@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,240 @@
|
|
|
1
|
+
import readme from './readme.md';
|
|
2
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Textfield',
|
|
5
|
+
parameters: {
|
|
6
|
+
notes: readme,
|
|
7
|
+
layout: 'centered',
|
|
8
|
+
design: [
|
|
9
|
+
{
|
|
10
|
+
name: 'Figma',
|
|
11
|
+
type: 'figma',
|
|
12
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1675%3A76544&t=Ne6myqwca5m00de7-1',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'Link',
|
|
16
|
+
type: 'link',
|
|
17
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1675%3A76544&t=Ne6myqwca5m00de7-1',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
argTypes: {
|
|
22
|
+
placeholderText: {
|
|
23
|
+
name: 'Placeholder',
|
|
24
|
+
description: 'Placeholder text',
|
|
25
|
+
control: {
|
|
26
|
+
type: 'text',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
type: {
|
|
30
|
+
name: 'Type',
|
|
31
|
+
description: 'Which type of textfield',
|
|
32
|
+
control: {
|
|
33
|
+
type: 'radio',
|
|
34
|
+
options: ['Password', 'Text'],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
modeVariant: {
|
|
38
|
+
name: 'Mode variant',
|
|
39
|
+
control: {
|
|
40
|
+
type: 'radio',
|
|
41
|
+
},
|
|
42
|
+
options: ['Inherit from parent', 'Primary', 'Secondary'],
|
|
43
|
+
table: {
|
|
44
|
+
defaultValue: { summary: 'Inherit from parent' },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
size: {
|
|
48
|
+
name: 'Size',
|
|
49
|
+
description: 'Switch between different sizes',
|
|
50
|
+
control: {
|
|
51
|
+
type: 'radio',
|
|
52
|
+
options: ['Large', 'Medium', 'Small'],
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
minWidth: {
|
|
56
|
+
name: 'No minimum width',
|
|
57
|
+
description: 'Toggle the minimum width.',
|
|
58
|
+
control: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
},
|
|
61
|
+
table: {
|
|
62
|
+
defaultValue: { summary: false },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
disabled: {
|
|
66
|
+
description: 'Set textfield to disabled state',
|
|
67
|
+
name: 'Disabled',
|
|
68
|
+
control: {
|
|
69
|
+
type: 'boolean',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
readonly: {
|
|
73
|
+
description: 'Set textfield to read only',
|
|
74
|
+
name: 'Read Only',
|
|
75
|
+
control: {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
label: {
|
|
80
|
+
description: 'Label text for specific textfield',
|
|
81
|
+
name: 'Label text',
|
|
82
|
+
control: {
|
|
83
|
+
type: 'text',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
labelPosition: {
|
|
87
|
+
name: 'Label position',
|
|
88
|
+
control: {
|
|
89
|
+
type: 'radio',
|
|
90
|
+
},
|
|
91
|
+
options: ['None', 'Inside', 'Outside'],
|
|
92
|
+
description: 'Label text position',
|
|
93
|
+
},
|
|
94
|
+
prefix: {
|
|
95
|
+
name: 'Prefix',
|
|
96
|
+
description: 'Add prefix symbol/text before the textfield',
|
|
97
|
+
control: {
|
|
98
|
+
type: 'boolean',
|
|
99
|
+
},
|
|
100
|
+
table: {
|
|
101
|
+
defaultValue: { summary: false },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
prefixType: {
|
|
105
|
+
name: 'Prefix type',
|
|
106
|
+
description: 'Choose icon or text for prefix.',
|
|
107
|
+
control: {
|
|
108
|
+
type: 'radio',
|
|
109
|
+
},
|
|
110
|
+
options: ['Icon', 'Text'],
|
|
111
|
+
if: { arg: 'prefix', eq: true },
|
|
112
|
+
},
|
|
113
|
+
suffix: {
|
|
114
|
+
name: 'Suffix',
|
|
115
|
+
description: 'Add suffix symbol/text after the textfield',
|
|
116
|
+
control: {
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
},
|
|
119
|
+
table: {
|
|
120
|
+
defaultValue: { summary: false },
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
suffixType: {
|
|
124
|
+
name: 'Suffix type',
|
|
125
|
+
description: 'Choose icon or text for suffix.',
|
|
126
|
+
control: {
|
|
127
|
+
type: 'radio',
|
|
128
|
+
},
|
|
129
|
+
options: ['Icon', 'Text'],
|
|
130
|
+
if: { arg: 'suffix', eq: true },
|
|
131
|
+
},
|
|
132
|
+
helper: {
|
|
133
|
+
name: 'Helper text',
|
|
134
|
+
description: 'Add helper text for the textfield',
|
|
135
|
+
control: {
|
|
136
|
+
type: 'text',
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
maxLength: {
|
|
140
|
+
name: 'Max length',
|
|
141
|
+
description: 'Set a maximum value of how long the text can be.',
|
|
142
|
+
control: {
|
|
143
|
+
type: 'number',
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
state: {
|
|
147
|
+
name: 'State',
|
|
148
|
+
description: 'Switch between success or error state',
|
|
149
|
+
control: {
|
|
150
|
+
type: 'radio',
|
|
151
|
+
},
|
|
152
|
+
options: ['Default', 'Success', 'Error'],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
args: {
|
|
156
|
+
placeholderText: 'Placeholder',
|
|
157
|
+
disabled: false,
|
|
158
|
+
readonly: false,
|
|
159
|
+
label: 'Label',
|
|
160
|
+
labelPosition: 'None',
|
|
161
|
+
helper: '',
|
|
162
|
+
maxLength: 0,
|
|
163
|
+
state: 'Default',
|
|
164
|
+
suffix: false,
|
|
165
|
+
suffixType: 'Icon',
|
|
166
|
+
prefix: false,
|
|
167
|
+
prefixType: 'Icon',
|
|
168
|
+
minWidth: 'Default',
|
|
169
|
+
size: 'Large',
|
|
170
|
+
type: 'Text',
|
|
171
|
+
modeVariant: 'Inherit from parent',
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
const Template = ({ type, placeholderText, size, minWidth, disabled, readonly, label, labelPosition, state, helper, prefix, prefixType, suffix, suffixType, maxLength, modeVariant, }) => {
|
|
175
|
+
const maxlength = maxLength > 0 ? `max-length="${maxLength}"` : '';
|
|
176
|
+
const stateValue = state.toLowerCase();
|
|
177
|
+
const sizeLookUp = {
|
|
178
|
+
Large: 'lg',
|
|
179
|
+
Medium: 'md',
|
|
180
|
+
Small: 'sm',
|
|
181
|
+
};
|
|
182
|
+
return formatHtmlPreview(`
|
|
183
|
+
<style>
|
|
184
|
+
/* demo-wrapper is for demonstration purposes only*/
|
|
185
|
+
.demo-wrapper {
|
|
186
|
+
width: 200px;
|
|
187
|
+
height: 150px;
|
|
188
|
+
}
|
|
189
|
+
</style>
|
|
190
|
+
|
|
191
|
+
<div class="demo-wrapper">
|
|
192
|
+
<sdds-textfield
|
|
193
|
+
type="${type}"
|
|
194
|
+
size="${sizeLookUp[size]}"
|
|
195
|
+
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
196
|
+
state="${stateValue}"
|
|
197
|
+
label="${label}"
|
|
198
|
+
label-position="${labelPosition.toLowerCase()}"
|
|
199
|
+
${helper ? `helper="${helper}"` : ''}
|
|
200
|
+
${maxlength}
|
|
201
|
+
${disabled ? 'disabled' : ''}
|
|
202
|
+
${readonly ? 'read-only' : ''}
|
|
203
|
+
${minWidth ? 'no-min-width' : ''}
|
|
204
|
+
placeholder="${placeholderText}" >
|
|
205
|
+
${prefix
|
|
206
|
+
? `
|
|
207
|
+
<span slot="sdds-prefix">
|
|
208
|
+
${prefixType === 'Text' ? '$' : '<sdds-icon name="truck" size="20px"></sdds-icon> '}
|
|
209
|
+
</span>`
|
|
210
|
+
: ''}
|
|
211
|
+
${suffix
|
|
212
|
+
? `
|
|
213
|
+
<span slot="sdds-suffix">
|
|
214
|
+
${suffixType === 'Text' ? '$' : '<sdds-icon name="truck" size="20px"></sdds-icon> '}
|
|
215
|
+
</span>`
|
|
216
|
+
: ''}
|
|
217
|
+
</sdds-textfield>
|
|
218
|
+
</div>
|
|
219
|
+
<!-- Script tag for demo purposes -->
|
|
220
|
+
<script>
|
|
221
|
+
textElement = document.querySelector('sdds-textfield')
|
|
222
|
+
textElement.addEventListener('sddsFocus',(event) => {
|
|
223
|
+
console.log(event)
|
|
224
|
+
})
|
|
225
|
+
textElement.addEventListener('sddsBlur',(event) => {
|
|
226
|
+
console.log(event)
|
|
227
|
+
})
|
|
228
|
+
textElement.addEventListener('sddsInput',(event) => {
|
|
229
|
+
console.log(event)
|
|
230
|
+
})
|
|
231
|
+
textElement.addEventListener('sddsChange',(event) => {
|
|
232
|
+
console.log(event)
|
|
233
|
+
})
|
|
234
|
+
</script>
|
|
235
|
+
`);
|
|
236
|
+
};
|
|
237
|
+
// ${true ? '<sdds-icon name="cross" slot="sdds-prefix"></sdds-icon>' : ''}
|
|
238
|
+
export const Default = Template.bind({});
|
|
239
|
+
Default.args = {};
|
|
240
|
+
//# sourceMappingURL=textfield.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textfield.stories.js","sourceRoot":"","sources":["../../../src/components/textfield/textfield.stories.tsx"],"names":[],"mappings":"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","sourcesContent":["import readme from './readme.md';\nimport { formatHtmlPreview } from '../../utils/utils';\n\nexport default {\n title: 'Components/Textfield',\n parameters: {\n notes: readme,\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=1675%3A76544&t=Ne6myqwca5m00de7-1',\n },\n {\n name: 'Link',\n type: 'link',\n url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=1675%3A76544&t=Ne6myqwca5m00de7-1',\n },\n ],\n },\n argTypes: {\n placeholderText: {\n name: 'Placeholder',\n description: 'Placeholder text',\n control: {\n type: 'text',\n },\n },\n type: {\n name: 'Type',\n description: 'Which type of textfield',\n control: {\n type: 'radio',\n options: ['Password', 'Text'],\n },\n },\n modeVariant: {\n name: 'Mode variant',\n control: {\n type: 'radio',\n },\n options: ['Inherit from parent', 'Primary', 'Secondary'],\n table: {\n defaultValue: { summary: 'Inherit from parent' },\n },\n },\n size: {\n name: 'Size',\n description: 'Switch between different sizes',\n control: {\n type: 'radio',\n options: ['Large', 'Medium', 'Small'],\n },\n },\n minWidth: {\n name: 'No minimum width',\n description: 'Toggle the minimum width.',\n control: {\n type: 'boolean',\n },\n table: {\n defaultValue: { summary: false },\n },\n },\n disabled: {\n description: 'Set textfield to disabled state',\n name: 'Disabled',\n control: {\n type: 'boolean',\n },\n },\n readonly: {\n description: 'Set textfield to read only',\n name: 'Read Only',\n control: {\n type: 'boolean',\n },\n },\n label: {\n description: 'Label text for specific textfield',\n name: 'Label text',\n control: {\n type: 'text',\n },\n },\n labelPosition: {\n name: 'Label position',\n control: {\n type: 'radio',\n },\n options: ['None', 'Inside', 'Outside'],\n description: 'Label text position',\n },\n prefix: {\n name: 'Prefix',\n description: 'Add prefix symbol/text before the textfield',\n control: {\n type: 'boolean',\n },\n table: {\n defaultValue: { summary: false },\n },\n },\n prefixType: {\n name: 'Prefix type',\n description: 'Choose icon or text for prefix.',\n control: {\n type: 'radio',\n },\n options: ['Icon', 'Text'],\n if: { arg: 'prefix', eq: true },\n },\n suffix: {\n name: 'Suffix',\n description: 'Add suffix symbol/text after the textfield',\n control: {\n type: 'boolean',\n },\n table: {\n defaultValue: { summary: false },\n },\n },\n suffixType: {\n name: 'Suffix type',\n description: 'Choose icon or text for suffix.',\n control: {\n type: 'radio',\n },\n options: ['Icon', 'Text'],\n if: { arg: 'suffix', eq: true },\n },\n helper: {\n name: 'Helper text',\n description: 'Add helper text for the textfield',\n control: {\n type: 'text',\n },\n },\n maxLength: {\n name: 'Max length',\n description: 'Set a maximum value of how long the text can be.',\n control: {\n type: 'number',\n },\n },\n state: {\n name: 'State',\n description: 'Switch between success or error state',\n control: {\n type: 'radio',\n },\n options: ['Default', 'Success', 'Error'],\n },\n },\n args: {\n placeholderText: 'Placeholder',\n disabled: false,\n readonly: false,\n label: 'Label',\n labelPosition: 'None',\n helper: '',\n maxLength: 0,\n state: 'Default',\n suffix: false,\n suffixType: 'Icon',\n prefix: false,\n prefixType: 'Icon',\n minWidth: 'Default',\n size: 'Large',\n type: 'Text',\n modeVariant: 'Inherit from parent',\n },\n};\n\nconst Template = ({\n type,\n placeholderText,\n size,\n minWidth,\n disabled,\n readonly,\n label,\n labelPosition,\n state,\n helper,\n prefix,\n prefixType,\n suffix,\n suffixType,\n maxLength,\n modeVariant,\n}) => {\n const maxlength = maxLength > 0 ? `max-length=\"${maxLength}\"` : '';\n const stateValue = state.toLowerCase();\n const sizeLookUp = {\n Large: 'lg',\n Medium: 'md',\n Small: 'sm',\n };\n return formatHtmlPreview(\n `\n <style>\n /* demo-wrapper is for demonstration purposes only*/\n .demo-wrapper {\n width: 200px;\n height: 150px;\n }\n </style>\n\n <div class=\"demo-wrapper\">\n <sdds-textfield\n type=\"${type}\"\n size=\"${sizeLookUp[size]}\"\n ${modeVariant !== 'Inherit from parent' ? `mode-variant=\"${modeVariant.toLowerCase()}\"` : ''}\n state=\"${stateValue}\"\n label=\"${label}\"\n label-position=\"${labelPosition.toLowerCase()}\"\n ${helper ? `helper=\"${helper}\"` : ''}\n ${maxlength}\n ${disabled ? 'disabled' : ''}\n ${readonly ? 'read-only' : ''}\n ${minWidth ? 'no-min-width' : ''}\n placeholder=\"${placeholderText}\" >\n ${\n prefix\n ? `\n <span slot=\"sdds-prefix\">\n ${prefixType === 'Text' ? '$' : '<sdds-icon name=\"truck\" size=\"20px\"></sdds-icon> '}\n </span>`\n : ''\n }\n ${\n suffix\n ? `\n <span slot=\"sdds-suffix\">\n ${suffixType === 'Text' ? '$' : '<sdds-icon name=\"truck\" size=\"20px\"></sdds-icon> '}\n </span>`\n : ''\n }\n </sdds-textfield>\n </div>\n <!-- Script tag for demo purposes -->\n <script>\n textElement = document.querySelector('sdds-textfield')\n textElement.addEventListener('sddsFocus',(event) => {\n console.log(event)\n })\n textElement.addEventListener('sddsBlur',(event) => {\n console.log(event)\n })\n textElement.addEventListener('sddsInput',(event) => {\n console.log(event)\n })\n textElement.addEventListener('sddsChange',(event) => {\n console.log(event)\n })\n </script>\n `,\n );\n};\n\n// ${true ? '<sdds-icon name=\"cross\" slot=\"sdds-prefix\"></sdds-icon>' : ''}\n\nexport const Default = Template.bind({});\n\nDefault.args = {};\n"]}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
:host(.hide) {
|
|
2
|
+
display: none;
|
|
3
|
+
visibility: hidden;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
:host {
|
|
7
|
+
z-index: 700;
|
|
8
|
+
}
|
|
9
|
+
:host .toast-wrapper {
|
|
10
|
+
display: flex;
|
|
11
|
+
width: 348px;
|
|
12
|
+
background-color: var(--sdds-toast-background-color);
|
|
13
|
+
border-radius: 4px;
|
|
14
|
+
}
|
|
15
|
+
:host .toast-wrapper.information {
|
|
16
|
+
border-left: 4px solid var(--sdds-information);
|
|
17
|
+
}
|
|
18
|
+
:host .toast-wrapper.information sdds-icon {
|
|
19
|
+
color: var(--sdds-information);
|
|
20
|
+
}
|
|
21
|
+
:host .toast-wrapper.success {
|
|
22
|
+
border-left: 4px solid var(--sdds-positive);
|
|
23
|
+
}
|
|
24
|
+
:host .toast-wrapper.success sdds-icon {
|
|
25
|
+
color: var(--sdds-positive);
|
|
26
|
+
}
|
|
27
|
+
:host .toast-wrapper.error {
|
|
28
|
+
border-left: 4px solid var(--sdds-negative);
|
|
29
|
+
}
|
|
30
|
+
:host .toast-wrapper.error sdds-icon {
|
|
31
|
+
color: var(--sdds-negative);
|
|
32
|
+
}
|
|
33
|
+
:host .toast-wrapper.warning {
|
|
34
|
+
border-left: 4px solid var(--sdds-warning);
|
|
35
|
+
}
|
|
36
|
+
:host .toast-wrapper.warning sdds-icon {
|
|
37
|
+
color: var(--sdds-warning);
|
|
38
|
+
}
|
|
39
|
+
:host .toast-wrapper button.toast-close {
|
|
40
|
+
height: 20px;
|
|
41
|
+
width: 20px;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
margin: 14px 14px 0 0;
|
|
46
|
+
border: none;
|
|
47
|
+
background: transparent;
|
|
48
|
+
}
|
|
49
|
+
:host .toast-wrapper button.toast-close:hover {
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
}
|
|
52
|
+
:host .toast-wrapper button.toast-close:focus {
|
|
53
|
+
outline: 2px solid var(--sdds-blue-400);
|
|
54
|
+
outline-offset: -2px;
|
|
55
|
+
}
|
|
56
|
+
:host .toast-wrapper button.toast-close sdds-icon {
|
|
57
|
+
color: var(--sdds-toast-dissmiss-color);
|
|
58
|
+
padding: 0;
|
|
59
|
+
}
|
|
60
|
+
:host sdds-icon {
|
|
61
|
+
padding: 14px 0 0 12px;
|
|
62
|
+
}
|
|
63
|
+
:host .toast-content {
|
|
64
|
+
padding: 16px 0 16px 10px;
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-direction: column;
|
|
67
|
+
flex: 1;
|
|
68
|
+
}
|
|
69
|
+
:host .toast-content .toast-header {
|
|
70
|
+
font: var(--sdds-headline-07);
|
|
71
|
+
letter-spacing: var(--sdds-headline-07-ls);
|
|
72
|
+
color: var(--sdds-toast-headline-color);
|
|
73
|
+
}
|
|
74
|
+
:host .toast-content .toast-header.no-subheader {
|
|
75
|
+
margin-bottom: 4px;
|
|
76
|
+
}
|
|
77
|
+
:host .toast-content .toast-header.only-header {
|
|
78
|
+
margin-bottom: 0;
|
|
79
|
+
}
|
|
80
|
+
:host .toast-content .toast-subheader slot::slotted(*) {
|
|
81
|
+
margin-top: 4px;
|
|
82
|
+
color: var(--sdds-toast-subheadline-color);
|
|
83
|
+
font: var(--sdds-detail-02);
|
|
84
|
+
letter-spacing: var(--sdds-detail-02-ls);
|
|
85
|
+
padding-bottom: 16px;
|
|
86
|
+
max-width: 252px;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
}
|
|
91
|
+
:host .toast-content .toast-subheader.no-link slot::slotted(*) {
|
|
92
|
+
padding-bottom: 0;
|
|
93
|
+
}
|
|
94
|
+
:host slot[name=toast-link]::slotted(*) {
|
|
95
|
+
color: var(--sdds-toast-link-color);
|
|
96
|
+
}
|
|
97
|
+
:host .sdds-mode-variant-primary {
|
|
98
|
+
--sdds-toast-background: var(--sdds-toast-background-primary);
|
|
99
|
+
}
|
|
100
|
+
:host .sdds-mode-variant-secondary {
|
|
101
|
+
--sdds-toast-background: var(--sdds-toast-background-secondary);
|
|
102
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class SddsToast {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.getIconName = () => {
|
|
5
|
+
switch (this.type) {
|
|
6
|
+
case 'information':
|
|
7
|
+
return 'info';
|
|
8
|
+
case 'error':
|
|
9
|
+
return 'error';
|
|
10
|
+
case 'warning':
|
|
11
|
+
return 'warning';
|
|
12
|
+
case 'success':
|
|
13
|
+
return 'tick';
|
|
14
|
+
default:
|
|
15
|
+
return 'info';
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
this.handleClose = () => {
|
|
19
|
+
const sddsCloseEvent = this.sddsClose.emit({
|
|
20
|
+
toastId: this.toastId,
|
|
21
|
+
});
|
|
22
|
+
if (!sddsCloseEvent.defaultPrevented) {
|
|
23
|
+
this.hidden = true;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
this.getHeaderClasses = () => {
|
|
27
|
+
if (!this.hasSubheader && !this.hasLink) {
|
|
28
|
+
return 'only-header';
|
|
29
|
+
}
|
|
30
|
+
if (!this.hasSubheader) {
|
|
31
|
+
return 'no-subheader';
|
|
32
|
+
}
|
|
33
|
+
return '';
|
|
34
|
+
};
|
|
35
|
+
this.toastId = crypto.randomUUID();
|
|
36
|
+
this.header = undefined;
|
|
37
|
+
this.subheader = undefined;
|
|
38
|
+
this.type = 'information';
|
|
39
|
+
this.hidden = false;
|
|
40
|
+
this.toastRole = 'alert';
|
|
41
|
+
this.hasSubheader = undefined;
|
|
42
|
+
this.hasLink = undefined;
|
|
43
|
+
}
|
|
44
|
+
/** Hides the toast. */
|
|
45
|
+
async hideToast() {
|
|
46
|
+
this.hidden = true;
|
|
47
|
+
return {
|
|
48
|
+
toastId: this.toastId,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** Shows the toast. */
|
|
52
|
+
async showToast() {
|
|
53
|
+
this.hidden = false;
|
|
54
|
+
return {
|
|
55
|
+
toastId: this.toastId,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
connectedCallback() {
|
|
59
|
+
const children = Array.from(this.host.children);
|
|
60
|
+
this.hasSubheader = children.some((childElement) => childElement.slot === 'toast-subheader');
|
|
61
|
+
this.hasLink = children.some((childElement) => childElement.slot === 'toast-link');
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
return (h(Host, { role: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: `${this.hidden ? 'hide' : 'show'}` }, h("div", { class: `
|
|
65
|
+
toast-wrapper
|
|
66
|
+
${this.type}
|
|
67
|
+
` }, h("sdds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `toast-content` }, h("div", { class: `toast-header
|
|
68
|
+
${this.getHeaderClasses()}
|
|
69
|
+
` }, this.header), h("div", { class: `toast-subheader ${this.hasLink ? '' : 'no-link'}` }, h("slot", { name: "toast-subheader" })), h("slot", { name: "toast-link" })), h("button", { onClick: () => {
|
|
70
|
+
this.handleClose();
|
|
71
|
+
}, class: `toast-close` }, h("sdds-icon", { name: "cross", size: "20px" })))));
|
|
72
|
+
}
|
|
73
|
+
static get is() { return "sdds-toast"; }
|
|
74
|
+
static get encapsulation() { return "shadow"; }
|
|
75
|
+
static get originalStyleUrls() {
|
|
76
|
+
return {
|
|
77
|
+
"$": ["sdds-toast.scss"]
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
static get styleUrls() {
|
|
81
|
+
return {
|
|
82
|
+
"$": ["sdds-toast.css"]
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
static get properties() {
|
|
86
|
+
return {
|
|
87
|
+
"toastId": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"mutable": false,
|
|
90
|
+
"complexType": {
|
|
91
|
+
"original": "string",
|
|
92
|
+
"resolved": "string",
|
|
93
|
+
"references": {}
|
|
94
|
+
},
|
|
95
|
+
"required": false,
|
|
96
|
+
"optional": false,
|
|
97
|
+
"docs": {
|
|
98
|
+
"tags": [],
|
|
99
|
+
"text": "ID for the toast. Randomly generated if not specified."
|
|
100
|
+
},
|
|
101
|
+
"attribute": "toast-id",
|
|
102
|
+
"reflect": false,
|
|
103
|
+
"defaultValue": "crypto.randomUUID()"
|
|
104
|
+
},
|
|
105
|
+
"header": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "string",
|
|
110
|
+
"resolved": "string",
|
|
111
|
+
"references": {}
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"optional": false,
|
|
115
|
+
"docs": {
|
|
116
|
+
"tags": [],
|
|
117
|
+
"text": "Header text for the component."
|
|
118
|
+
},
|
|
119
|
+
"attribute": "header",
|
|
120
|
+
"reflect": false
|
|
121
|
+
},
|
|
122
|
+
"subheader": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "string",
|
|
127
|
+
"resolved": "string",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": "Subheader text for the component."
|
|
135
|
+
},
|
|
136
|
+
"attribute": "subheader",
|
|
137
|
+
"reflect": false
|
|
138
|
+
},
|
|
139
|
+
"type": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "'information' | 'error' | 'warning' | 'success'",
|
|
144
|
+
"resolved": "\"error\" | \"information\" | \"success\" | \"warning\"",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Type of toast."
|
|
152
|
+
},
|
|
153
|
+
"attribute": "type",
|
|
154
|
+
"reflect": false,
|
|
155
|
+
"defaultValue": "'information'"
|
|
156
|
+
},
|
|
157
|
+
"hidden": {
|
|
158
|
+
"type": "boolean",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "boolean",
|
|
162
|
+
"resolved": "boolean",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "Hides the toast."
|
|
170
|
+
},
|
|
171
|
+
"attribute": "hidden",
|
|
172
|
+
"reflect": false,
|
|
173
|
+
"defaultValue": "false"
|
|
174
|
+
},
|
|
175
|
+
"toastRole": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "'alert' | 'log' | 'status'",
|
|
180
|
+
"resolved": "\"alert\" | \"log\" | \"status\"",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "ARIA toastRole for the toast."
|
|
188
|
+
},
|
|
189
|
+
"attribute": "toast-role",
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "'alert'"
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
static get states() {
|
|
196
|
+
return {
|
|
197
|
+
"hasSubheader": {},
|
|
198
|
+
"hasLink": {}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
static get events() {
|
|
202
|
+
return [{
|
|
203
|
+
"method": "sddsClose",
|
|
204
|
+
"name": "sddsClose",
|
|
205
|
+
"bubbles": true,
|
|
206
|
+
"cancelable": true,
|
|
207
|
+
"composed": true,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [],
|
|
210
|
+
"text": "Sends unique toast identifier component is closed."
|
|
211
|
+
},
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "{\n toastId: string;\n }",
|
|
214
|
+
"resolved": "{ toastId: string; }",
|
|
215
|
+
"references": {}
|
|
216
|
+
}
|
|
217
|
+
}];
|
|
218
|
+
}
|
|
219
|
+
static get methods() {
|
|
220
|
+
return {
|
|
221
|
+
"hideToast": {
|
|
222
|
+
"complexType": {
|
|
223
|
+
"signature": "() => Promise<{ toastId: string; }>",
|
|
224
|
+
"parameters": [],
|
|
225
|
+
"references": {
|
|
226
|
+
"Promise": {
|
|
227
|
+
"location": "global"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"return": "Promise<{ toastId: string; }>"
|
|
231
|
+
},
|
|
232
|
+
"docs": {
|
|
233
|
+
"text": "Hides the toast.",
|
|
234
|
+
"tags": []
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"showToast": {
|
|
238
|
+
"complexType": {
|
|
239
|
+
"signature": "() => Promise<{ toastId: string; }>",
|
|
240
|
+
"parameters": [],
|
|
241
|
+
"references": {
|
|
242
|
+
"Promise": {
|
|
243
|
+
"location": "global"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"return": "Promise<{ toastId: string; }>"
|
|
247
|
+
},
|
|
248
|
+
"docs": {
|
|
249
|
+
"text": "Shows the toast.",
|
|
250
|
+
"tags": []
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
static get elementRef() { return "host"; }
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=sdds-toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdds-toast.js","sourceRoot":"","sources":["../../../src/components/toast/sdds-toast.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, Host, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\nimport { HostElement, Method, State } from '@stencil/core/internal';\n\n@Component({\n tag: 'sdds-toast',\n styleUrl: 'sdds-toast.scss',\n shadow: true,\n})\nexport class SddsToast {\n /** ID for the toast. Randomly generated if not specified. */\n @Prop() toastId: string = crypto.randomUUID();\n\n /** Header text for the component. */\n @Prop() header: string;\n\n /** Subheader text for the component. */\n @Prop() subheader: string;\n\n /** Type of toast. */\n @Prop() type: 'information' | 'error' | 'warning' | 'success' = 'information';\n\n /** Hides the toast. */\n @Prop() hidden: boolean = false;\n\n /** ARIA toastRole for the toast. */\n @Prop() toastRole: 'alert' | 'log' | 'status' = 'alert';\n\n @Element() host: HostElement;\n\n @State() hasSubheader: boolean;\n\n @State() hasLink: boolean;\n\n /** Hides the toast. */\n @Method()\n async hideToast() {\n this.hidden = true;\n return {\n toastId: this.toastId,\n };\n }\n\n /** Shows the toast. */\n @Method()\n async showToast() {\n this.hidden = false;\n return {\n toastId: this.toastId,\n };\n }\n\n /** Sends unique toast identifier component is closed. */\n @Event({\n eventName: 'sddsClose',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n sddsClose: EventEmitter<{\n toastId: string;\n }>;\n\n getIconName = () => {\n switch (this.type) {\n case 'information':\n return 'info';\n case 'error':\n return 'error';\n case 'warning':\n return 'warning';\n case 'success':\n return 'tick';\n default:\n return 'info';\n }\n };\n\n handleClose = () => {\n const sddsCloseEvent = this.sddsClose.emit({\n toastId: this.toastId,\n });\n if (!sddsCloseEvent.defaultPrevented) {\n this.hidden = true;\n }\n };\n\n connectedCallback() {\n const children = Array.from(this.host.children);\n this.hasSubheader = children.some((childElement) => childElement.slot === 'toast-subheader');\n this.hasLink = children.some((childElement) => childElement.slot === 'toast-link');\n }\n\n getHeaderClasses = () => {\n if (!this.hasSubheader && !this.hasLink) {\n return 'only-header';\n }\n if (!this.hasSubheader) {\n return 'no-subheader';\n }\n return '';\n };\n\n render() {\n return (\n <Host\n role={this.toastRole}\n aria-describedby={this.host.getAttribute('aria-describedby')}\n class={`${this.hidden ? 'hide' : 'show'}`}\n >\n <div\n class={`\n toast-wrapper\n ${this.type}\n `}\n >\n <sdds-icon name={this.getIconName()} size=\"20px\"></sdds-icon>\n <div class={`toast-content`}>\n <div\n class={`toast-header\n ${this.getHeaderClasses()}\n `}\n >\n {this.header}\n </div>\n <div class={`toast-subheader ${this.hasLink ? '' : 'no-link'}`}>\n <slot name=\"toast-subheader\"></slot>\n </div>\n <slot name=\"toast-link\"></slot>\n </div>\n <button\n onClick={() => {\n this.handleClose();\n }}\n class={`toast-close`}\n >\n <sdds-icon name=\"cross\" size=\"20px\"></sdds-icon>\n </button>\n </div>\n </Host>\n );\n }\n}\n"]}
|