@scania/tegel 0.0.1-beta.9 → 0.0.31
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/dist/cjs/index-18eb94f0.js +2182 -0
- package/dist/cjs/index-18eb94f0.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +24 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/popper-11d5f714.js +1803 -0
- package/dist/cjs/popper-11d5f714.js.map +1 -0
- package/dist/cjs/sdds-accordion-item.cjs.entry.js +36 -0
- package/dist/cjs/sdds-accordion-item.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-accordion.cjs.entry.js +23 -0
- package/dist/cjs/sdds-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-badges.cjs.entry.js +56 -0
- package/dist/cjs/sdds-badges.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-banner.cjs.entry.js +81 -0
- package/dist/cjs/sdds-banner.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-block.cjs.entry.js +34 -0
- package/dist/cjs/sdds-block.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +175 -0
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js +27 -0
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js +25 -0
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-button.cjs.entry.js +39 -0
- package/dist/cjs/sdds-button.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-card.cjs.entry.js +58 -0
- package/dist/cjs/sdds-card.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-checkbox.cjs.entry.js +57 -0
- package/dist/cjs/sdds-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-datetime.cjs.entry.js +97 -0
- package/dist/cjs/sdds-datetime.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +94 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +343 -0
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-header-cell.cjs.entry.js +141 -0
- package/dist/cjs/sdds-header-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-icon.cjs.entry.js +44 -0
- package/dist/cjs/sdds-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tab.cjs.entry.js +24 -0
- package/dist/cjs/sdds-inline-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +100 -0
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +223 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-link.cjs.entry.js +30 -0
- package/dist/cjs/sdds-link.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-message.cjs.entry.js +43 -0
- package/dist/cjs/sdds-message.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-modal.cjs.entry.js +53 -0
- package/dist/cjs/sdds-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +100 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +86 -0
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +87 -0
- package/dist/cjs/sdds-popover-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-radio-button.cjs.entry.js +34 -0
- package/dist/cjs/sdds-radio-button.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-slider.cjs.entry.js +359 -0
- package/dist/cjs/sdds-slider.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-spinner.cjs.entry.js +23 -0
- package/dist/cjs/sdds-spinner.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +84 -0
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-body.cjs.entry.js +291 -0
- package/dist/cjs/sdds-table-body.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-footer.cjs.entry.js +166 -0
- package/dist/cjs/sdds-table-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-header.cjs.entry.js +101 -0
- package/dist/cjs/sdds-table-header.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +67 -0
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table.cjs.entry.js +70 -0
- package/dist/cjs/sdds-table.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-textarea.cjs.entry.js +76 -0
- package/dist/cjs/sdds-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-textfield.cjs.entry.js +93 -0
- package/dist/cjs/sdds-textfield.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-toast.cjs.entry.js +88 -0
- package/dist/cjs/sdds-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-toggle.cjs.entry.js +46 -0
- package/dist/cjs/sdds-toggle.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-tooltip.cjs.entry.js +106 -0
- package/dist/cjs/sdds-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/tegel.cjs.js +28 -0
- package/dist/cjs/tegel.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +52 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +153 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +147 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.js.map +1 -0
- package/dist/collection/components/accordion/accordion.css +63 -0
- package/dist/collection/components/accordion/accordion.js +63 -0
- package/dist/collection/components/accordion/accordion.js.map +1 -0
- package/dist/collection/components/accordion/accordion.stories.js +100 -0
- package/dist/collection/components/accordion/accordion.stories.js.map +1 -0
- package/dist/collection/components/badge/badge.stories.js +103 -0
- package/dist/collection/components/badge/badge.stories.js.map +1 -0
- package/dist/collection/components/badge/badges.css +42 -0
- package/dist/collection/components/badge/badges.js +148 -0
- package/dist/collection/components/badge/badges.js.map +1 -0
- package/dist/collection/components/banner/banner.stories.js +93 -0
- package/dist/collection/components/banner/banner.stories.js.map +1 -0
- package/dist/collection/components/banner/sdds-banner.css +88 -0
- package/dist/collection/components/banner/sdds-banner.js +331 -0
- package/dist/collection/components/banner/sdds-banner.js.map +1 -0
- package/dist/collection/components/banner/sdds-banner.stories.js +130 -0
- package/dist/collection/components/banner/sdds-banner.stories.js.map +1 -0
- package/dist/collection/components/block/block-native.stories.js +49 -0
- package/dist/collection/components/block/block-native.stories.js.map +1 -0
- package/dist/collection/components/block/sdds-block.css +22 -0
- package/dist/collection/components/block/sdds-block.js +56 -0
- package/dist/collection/components/block/sdds-block.js.map +1 -0
- package/dist/collection/components/block/sdds-block.stories.js +49 -0
- package/dist/collection/components/block/sdds-block.stories.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb-component.css +30 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.css +43 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +84 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +23 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +27 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -0
- package/dist/collection/components/button/button-component.js +156 -0
- package/dist/collection/components/button/button-component.js.map +1 -0
- package/dist/collection/components/button/button-native.stories.js +188 -0
- package/dist/collection/components/button/button-native.stories.js.map +1 -0
- package/dist/collection/components/button/button-webcomponent.stories.js +190 -0
- package/dist/collection/components/button/button-webcomponent.stories.js.map +1 -0
- package/dist/collection/components/button/button.css +670 -0
- package/dist/collection/components/card/card.stories.js +168 -0
- package/dist/collection/components/card/card.stories.js.map +1 -0
- package/dist/collection/components/card/sdds-card.css +78 -0
- package/dist/collection/components/card/sdds-card.js +277 -0
- package/dist/collection/components/card/sdds-card.js.map +1 -0
- package/dist/collection/components/card/sdds-card.stories.js +169 -0
- package/dist/collection/components/card/sdds-card.stories.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.stories.js +55 -0
- package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -0
- package/dist/collection/components/checkbox/sdds-checkbox.css +95 -0
- package/dist/collection/components/checkbox/sdds-checkbox.js +240 -0
- package/dist/collection/components/checkbox/sdds-checkbox.js.map +1 -0
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js +72 -0
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js.map +1 -0
- package/dist/collection/components/chips/chips.stories.js +107 -0
- package/dist/collection/components/chips/chips.stories.js.map +1 -0
- package/dist/collection/components/data-table/native-table.stories.js +161 -0
- package/dist/collection/components/data-table/native-table.stories.js.map +1 -0
- package/dist/collection/components/data-table/table/table.css +15 -0
- package/dist/collection/components/data-table/table/table.js +254 -0
- package/dist/collection/components/data-table/table/table.js.map +1 -0
- package/dist/collection/components/data-table/table-body/table-body.css +22 -0
- package/dist/collection/components/data-table/table-body/table-body.js +426 -0
- package/dist/collection/components/data-table/table-body/table-body.js.map +1 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +40 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +169 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js.map +1 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.css +175 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.js +166 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.js.map +1 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +78 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +157 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js.map +1 -0
- package/dist/collection/components/data-table/table-component-basic.stories.js +162 -0
- package/dist/collection/components/data-table/table-component-basic.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js +129 -0
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-bodydata.stories.js +59 -0
- package/dist/collection/components/data-table/table-component-bodydata.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-custom-width.stories.js +198 -0
- package/dist/collection/components/data-table/table-component-custom-width.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js +152 -0
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +136 -0
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-filtering.stories.js +138 -0
- package/dist/collection/components/data-table/table-component-filtering.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-multiselect.stories.js +159 -0
- package/dist/collection/components/data-table/table-component-multiselect.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-pagination.stories.js +128 -0
- package/dist/collection/components/data-table/table-component-pagination.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-component-sorting.stories.js +127 -0
- package/dist/collection/components/data-table/table-component-sorting.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-footer/table-footer.css +97 -0
- package/dist/collection/components/data-table/table-footer/table-footer.js +355 -0
- package/dist/collection/components/data-table/table-footer/table-footer.js.map +1 -0
- package/dist/collection/components/data-table/table-header/table-header.css +190 -0
- package/dist/collection/components/data-table/table-header/table-header.js +153 -0
- package/dist/collection/components/data-table/table-header/table-header.js.map +1 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +127 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +318 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js.map +1 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +93 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +142 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js.map +1 -0
- package/dist/collection/components/datetime/datetime.css +385 -0
- package/dist/collection/components/datetime/datetime.js +353 -0
- package/dist/collection/components/datetime/datetime.js.map +1 -0
- package/dist/collection/components/datetime/datetime.stories.js +208 -0
- package/dist/collection/components/datetime/datetime.stories.js.map +1 -0
- package/dist/collection/components/divider/divider.stories.js +134 -0
- package/dist/collection/components/divider/divider.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +340 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +131 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-native.stories.js +91 -0
- package/dist/collection/components/dropdown/dropdown-native.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +186 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +168 -0
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +147 -0
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown.css +951 -0
- package/dist/collection/components/dropdown/dropdown.js +578 -0
- package/dist/collection/components/dropdown/dropdown.js.map +1 -0
- package/dist/collection/components/footer/footer.stories.js +118 -0
- package/dist/collection/components/footer/footer.stories.js.map +1 -0
- package/dist/collection/components/header/header-all.stories.js +218 -0
- package/dist/collection/components/header/header-all.stories.js.map +1 -0
- package/dist/collection/components/header/header-default.stories.js +48 -0
- package/dist/collection/components/header/header-default.stories.js.map +1 -0
- package/dist/collection/components/header/header-inline.stories.js +114 -0
- package/dist/collection/components/header/header-inline.stories.js.map +1 -0
- package/dist/collection/components/header/header-search.stories.js +264 -0
- package/dist/collection/components/header/header-search.stories.js.map +1 -0
- package/dist/collection/components/header/header-toolbar.stories.js +205 -0
- package/dist/collection/components/header/header-toolbar.stories.js.map +1 -0
- package/dist/collection/components/icon/icon-font.stories.js +58 -0
- package/dist/collection/components/icon/icon-font.stories.js.map +1 -0
- package/dist/collection/components/icon/icon-web-component.stories.js +52 -0
- package/dist/collection/components/icon/icon-web-component.stories.js.map +1 -0
- package/dist/collection/components/icon/icon.css +16 -0
- package/dist/collection/components/icon/icon.js +90 -0
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/icon/iconsArray.js +2 -0
- package/dist/collection/components/link/link.stories.js +46 -0
- package/dist/collection/components/link/link.stories.js.map +1 -0
- package/dist/collection/components/link/sdds-link.css +36 -0
- package/dist/collection/components/link/sdds-link.js +122 -0
- package/dist/collection/components/link/sdds-link.js.map +1 -0
- package/dist/collection/components/link/sdds-link.stories.js +71 -0
- package/dist/collection/components/link/sdds-link.stories.js.map +1 -0
- package/dist/collection/components/message/message.stories.js +109 -0
- package/dist/collection/components/message/message.stories.js.map +1 -0
- package/dist/collection/components/message/sdds-message.css +70 -0
- package/dist/collection/components/message/sdds-message.js +136 -0
- package/dist/collection/components/message/sdds-message.js.map +1 -0
- package/dist/collection/components/message/sdds-message.stories.js +107 -0
- package/dist/collection/components/message/sdds-message.stories.js.map +1 -0
- package/dist/collection/components/modal/modal-native.stories.js +130 -0
- package/dist/collection/components/modal/modal-native.stories.js.map +1 -0
- package/dist/collection/components/modal/modal-webcomponent.stories.js +87 -0
- package/dist/collection/components/modal/modal-webcomponent.stories.js.map +1 -0
- package/dist/collection/components/modal/modal.css +350 -0
- package/dist/collection/components/modal/modal.js +149 -0
- package/dist/collection/components/modal/modal.js.map +1 -0
- package/dist/collection/components/popover-canvas/popover-canvas.css +20 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +220 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js.map +1 -0
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +90 -0
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js.map +1 -0
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +122 -0
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js.map +1 -0
- package/dist/collection/components/popover-menu/popover-menu.css +19 -0
- package/dist/collection/components/popover-menu/popover-menu.js +221 -0
- package/dist/collection/components/popover-menu/popover-menu.js.map +1 -0
- package/dist/collection/components/popover-menu/popover-menu.stories.js +115 -0
- package/dist/collection/components/popover-menu/popover-menu.stories.js.map +1 -0
- package/dist/collection/components/radio-button/radio-button-component.css +123 -0
- package/dist/collection/components/radio-button/radio-button-component.stories.js +92 -0
- package/dist/collection/components/radio-button/radio-button-component.stories.js.map +1 -0
- package/dist/collection/components/radio-button/radio-button.js +161 -0
- package/dist/collection/components/radio-button/radio-button.js.map +1 -0
- package/dist/collection/components/radio-button/radio-button.stories.js +69 -0
- package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -0
- package/dist/collection/components/side-menu/side-menu.stories.js +183 -0
- package/dist/collection/components/side-menu/side-menu.stories.js.map +1 -0
- package/dist/collection/components/slider/slider.css +297 -0
- package/dist/collection/components/slider/slider.js +722 -0
- package/dist/collection/components/slider/slider.js.map +1 -0
- package/dist/collection/components/slider/slider.stories.js +209 -0
- package/dist/collection/components/slider/slider.stories.js.map +1 -0
- package/dist/collection/components/spinner/spinner.css +79 -0
- package/dist/collection/components/spinner/spinner.js +62 -0
- package/dist/collection/components/spinner/spinner.js.map +1 -0
- package/dist/collection/components/spinner/spinner.stories.js +60 -0
- package/dist/collection/components/spinner/spinner.stories.js.map +1 -0
- package/dist/collection/components/stepper/stepper.stories.js +140 -0
- package/dist/collection/components/stepper/stepper.stories.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.css +3 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js +81 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +156 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +313 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +72 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +141 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +129 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +47 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js.map +1 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +157 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +129 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js.map +1 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +33 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js.map +1 -0
- package/dist/collection/components/textarea/textarea.css +298 -0
- package/dist/collection/components/textarea/textarea.js +403 -0
- package/dist/collection/components/textarea/textarea.js.map +1 -0
- package/dist/collection/components/textarea/textarea.stories.js +170 -0
- package/dist/collection/components/textarea/textarea.stories.js.map +1 -0
- package/dist/collection/components/textfield/textfield.css +502 -0
- package/dist/collection/components/textfield/textfield.js +440 -0
- package/dist/collection/components/textfield/textfield.js.map +1 -0
- package/dist/collection/components/textfield/textfield.stories.js +240 -0
- package/dist/collection/components/textfield/textfield.stories.js.map +1 -0
- package/dist/collection/components/toast/sdds-toast.css +102 -0
- package/dist/collection/components/toast/sdds-toast.js +257 -0
- package/dist/collection/components/toast/sdds-toast.js.map +1 -0
- package/dist/collection/components/toast/sdds-toast.stories.js +87 -0
- package/dist/collection/components/toast/sdds-toast.stories.js.map +1 -0
- package/dist/collection/components/toast/toast.stories.js +130 -0
- package/dist/collection/components/toast/toast.stories.js.map +1 -0
- package/dist/collection/components/toggle/sdds-toggle.css +104 -0
- package/dist/collection/components/toggle/sdds-toggle.js +262 -0
- package/dist/collection/components/toggle/sdds-toggle.js.map +1 -0
- package/dist/collection/components/toggle/sdds-toggle.stories.js +93 -0
- package/dist/collection/components/toggle/sdds-toggle.stories.js.map +1 -0
- package/dist/collection/components/toggle/toggle.stories.js +73 -0
- package/dist/collection/components/toggle/toggle.stories.js.map +1 -0
- package/dist/collection/components/tooltip/tooltip.css +46 -0
- package/dist/collection/components/tooltip/tooltip.js +230 -0
- package/dist/collection/components/tooltip/tooltip.js.map +1 -0
- package/dist/collection/components/tooltip/tooltip.stories.js +116 -0
- package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -0
- package/dist/collection/components/utility/colour/background-color.stories.js +97 -0
- package/dist/collection/components/utility/colour/background-color.stories.js.map +1 -0
- package/dist/collection/components/utility/colour/text-color.stories.js +95 -0
- package/dist/collection/components/utility/colour/text-color.stories.js.map +1 -0
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js +39 -0
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js.map +1 -0
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js +72 -0
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js.map +1 -0
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +41 -0
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js.map +1 -0
- package/dist/collection/foundations-stories/grid/grid.stories.js +387 -0
- package/dist/collection/foundations-stories/grid/grid.stories.js.map +1 -0
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +101 -0
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js.map +1 -0
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +95 -0
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-body.stories.js +17 -0
- package/dist/collection/foundations-stories/typography/typography-body.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js +18 -0
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js +40 -0
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +13 -0
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/utils/utils.js +13 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/esm/index-96563708.js +2153 -0
- package/dist/esm/index-96563708.js.map +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +20 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/popper-f860750c.js +1801 -0
- package/dist/esm/popper-f860750c.js.map +1 -0
- package/dist/esm/sdds-accordion-item.entry.js +32 -0
- package/dist/esm/sdds-accordion-item.entry.js.map +1 -0
- package/dist/esm/sdds-accordion.entry.js +19 -0
- package/dist/esm/sdds-accordion.entry.js.map +1 -0
- package/dist/esm/sdds-badges.entry.js +52 -0
- package/dist/esm/sdds-badges.entry.js.map +1 -0
- package/dist/esm/sdds-banner.entry.js +77 -0
- package/dist/esm/sdds-banner.entry.js.map +1 -0
- package/dist/esm/sdds-block.entry.js +30 -0
- package/dist/esm/sdds-block.entry.js.map +1 -0
- package/dist/esm/sdds-body-cell_2.entry.js +170 -0
- package/dist/esm/sdds-body-cell_2.entry.js.map +1 -0
- package/dist/esm/sdds-breadcrumb-item.entry.js +23 -0
- package/dist/esm/sdds-breadcrumb-item.entry.js.map +1 -0
- package/dist/esm/sdds-breadcrumb.entry.js +21 -0
- package/dist/esm/sdds-breadcrumb.entry.js.map +1 -0
- package/dist/esm/sdds-button.entry.js +35 -0
- package/dist/esm/sdds-button.entry.js.map +1 -0
- package/dist/esm/sdds-card.entry.js +54 -0
- package/dist/esm/sdds-card.entry.js.map +1 -0
- package/dist/esm/sdds-checkbox.entry.js +53 -0
- package/dist/esm/sdds-checkbox.entry.js.map +1 -0
- package/dist/esm/sdds-datetime.entry.js +93 -0
- package/dist/esm/sdds-datetime.entry.js.map +1 -0
- package/dist/esm/sdds-dropdown-filter.entry.js +90 -0
- package/dist/esm/sdds-dropdown-filter.entry.js.map +1 -0
- package/dist/esm/sdds-dropdown_2.entry.js +338 -0
- package/dist/esm/sdds-dropdown_2.entry.js.map +1 -0
- package/dist/esm/sdds-header-cell.entry.js +137 -0
- package/dist/esm/sdds-header-cell.entry.js.map +1 -0
- package/dist/esm/sdds-icon.entry.js +40 -0
- package/dist/esm/sdds-icon.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tab.entry.js +20 -0
- package/dist/esm/sdds-inline-tab.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +96 -0
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tabs.entry.js +219 -0
- package/dist/esm/sdds-inline-tabs.entry.js.map +1 -0
- package/dist/esm/sdds-link.entry.js +26 -0
- package/dist/esm/sdds-link.entry.js.map +1 -0
- package/dist/esm/sdds-message.entry.js +39 -0
- package/dist/esm/sdds-message.entry.js.map +1 -0
- package/dist/esm/sdds-modal.entry.js +49 -0
- package/dist/esm/sdds-modal.entry.js.map +1 -0
- package/dist/esm/sdds-navigation-tabs.entry.js +96 -0
- package/dist/esm/sdds-navigation-tabs.entry.js.map +1 -0
- package/dist/esm/sdds-popover-canvas.entry.js +82 -0
- package/dist/esm/sdds-popover-canvas.entry.js.map +1 -0
- package/dist/esm/sdds-popover-menu.entry.js +83 -0
- package/dist/esm/sdds-popover-menu.entry.js.map +1 -0
- package/dist/esm/sdds-radio-button.entry.js +30 -0
- package/dist/esm/sdds-radio-button.entry.js.map +1 -0
- package/dist/esm/sdds-slider.entry.js +355 -0
- package/dist/esm/sdds-slider.entry.js.map +1 -0
- package/dist/esm/sdds-spinner.entry.js +19 -0
- package/dist/esm/sdds-spinner.entry.js.map +1 -0
- package/dist/esm/sdds-table-body-row-expandable.entry.js +80 -0
- package/dist/esm/sdds-table-body-row-expandable.entry.js.map +1 -0
- package/dist/esm/sdds-table-body.entry.js +287 -0
- package/dist/esm/sdds-table-body.entry.js.map +1 -0
- package/dist/esm/sdds-table-footer.entry.js +162 -0
- package/dist/esm/sdds-table-footer.entry.js.map +1 -0
- package/dist/esm/sdds-table-header.entry.js +97 -0
- package/dist/esm/sdds-table-header.entry.js.map +1 -0
- package/dist/esm/sdds-table-toolbar.entry.js +63 -0
- package/dist/esm/sdds-table-toolbar.entry.js.map +1 -0
- package/dist/esm/sdds-table.entry.js +66 -0
- package/dist/esm/sdds-table.entry.js.map +1 -0
- package/dist/esm/sdds-textarea.entry.js +72 -0
- package/dist/esm/sdds-textarea.entry.js.map +1 -0
- package/dist/esm/sdds-textfield.entry.js +89 -0
- package/dist/esm/sdds-textfield.entry.js.map +1 -0
- package/dist/esm/sdds-toast.entry.js +84 -0
- package/dist/esm/sdds-toast.entry.js.map +1 -0
- package/dist/esm/sdds-toggle.entry.js +42 -0
- package/dist/esm/sdds-toggle.entry.js.map +1 -0
- package/dist/esm/sdds-tooltip.entry.js +102 -0
- package/dist/esm/sdds-tooltip.entry.js.map +1 -0
- package/dist/esm/tegel.js +23 -0
- package/dist/esm/tegel.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/node_modules/@types/jest/index.d.ts +1512 -0
- package/dist/tegel/index.esm.js +2 -0
- package/dist/tegel/index.esm.js.map +1 -0
- package/dist/tegel/p-07c7c2e7.entry.js +2 -0
- package/dist/tegel/p-07c7c2e7.entry.js.map +1 -0
- package/dist/tegel/p-0953710b.entry.js +2 -0
- package/dist/tegel/p-0953710b.entry.js.map +1 -0
- package/dist/tegel/p-0b4eba86.js +3 -0
- package/dist/tegel/p-0b4eba86.js.map +1 -0
- package/dist/tegel/p-1eb8dd92.entry.js +2 -0
- package/dist/tegel/p-1eb8dd92.entry.js.map +1 -0
- package/dist/tegel/p-25af32a7.entry.js +2 -0
- package/dist/tegel/p-25af32a7.entry.js.map +1 -0
- package/dist/tegel/p-262dca00.entry.js +2 -0
- package/dist/tegel/p-262dca00.entry.js.map +1 -0
- package/dist/tegel/p-2fad34c4.entry.js +2 -0
- package/dist/tegel/p-2fad34c4.entry.js.map +1 -0
- package/dist/tegel/p-336efb27.entry.js +2 -0
- package/dist/tegel/p-336efb27.entry.js.map +1 -0
- package/dist/tegel/p-33e7f7e5.entry.js +2 -0
- package/dist/tegel/p-33e7f7e5.entry.js.map +1 -0
- package/dist/tegel/p-458cda76.entry.js +2 -0
- package/dist/tegel/p-458cda76.entry.js.map +1 -0
- package/dist/tegel/p-46013562.entry.js +2 -0
- package/dist/tegel/p-46013562.entry.js.map +1 -0
- package/dist/tegel/p-525ec252.entry.js +2 -0
- package/dist/tegel/p-525ec252.entry.js.map +1 -0
- package/dist/tegel/p-5c390692.entry.js +2 -0
- package/dist/tegel/p-5c390692.entry.js.map +1 -0
- package/dist/tegel/p-5e50ce81.entry.js +2 -0
- package/dist/tegel/p-5e50ce81.entry.js.map +1 -0
- package/dist/tegel/p-62ed6fdc.entry.js +2 -0
- package/dist/tegel/p-62ed6fdc.entry.js.map +1 -0
- package/dist/tegel/p-68fca08c.entry.js +2 -0
- package/dist/tegel/p-68fca08c.entry.js.map +1 -0
- package/dist/tegel/p-6bdce8c1.entry.js +2 -0
- package/dist/tegel/p-6bdce8c1.entry.js.map +1 -0
- package/dist/tegel/p-6e54f5a2.entry.js +2 -0
- package/dist/tegel/p-6e54f5a2.entry.js.map +1 -0
- package/dist/tegel/p-72099402.entry.js +2 -0
- package/dist/tegel/p-72099402.entry.js.map +1 -0
- package/dist/tegel/p-77a4950d.entry.js +2 -0
- package/dist/tegel/p-77a4950d.entry.js.map +1 -0
- package/dist/tegel/p-84e5d141.entry.js +2 -0
- package/dist/tegel/p-84e5d141.entry.js.map +1 -0
- package/dist/tegel/p-913cb5e9.entry.js +2 -0
- package/dist/tegel/p-913cb5e9.entry.js.map +1 -0
- package/dist/tegel/p-92869ad1.entry.js +2 -0
- package/dist/tegel/p-92869ad1.entry.js.map +1 -0
- package/dist/tegel/p-93571e36.entry.js +2 -0
- package/dist/tegel/p-93571e36.entry.js.map +1 -0
- package/dist/tegel/p-9904d7ec.entry.js +2 -0
- package/dist/tegel/p-9904d7ec.entry.js.map +1 -0
- package/dist/tegel/p-a3741fdd.entry.js +2 -0
- package/dist/tegel/p-a3741fdd.entry.js.map +1 -0
- package/dist/tegel/p-aff4d273.entry.js +2 -0
- package/dist/tegel/p-aff4d273.entry.js.map +1 -0
- package/dist/tegel/p-b2dde7a5.entry.js +2 -0
- package/dist/tegel/p-b2dde7a5.entry.js.map +1 -0
- package/dist/tegel/p-b9ec54c5.entry.js +2 -0
- package/dist/tegel/p-b9ec54c5.entry.js.map +1 -0
- package/dist/tegel/p-ba975249.entry.js +2 -0
- package/dist/tegel/p-ba975249.entry.js.map +1 -0
- package/dist/tegel/p-c79b3861.entry.js +2 -0
- package/dist/tegel/p-c79b3861.entry.js.map +1 -0
- package/dist/tegel/p-cd08f5f0.entry.js +2 -0
- package/dist/tegel/p-cd08f5f0.entry.js.map +1 -0
- package/dist/tegel/p-d910763a.entry.js +2 -0
- package/dist/tegel/p-d910763a.entry.js.map +1 -0
- package/dist/tegel/p-e25424af.entry.js +2 -0
- package/dist/tegel/p-e25424af.entry.js.map +1 -0
- package/dist/tegel/p-e5e10d8f.entry.js +2 -0
- package/dist/tegel/p-e5e10d8f.entry.js.map +1 -0
- package/dist/tegel/p-e662e68d.entry.js +2 -0
- package/dist/tegel/p-e662e68d.entry.js.map +1 -0
- package/dist/tegel/p-ebffa726.entry.js +2 -0
- package/dist/tegel/p-ebffa726.entry.js.map +1 -0
- package/dist/tegel/p-ec26fc38.js +2 -0
- package/dist/tegel/p-ec26fc38.js.map +1 -0
- package/dist/tegel/p-fa3dbeec.entry.js +2 -0
- package/dist/tegel/p-fa3dbeec.entry.js.map +1 -0
- package/dist/tegel/p-fbcdf3d9.entry.js +2 -0
- package/dist/tegel/p-fbcdf3d9.entry.js.map +1 -0
- package/dist/tegel/p-fc96cf21.entry.js +2 -0
- package/dist/tegel/p-fc96cf21.entry.js.map +1 -0
- package/dist/tegel/tegel.css +109 -0
- package/dist/tegel/tegel.esm.js +2 -0
- package/dist/tegel/tegel.esm.js.map +1 -0
- package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +17 -0
- package/dist/types/components/accordion/accordion.d.ts +7 -0
- package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
- package/dist/types/components/badge/badge.stories.d.ts +66 -0
- package/dist/types/components/badge/badges.d.ts +16 -0
- package/dist/types/components/banner/banner.stories.d.ts +68 -0
- package/dist/types/components/banner/sdds-banner.d.ts +48 -0
- package/dist/types/components/banner/sdds-banner.stories.d.ts +109 -0
- package/dist/types/components/block/block-native.stories.d.ts +31 -0
- package/dist/types/components/block/sdds-block.d.ts +9 -0
- package/dist/types/components/block/sdds-block.stories.d.ts +32 -0
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +9 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +5 -0
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +12 -0
- package/dist/types/components/button/button-component.d.ts +18 -0
- package/dist/types/components/button/button-native.stories.d.ts +148 -0
- package/dist/types/components/button/button-webcomponent.stories.d.ts +147 -0
- package/dist/types/components/card/card.stories.d.ts +138 -0
- package/dist/types/components/card/sdds-card.d.ts +39 -0
- package/dist/types/components/card/sdds-card.stories.d.ts +139 -0
- package/dist/types/components/checkbox/checkbox.stories.d.ts +39 -0
- package/dist/types/components/checkbox/sdds-checkbox.d.ts +38 -0
- package/dist/types/components/checkbox/sdds-checkbox.stories.d.ts +40 -0
- package/dist/types/components/chips/chips.stories.d.ts +77 -0
- package/dist/types/components/data-table/native-table.stories.d.ts +133 -0
- package/dist/types/components/data-table/table/table.d.ts +47 -0
- package/dist/types/components/data-table/table-body/table-body.d.ts +54 -0
- package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +24 -0
- package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +27 -0
- package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +27 -0
- package/dist/types/components/data-table/table-component-basic.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +99 -0
- package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +38 -0
- package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +148 -0
- package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +88 -0
- package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +88 -0
- package/dist/types/components/data-table/table-component-filtering.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-pagination.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-sorting.stories.d.ts +100 -0
- package/dist/types/components/data-table/table-footer/table-footer.d.ts +50 -0
- package/dist/types/components/data-table/table-header/table-header.d.ts +27 -0
- package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +44 -0
- package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +22 -0
- package/dist/types/components/datetime/datetime.d.ts +42 -0
- package/dist/types/components/datetime/datetime.stories.d.ts +127 -0
- package/dist/types/components/divider/divider.stories.d.ts +65 -0
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +42 -0
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +73 -0
- package/dist/types/components/dropdown/dropdown-native.stories.d.ts +57 -0
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +19 -0
- package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +129 -0
- package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +115 -0
- package/dist/types/components/dropdown/dropdown.d.ts +58 -0
- package/dist/types/components/footer/footer.stories.d.ts +45 -0
- package/dist/types/components/header/header-all.stories.d.ts +29 -0
- package/dist/types/components/header/header-default.stories.d.ts +29 -0
- package/dist/types/components/header/header-inline.stories.d.ts +29 -0
- package/dist/types/components/header/header-search.stories.d.ts +29 -0
- package/dist/types/components/header/header-toolbar.stories.d.ts +29 -0
- package/dist/types/components/icon/icon-font.stories.d.ts +38 -0
- package/dist/types/components/icon/icon-web-component.stories.d.ts +38 -0
- package/dist/types/components/icon/icon.d.ts +12 -0
- package/dist/types/components/link/link.stories.d.ts +33 -0
- package/dist/types/components/link/sdds-link.d.ts +13 -0
- package/dist/types/components/link/sdds-link.stories.d.ts +58 -0
- package/dist/types/components/message/message.stories.d.ts +69 -0
- package/dist/types/components/message/sdds-message.d.ts +14 -0
- package/dist/types/components/message/sdds-message.stories.d.ts +87 -0
- package/dist/types/components/modal/modal-native.stories.d.ts +59 -0
- package/dist/types/components/modal/modal-webcomponent.stories.d.ts +52 -0
- package/dist/types/components/modal/modal.d.ts +17 -0
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +24 -0
- package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +25 -0
- package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +27 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +24 -0
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +27 -0
- package/dist/types/components/radio-button/radio-button-component.stories.d.ts +39 -0
- package/dist/types/components/radio-button/radio-button.d.ts +26 -0
- package/dist/types/components/radio-button/radio-button.stories.d.ts +33 -0
- package/dist/types/components/side-menu/side-menu.stories.d.ts +42 -0
- package/dist/types/components/slider/slider.d.ts +86 -0
- package/dist/types/components/slider/slider.stories.d.ts +169 -0
- package/dist/types/components/spinner/spinner.d.ts +7 -0
- package/dist/types/components/spinner/spinner.stories.d.ts +37 -0
- package/dist/types/components/stepper/stepper.stories.d.ts +56 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tab/inline-tab.d.ts +6 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +40 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +49 -0
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +20 -0
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts +30 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +20 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +13 -0
- package/dist/types/components/textarea/textarea.d.ts +48 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +116 -0
- package/dist/types/components/textfield/textfield.d.ts +52 -0
- package/dist/types/components/textfield/textfield.stories.d.ts +180 -0
- package/dist/types/components/toast/sdds-toast.d.ts +36 -0
- package/dist/types/components/toast/sdds-toast.stories.d.ts +56 -0
- package/dist/types/components/toast/toast.stories.d.ts +69 -0
- package/dist/types/components/toggle/sdds-toggle.d.ts +34 -0
- package/dist/types/components/toggle/sdds-toggle.stories.d.ts +74 -0
- package/dist/types/components/toggle/toggle.stories.d.ts +55 -0
- package/dist/types/components/tooltip/tooltip.d.ts +24 -0
- package/dist/types/components/tooltip/tooltip.stories.d.ts +54 -0
- package/dist/types/components/utility/colour/background-color.stories.d.ts +58 -0
- package/dist/types/components/utility/colour/text-color.stories.d.ts +58 -0
- package/dist/types/components.d.ts +2645 -0
- package/dist/types/foundations-stories/colour/colour-brand.stories.d.ts +13 -0
- package/dist/types/foundations-stories/colour/colour-scales.stories.d.ts +13 -0
- package/dist/types/foundations-stories/colour/colour-semantic.stories.d.ts +13 -0
- package/dist/types/foundations-stories/grid/grid.stories.d.ts +35 -0
- package/dist/types/foundations-stories/spacing/spacing-element.stories.d.ts +8 -0
- package/dist/types/foundations-stories/spacing/spacing-layout.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-body.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-detail.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-headline.stories.d.ts +21 -0
- package/dist/types/foundations-stories/typography/typography-paragraph.stories.d.ts +8 -0
- package/dist/types/global.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1637 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +3 -3
- package/readme.md +34 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Components/Divider',
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: 'centered',
|
|
6
|
+
design: [
|
|
7
|
+
{
|
|
8
|
+
name: 'Figma',
|
|
9
|
+
type: 'figma',
|
|
10
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=993%3A47555&t=M7Ova7xZaoeMwb5e-1',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'Link',
|
|
14
|
+
type: 'link',
|
|
15
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=993%3A47555&t=M7Ova7xZaoeMwb5e-1',
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
argTypes: {
|
|
20
|
+
type: {
|
|
21
|
+
name: 'Type',
|
|
22
|
+
description: 'Choose divider type.',
|
|
23
|
+
control: {
|
|
24
|
+
type: 'radio',
|
|
25
|
+
},
|
|
26
|
+
options: ['Horizontal', 'Vertical'],
|
|
27
|
+
table: {
|
|
28
|
+
defaultValue: { summary: 'Horizontal' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
width: {
|
|
32
|
+
name: 'Width',
|
|
33
|
+
description: 'Choose divider width.',
|
|
34
|
+
control: {
|
|
35
|
+
type: 'number',
|
|
36
|
+
},
|
|
37
|
+
if: { arg: 'type', eq: 'Horizontal' },
|
|
38
|
+
},
|
|
39
|
+
height: {
|
|
40
|
+
name: 'Height',
|
|
41
|
+
description: 'Choose divider height.',
|
|
42
|
+
control: {
|
|
43
|
+
type: 'number',
|
|
44
|
+
},
|
|
45
|
+
if: { arg: 'type', eq: 'Vertical' },
|
|
46
|
+
},
|
|
47
|
+
direction: {
|
|
48
|
+
name: 'Direction',
|
|
49
|
+
description: 'Set the direction of the divider',
|
|
50
|
+
control: {
|
|
51
|
+
type: 'select',
|
|
52
|
+
},
|
|
53
|
+
options: ['Top', 'Right', 'Bottom', 'Left'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
args: {
|
|
57
|
+
type: 'Horizontal',
|
|
58
|
+
width: 150,
|
|
59
|
+
height: 150,
|
|
60
|
+
direction: 'Top',
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
const Template = ({ type, width, height }) => {
|
|
64
|
+
const classLookup = {
|
|
65
|
+
Horizontal: `sdds-divider`,
|
|
66
|
+
Vertical: `sdds-divider-vertical`,
|
|
67
|
+
};
|
|
68
|
+
return formatHtmlPreview(`
|
|
69
|
+
<style>
|
|
70
|
+
${height
|
|
71
|
+
? `/* demo-div is for demonstration purposes only*/
|
|
72
|
+
.demo-div {
|
|
73
|
+
height: ${height}px;
|
|
74
|
+
width: 1px;
|
|
75
|
+
padding: 0px;
|
|
76
|
+
}`
|
|
77
|
+
: ''} ${width
|
|
78
|
+
? `/* demo-div is for demonstration purposes only*/
|
|
79
|
+
.demo-div {
|
|
80
|
+
width: ${width}px;
|
|
81
|
+
height: 1px;
|
|
82
|
+
padding: 0px;
|
|
83
|
+
}`
|
|
84
|
+
: ''}
|
|
85
|
+
</style>
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
<div
|
|
89
|
+
class="demo-div ${classLookup[type]}"></div>
|
|
90
|
+
`);
|
|
91
|
+
};
|
|
92
|
+
const BorderTemplate = ({ direction }) => {
|
|
93
|
+
const directionLookup = {
|
|
94
|
+
Top: 'top',
|
|
95
|
+
Right: 'right',
|
|
96
|
+
Bottom: 'bottom',
|
|
97
|
+
Left: 'left',
|
|
98
|
+
};
|
|
99
|
+
return formatHtmlPreview(`
|
|
100
|
+
<style>
|
|
101
|
+
#demo-wrapper{
|
|
102
|
+
padding: 50px;
|
|
103
|
+
background-color: var(--sdds-grey-958)
|
|
104
|
+
}
|
|
105
|
+
/* border-demo-div is for demonstration purposes only*/
|
|
106
|
+
.border-demo-div {
|
|
107
|
+
height: 200px;
|
|
108
|
+
width: 200px;
|
|
109
|
+
background-color: var(--sdds-grey-868);
|
|
110
|
+
color: var(--sdds-grey-50);
|
|
111
|
+
text-align: center;
|
|
112
|
+
padding: 10px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
</style>
|
|
116
|
+
<div id= "demo-wrapper">
|
|
117
|
+
|
|
118
|
+
<div
|
|
119
|
+
class="border-demo-div sdds-divider-border-${directionLookup[direction]}">
|
|
120
|
+
<H4>DEMO</H4></div></div>
|
|
121
|
+
`);
|
|
122
|
+
};
|
|
123
|
+
export const Default = Template.bind({});
|
|
124
|
+
Default.argTypes = {
|
|
125
|
+
direction: { table: { disable: true } }
|
|
126
|
+
};
|
|
127
|
+
export const Border = BorderTemplate.bind({});
|
|
128
|
+
Border.args = {
|
|
129
|
+
direction: 'Top'
|
|
130
|
+
};
|
|
131
|
+
Border.argTypes = {
|
|
132
|
+
type: { table: { disable: true } }
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=divider.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divider.stories.js","sourceRoot":"","sources":["../../../src/components/divider/divider.stories.tsx"],"names":[],"mappings":"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","sourcesContent":["import { formatHtmlPreview } from '../../utils/utils';\n\nexport default {\n title: 'Components/Divider',\n parameters: {\n layout: 'centered',\n design: [\n {\n name: 'Figma',\n type: 'figma',\n url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=993%3A47555&t=M7Ova7xZaoeMwb5e-1',\n },\n {\n name: 'Link',\n type: 'link',\n url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=993%3A47555&t=M7Ova7xZaoeMwb5e-1',\n },\n ],\n },\n argTypes: {\n type: {\n name: 'Type',\n description: 'Choose divider type.',\n control: {\n type: 'radio',\n },\n options: ['Horizontal', 'Vertical'],\n table: {\n defaultValue: { summary: 'Horizontal' },\n },\n },\n width: {\n name: 'Width',\n description: 'Choose divider width.',\n control: {\n type: 'number',\n },\n if: { arg: 'type', eq: 'Horizontal' },\n },\n height: {\n name: 'Height',\n description: 'Choose divider height.',\n control: {\n type: 'number',\n },\n if: { arg: 'type', eq: 'Vertical' },\n },\n direction: {\n name: 'Direction',\n description: 'Set the direction of the divider',\n control: {\n type: 'select',\n },\n options: ['Top', 'Right', 'Bottom', 'Left'],\n },\n },\n args: {\n type: 'Horizontal',\n width: 150,\n height: 150,\n direction: 'Top',\n },\n};\n\n\nconst Template = ({ type, width, height }) => {\n const classLookup = {\n Horizontal: `sdds-divider`,\n Vertical: `sdds-divider-vertical`,\n };\n \n return formatHtmlPreview(\n `\n <style>\n ${\n height\n ? `/* demo-div is for demonstration purposes only*/\n .demo-div {\n height: ${height}px;\n width: 1px;\n padding: 0px;\n }`\n : ''\n } ${\n width\n ? `/* demo-div is for demonstration purposes only*/\n .demo-div {\n width: ${width}px;\n height: 1px;\n padding: 0px;\n }`\n : ''\n }\n </style>\n \n \n <div\n class=\"demo-div ${classLookup[type]}\"></div>\n `,\n);\n};\n\nconst BorderTemplate= ({ direction }) => {\n const directionLookup = {\n Top: 'top',\n Right: 'right',\n Bottom: 'bottom',\n Left: 'left',\n };\n return formatHtmlPreview(\n `\n <style>\n #demo-wrapper{\n padding: 50px;\n background-color: var(--sdds-grey-958)\n }\n /* border-demo-div is for demonstration purposes only*/\n .border-demo-div {\n height: 200px;\n width: 200px;\n background-color: var(--sdds-grey-868);\n color: var(--sdds-grey-50);\n text-align: center;\n padding: 10px;\n }\n \n </style>\n <div id= \"demo-wrapper\">\n \n <div\n class=\"border-demo-div sdds-divider-border-${directionLookup[direction]}\">\n <H4>DEMO</H4></div></div>\n `,\n);\n};\n\n\nexport const Default = Template.bind({});\nDefault.argTypes={\n direction: { table: { disable: true } } \n }\nexport const Border = BorderTemplate.bind({});\nBorder.args={\n direction: 'Top'\n} \n \nBorder.argTypes={\n type: { table: { disable: true } } \n}\n\n\n"]}
|
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
export class DropdownFilter {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.dataOptions = [];
|
|
5
|
+
this.filteredContent = [];
|
|
6
|
+
this.searchTerm = '';
|
|
7
|
+
this.selectedOptionState = undefined;
|
|
8
|
+
this.dropdownRef = undefined;
|
|
9
|
+
this.placeholder = '';
|
|
10
|
+
this.label = undefined;
|
|
11
|
+
this.defaultOption = undefined;
|
|
12
|
+
this.selectedOption = undefined;
|
|
13
|
+
this.disabled = undefined;
|
|
14
|
+
this.size = 'lg';
|
|
15
|
+
this.inline = false;
|
|
16
|
+
this.labelPosition = 'no-label';
|
|
17
|
+
this.state = 'default';
|
|
18
|
+
this.helper = '';
|
|
19
|
+
this.data = undefined;
|
|
20
|
+
this.selectedLabel = 'no-selected';
|
|
21
|
+
this.selectedValue = 'no-selected';
|
|
22
|
+
}
|
|
23
|
+
componentWillLoad() {
|
|
24
|
+
this.parseData(this.data);
|
|
25
|
+
if (this.defaultOption) {
|
|
26
|
+
this.selectedOptionState = this.defaultOption;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
parseData(newValue) {
|
|
30
|
+
if (newValue)
|
|
31
|
+
this.dataOptions = JSON.parse(newValue);
|
|
32
|
+
this.filteredContent = this.dataOptions;
|
|
33
|
+
}
|
|
34
|
+
updateOptionsContent(event) {
|
|
35
|
+
this.searchTerm = event.detail;
|
|
36
|
+
this.findData();
|
|
37
|
+
}
|
|
38
|
+
selectOptionHandler(event) {
|
|
39
|
+
this.selectedOptionState = event.detail.value;
|
|
40
|
+
this.selectedLabel = event.detail.label;
|
|
41
|
+
this.selectedValue = event.detail.value;
|
|
42
|
+
// Reset list when search is done and user have selected one option
|
|
43
|
+
// To match with animation time for option list to fadeout first
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
this.filteredContent = this.dataOptions;
|
|
46
|
+
}, 200);
|
|
47
|
+
}
|
|
48
|
+
findData() {
|
|
49
|
+
const searchAsRegEx = new RegExp(this.searchTerm, 'gmi');
|
|
50
|
+
this.filteredContent = this.dataOptions.filter(option => {
|
|
51
|
+
if (option.label) {
|
|
52
|
+
const listItem = option.label.toLowerCase();
|
|
53
|
+
const searchResultList = listItem.match(searchAsRegEx);
|
|
54
|
+
if (searchResultList) {
|
|
55
|
+
return searchResultList;
|
|
56
|
+
}
|
|
57
|
+
this.selectedOptionState = null;
|
|
58
|
+
this.selectedLabel = 'no-result';
|
|
59
|
+
this.selectedValue = 'no-result';
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
setOptionsContent() {
|
|
64
|
+
const newList = this.filteredContent.map(obj => (h("sdds-dropdown-option", { tabindex: "0", value: obj.value, class: `${this.selectedOptionState === obj.value ? 'selected' : ''}` }, obj.label)));
|
|
65
|
+
if (newList.length > 0) {
|
|
66
|
+
return newList;
|
|
67
|
+
}
|
|
68
|
+
return (h("sdds-dropdown-option", { tabindex: "-1", value: "no-result", class: "sdds-option--no-result" }, "No result"));
|
|
69
|
+
}
|
|
70
|
+
/** Use this method to reset the dropdown. Then it will go back to its initial state. */
|
|
71
|
+
async resetOption() {
|
|
72
|
+
var _a;
|
|
73
|
+
await ((_a = this.dropdownRef) === null || _a === void 0 ? void 0 : _a.resetOption());
|
|
74
|
+
}
|
|
75
|
+
render() {
|
|
76
|
+
return (h(Host, { "selected-value": this.selectedValue, "selected-text": this.selectedLabel }, h("sdds-dropdown", { ref: el => (this.dropdownRef = el), exportparts: "dropdown-filter-disabled", size: this.size, label: this.label, disabled: this.disabled, labelPosition: this.labelPosition, helper: this.helper, state: this.state, placeholder: this.placeholder, defaultOption: this.defaultOption, selectedOption: this.selectedOption, type: "filter", tabindex: this.disabled ? '-1' : null }, this.setOptionsContent())));
|
|
77
|
+
}
|
|
78
|
+
static get is() { return "sdds-dropdown-filter"; }
|
|
79
|
+
static get encapsulation() { return "shadow"; }
|
|
80
|
+
static get originalStyleUrls() {
|
|
81
|
+
return {
|
|
82
|
+
"$": ["./../dropdown.scss"]
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get styleUrls() {
|
|
86
|
+
return {
|
|
87
|
+
"$": ["../dropdown.css"]
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
static get properties() {
|
|
91
|
+
return {
|
|
92
|
+
"placeholder": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"mutable": false,
|
|
95
|
+
"complexType": {
|
|
96
|
+
"original": "string",
|
|
97
|
+
"resolved": "string",
|
|
98
|
+
"references": {}
|
|
99
|
+
},
|
|
100
|
+
"required": false,
|
|
101
|
+
"optional": false,
|
|
102
|
+
"docs": {
|
|
103
|
+
"tags": [],
|
|
104
|
+
"text": "Placeholder text for dropdown with no selected item"
|
|
105
|
+
},
|
|
106
|
+
"attribute": "placeholder",
|
|
107
|
+
"reflect": false,
|
|
108
|
+
"defaultValue": "''"
|
|
109
|
+
},
|
|
110
|
+
"label": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "string",
|
|
115
|
+
"resolved": "string",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Label for dropdown with no selected item"
|
|
123
|
+
},
|
|
124
|
+
"attribute": "label",
|
|
125
|
+
"reflect": false
|
|
126
|
+
},
|
|
127
|
+
"defaultOption": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "string",
|
|
132
|
+
"resolved": "string",
|
|
133
|
+
"references": {}
|
|
134
|
+
},
|
|
135
|
+
"required": false,
|
|
136
|
+
"optional": false,
|
|
137
|
+
"docs": {
|
|
138
|
+
"tags": [],
|
|
139
|
+
"text": "Add the value of the option to set it as default"
|
|
140
|
+
},
|
|
141
|
+
"attribute": "default-option",
|
|
142
|
+
"reflect": false
|
|
143
|
+
},
|
|
144
|
+
"selectedOption": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"mutable": false,
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "string",
|
|
149
|
+
"resolved": "string",
|
|
150
|
+
"references": {}
|
|
151
|
+
},
|
|
152
|
+
"required": false,
|
|
153
|
+
"optional": false,
|
|
154
|
+
"docs": {
|
|
155
|
+
"tags": [],
|
|
156
|
+
"text": "Add the value of the option as string to set it as new selected value"
|
|
157
|
+
},
|
|
158
|
+
"attribute": "selected-option",
|
|
159
|
+
"reflect": false
|
|
160
|
+
},
|
|
161
|
+
"disabled": {
|
|
162
|
+
"type": "boolean",
|
|
163
|
+
"mutable": false,
|
|
164
|
+
"complexType": {
|
|
165
|
+
"original": "boolean",
|
|
166
|
+
"resolved": "boolean",
|
|
167
|
+
"references": {}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": "Add the value of the option to set it as default"
|
|
174
|
+
},
|
|
175
|
+
"attribute": "disabled",
|
|
176
|
+
"reflect": false
|
|
177
|
+
},
|
|
178
|
+
"size": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"mutable": false,
|
|
181
|
+
"complexType": {
|
|
182
|
+
"original": "'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large'",
|
|
183
|
+
"resolved": "\"large\" | \"lg\" | \"md\" | \"medium\" | \"sm\" | \"small\"",
|
|
184
|
+
"references": {}
|
|
185
|
+
},
|
|
186
|
+
"required": false,
|
|
187
|
+
"optional": false,
|
|
188
|
+
"docs": {
|
|
189
|
+
"tags": [],
|
|
190
|
+
"text": "Controls the size of dropdown. 'sm', 'md' and 'lg' correct values and 'small', 'medium' and 'large' are deprecated"
|
|
191
|
+
},
|
|
192
|
+
"attribute": "size",
|
|
193
|
+
"reflect": false,
|
|
194
|
+
"defaultValue": "'lg'"
|
|
195
|
+
},
|
|
196
|
+
"inline": {
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"mutable": false,
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "boolean",
|
|
201
|
+
"resolved": "boolean",
|
|
202
|
+
"references": {}
|
|
203
|
+
},
|
|
204
|
+
"required": false,
|
|
205
|
+
"optional": false,
|
|
206
|
+
"docs": {
|
|
207
|
+
"tags": [],
|
|
208
|
+
"text": "Set to true to make the width following the label text length"
|
|
209
|
+
},
|
|
210
|
+
"attribute": "inline",
|
|
211
|
+
"reflect": false,
|
|
212
|
+
"defaultValue": "false"
|
|
213
|
+
},
|
|
214
|
+
"labelPosition": {
|
|
215
|
+
"type": "string",
|
|
216
|
+
"mutable": false,
|
|
217
|
+
"complexType": {
|
|
218
|
+
"original": "'no-label' | 'inside' | 'outside'",
|
|
219
|
+
"resolved": "\"inside\" | \"no-label\" | \"outside\"",
|
|
220
|
+
"references": {}
|
|
221
|
+
},
|
|
222
|
+
"required": false,
|
|
223
|
+
"optional": false,
|
|
224
|
+
"docs": {
|
|
225
|
+
"tags": [],
|
|
226
|
+
"text": "Position of label"
|
|
227
|
+
},
|
|
228
|
+
"attribute": "label-position",
|
|
229
|
+
"reflect": false,
|
|
230
|
+
"defaultValue": "'no-label'"
|
|
231
|
+
},
|
|
232
|
+
"state": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"mutable": false,
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "string",
|
|
237
|
+
"resolved": "string",
|
|
238
|
+
"references": {}
|
|
239
|
+
},
|
|
240
|
+
"required": false,
|
|
241
|
+
"optional": false,
|
|
242
|
+
"docs": {
|
|
243
|
+
"tags": [],
|
|
244
|
+
"text": "Support `error` state"
|
|
245
|
+
},
|
|
246
|
+
"attribute": "state",
|
|
247
|
+
"reflect": false,
|
|
248
|
+
"defaultValue": "'default'"
|
|
249
|
+
},
|
|
250
|
+
"helper": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "string",
|
|
255
|
+
"resolved": "string",
|
|
256
|
+
"references": {}
|
|
257
|
+
},
|
|
258
|
+
"required": false,
|
|
259
|
+
"optional": false,
|
|
260
|
+
"docs": {
|
|
261
|
+
"tags": [],
|
|
262
|
+
"text": "Add helper text in the bottom of dropdown"
|
|
263
|
+
},
|
|
264
|
+
"attribute": "helper",
|
|
265
|
+
"reflect": false,
|
|
266
|
+
"defaultValue": "''"
|
|
267
|
+
},
|
|
268
|
+
"data": {
|
|
269
|
+
"type": "string",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "string",
|
|
273
|
+
"resolved": "string",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": false,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": "Data is an array of objects that contains label and value\n`data = [{label:'Option 1', value:'opt-1'},{label:'Option 2', value:'opt-2'}]`"
|
|
281
|
+
},
|
|
282
|
+
"attribute": "data",
|
|
283
|
+
"reflect": false
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
static get states() {
|
|
288
|
+
return {
|
|
289
|
+
"dataOptions": {},
|
|
290
|
+
"filteredContent": {},
|
|
291
|
+
"searchTerm": {},
|
|
292
|
+
"selectedOptionState": {},
|
|
293
|
+
"dropdownRef": {},
|
|
294
|
+
"selectedLabel": {},
|
|
295
|
+
"selectedValue": {}
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
static get methods() {
|
|
299
|
+
return {
|
|
300
|
+
"resetOption": {
|
|
301
|
+
"complexType": {
|
|
302
|
+
"signature": "() => Promise<void>",
|
|
303
|
+
"parameters": [],
|
|
304
|
+
"references": {
|
|
305
|
+
"Promise": {
|
|
306
|
+
"location": "global"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"return": "Promise<void>"
|
|
310
|
+
},
|
|
311
|
+
"docs": {
|
|
312
|
+
"text": "Use this method to reset the dropdown. Then it will go back to its initial state.",
|
|
313
|
+
"tags": []
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
static get watchers() {
|
|
319
|
+
return [{
|
|
320
|
+
"propName": "data",
|
|
321
|
+
"methodName": "parseData"
|
|
322
|
+
}];
|
|
323
|
+
}
|
|
324
|
+
static get listeners() {
|
|
325
|
+
return [{
|
|
326
|
+
"name": "inputSearch",
|
|
327
|
+
"method": "updateOptionsContent",
|
|
328
|
+
"target": undefined,
|
|
329
|
+
"capture": false,
|
|
330
|
+
"passive": false
|
|
331
|
+
}, {
|
|
332
|
+
"name": "selectOption",
|
|
333
|
+
"method": "selectOptionHandler",
|
|
334
|
+
"target": undefined,
|
|
335
|
+
"capture": false,
|
|
336
|
+
"passive": false
|
|
337
|
+
}];
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
//# sourceMappingURL=dropdown-filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-filter.js","sourceRoot":"","sources":["../../../../src/components/dropdown/dropdown-filter/dropdown-filter.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, h, Host, Listen, Method, Prop, State, Watch } from '@stencil/core';\n\n@Component({\n tag: 'sdds-dropdown-filter',\n shadow: true,\n styleUrl: './../dropdown.scss',\n})\nexport class DropdownFilter {\n @State() dataOptions = [];\n\n @State() filteredContent = [];\n\n @State() searchTerm = '';\n\n @State() selectedOptionState: any;\n\n @State() dropdownRef?: HTMLSddsDropdownElement;\n\n /** Placeholder text for dropdown with no selected item */\n @Prop() placeholder: string = '';\n\n /** Label for dropdown with no selected item */\n @Prop() label: string;\n\n /** Add the value of the option to set it as default */\n @Prop() defaultOption: string;\n\n /** Add the value of the option as string to set it as new selected value */\n @Prop() selectedOption: string;\n\n /** Add the value of the option to set it as default */\n @Prop() disabled: boolean;\n\n /** Controls the size of dropdown. 'sm', 'md' and 'lg' correct values and 'small', 'medium' and 'large' are deprecated */\n @Prop() size: 'sm' | 'md' | 'lg' | 'small' | 'medium' | 'large' = 'lg';\n\n /** Set to true to make the width following the label text length */\n @Prop() inline: boolean = false;\n\n /** Position of label */\n @Prop() labelPosition: 'no-label' | 'inside' | 'outside' = 'no-label';\n\n /** Support `error` state */\n @Prop() state: string = 'default';\n\n /** Add helper text in the bottom of dropdown */\n @Prop() helper: string = '';\n\n /** Data is an array of objects that contains label and value\n * `data = [{label:'Option 1', value:'opt-1'},{label:'Option 2', value:'opt-2'}]`\n */\n @Prop() data: string;\n\n @State() selectedLabel: string = 'no-selected';\n\n @State() selectedValue: string = 'no-selected';\n\n componentWillLoad() {\n this.parseData(this.data);\n\n if (this.defaultOption) {\n this.selectedOptionState = this.defaultOption;\n }\n }\n\n @Watch('data')\n parseData(newValue: string) {\n if (newValue) this.dataOptions = JSON.parse(newValue);\n this.filteredContent = this.dataOptions;\n }\n\n @Listen('inputSearch')\n updateOptionsContent(event: CustomEvent<any>) {\n this.searchTerm = event.detail;\n this.findData();\n }\n\n @Listen('selectOption')\n selectOptionHandler(event: CustomEvent<any>) {\n this.selectedOptionState = event.detail.value;\n this.selectedLabel = event.detail.label;\n this.selectedValue = event.detail.value;\n\n // Reset list when search is done and user have selected one option\n // To match with animation time for option list to fadeout first\n setTimeout(() => {\n this.filteredContent = this.dataOptions;\n }, 200);\n }\n\n findData() {\n const searchAsRegEx = new RegExp(this.searchTerm, 'gmi');\n this.filteredContent = this.dataOptions.filter(option => {\n if (option.label) {\n const listItem = option.label.toLowerCase();\n const searchResultList = listItem.match(searchAsRegEx);\n if (searchResultList) {\n return searchResultList;\n }\n this.selectedOptionState = null;\n this.selectedLabel = 'no-result';\n this.selectedValue = 'no-result';\n }\n });\n }\n\n setOptionsContent() {\n const newList = this.filteredContent.map(obj => (\n <sdds-dropdown-option tabindex=\"0\" value={obj.value} class={`${this.selectedOptionState === obj.value ? 'selected' : ''}`}>\n {obj.label}\n </sdds-dropdown-option>\n ));\n if (newList.length > 0) {\n return newList;\n }\n return (\n <sdds-dropdown-option tabindex=\"-1\" value=\"no-result\" class=\"sdds-option--no-result\">\n No result\n </sdds-dropdown-option>\n );\n }\n\n /** Use this method to reset the dropdown. Then it will go back to its initial state. */\n @Method() async resetOption() {\n await this.dropdownRef?.resetOption();\n }\n\n render() {\n return (\n <Host selected-value={this.selectedValue} selected-text={this.selectedLabel}>\n <sdds-dropdown\n ref={el => (this.dropdownRef = el)}\n exportparts=\"dropdown-filter-disabled\"\n size={this.size}\n label={this.label}\n disabled={this.disabled}\n labelPosition={this.labelPosition}\n helper={this.helper}\n state={this.state}\n placeholder={this.placeholder}\n defaultOption={this.defaultOption}\n selectedOption={this.selectedOption}\n type=\"filter\"\n tabindex={this.disabled ? '-1' : null}\n >\n {this.setOptionsContent()}\n </sdds-dropdown>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Dropdown Filter',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'centered',
|
|
7
|
+
notes: readme,
|
|
8
|
+
design: [
|
|
9
|
+
{
|
|
10
|
+
name: 'Figma',
|
|
11
|
+
type: 'figma',
|
|
12
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9754%3A22916&t=M7Ova7xZaoeMwb5e-1',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'Link',
|
|
16
|
+
type: 'link',
|
|
17
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9754%3A22916&t=M7Ova7xZaoeMwb5e-1',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
argTypes: {
|
|
22
|
+
size: {
|
|
23
|
+
name: 'Size',
|
|
24
|
+
control: {
|
|
25
|
+
type: 'radio',
|
|
26
|
+
},
|
|
27
|
+
options: ['Large', 'Medium', 'Small'],
|
|
28
|
+
description: 'Size of the dropdown',
|
|
29
|
+
},
|
|
30
|
+
placeholder: {
|
|
31
|
+
name: 'Placeholder',
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: 'Placeholder text when no option is selected',
|
|
34
|
+
},
|
|
35
|
+
disabled: {
|
|
36
|
+
name: 'Disabled',
|
|
37
|
+
description: 'Disables the component',
|
|
38
|
+
control: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
helper: {
|
|
43
|
+
name: 'Helper text',
|
|
44
|
+
control: {
|
|
45
|
+
type: 'text',
|
|
46
|
+
},
|
|
47
|
+
description: 'Helper text assists the user with additional information about the dropdown',
|
|
48
|
+
},
|
|
49
|
+
defaultOption: {
|
|
50
|
+
description: 'Sets a pre-selected option and replaces placeholder',
|
|
51
|
+
name: 'Default option',
|
|
52
|
+
control: {
|
|
53
|
+
type: 'radio',
|
|
54
|
+
},
|
|
55
|
+
options: ['No default', 'Option 1', 'Option 2', 'Option 3'],
|
|
56
|
+
},
|
|
57
|
+
openDirection: {
|
|
58
|
+
name: 'Open direction',
|
|
59
|
+
description: 'The direction the dropdown will open.',
|
|
60
|
+
control: {
|
|
61
|
+
type: 'radio',
|
|
62
|
+
},
|
|
63
|
+
options: ['Up', 'Down', 'Auto'],
|
|
64
|
+
table: {
|
|
65
|
+
summary: {
|
|
66
|
+
defaultValue: 'auto',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
args: {
|
|
72
|
+
size: 'Large',
|
|
73
|
+
placeholder: 'Placeholder',
|
|
74
|
+
disabled: false,
|
|
75
|
+
helper: '',
|
|
76
|
+
defaultOption: 'Option 1',
|
|
77
|
+
state: 'Default',
|
|
78
|
+
openDirection: 'Auto',
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
const FilterTemplate = ({ size, disabled = false, helper = '', label, state = 'default', placeholder, labelPosition, defaultOption, openDirection, }) => {
|
|
82
|
+
const stateValue = state === 'Error' ? 'error' : 'default';
|
|
83
|
+
const sizeLookup = { Large: 'lg', Medium: 'md', Small: 'sm' };
|
|
84
|
+
const labelPosLookup = { None: 'no-default', Outside: 'outside' };
|
|
85
|
+
const defaultOptionLookup = {
|
|
86
|
+
'No default': 'no-default',
|
|
87
|
+
'Option 1': 'option-1',
|
|
88
|
+
'Option 2': 'option-2',
|
|
89
|
+
'Option 3': 'option-3',
|
|
90
|
+
};
|
|
91
|
+
return formatHtmlPreview(`
|
|
92
|
+
<style>
|
|
93
|
+
/* demo-wrapper is for demonstration purposes only*/
|
|
94
|
+
.demo-wrapper {
|
|
95
|
+
width: 300px;
|
|
96
|
+
height:200px;
|
|
97
|
+
}
|
|
98
|
+
</style>
|
|
99
|
+
|
|
100
|
+
<div class="demo-wrapper">
|
|
101
|
+
<sdds-dropdown-filter
|
|
102
|
+
id="sdds-dropdown-filter"
|
|
103
|
+
size="${sizeLookup[size]}"
|
|
104
|
+
placeholder="${placeholder}"
|
|
105
|
+
disabled="${disabled}"
|
|
106
|
+
open-direction="${openDirection.toLowerCase()}"
|
|
107
|
+
label-position="${labelPosLookup[labelPosition]}"
|
|
108
|
+
${labelPosLookup[labelPosition] !== 'no-default' ? `label="${label}"` : ''}
|
|
109
|
+
${helper !== '' ? `helper="${helper}"` : ''}
|
|
110
|
+
state="${stateValue}"
|
|
111
|
+
data='[
|
|
112
|
+
{
|
|
113
|
+
"value": "option-1",
|
|
114
|
+
"label":"Jakarta"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"value":"option-2"
|
|
118
|
+
,"label":"Stockholm"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"value":"option-3",
|
|
122
|
+
"label":"Barcelona"
|
|
123
|
+
}
|
|
124
|
+
]'
|
|
125
|
+
default-option="${defaultOptionLookup[defaultOption]}">
|
|
126
|
+
</sdds-dropdown-filter>
|
|
127
|
+
</div>
|
|
128
|
+
`);
|
|
129
|
+
};
|
|
130
|
+
export const Default = FilterTemplate.bind({});
|
|
131
|
+
//# sourceMappingURL=dropdown-filter.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-filter.stories.js","sourceRoot":"","sources":["../../../../src/components/dropdown/dropdown-filter/dropdown-filter.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,eAAe;EACb,KAAK,EAAE,4BAA4B;EACnC,UAAU,EAAE;IACV,MAAM,EAAE,UAAU;IAClB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE;MACN;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,8GAA8G;OACpH;MACD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,8GAA8G;OACpH;KACF;GACF;EACD,QAAQ,EAAE;IACR,IAAI,EAAE;MACJ,IAAI,EAAE,MAAM;MACZ,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;OACd;MACD,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC;MACrC,WAAW,EAAE,sBAAsB;KACpC;IACD,WAAW,EAAE;MACX,IAAI,EAAE,aAAa;MACnB,IAAI,EAAE,QAAQ;MACd,WAAW,EAAE,6CAA6C;KAC3D;IACD,QAAQ,EAAE;MACR,IAAI,EAAE,UAAU;MAChB,WAAW,EAAE,wBAAwB;MACrC,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;OAChB;KACF;IACD,MAAM,EAAE;MACN,IAAI,EAAE,aAAa;MACnB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM;OACb;MACD,WAAW,EAAE,6EAA6E;KAC3F;IACD,aAAa,EAAE;MACb,WAAW,EAAE,qDAAqD;MAClE,IAAI,EAAE,gBAAgB;MACtB,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;OACd;MACD,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,CAAC;KAC5D;IACD,aAAa,EAAE;MACb,IAAI,EAAE,gBAAgB;MACtB,WAAW,EAAE,uCAAuC;MACpD,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;OACd;MACD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;MAC/B,KAAK,EAAE;QACL,OAAO,EAAE;UACP,YAAY,EAAE,MAAM;SACrB;OACF;KACF;GACF;EACD,IAAI,EAAE;IACJ,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,EAAE;IACV,aAAa,EAAE,UAAU;IACzB,KAAK,EAAE,SAAS;IAChB,aAAa,EAAE,MAAM;GACtB;CACF,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,EACtB,IAAI,EACJ,QAAQ,GAAG,KAAK,EAChB,MAAM,GAAG,EAAE,EACX,KAAK,EACL,KAAK,GAAG,SAAS,EACjB,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,GACd,EAAE,EAAE;EACH,MAAM,UAAU,GAAG,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;EAC3D,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;EAC9D,MAAM,cAAc,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;EAClE,MAAM,mBAAmB,GAAG;IAC1B,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE,UAAU;IACtB,UAAU,EAAE,UAAU;GACvB,CAAC;EAEF,OAAO,iBAAiB,CAAC;;;;;;;;;;;;gBAYX,UAAU,CAAC,IAAI,CAAC;uBACT,WAAW;oBACd,QAAQ;0BACF,aAAa,CAAC,WAAW,EAAE;0BAC3B,cAAc,CAAC,aAAa,CAAC;UAC7C,cAAc,CAAC,aAAa,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;UACxE,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,WAAW,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE;iBAClC,UAAU;;;;;;;;;;;;;;;0BAeD,mBAAmB,CAAC,aAAa,CAAC;;;GAGzD,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { formatHtmlPreview } from '../../../utils/utils';\nimport readme from './readme.md';\n\nexport default {\n title: 'Components/Dropdown Filter',\n parameters: {\n layout: 'centered',\n notes: readme,\n design: [\n {\n name: 'Figma',\n type: 'figma',\n url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9754%3A22916&t=M7Ova7xZaoeMwb5e-1',\n },\n {\n name: 'Link',\n type: 'link',\n url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9754%3A22916&t=M7Ova7xZaoeMwb5e-1',\n },\n ],\n },\n argTypes: {\n size: {\n name: 'Size',\n control: {\n type: 'radio',\n },\n options: ['Large', 'Medium', 'Small'],\n description: 'Size of the dropdown',\n },\n placeholder: {\n name: 'Placeholder',\n type: 'string',\n description: 'Placeholder text when no option is selected',\n },\n disabled: {\n name: 'Disabled',\n description: 'Disables the component',\n control: {\n type: 'boolean',\n },\n },\n helper: {\n name: 'Helper text',\n control: {\n type: 'text',\n },\n description: 'Helper text assists the user with additional information about the dropdown',\n },\n defaultOption: {\n description: 'Sets a pre-selected option and replaces placeholder',\n name: 'Default option',\n control: {\n type: 'radio',\n },\n options: ['No default', 'Option 1', 'Option 2', 'Option 3'],\n },\n openDirection: {\n name: 'Open direction',\n description: 'The direction the dropdown will open.',\n control: {\n type: 'radio',\n },\n options: ['Up', 'Down', 'Auto'],\n table: {\n summary: {\n defaultValue: 'auto',\n },\n },\n },\n },\n args: {\n size: 'Large',\n placeholder: 'Placeholder',\n disabled: false,\n helper: '',\n defaultOption: 'Option 1',\n state: 'Default',\n openDirection: 'Auto',\n },\n};\n\nconst FilterTemplate = ({\n size,\n disabled = false,\n helper = '',\n label,\n state = 'default',\n placeholder,\n labelPosition,\n defaultOption,\n openDirection,\n}) => {\n const stateValue = state === 'Error' ? 'error' : 'default';\n const sizeLookup = { Large: 'lg', Medium: 'md', Small: 'sm' };\n const labelPosLookup = { None: 'no-default', Outside: 'outside' };\n const defaultOptionLookup = {\n 'No default': 'no-default',\n 'Option 1': 'option-1',\n 'Option 2': 'option-2',\n 'Option 3': 'option-3',\n };\n\n return formatHtmlPreview(`\n <style>\n /* demo-wrapper is for demonstration purposes only*/\n .demo-wrapper {\n width: 300px;\n height:200px;\n }\n </style>\n\n <div class=\"demo-wrapper\">\n <sdds-dropdown-filter\n id=\"sdds-dropdown-filter\"\n size=\"${sizeLookup[size]}\"\n placeholder=\"${placeholder}\"\n disabled=\"${disabled}\"\n open-direction=\"${openDirection.toLowerCase()}\"\n label-position=\"${labelPosLookup[labelPosition]}\"\n ${labelPosLookup[labelPosition] !== 'no-default' ? `label=\"${label}\"` : ''}\n ${helper !== '' ? `helper=\"${helper}\"` : ''}\n state=\"${stateValue}\"\n data='[\n {\n \"value\": \"option-1\",\n \"label\":\"Jakarta\"\n },\n {\n \"value\":\"option-2\"\n ,\"label\":\"Stockholm\"\n },\n {\n \"value\":\"option-3\",\n \"label\":\"Barcelona\"\n }\n ]'\n default-option=\"${defaultOptionLookup[defaultOption]}\">\n </sdds-dropdown-filter>\n </div>\n `);\n};\n\nexport const Default = FilterTemplate.bind({});\n"]}
|