@dubai-design-system/components-js 5.0.3 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +233 -1
- package/MIGRATION.md +423 -0
- package/dist/cjs/dda-accordion.cjs.entry.js +12 -7
- package/dist/cjs/dda-alert.cjs.entry.js +20 -3
- package/dist/cjs/dda-attach-file.cjs.entry.js +24 -8
- package/dist/cjs/dda-avatar.cjs.entry.js +23 -12
- package/dist/cjs/dda-banner.cjs.entry.js +14 -5
- package/dist/cjs/dda-breadcrumb.cjs.entry.js +22 -10
- package/dist/cjs/dda-button.cjs.entry.js +16 -9
- package/dist/cjs/dda-checkbox.cjs.entry.js +5 -4
- package/dist/cjs/dda-chip.cjs.entry.js +8 -3
- package/dist/cjs/dda-credit-card.cjs.entry.js +5 -3
- package/dist/cjs/dda-creditcard-field.cjs.entry.js +26 -8
- package/dist/cjs/dda-dropdown.cjs.entry.js +31 -5
- package/dist/cjs/dda-footer.cjs.entry.js +9 -3
- package/dist/cjs/dda-header.cjs.entry.js +88 -8
- package/dist/cjs/dda-home-banner.cjs.entry.js +11 -5
- package/dist/cjs/dda-horizontal-stepper.cjs.entry.js +22 -5
- package/dist/cjs/dda-input.cjs.entry.js +17 -10
- package/dist/cjs/dda-link-button_2.cjs.entry.js +21 -13
- package/dist/cjs/dda-number-field.cjs.entry.js +20 -8
- package/dist/cjs/dda-pagination.cjs.entry.js +21 -11
- package/dist/cjs/dda-phonefield.cjs.entry.js +27 -9
- package/dist/cjs/dda-progressbar.cjs.entry.js +8 -3
- package/dist/cjs/dda-range-slider.cjs.entry.js +15 -3
- package/dist/cjs/dda-search-input.cjs.entry.js +27 -12
- package/dist/cjs/dda-segmented-tabs.cjs.entry.js +54 -6
- package/dist/cjs/dda-select.cjs.entry.js +40 -8
- package/dist/cjs/dda-sticky-footer.cjs.entry.js +20 -3
- package/dist/cjs/dda-tabs.cjs.entry.js +10 -4
- package/dist/cjs/dda-textarea.cjs.entry.js +22 -12
- package/dist/cjs/dda-toggle.cjs.entry.js +5 -4
- package/dist/cjs/dda-tooltip.cjs.entry.js +6 -4
- package/dist/cjs/dda-ui-card.cjs.entry.js +19 -2
- package/dist/cjs/dda-vertical-stepper.cjs.entry.js +23 -3
- package/dist/cjs/dda.cjs.js +2 -2
- package/dist/cjs/index-Bgd2iAET.js +2116 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/unique-id-DahNGdQy.js +14 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/dda-accordion/dda-accordion.js +16 -11
- package/dist/collection/components/dda-alert/dda-alert.js +74 -17
- package/dist/collection/components/dda-alert/dda-alert.stories.js +2 -8
- package/dist/collection/components/dda-attach-file/dda-attach-file.js +35 -19
- package/dist/collection/components/dda-attach-file/dda-attach-file.stories.js +0 -9
- package/dist/collection/components/dda-avatar/dda-avatar.js +53 -25
- package/dist/collection/components/dda-avatar/dda-avatar.stories.js +1 -1
- package/dist/collection/components/dda-banner/dda-banner.css +35 -0
- package/dist/collection/components/dda-banner/dda-banner.js +34 -5
- package/dist/collection/components/dda-breadcrumb/dda-breadcrumb.js +49 -12
- package/dist/collection/components/dda-button/dda-button.js +29 -22
- package/dist/collection/components/dda-checkbox/dda-checkbox.css +13 -0
- package/dist/collection/components/dda-checkbox/dda-checkbox.js +13 -12
- package/dist/collection/components/dda-checkbox/dda-checkbox.stories.js +0 -11
- package/dist/collection/components/dda-chip/dda-chip.js +34 -9
- package/dist/collection/components/dda-chip/dda-chip.stories.js +0 -11
- package/dist/collection/components/dda-credit-card/dda-credit-card.js +10 -8
- package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.js +58 -23
- package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.stories.js +1 -10
- package/dist/collection/components/dda-dropdown/dda-dropdown.js +90 -18
- package/dist/collection/components/dda-dropdown/dda-dropdown.stories.js +0 -4
- package/dist/collection/components/dda-footer/dda-footer.js +57 -10
- package/dist/collection/components/dda-footer/dda-footer.stories.js +5 -4
- package/dist/collection/components/dda-header/dda-header.css +11 -0
- package/dist/collection/components/dda-header/dda-header.js +232 -37
- package/dist/collection/components/dda-header/dda-header.stories.js +12 -21
- package/dist/collection/components/dda-home-banner/dda-home-banner.js +8 -2
- package/dist/collection/components/dda-home-banner/home-banner.css +23 -2
- package/dist/collection/components/dda-input/dda-input.js +47 -21
- package/dist/collection/components/dda-input/dda-input.stories.js +0 -13
- package/dist/collection/components/dda-link-button/dda-link-button.js +30 -23
- package/dist/collection/components/dda-number-field/dda-number-field.js +54 -22
- package/dist/collection/components/dda-number-field/dda-number-field.stories.js +0 -9
- package/dist/collection/components/dda-pagination/dda-pagination.js +95 -28
- package/dist/collection/components/dda-pagination/dda-pagination.stories.js +24 -24
- package/dist/collection/components/dda-phonefield/dda-phonefield.js +62 -24
- package/dist/collection/components/dda-phonefield/dda-phonefield.stories.js +0 -13
- package/dist/collection/components/dda-progressbar/dda-progressbar.js +13 -8
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +156 -25
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.js +13 -12
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.stories.js +5 -16
- package/dist/collection/components/dda-range-slider/dda-range-slider.js +29 -17
- package/dist/collection/components/dda-search-input/dda-search-input.js +61 -26
- package/dist/collection/components/dda-search-input/dda-search-input.stories.js +0 -9
- package/dist/collection/components/dda-select/dda-select.js +78 -20
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +80 -43
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.stories.js +1 -1
- package/dist/collection/components/dda-tabs/dda-tabs.js +21 -15
- package/dist/collection/components/dda-tabs/dda-tabs.stories.js +3 -10
- package/dist/collection/components/dda-textarea/dda-textarea.js +33 -23
- package/dist/collection/components/dda-textarea/dda-textarea.stories.js +0 -9
- package/dist/collection/components/dda-toggle/dda-toggle.css +9 -0
- package/dist/collection/components/dda-toggle/dda-toggle.js +47 -8
- package/dist/collection/components/dda-toggle/dda-toggle.stories.js +10 -22
- package/dist/collection/components/dda-tooltip/dda-tooltip.js +9 -7
- package/dist/collection/components/dda-ui-card/dda-ui-card.js +55 -13
- package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.js +79 -11
- package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.css +4 -1
- package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.js +24 -6
- package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.stories.js +2 -2
- package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.js +49 -6
- package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.stories.js +2 -2
- package/dist/collection/global/global.css +152 -25
- package/dist/collection/global/input.css +56 -2
- package/dist/collection/storybook/component-api.js +15 -0
- package/dist/collection/utils/placeholder-color.js +89 -0
- package/dist/collection/utils/unique-id.js +10 -0
- package/dist/components/dda-accordion.js +1 -1
- package/dist/components/dda-alert.js +1 -1
- package/dist/components/dda-attach-file.js +1 -1
- package/dist/components/dda-avatar.js +1 -1
- package/dist/components/dda-banner.js +1 -1
- package/dist/components/dda-breadcrumb.js +1 -1
- package/dist/components/dda-button.js +1 -1
- package/dist/components/dda-checkbox.js +1 -1
- package/dist/components/dda-chip.js +1 -1
- package/dist/components/dda-credit-card.js +1 -1
- package/dist/components/dda-creditcard-field.js +1 -1
- package/dist/components/dda-dropdown.js +1 -1
- package/dist/components/dda-footer.js +1 -1
- package/dist/components/dda-header.js +1 -1
- package/dist/components/dda-home-banner.js +1 -1
- package/dist/components/dda-horizontal-stepper.js +1 -1
- package/dist/components/dda-input.js +1 -1
- package/dist/components/dda-link-button.js +1 -1
- package/dist/components/dda-number-field.js +1 -1
- package/dist/components/dda-pagination.js +1 -1
- package/dist/components/dda-phonefield.js +1 -1
- package/dist/components/dda-progressbar.js +1 -1
- package/dist/components/dda-radiobutton.js +1 -1
- package/dist/components/dda-range-slider.js +1 -1
- package/dist/components/dda-search-input.js +1 -1
- package/dist/components/dda-segmented-tabs.js +1 -1
- package/dist/components/dda-select.js +1 -1
- package/dist/components/dda-sticky-footer.js +1 -1
- package/dist/components/dda-tabs.js +1 -1
- package/dist/components/dda-textarea.js +1 -1
- package/dist/components/dda-toggle.js +1 -1
- package/dist/components/dda-tooltip.js +1 -1
- package/dist/components/dda-ui-card.js +1 -1
- package/dist/components/dda-vertical-stepper.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-B-I003EB.js +1 -0
- package/dist/components/p-Bc2V1U4_.js +1 -0
- package/dist/components/p-Bzqf-PpF.js +1 -0
- package/dist/components/p-D-CHT-as.js +1 -0
- package/dist/components/p-DJw8qV7U.js +1 -0
- package/dist/components/p-DpwQ9sGp.js +1 -0
- package/dist/dda/dda.css +2 -2
- package/dist/dda/dda.esm.js +1 -1
- package/dist/dda/p-03400387.entry.js +1 -0
- package/dist/dda/p-04bcda8a.entry.js +1 -0
- package/dist/dda/p-18a3d7b1.entry.js +1 -0
- package/dist/dda/p-1f7b8486.entry.js +1 -0
- package/dist/dda/p-3024288f.entry.js +1 -0
- package/dist/dda/p-41b8ed7d.entry.js +1 -0
- package/dist/dda/p-56f60336.entry.js +1 -0
- package/dist/dda/p-65776d80.entry.js +1 -0
- package/dist/dda/p-73611084.entry.js +1 -0
- package/dist/dda/p-7ad8cde9.entry.js +1 -0
- package/dist/dda/p-8134e59d.entry.js +1 -0
- package/dist/dda/p-8494fd9e.entry.js +1 -0
- package/dist/dda/p-876d55b2.entry.js +1 -0
- package/dist/dda/p-88d884a8.entry.js +1 -0
- package/dist/dda/p-8b25ae94.entry.js +1 -0
- package/dist/dda/p-8f376986.entry.js +1 -0
- package/dist/dda/p-90019b80.entry.js +1 -0
- package/dist/dda/p-92fa4777.entry.js +1 -0
- package/dist/dda/p-97431faf.entry.js +1 -0
- package/dist/dda/p-B-I003EB.js +1 -0
- package/dist/dda/p-D6L6zgH9.js +2 -0
- package/dist/dda/p-a5456de2.entry.js +1 -0
- package/dist/dda/p-aa7b4c13.entry.js +1 -0
- package/dist/dda/p-ad40eb27.entry.js +1 -0
- package/dist/dda/p-c055f0d2.entry.js +1 -0
- package/dist/dda/p-c42c8733.entry.js +1 -0
- package/dist/dda/p-c77282be.entry.js +1 -0
- package/dist/dda/p-ca64abe6.entry.js +1 -0
- package/dist/dda/p-ceca8088.entry.js +1 -0
- package/dist/dda/p-d6786b43.entry.js +1 -0
- package/dist/dda/p-e2113e42.entry.js +1 -0
- package/dist/dda/p-ee862207.entry.js +1 -0
- package/dist/dda/p-ef38e28b.entry.js +1 -0
- package/dist/dda/p-f43fb910.entry.js +1 -0
- package/dist/dda/p-fb4db977.entry.js +1 -0
- package/dist/esm/dda-accordion.entry.js +12 -7
- package/dist/esm/dda-alert.entry.js +20 -3
- package/dist/esm/dda-attach-file.entry.js +24 -8
- package/dist/esm/dda-avatar.entry.js +23 -12
- package/dist/esm/dda-banner.entry.js +14 -5
- package/dist/esm/dda-breadcrumb.entry.js +22 -10
- package/dist/esm/dda-button.entry.js +16 -9
- package/dist/esm/dda-checkbox.entry.js +5 -4
- package/dist/esm/dda-chip.entry.js +8 -3
- package/dist/esm/dda-credit-card.entry.js +5 -3
- package/dist/esm/dda-creditcard-field.entry.js +26 -8
- package/dist/esm/dda-dropdown.entry.js +31 -5
- package/dist/esm/dda-footer.entry.js +9 -3
- package/dist/esm/dda-header.entry.js +88 -8
- package/dist/esm/dda-home-banner.entry.js +11 -5
- package/dist/esm/dda-horizontal-stepper.entry.js +22 -5
- package/dist/esm/dda-input.entry.js +17 -10
- package/dist/esm/dda-link-button_2.entry.js +21 -13
- package/dist/esm/dda-number-field.entry.js +20 -8
- package/dist/esm/dda-pagination.entry.js +21 -11
- package/dist/esm/dda-phonefield.entry.js +27 -9
- package/dist/esm/dda-progressbar.entry.js +8 -3
- package/dist/esm/dda-range-slider.entry.js +15 -3
- package/dist/esm/dda-search-input.entry.js +27 -12
- package/dist/esm/dda-segmented-tabs.entry.js +54 -6
- package/dist/esm/dda-select.entry.js +40 -8
- package/dist/esm/dda-sticky-footer.entry.js +20 -3
- package/dist/esm/dda-tabs.entry.js +10 -4
- package/dist/esm/dda-textarea.entry.js +22 -12
- package/dist/esm/dda-toggle.entry.js +5 -4
- package/dist/esm/dda-tooltip.entry.js +6 -4
- package/dist/esm/dda-ui-card.entry.js +19 -2
- package/dist/esm/dda-vertical-stepper.entry.js +23 -3
- package/dist/esm/dda.js +3 -3
- package/dist/esm/index-D6L6zgH9.js +2106 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/unique-id-B-I003EB.js +12 -0
- package/dist/types/components/dda-accordion/dda-accordion.d.ts +6 -0
- package/dist/types/components/dda-alert/dda-alert.d.ts +21 -0
- package/dist/types/components/dda-attach-file/dda-attach-file.d.ts +17 -0
- package/dist/types/components/dda-attach-file/dda-attach-file.stories.d.ts +0 -4
- package/dist/types/components/dda-avatar/dda-avatar.d.ts +20 -0
- package/dist/types/components/dda-banner/dda-banner.d.ts +5 -0
- package/dist/types/components/dda-breadcrumb/dda-breadcrumb.d.ts +12 -6
- package/dist/types/components/dda-button/dda-button.d.ts +15 -4
- package/dist/types/components/dda-checkbox/dda-checkbox.d.ts +11 -0
- package/dist/types/components/dda-checkbox/dda-checkbox.stories.d.ts +0 -10
- package/dist/types/components/dda-chip/dda-chip.d.ts +10 -0
- package/dist/types/components/dda-chip/dda-chip.stories.d.ts +0 -6
- package/dist/types/components/dda-credit-card/dda-credit-card.d.ts +7 -0
- package/dist/types/components/dda-creditcard-field/dda-creditcard-field.d.ts +24 -0
- package/dist/types/components/dda-creditcard-field/dda-creditcard-field.stories.d.ts +0 -6
- package/dist/types/components/dda-dropdown/dda-dropdown.d.ts +25 -0
- package/dist/types/components/dda-dropdown/dda-dropdown.stories.d.ts +0 -4
- package/dist/types/components/dda-footer/dda-footer.d.ts +13 -0
- package/dist/types/components/dda-header/dda-header.d.ts +62 -0
- package/dist/types/components/dda-header/dda-header.stories.d.ts +6 -0
- package/dist/types/components/dda-home-banner/dda-home-banner.d.ts +1 -0
- package/dist/types/components/dda-input/dda-input.d.ts +18 -0
- package/dist/types/components/dda-input/dda-input.stories.d.ts +0 -6
- package/dist/types/components/dda-link-button/dda-link-button.d.ts +14 -3
- package/dist/types/components/dda-number-field/dda-number-field.d.ts +21 -0
- package/dist/types/components/dda-number-field/dda-number-field.stories.d.ts +0 -6
- package/dist/types/components/dda-pagination/dda-pagination.d.ts +26 -0
- package/dist/types/components/dda-phonefield/dda-phonefield.d.ts +21 -0
- package/dist/types/components/dda-phonefield/dda-phonefield.stories.d.ts +0 -6
- package/dist/types/components/dda-progressbar/dda-progressbar.d.ts +7 -0
- package/dist/types/components/dda-radiobutton/dda-radiobutton.d.ts +11 -0
- package/dist/types/components/dda-radiobutton/dda-radiobutton.stories.d.ts +5 -15
- package/dist/types/components/dda-range-slider/dda-range-slider.d.ts +16 -0
- package/dist/types/components/dda-search-input/dda-search-input.d.ts +21 -0
- package/dist/types/components/dda-search-input/dda-search-input.stories.d.ts +0 -6
- package/dist/types/components/dda-select/dda-select.d.ts +23 -0
- package/dist/types/components/dda-sticky-footer/dda-sticky-footer.d.ts +46 -3
- package/dist/types/components/dda-tabs/dda-tabs.d.ts +12 -1
- package/dist/types/components/dda-tabs/dda-tabs.stories.d.ts +0 -4
- package/dist/types/components/dda-textarea/dda-textarea.d.ts +16 -0
- package/dist/types/components/dda-textarea/dda-textarea.stories.d.ts +0 -6
- package/dist/types/components/dda-toggle/dda-toggle.d.ts +11 -0
- package/dist/types/components/dda-toggle/dda-toggle.stories.d.ts +2 -12
- package/dist/types/components/dda-tooltip/dda-tooltip.d.ts +5 -0
- package/dist/types/components/dda-ui-card/dda-ui-card.d.ts +13 -1
- package/dist/types/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.d.ts +19 -2
- package/dist/types/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.d.ts +6 -0
- package/dist/types/components/stepper/dda-vertical-stepper/dda-vertical-stepper.d.ts +8 -0
- package/dist/types/components.d.ts +2373 -38
- package/dist/types/utils/placeholder-color.d.ts +10 -0
- package/dist/types/utils/unique-id.d.ts +6 -0
- package/package.json +4 -3
- package/readme.md +6 -0
- package/dist/cjs/index-CDUC0Pdj.js +0 -1986
- package/dist/components/p-9UeqjDnY.js +0 -1
- package/dist/components/p-CrTEb7xH.js +0 -1
- package/dist/components/p-DldlmGnP.js +0 -1
- package/dist/components/p-NvTw9Mx1.js +0 -1
- package/dist/components/p-i15-_er0.js +0 -1
- package/dist/dda/p-016e4090.entry.js +0 -1
- package/dist/dda/p-0229b303.entry.js +0 -1
- package/dist/dda/p-05a6f90d.entry.js +0 -1
- package/dist/dda/p-1c9a6035.entry.js +0 -1
- package/dist/dda/p-2c313105.entry.js +0 -1
- package/dist/dda/p-2cec7be6.entry.js +0 -1
- package/dist/dda/p-2f4ace4c.entry.js +0 -1
- package/dist/dda/p-360a0577.entry.js +0 -1
- package/dist/dda/p-3e49128d.entry.js +0 -1
- package/dist/dda/p-3fa27728.entry.js +0 -1
- package/dist/dda/p-43e1c12f.entry.js +0 -1
- package/dist/dda/p-4428417d.entry.js +0 -1
- package/dist/dda/p-44ce832e.entry.js +0 -1
- package/dist/dda/p-560a3f0c.entry.js +0 -1
- package/dist/dda/p-5712bbd9.entry.js +0 -1
- package/dist/dda/p-626d7e7b.entry.js +0 -1
- package/dist/dda/p-68008c64.entry.js +0 -1
- package/dist/dda/p-6f3d9f78.entry.js +0 -1
- package/dist/dda/p-79db1218.entry.js +0 -1
- package/dist/dda/p-84911fab.entry.js +0 -1
- package/dist/dda/p-90d9648b.entry.js +0 -1
- package/dist/dda/p-91040abe.entry.js +0 -1
- package/dist/dda/p-Cq6A4mXg.js +0 -2
- package/dist/dda/p-a1421a54.entry.js +0 -1
- package/dist/dda/p-a22b1c56.entry.js +0 -1
- package/dist/dda/p-aa0e9035.entry.js +0 -1
- package/dist/dda/p-b2981646.entry.js +0 -1
- package/dist/dda/p-c1f45887.entry.js +0 -1
- package/dist/dda/p-c50e1141.entry.js +0 -1
- package/dist/dda/p-d8a9cab1.entry.js +0 -1
- package/dist/dda/p-dd966009.entry.js +0 -1
- package/dist/dda/p-ed099201.entry.js +0 -1
- package/dist/dda/p-f4bd2b2e.entry.js +0 -1
- package/dist/dda/p-fc30c60e.entry.js +0 -1
- package/dist/esm/index-Cq6A4mXg.js +0 -1976
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class DdaBreadcrumb {
|
|
3
3
|
constructor() {
|
|
4
|
-
|
|
5
|
-
this.
|
|
4
|
+
/** What each item shows: `text` (label only), `icon-text` (icon and label) or `icon` (icon only). */
|
|
5
|
+
this.design = 'text';
|
|
6
|
+
/** Material Symbols icon shown between items: `chevron_right` or `pen_size_2` (a slash). */
|
|
7
|
+
this.separator = 'chevron_right';
|
|
8
|
+
/** Extra CSS classes added to the inner `<nav>`. */
|
|
6
9
|
this.custom_class = '';
|
|
7
|
-
this.breadcrumbs = [];
|
|
8
10
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
parseBreadcrumbs() {
|
|
12
|
+
var _a;
|
|
13
|
+
const source = (_a = this.breadcrumbs) !== null && _a !== void 0 ? _a : this.el.getAttribute('data-breadcrumbs');
|
|
14
|
+
if (!source)
|
|
15
|
+
return [];
|
|
16
|
+
if (Array.isArray(source))
|
|
17
|
+
return source;
|
|
18
|
+
try {
|
|
19
|
+
const parsed = JSON.parse(source);
|
|
20
|
+
return Array.isArray(parsed) ? parsed : [];
|
|
21
|
+
}
|
|
22
|
+
catch (_b) {
|
|
23
|
+
return [];
|
|
13
24
|
}
|
|
14
25
|
}
|
|
15
26
|
render() {
|
|
16
|
-
|
|
27
|
+
const breadcrumbs = this.parseBreadcrumbs();
|
|
28
|
+
return (h(Host, { key: '87d47d41d1da4d9bac28cbea4136a2b22728b6ee' }, h("div", { key: '038c176e93c24c117fdc50e4245c503adbaf65dc', class: this.component_mode }, h("nav", { key: '36a47a1d0e908d5ce10757051f00a723e867cf92', "aria-label": "breadcrumb", class: `${this.custom_class}` }, h("ol", { key: 'c1ef97d3a64e0cf56f9ee1b2e9561c5d5d7cb300', class: "dda-breadcrumb" }, breadcrumbs.map((crumb, index) => (h("li", { class: `dda-breadcrumb-item ${index === breadcrumbs.length - 1 ? 'active' : ''}` }, h("a", { href: crumb.url }, this.design !== 'text' && h("i", { class: `material-icons` }, crumb.icon), this.design !== 'icon' && h("span", null, crumb.text)), index < breadcrumbs.length - 1 && (h("i", { class: `material-icons material-symbols-outlined` }, this.separator))))))))));
|
|
17
29
|
}
|
|
18
30
|
static get is() { return "dda-breadcrumb"; }
|
|
19
31
|
static get originalStyleUrls() {
|
|
@@ -40,7 +52,7 @@ export class DdaBreadcrumb {
|
|
|
40
52
|
"optional": false,
|
|
41
53
|
"docs": {
|
|
42
54
|
"tags": [],
|
|
43
|
-
"text": ""
|
|
55
|
+
"text": "What each item shows: `text` (label only), `icon-text` (icon and label) or `icon` (icon only)."
|
|
44
56
|
},
|
|
45
57
|
"getter": false,
|
|
46
58
|
"setter": false,
|
|
@@ -60,7 +72,7 @@ export class DdaBreadcrumb {
|
|
|
60
72
|
"optional": false,
|
|
61
73
|
"docs": {
|
|
62
74
|
"tags": [],
|
|
63
|
-
"text": ""
|
|
75
|
+
"text": "Material Symbols icon shown between items: `chevron_right` or `pen_size_2` (a slash)."
|
|
64
76
|
},
|
|
65
77
|
"getter": false,
|
|
66
78
|
"setter": false,
|
|
@@ -80,7 +92,7 @@ export class DdaBreadcrumb {
|
|
|
80
92
|
"optional": true,
|
|
81
93
|
"docs": {
|
|
82
94
|
"tags": [],
|
|
83
|
-
"text": ""
|
|
95
|
+
"text": "Extra CSS classes added to the inner `<nav>`."
|
|
84
96
|
},
|
|
85
97
|
"getter": false,
|
|
86
98
|
"setter": false,
|
|
@@ -100,12 +112,37 @@ export class DdaBreadcrumb {
|
|
|
100
112
|
"optional": true,
|
|
101
113
|
"docs": {
|
|
102
114
|
"tags": [],
|
|
103
|
-
"text": ""
|
|
115
|
+
"text": "Theme override class on the wrapper, e.g. `light-mode`."
|
|
104
116
|
},
|
|
105
117
|
"getter": false,
|
|
106
118
|
"setter": false,
|
|
107
119
|
"reflect": false,
|
|
108
120
|
"attribute": "component_mode"
|
|
121
|
+
},
|
|
122
|
+
"breadcrumbs": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "string | BreadcrumbItem[]",
|
|
127
|
+
"resolved": "BreadcrumbItem[] | string",
|
|
128
|
+
"references": {
|
|
129
|
+
"BreadcrumbItem": {
|
|
130
|
+
"location": "local",
|
|
131
|
+
"path": "/root/Coding/dubai-design-system/packages/stencil/src/components/dda-breadcrumb/dda-breadcrumb.tsx",
|
|
132
|
+
"id": "src/components/dda-breadcrumb/dda-breadcrumb.tsx::BreadcrumbItem"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": false,
|
|
137
|
+
"optional": true,
|
|
138
|
+
"docs": {
|
|
139
|
+
"tags": [],
|
|
140
|
+
"text": "The items, as an array or a JSON string of `{ text, icon?, url? }` objects. The last item is the current page. The `data-breadcrumbs` attribute is still read when this is not set."
|
|
141
|
+
},
|
|
142
|
+
"getter": false,
|
|
143
|
+
"setter": false,
|
|
144
|
+
"reflect": false,
|
|
145
|
+
"attribute": "breadcrumbs"
|
|
109
146
|
}
|
|
110
147
|
};
|
|
111
148
|
}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
2
|
export class DdaButton {
|
|
3
3
|
constructor() {
|
|
4
|
-
/**
|
|
4
|
+
/** Native button type: `button`, `submit` or `reset`. */
|
|
5
5
|
this.type = 'button';
|
|
6
|
-
/**
|
|
6
|
+
/** Disables the button. */
|
|
7
7
|
this.disabled = false;
|
|
8
|
-
/**
|
|
8
|
+
/** Material Symbols icon name shown before the label, e.g. `arrow_back`. */
|
|
9
9
|
this.start_icon = '';
|
|
10
|
-
|
|
10
|
+
/** Material Symbols icon name shown after the label, e.g. `arrow_forward`. */
|
|
11
|
+
this.end_icon = '';
|
|
12
|
+
/** Accessible name. Required when the button shows only an icon. */
|
|
11
13
|
this.aria_label = '';
|
|
12
|
-
|
|
14
|
+
/** Color variant, e.g. `default-primary`, `default-secondary`, `error-primary`, `onsurface-link`. */
|
|
15
|
+
this.button_color = 'primary';
|
|
16
|
+
/** Shape: `default` or `circle`. */
|
|
13
17
|
this.button_shape = '';
|
|
18
|
+
/** Shape of an icon-only button: `default` or `circle`. */
|
|
14
19
|
this.icon_button_shape = '';
|
|
15
|
-
|
|
20
|
+
/** Extra CSS classes added to the inner `<button>`. */
|
|
21
|
+
this.custom_class = '';
|
|
22
|
+
/** `name` of the inner `<button>`, submitted with its form. */
|
|
16
23
|
this.button_name = '';
|
|
17
24
|
}
|
|
18
25
|
render() {
|
|
@@ -26,7 +33,7 @@ export class DdaButton {
|
|
|
26
33
|
this.custom_class, // Include custom class
|
|
27
34
|
this.component_mode,
|
|
28
35
|
].filter(Boolean).join(' ');
|
|
29
|
-
return (h(Host, { key: '
|
|
36
|
+
return (h(Host, { key: '25a967630460899e8083499dbaba5a8da655c03d' }, h("button", { key: 'cffeab56005fd6f9c736f7a4f2615c273fbff6d2', id: this.button_id, type: this.type, class: buttonClass, disabled: this.disabled, "aria-label": this.aria_label, onClick: this.clickHandler, name: this.button_name }, this.start_icon && h("i", { key: '7e91f590471e16e74128d5edfd149935f7c7933b', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, this.start_icon), h("slot", { key: '3f135fe5fdce6e4cc46626285d40b6859f95c213' }), this.end_icon && h("i", { key: 'd1ea77fa05a58a354b7c8c365d01196d624407c6', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, this.end_icon))));
|
|
30
37
|
}
|
|
31
38
|
static get is() { return "dda-button"; }
|
|
32
39
|
static get originalStyleUrls() {
|
|
@@ -53,7 +60,7 @@ export class DdaButton {
|
|
|
53
60
|
"optional": false,
|
|
54
61
|
"docs": {
|
|
55
62
|
"tags": [],
|
|
56
|
-
"text": "
|
|
63
|
+
"text": "Native button type: `button`, `submit` or `reset`."
|
|
57
64
|
},
|
|
58
65
|
"getter": false,
|
|
59
66
|
"setter": false,
|
|
@@ -73,7 +80,7 @@ export class DdaButton {
|
|
|
73
80
|
"optional": false,
|
|
74
81
|
"docs": {
|
|
75
82
|
"tags": [],
|
|
76
|
-
"text": "
|
|
83
|
+
"text": "Disables the button."
|
|
77
84
|
},
|
|
78
85
|
"getter": false,
|
|
79
86
|
"setter": false,
|
|
@@ -93,7 +100,7 @@ export class DdaButton {
|
|
|
93
100
|
"optional": false,
|
|
94
101
|
"docs": {
|
|
95
102
|
"tags": [],
|
|
96
|
-
"text": "
|
|
103
|
+
"text": "Material Symbols icon name shown before the label, e.g. `arrow_back`."
|
|
97
104
|
},
|
|
98
105
|
"getter": false,
|
|
99
106
|
"setter": false,
|
|
@@ -113,7 +120,7 @@ export class DdaButton {
|
|
|
113
120
|
"optional": false,
|
|
114
121
|
"docs": {
|
|
115
122
|
"tags": [],
|
|
116
|
-
"text": ""
|
|
123
|
+
"text": "Material Symbols icon name shown after the label, e.g. `arrow_forward`."
|
|
117
124
|
},
|
|
118
125
|
"getter": false,
|
|
119
126
|
"setter": false,
|
|
@@ -133,7 +140,7 @@ export class DdaButton {
|
|
|
133
140
|
"optional": true,
|
|
134
141
|
"docs": {
|
|
135
142
|
"tags": [],
|
|
136
|
-
"text": ""
|
|
143
|
+
"text": "Accessible name. Required when the button shows only an icon."
|
|
137
144
|
},
|
|
138
145
|
"getter": false,
|
|
139
146
|
"setter": false,
|
|
@@ -153,7 +160,7 @@ export class DdaButton {
|
|
|
153
160
|
"optional": false,
|
|
154
161
|
"docs": {
|
|
155
162
|
"tags": [],
|
|
156
|
-
"text": ""
|
|
163
|
+
"text": "Color variant, e.g. `default-primary`, `default-secondary`, `error-primary`, `onsurface-link`."
|
|
157
164
|
},
|
|
158
165
|
"getter": false,
|
|
159
166
|
"setter": false,
|
|
@@ -173,7 +180,7 @@ export class DdaButton {
|
|
|
173
180
|
"optional": true,
|
|
174
181
|
"docs": {
|
|
175
182
|
"tags": [],
|
|
176
|
-
"text": ""
|
|
183
|
+
"text": "Size: `sm`, `md`, `lg` or `xl`."
|
|
177
184
|
},
|
|
178
185
|
"getter": false,
|
|
179
186
|
"setter": false,
|
|
@@ -192,7 +199,7 @@ export class DdaButton {
|
|
|
192
199
|
"optional": true,
|
|
193
200
|
"docs": {
|
|
194
201
|
"tags": [],
|
|
195
|
-
"text": ""
|
|
202
|
+
"text": "Shape: `default` or `circle`."
|
|
196
203
|
},
|
|
197
204
|
"getter": false,
|
|
198
205
|
"setter": false,
|
|
@@ -212,7 +219,7 @@ export class DdaButton {
|
|
|
212
219
|
"optional": true,
|
|
213
220
|
"docs": {
|
|
214
221
|
"tags": [],
|
|
215
|
-
"text": ""
|
|
222
|
+
"text": "Shape of an icon-only button: `default` or `circle`."
|
|
216
223
|
},
|
|
217
224
|
"getter": false,
|
|
218
225
|
"setter": false,
|
|
@@ -232,7 +239,7 @@ export class DdaButton {
|
|
|
232
239
|
"optional": true,
|
|
233
240
|
"docs": {
|
|
234
241
|
"tags": [],
|
|
235
|
-
"text": ""
|
|
242
|
+
"text": "Gap between icon and label, as a spacing step: 1\u20136, 8, 10, 12 or 16."
|
|
236
243
|
},
|
|
237
244
|
"getter": false,
|
|
238
245
|
"setter": false,
|
|
@@ -251,7 +258,7 @@ export class DdaButton {
|
|
|
251
258
|
"optional": true,
|
|
252
259
|
"docs": {
|
|
253
260
|
"tags": [],
|
|
254
|
-
"text": ""
|
|
261
|
+
"text": "Extra CSS classes added to the inner `<button>`."
|
|
255
262
|
},
|
|
256
263
|
"getter": false,
|
|
257
264
|
"setter": false,
|
|
@@ -271,7 +278,7 @@ export class DdaButton {
|
|
|
271
278
|
"optional": true,
|
|
272
279
|
"docs": {
|
|
273
280
|
"tags": [],
|
|
274
|
-
"text": ""
|
|
281
|
+
"text": "Theme override class for the button, e.g. `light-mode`."
|
|
275
282
|
},
|
|
276
283
|
"getter": false,
|
|
277
284
|
"setter": false,
|
|
@@ -290,7 +297,7 @@ export class DdaButton {
|
|
|
290
297
|
"optional": false,
|
|
291
298
|
"docs": {
|
|
292
299
|
"tags": [],
|
|
293
|
-
"text": ""
|
|
300
|
+
"text": "`id` of the inner `<button>`."
|
|
294
301
|
},
|
|
295
302
|
"getter": false,
|
|
296
303
|
"setter": false,
|
|
@@ -309,7 +316,7 @@ export class DdaButton {
|
|
|
309
316
|
"optional": true,
|
|
310
317
|
"docs": {
|
|
311
318
|
"tags": [],
|
|
312
|
-
"text": ""
|
|
319
|
+
"text": "`name` of the inner `<button>`, submitted with its form."
|
|
313
320
|
},
|
|
314
321
|
"getter": false,
|
|
315
322
|
"setter": false,
|
|
@@ -334,7 +341,7 @@ export class DdaButton {
|
|
|
334
341
|
"optional": true,
|
|
335
342
|
"docs": {
|
|
336
343
|
"tags": [],
|
|
337
|
-
"text": "
|
|
344
|
+
"text": "Click handler, set as a JavaScript property. You can also listen for the native `click` event."
|
|
338
345
|
},
|
|
339
346
|
"getter": false,
|
|
340
347
|
"setter": false
|
|
@@ -77,6 +77,19 @@
|
|
|
77
77
|
box-shadow: 0px 0px 0px 3px var(--dda-color-primary-95);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
/* WCAG 2.4.7 Focus Visible: the native input is hidden, so keyboard focus
|
|
81
|
+
draws the shared two-tone ring (same idiom as .dda-btn:focus-visible in
|
|
82
|
+
dda-button.css) on the styled box. The :checked selector keeps it above the
|
|
83
|
+
:checked:focus-within rule. */
|
|
84
|
+
.dda-checkbox-container input[type="checkbox"]:focus-visible~label i,
|
|
85
|
+
.dda-checkbox-container input[type="checkbox"]:focus-visible~label svg,
|
|
86
|
+
.dda-checkbox-container input[type="checkbox"]:checked:focus-visible~label i,
|
|
87
|
+
.dda-checkbox-container input[type="checkbox"]:checked:focus-visible~label svg {
|
|
88
|
+
-webkit-box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
|
|
89
|
+
-moz-box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
|
|
90
|
+
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
|
|
91
|
+
}
|
|
92
|
+
|
|
80
93
|
.dda-checkbox-container label p {
|
|
81
94
|
margin: 0px;
|
|
82
95
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class DdaCheckbox {
|
|
3
3
|
constructor() {
|
|
4
|
+
/** Extra CSS classes added to the checkbox container. */
|
|
4
5
|
this.custom_class = '';
|
|
5
6
|
}
|
|
6
7
|
render() {
|
|
@@ -12,7 +13,7 @@ export class DdaCheckbox {
|
|
|
12
13
|
this.checkbox_status ? `dda-checkbox-${this.checkbox_status}` : '',
|
|
13
14
|
this.component_mode,
|
|
14
15
|
].filter(Boolean).join(' ');
|
|
15
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: 'a03a2096e9f0cf6f803e1e0268eb56e96a82bfeb' }, h("div", { key: 'd1e56a9ee711a90bf8c4f42a9b189eab4d8e4187', class: checkboxClass }, h("input", { key: '63d4afed191febf792cc147f2aa0834846301760', "aria-label": this.aria_label, type: "checkbox", id: this.input_id, name: this.group_name, checked: this.checked }), h("label", { key: '281964bf46d08eef1e9f3432ce7f90ce18119786', htmlFor: this.input_id }, h("i", { key: 'c60e23ce71bb3ea998f3bc7fc75ca116b73304c3', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "check"), h("p", { key: '29dbc05b1934a8aae622aa2ffbbda00652c8541b' }, h("span", { key: 'aa7f42edff530e20b3049f43dd6ab6745ef15bad', class: "dda-checkbox-title" }, this.title_text), this.supporting && h("span", { key: '27e8db36535ad9ca842b2c8fb980dca2940bc478', class: "dda-checkbox-supporting" }, this.supporting))))));
|
|
16
17
|
}
|
|
17
18
|
static get is() { return "dda-checkbox"; }
|
|
18
19
|
static get originalStyleUrls() {
|
|
@@ -39,7 +40,7 @@ export class DdaCheckbox {
|
|
|
39
40
|
"optional": false,
|
|
40
41
|
"docs": {
|
|
41
42
|
"tags": [],
|
|
42
|
-
"text": ""
|
|
43
|
+
"text": "Label shown next to the checkbox."
|
|
43
44
|
},
|
|
44
45
|
"getter": false,
|
|
45
46
|
"setter": false,
|
|
@@ -58,7 +59,7 @@ export class DdaCheckbox {
|
|
|
58
59
|
"optional": true,
|
|
59
60
|
"docs": {
|
|
60
61
|
"tags": [],
|
|
61
|
-
"text": ""
|
|
62
|
+
"text": "Secondary text shown under the title."
|
|
62
63
|
},
|
|
63
64
|
"getter": false,
|
|
64
65
|
"setter": false,
|
|
@@ -77,7 +78,7 @@ export class DdaCheckbox {
|
|
|
77
78
|
"optional": true,
|
|
78
79
|
"docs": {
|
|
79
80
|
"tags": [],
|
|
80
|
-
"text": ""
|
|
81
|
+
"text": "`name` of the inner checkbox input."
|
|
81
82
|
},
|
|
82
83
|
"getter": false,
|
|
83
84
|
"setter": false,
|
|
@@ -96,7 +97,7 @@ export class DdaCheckbox {
|
|
|
96
97
|
"optional": true,
|
|
97
98
|
"docs": {
|
|
98
99
|
"tags": [],
|
|
99
|
-
"text": ""
|
|
100
|
+
"text": "`id` of the inner checkbox input. The label points to it, so set a unique value to make the label clickable."
|
|
100
101
|
},
|
|
101
102
|
"getter": false,
|
|
102
103
|
"setter": false,
|
|
@@ -115,7 +116,7 @@ export class DdaCheckbox {
|
|
|
115
116
|
"optional": false,
|
|
116
117
|
"docs": {
|
|
117
118
|
"tags": [],
|
|
118
|
-
"text": ""
|
|
119
|
+
"text": "Checked state of the inner input. Read the current state from the input or its `change` event."
|
|
119
120
|
},
|
|
120
121
|
"getter": false,
|
|
121
122
|
"setter": false,
|
|
@@ -134,7 +135,7 @@ export class DdaCheckbox {
|
|
|
134
135
|
"optional": true,
|
|
135
136
|
"docs": {
|
|
136
137
|
"tags": [],
|
|
137
|
-
"text": ""
|
|
138
|
+
"text": "Status: `disabled` shows the disabled style and blocks pointer clicks."
|
|
138
139
|
},
|
|
139
140
|
"getter": false,
|
|
140
141
|
"setter": false,
|
|
@@ -153,7 +154,7 @@ export class DdaCheckbox {
|
|
|
153
154
|
"optional": true,
|
|
154
155
|
"docs": {
|
|
155
156
|
"tags": [],
|
|
156
|
-
"text": ""
|
|
157
|
+
"text": "Size: `sm`, `md` or `lg`."
|
|
157
158
|
},
|
|
158
159
|
"getter": false,
|
|
159
160
|
"setter": false,
|
|
@@ -172,7 +173,7 @@ export class DdaCheckbox {
|
|
|
172
173
|
"optional": true,
|
|
173
174
|
"docs": {
|
|
174
175
|
"tags": [],
|
|
175
|
-
"text": ""
|
|
176
|
+
"text": "Box shape: `square` or `rounded`."
|
|
176
177
|
},
|
|
177
178
|
"getter": false,
|
|
178
179
|
"setter": false,
|
|
@@ -191,7 +192,7 @@ export class DdaCheckbox {
|
|
|
191
192
|
"optional": true,
|
|
192
193
|
"docs": {
|
|
193
194
|
"tags": [],
|
|
194
|
-
"text": ""
|
|
195
|
+
"text": "Extra CSS classes added to the checkbox container."
|
|
195
196
|
},
|
|
196
197
|
"getter": false,
|
|
197
198
|
"setter": false,
|
|
@@ -211,7 +212,7 @@ export class DdaCheckbox {
|
|
|
211
212
|
"optional": true,
|
|
212
213
|
"docs": {
|
|
213
214
|
"tags": [],
|
|
214
|
-
"text": ""
|
|
215
|
+
"text": "Theme override class for the checkbox, e.g. `light-mode`."
|
|
215
216
|
},
|
|
216
217
|
"getter": false,
|
|
217
218
|
"setter": false,
|
|
@@ -230,7 +231,7 @@ export class DdaCheckbox {
|
|
|
230
231
|
"optional": true,
|
|
231
232
|
"docs": {
|
|
232
233
|
"tags": [],
|
|
233
|
-
"text": ""
|
|
234
|
+
"text": "Accessible name of the inner checkbox input."
|
|
234
235
|
},
|
|
235
236
|
"getter": false,
|
|
236
237
|
"setter": false,
|
|
@@ -14,10 +14,6 @@ export default {
|
|
|
14
14
|
control: 'text',
|
|
15
15
|
description: 'default',
|
|
16
16
|
},
|
|
17
|
-
labelfor: {
|
|
18
|
-
control: 'text',
|
|
19
|
-
description: 'default',
|
|
20
|
-
},
|
|
21
17
|
input_id: {
|
|
22
18
|
control: 'text',
|
|
23
19
|
description: 'default',
|
|
@@ -50,10 +46,6 @@ export default {
|
|
|
50
46
|
control: { type: 'text' },
|
|
51
47
|
description: 'Aria label for the checkbox',
|
|
52
48
|
},
|
|
53
|
-
onclick: {
|
|
54
|
-
control: { type: 'text' },
|
|
55
|
-
description: 'Event handler for the checkbox component',
|
|
56
|
-
}
|
|
57
49
|
},
|
|
58
50
|
parameters: {
|
|
59
51
|
docs: {
|
|
@@ -73,7 +65,6 @@ To use the \`dda-checkbox\` component, pass the following props:
|
|
|
73
65
|
custom_class=""
|
|
74
66
|
component_mode=""
|
|
75
67
|
aria_label="checkbox"
|
|
76
|
-
onclick="console.log('Checkbox clicked')"
|
|
77
68
|
></dda-checkbox>
|
|
78
69
|
\`\`\`
|
|
79
70
|
`,
|
|
@@ -99,7 +90,6 @@ checkboxSquare.args = {
|
|
|
99
90
|
input_id: 'testId',
|
|
100
91
|
custom_class: '',
|
|
101
92
|
component_mode: '',
|
|
102
|
-
onclick: "",
|
|
103
93
|
};
|
|
104
94
|
export const checkboxRounded = Template.bind({});
|
|
105
95
|
checkboxRounded.args = {
|
|
@@ -113,5 +103,4 @@ checkboxRounded.args = {
|
|
|
113
103
|
custom_class: '',
|
|
114
104
|
component_mode: '',
|
|
115
105
|
aria_label: 'checkbox',
|
|
116
|
-
onclick: "",
|
|
117
106
|
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
export class DdaChip {
|
|
3
3
|
constructor() {
|
|
4
|
+
/** Color: `grey`, `primary`, `green`, `yellow`, `red` or `purple`. Other values, including the default, use the base primary style. */
|
|
4
5
|
this.bg_color = 'success';
|
|
6
|
+
/** Corner radius: `sm`, `md`, `lg` or `circle`. */
|
|
5
7
|
this.rounded = '';
|
|
8
|
+
/** Shows a close button after the label. Its accessible name comes from `close_button_label`. */
|
|
6
9
|
this.show_close_icon = false;
|
|
10
|
+
/** Accessible name of the icon-only close button. */
|
|
11
|
+
this.close_button_label = 'Remove';
|
|
7
12
|
}
|
|
8
13
|
render() {
|
|
9
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '2cd6e91242c3e95df532f3771098fc59c745b0e7' }, h("div", { key: '3ea476295a82ac1bd866d56d9982e64cdaee2692', class: `dda-chip dda-chip-${this.bg_color} dda-chip-${this.size} dda-rounded-${this.rounded} ${this.custom_class} ${this.component_mode}` }, this.icon ? h("i", { class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, this.icon) : null, h("span", { key: 'c2fa931281235fdbdc75fe6a725e3c55623f6f33' }, h("slot", { key: '09f4718890a6591edd1ab86b8825621aa305162e' })), this.show_close_icon && (h("button", { key: 'c2b60bf0ae4533ee8a4b80f481772154d03d9af0', type: "button", class: "chip-close", onClick: this.clickHandler, "aria-label": this.close_button_label }, h("i", { key: '62e9e1659c60d909d6db32636654126c35184395', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close"))))));
|
|
10
15
|
}
|
|
11
16
|
static get is() { return "dda-chip"; }
|
|
12
17
|
static get originalStyleUrls() {
|
|
@@ -33,7 +38,7 @@ export class DdaChip {
|
|
|
33
38
|
"optional": false,
|
|
34
39
|
"docs": {
|
|
35
40
|
"tags": [],
|
|
36
|
-
"text": ""
|
|
41
|
+
"text": "Color: `grey`, `primary`, `green`, `yellow`, `red` or `purple`. Other values, including the default, use the base primary style."
|
|
37
42
|
},
|
|
38
43
|
"getter": false,
|
|
39
44
|
"setter": false,
|
|
@@ -53,7 +58,7 @@ export class DdaChip {
|
|
|
53
58
|
"optional": true,
|
|
54
59
|
"docs": {
|
|
55
60
|
"tags": [],
|
|
56
|
-
"text": ""
|
|
61
|
+
"text": "Corner radius: `sm`, `md`, `lg` or `circle`."
|
|
57
62
|
},
|
|
58
63
|
"getter": false,
|
|
59
64
|
"setter": false,
|
|
@@ -73,7 +78,7 @@ export class DdaChip {
|
|
|
73
78
|
"optional": false,
|
|
74
79
|
"docs": {
|
|
75
80
|
"tags": [],
|
|
76
|
-
"text": ""
|
|
81
|
+
"text": "Material Symbols icon name shown before the label, e.g. `check_circle`."
|
|
77
82
|
},
|
|
78
83
|
"getter": false,
|
|
79
84
|
"setter": false,
|
|
@@ -92,7 +97,7 @@ export class DdaChip {
|
|
|
92
97
|
"optional": false,
|
|
93
98
|
"docs": {
|
|
94
99
|
"tags": [],
|
|
95
|
-
"text": ""
|
|
100
|
+
"text": "Shows a close button after the label. Its accessible name comes from `close_button_label`."
|
|
96
101
|
},
|
|
97
102
|
"getter": false,
|
|
98
103
|
"setter": false,
|
|
@@ -100,6 +105,26 @@ export class DdaChip {
|
|
|
100
105
|
"attribute": "show_close_icon",
|
|
101
106
|
"defaultValue": "false"
|
|
102
107
|
},
|
|
108
|
+
"close_button_label": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"mutable": false,
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "string",
|
|
113
|
+
"resolved": "string",
|
|
114
|
+
"references": {}
|
|
115
|
+
},
|
|
116
|
+
"required": false,
|
|
117
|
+
"optional": false,
|
|
118
|
+
"docs": {
|
|
119
|
+
"tags": [],
|
|
120
|
+
"text": "Accessible name of the icon-only close button."
|
|
121
|
+
},
|
|
122
|
+
"getter": false,
|
|
123
|
+
"setter": false,
|
|
124
|
+
"reflect": false,
|
|
125
|
+
"attribute": "close_button_label",
|
|
126
|
+
"defaultValue": "'Remove'"
|
|
127
|
+
},
|
|
103
128
|
"size": {
|
|
104
129
|
"type": "string",
|
|
105
130
|
"mutable": false,
|
|
@@ -112,7 +137,7 @@ export class DdaChip {
|
|
|
112
137
|
"optional": true,
|
|
113
138
|
"docs": {
|
|
114
139
|
"tags": [],
|
|
115
|
-
"text": ""
|
|
140
|
+
"text": "Height: `sm` (24px), `md` (26px) or `lg` (32px)."
|
|
116
141
|
},
|
|
117
142
|
"getter": false,
|
|
118
143
|
"setter": false,
|
|
@@ -131,7 +156,7 @@ export class DdaChip {
|
|
|
131
156
|
"optional": true,
|
|
132
157
|
"docs": {
|
|
133
158
|
"tags": [],
|
|
134
|
-
"text": ""
|
|
159
|
+
"text": "Extra CSS classes added to the chip container."
|
|
135
160
|
},
|
|
136
161
|
"getter": false,
|
|
137
162
|
"setter": false,
|
|
@@ -150,7 +175,7 @@ export class DdaChip {
|
|
|
150
175
|
"optional": true,
|
|
151
176
|
"docs": {
|
|
152
177
|
"tags": [],
|
|
153
|
-
"text": ""
|
|
178
|
+
"text": "Theme override class for the chip, e.g. `light-mode`."
|
|
154
179
|
},
|
|
155
180
|
"getter": false,
|
|
156
181
|
"setter": false,
|
|
@@ -174,7 +199,7 @@ export class DdaChip {
|
|
|
174
199
|
"optional": true,
|
|
175
200
|
"docs": {
|
|
176
201
|
"tags": [],
|
|
177
|
-
"text": ""
|
|
202
|
+
"text": "Click handler for the close button, set as a JavaScript property. The chip does not remove itself."
|
|
178
203
|
},
|
|
179
204
|
"getter": false,
|
|
180
205
|
"setter": false
|
|
@@ -38,10 +38,6 @@ export default {
|
|
|
38
38
|
options: ['light-mode'],
|
|
39
39
|
description: 'Mode of the chip component',
|
|
40
40
|
},
|
|
41
|
-
onclick: {
|
|
42
|
-
control: { type: 'text' },
|
|
43
|
-
description: 'Function triggered when the close icon is clicked',
|
|
44
|
-
},
|
|
45
41
|
},
|
|
46
42
|
parameters: {
|
|
47
43
|
docs: {
|
|
@@ -56,7 +52,6 @@ To use the \`dda-chip\` component, pass the following props:
|
|
|
56
52
|
show_close_icon="true"
|
|
57
53
|
custom_class=""
|
|
58
54
|
component_mode=""
|
|
59
|
-
onclick="console.log("clicked!")"
|
|
60
55
|
>Label
|
|
61
56
|
</dda-chip>
|
|
62
57
|
\`\`\`
|
|
@@ -81,7 +76,6 @@ Grey.args = {
|
|
|
81
76
|
bg_color: 'grey',
|
|
82
77
|
icon: 'sentiment_satisfied',
|
|
83
78
|
show_close_icon: true,
|
|
84
|
-
onclick: "console.log('clicked')",
|
|
85
79
|
};
|
|
86
80
|
export const Primary = Template.bind({});
|
|
87
81
|
Primary.args = {
|
|
@@ -91,7 +85,6 @@ Primary.args = {
|
|
|
91
85
|
show_close_icon: true,
|
|
92
86
|
custom_class: '',
|
|
93
87
|
component_mode: '',
|
|
94
|
-
onclick: "alert('Close icon clicked!')",
|
|
95
88
|
};
|
|
96
89
|
export const Green = Template.bind({});
|
|
97
90
|
Green.args = {
|
|
@@ -101,7 +94,6 @@ Green.args = {
|
|
|
101
94
|
show_close_icon: true,
|
|
102
95
|
custom_class: '',
|
|
103
96
|
component_mode: '',
|
|
104
|
-
onclick: "() => alert('Close icon clicked!')",
|
|
105
97
|
};
|
|
106
98
|
export const Yellow = Template.bind({});
|
|
107
99
|
Yellow.args = {
|
|
@@ -111,7 +103,6 @@ Yellow.args = {
|
|
|
111
103
|
show_close_icon: true,
|
|
112
104
|
custom_class: '',
|
|
113
105
|
component_mode: '',
|
|
114
|
-
onclick: "() => alert('Close icon clicked!')",
|
|
115
106
|
};
|
|
116
107
|
export const Red = Template.bind({});
|
|
117
108
|
Red.args = {
|
|
@@ -121,7 +112,6 @@ Red.args = {
|
|
|
121
112
|
show_close_icon: true,
|
|
122
113
|
custom_class: '',
|
|
123
114
|
component_mode: '',
|
|
124
|
-
onclick: "() => alert('Close icon clicked!')",
|
|
125
115
|
};
|
|
126
116
|
export const Purple = Template.bind({});
|
|
127
117
|
Purple.args = {
|
|
@@ -131,5 +121,4 @@ Purple.args = {
|
|
|
131
121
|
show_close_icon: true,
|
|
132
122
|
custom_class: '',
|
|
133
123
|
component_mode: '',
|
|
134
|
-
onclick: "() => alert('Close icon clicked!')",
|
|
135
124
|
};
|