Skip to content

Commit

Permalink
Merge branch 'main' into 847-fix-ion-tooltip-should-close-when-user-s…
Browse files Browse the repository at this point in the history
…crolls-the-page
  • Loading branch information
allan-chagas-brisa authored Sep 27, 2023
2 parents 9ed5732 + db46be3 commit 0e76159
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions projects/ion/src/lib/button/button.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<ion-icon
*ngIf="options"
[type]="showDropdown ? 'semi-up' : 'semi-down'"
[size]="iconSize"
class="icon"
></ion-icon>
<ng-container *ngIf="!circularButton && label">
Expand Down
4 changes: 4 additions & 0 deletions projects/ion/src/lib/icon/svgs/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ import {
move,
zoomOut,
hand,
orderNumber1,
orderNumber2,
} from './iconsText';

// To add an icon, use kebab-case on key name and insert only SVG paths on value
Expand Down Expand Up @@ -590,6 +592,8 @@ export const iconsPaths: Record<string, string> = {
'order-generic': orderGeneric,
'order-letter1': orderLetter1,
'order-letter2': orderLetter2,
'order-number1': orderNumber1,
'order-number2': orderNumber2,
'order-up': orderUp,
out,
passcode,
Expand Down
2 changes: 2 additions & 0 deletions projects/ion/src/lib/icon/svgs/iconsText/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ export { default as orderBottom } from './order-bottom';
export { default as orderGeneric } from './order-generic';
export { default as orderLetter1 } from './order-letter1';
export { default as orderLetter2 } from './order-letter2';
export { default as orderNumber1 } from './order-number1';
export { default as orderNumber2 } from './order-number2';
export { default as orderUp } from './order-up';
export { default as out } from './out';
export { default as passcode } from './passcode';
Expand Down
3 changes: 3 additions & 0 deletions projects/ion/src/lib/icon/svgs/iconsText/order-number1.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default `<path d="M7.66261 3.24988C7.48621 3.0944 7.25416 3 7.00001 3C6.74598 3 6.51392 3.0944 6.33753 3.24988C6.31056 3.27364 6.2848 3.29896 6.26038 3.32573C6.25111 3.33585 6.24207 3.34619 6.23328 3.35667C6.21937 3.37321 6.20594 3.39019 6.19312 3.40761L3.20008 7.38179C2.86866 7.8218 2.95826 8.44601 3.40003 8.776C3.84193 9.10602 4.46864 9.01685 4.80006 8.57684L6.00001 6.98345V19.9297C6.00001 20.4797 6.44776 20.9255 7.00001 20.9255C7.55238 20.9255 8.00001 20.4797 8.00001 19.9297V6.98345L9.20008 8.57684C9.53138 9.01685 10.1582 9.10602 10.6001 8.776C11.0419 8.44601 11.1315 7.8218 10.8001 7.38179L7.80702 3.40764C7.78553 3.37834 7.76234 3.35026 7.7378 3.32352C7.71388 3.29756 7.68885 3.27301 7.66261 3.24988Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M21 6.98345C21 9.18346 19.6569 10.9669 18 10.9669C16.3431 10.9669 15 9.18346 15 6.98345C15 4.78345 16.3431 3 18 3C19.6569 3 21 4.78345 21 6.98345ZM19 6.98345C19 7.69418 18.7805 8.26095 18.5213 8.60515C18.2626 8.94873 18.0578 8.97518 18 8.97518C17.9422 8.97518 17.7374 8.94873 17.4787 8.60515C17.2195 8.26095 17 7.69418 17 6.98345C17 6.27273 17.2195 5.70596 17.4787 5.36176C17.7374 5.01818 17.9422 4.99173 18 4.99173C18.0578 4.99173 18.2626 5.01818 18.5213 5.36176C18.7805 5.70596 19 6.27273 19 6.98345Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 11.9628C19.6039 11.9628 20.9138 13.2162 20.9959 14.7931H21V17.5886C21 18.3632 20.7353 19.1147 20.2494 19.7196C19.0936 21.1583 16.9995 21.4231 15.5194 20.3176L15.4 20.2284C14.9582 19.8984 14.8686 19.2742 15.2 18.8342C15.5314 18.3942 16.1582 18.3051 16.6 18.6351L16.7194 18.7242C17.3353 19.1842 18.2067 19.0741 18.6877 18.4754C18.8512 18.2718 18.9545 18.0283 18.988 17.7721C18.6786 17.8796 18.3462 17.938 18 17.938C16.3431 17.938 15 16.6004 15 14.9504C15 13.3004 16.3431 11.9628 18 11.9628ZM19 14.9504C19 15.5004 18.5523 15.9462 18 15.9462C17.4477 15.9462 17 15.5004 17 14.9504C17 14.4004 17.4477 13.9545 18 13.9545C18.5523 13.9545 19 14.4004 19 14.9504Z"/>`;
3 changes: 3 additions & 0 deletions projects/ion/src/lib/icon/svgs/iconsText/order-number2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default `<path d="M6.33753 20.6757C6.51392 20.8312 6.74598 20.9255 7.00013 20.9255C7.25416 20.9255 7.48621 20.8312 7.6626 20.6757C7.68958 20.6519 7.71534 20.6266 7.73975 20.5998C7.74903 20.5897 7.75806 20.5794 7.76685 20.5689C7.78077 20.5523 7.79419 20.5354 7.80701 20.5179L10.8001 16.5438C11.1315 16.1037 11.0419 15.4795 10.6001 15.1495C10.1582 14.8195 9.5315 14.9087 9.20008 15.3487L8.00013 16.9421L8.00013 3.99586C8.00013 3.44587 7.55237 3 7.00013 3C6.44776 3 6.00013 3.44587 6.00013 3.99586L6.00013 16.9421L4.80006 15.3487C4.46876 14.9087 3.84193 14.8195 3.40003 15.1495C2.95826 15.4795 2.86866 16.1037 3.20008 16.5438L6.19312 20.5179C6.21461 20.5472 6.2378 20.5753 6.26233 20.602C6.28626 20.628 6.31128 20.6525 6.33753 20.6757Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M21 6.98345C21 9.18346 19.6569 10.9669 18 10.9669C16.3432 10.9669 15 9.18346 15 6.98345C15 4.78345 16.3432 3 18 3C19.6569 3 21 4.78345 21 6.98345ZM19 6.98345C19 7.69418 18.7805 8.26095 18.5213 8.60515C18.2626 8.94873 18.0578 8.97518 18 8.97518C17.9422 8.97518 17.7374 8.94873 17.4787 8.60515C17.2195 8.26095 17 7.69418 17 6.98345C17 6.27273 17.2195 5.70596 17.4787 5.36176C17.7374 5.01818 17.9422 4.99173 18 4.99173C18.0578 4.99173 18.2626 5.01818 18.5213 5.36176C18.7805 5.70596 19 6.27273 19 6.98345Z"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M18 11.9628C19.6039 11.9628 20.9138 13.2162 20.9959 14.7931H21V17.5886C21 18.3632 20.7353 19.1147 20.2494 19.7196C19.0936 21.1583 16.9995 21.4231 15.5194 20.3176L15.4 20.2284C14.9582 19.8984 14.8686 19.2742 15.2 18.8342C15.5314 18.3942 16.1582 18.3051 16.6 18.6351L16.7194 18.7242C17.3353 19.1842 18.2067 19.0741 18.6877 18.4754C18.8512 18.2718 18.9545 18.0283 18.988 17.7721C18.6786 17.8796 18.3462 17.938 18 17.938C16.3432 17.938 15 16.6004 15 14.9504C15 13.3004 16.3432 11.9628 18 11.9628ZM19 14.9504C19 15.5004 18.5523 15.9462 18 15.9462C17.4477 15.9462 17 15.5004 17 14.9504C17 14.4004 17.4477 13.9545 18 13.9545C18.5523 13.9545 19 14.4004 19 14.9504Z"/>`;
16 changes: 16 additions & 0 deletions stories/Button.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ O Ion, Suporta 4 tamanhos padrões para botões. Basta configurar a propriedade
</Story>
</Canvas>

- `options`. Habilita o dropdown no IonButton.
- `dropdownConfig`. Possibilita configurar o dropdown, ao repassar as propriedades `required` e `notShowClearButton`.

<Canvas>
<Story
name="with dropdown"
Expand All @@ -264,6 +267,19 @@ O Ion, Suporta 4 tamanhos padrões para botões. Basta configurar a propriedade
}}
secondary
</Story>
<Story
name="with dropdown"
decorators={[
moduleMetadata({
imports: [CommonModule, IonSharedModule],
}),
]}
>
{{
template: `<ion-button label="Primary" [options]="[{ label: 'option 1' }, {label: 'option 2'}]" [dropdownConfig]="{required: true}"></ion-button>`,
}}
secondary
</Story>
<Story
name="with dropdown : multiple choices"
decorators={[
Expand Down

0 comments on commit 0e76159

Please sign in to comment.