@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 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.stories.js","sourceRoot":"","sources":["../../../src/components/stepper/stepper.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAe;EACb,KAAK,EAAE,oBAAoB;EAC3B,UAAU,EAAE;IACV,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE;MACN;QACE,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,OAAO;QACb,GAAG,EAAE,+GAA+G;OACrH;MACD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,GAAG,EAAE,+GAA+G;OACrH;KACF;GACF;EACD,QAAQ,EAAE;IACR,IAAI,EAAE;MACJ,IAAI,EAAE,MAAM;MACZ,WAAW,EAAE,qBAAqB;MAClC,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;OACd;MACD,OAAO,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;KAC9B;IACD,KAAK,EAAE;MACL,IAAI,EAAE,OAAO;MACb,WAAW,EAAE,sBAAsB;MACnC,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;OACd;MACD,OAAO,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,UAAU,CAAC;KACjD;IACD,SAAS,EAAE;MACT,IAAI,EAAE,iBAAiB;MACvB,WAAW,EAAE,6BAA6B;MAC1C,OAAO,EAAE;QACP,IAAI,EAAE,SAAS;OAChB;KACF;IACD,QAAQ,EAAE;MACR,IAAI,EAAE,WAAW;MACjB,WAAW,EAAE,sBAAsB;MACnC,OAAO,EAAE;QACP,IAAI,EAAE,OAAO;OACd;MACD,OAAO,EAAE,CAAC,QAAQ,EAAE,eAAe,CAAC;KACrC;GACF;EACD,IAAI,EAAE;IACJ,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,SAAS,E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GAAG,EAAE,CAAC;AAElB,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;EACX,IAAI,EAAE,OAAO;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;EAChB,IAAI,EAAE,SAAS;EACf,KAAK,EAAE,cAAc;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG;EACd,IAAI,EAAE,SAAS;EACf,KAAK,EAAE,UAAU;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3C,SAAS,CAAC,IAAI,GAAG;EACf,IAAI,EAAE,SAAS;EACf,KAAK,EAAE,SAAS;EAChB,KAAK,EAAE,MAAM;CACd,CAAC","sourcesContent":["import { formatHtmlPreview } from '../../utils/utils';\n\nexport default {\n title: 'Components/Stepper',\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=10508%3A32221&t=Ne6myqwca5m00de7-1',\n },\n {\n name: 'Link',\n type: 'link',\n url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10508%3A32221&t=Ne6myqwca5m00de7-1',\n },\n ],\n },\n argTypes: {\n size: {\n name: 'Size',\n description: 'Size of the stepper',\n control: {\n type: 'radio',\n },\n options: ['Default', 'Small'],\n },\n style: {\n name: 'Style',\n description: 'Style of the stepper',\n control: {\n type: 'radio',\n },\n options: ['Default', 'Text on side', 'Vertical'],\n },\n showLabel: {\n name: 'Show label text',\n description: 'Show or hide the label text',\n control: {\n type: 'boolean',\n },\n },\n iconType: {\n name: 'Icon type',\n description: 'Native/Web Component',\n control: {\n type: 'radio',\n },\n options: ['Native', 'Web Component'],\n },\n },\n args: {\n size: 'Default',\n style: 'Default',\n showLabel: true,\n iconType: 'Native',\n },\n};\n\nconst Template = ({ size, style, showLabel, iconType }) => {\n const sizeClass = size === 'Small' ? 'sdds-stepper-sm' : '';\n\n const styleLookup = {\n 'Default': '',\n 'Text on side': 'sdds-stepper--sidetext',\n 'Vertical': 'sdds-stepper--vertical',\n };\n return formatHtmlPreview(\n `\n\n ${\n iconType === 'Native'\n ? ` <style>/* Note: In case using WebFont icons, please make sure to import icons css file in your implementation */\n @import url('https://cdn.digitaldesign.scania.com/icons/webfont/css/sdds-icons.css');</style>\n `\n : ''\n }\n\n\n <div class=\"sdds-stepper-demo-container\">\n <div class=\"sdds-stepper ${sizeClass} ${styleLookup[style]}\">\n\n <div class=\"sdds-stepper__step sdds-stepper__step--value\">\n <div class=\"sdds-stepper__step-icon\">\n <span class=\"sdds-stepper__step-icon-value\">1</span>\n </div>\n ${showLabel ? '<label class=\"sdds-stepper__step_label\">Step value</label>' : ''}\n </div>\n\n <div class=\"sdds-stepper__step sdds-stepper__step--warning\">\n <div class=\"sdds-stepper__step-icon\">\n ${\n iconType === 'Native'\n ? `<i class=\"sdds-icon warning\"></i>\n `\n : `<sdds-icon name=\"warning\" size=\"${size === 'Small' ? '16px' : '18px'}\"></sdds-icon> `\n }\n </div>\n ${showLabel ? '<label class=\"sdds-stepper__step_label\">Step warning</label>' : ''}\n </div>\n\n <div class=\"sdds-stepper__step sdds-stepper__step--inactive\">\n <div class=\"sdds-stepper__step-icon\">\n <span class=\"sdds-stepper__step-icon-value\">3</span>\n </div>\n ${showLabel ? '<label class=\"sdds-stepper__step_label\">Step inactive</label>' : ''}\n </div>\n\n <div class=\"sdds-stepper__step sdds-stepper__step--success\">\n <div class=\"sdds-stepper__step-icon\">\n ${\n iconType === 'Native'\n ? `<i class=\"sdds-icon tick\"></i>\n `\n : `<div>\n <sdds-icon name=\"tick\" size=\"${size === 'Small' ? '16px' : '20px'}\"></sdds-icon> \n </div>`\n }\n </div>\n ${showLabel ? '<label class=\"sdds-stepper__step_label\">Step success</label>' : ''}\n </div>\n\n </div>\n </div>\n `,\n );\n};\n\nexport const Default = Template.bind({});\nDefault.args = {};\n\nexport const Small = Template.bind({});\nSmall.args = {\n size: 'Small',\n};\n\nexport const TextOnSide = Template.bind({});\nTextOnSide.args = {\n size: 'Default',\n style: 'Text on side',\n};\n\nexport const Vertical = Template.bind({});\nVertical.args = {\n size: 'Default',\n style: 'Vertical',\n};\n\nexport const HideLabel = Template.bind({});\nHideLabel.args = {\n size: 'Default',\n style: 'Default',\n label: 'Hide',\n};\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class InlineTabsChild {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.label = undefined;
|
|
5
|
+
this.disabled = false;
|
|
6
|
+
this.default = false;
|
|
7
|
+
}
|
|
8
|
+
render() {
|
|
9
|
+
return (h(Host, null, h("slot", null)));
|
|
10
|
+
}
|
|
11
|
+
static get is() { return "sdds-inline-tab"; }
|
|
12
|
+
static get encapsulation() { return "shadow"; }
|
|
13
|
+
static get originalStyleUrls() {
|
|
14
|
+
return {
|
|
15
|
+
"$": ["inline-tab.scss"]
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static get styleUrls() {
|
|
19
|
+
return {
|
|
20
|
+
"$": ["inline-tab.css"]
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static get properties() {
|
|
24
|
+
return {
|
|
25
|
+
"label": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"mutable": false,
|
|
28
|
+
"complexType": {
|
|
29
|
+
"original": "string",
|
|
30
|
+
"resolved": "string",
|
|
31
|
+
"references": {}
|
|
32
|
+
},
|
|
33
|
+
"required": false,
|
|
34
|
+
"optional": false,
|
|
35
|
+
"docs": {
|
|
36
|
+
"tags": [],
|
|
37
|
+
"text": ""
|
|
38
|
+
},
|
|
39
|
+
"attribute": "label",
|
|
40
|
+
"reflect": false
|
|
41
|
+
},
|
|
42
|
+
"disabled": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "boolean",
|
|
47
|
+
"resolved": "boolean",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
},
|
|
56
|
+
"attribute": "disabled",
|
|
57
|
+
"reflect": false,
|
|
58
|
+
"defaultValue": "false"
|
|
59
|
+
},
|
|
60
|
+
"default": {
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"mutable": false,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "boolean",
|
|
65
|
+
"resolved": "boolean",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": false,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": ""
|
|
73
|
+
},
|
|
74
|
+
"attribute": "default",
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"defaultValue": "false"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=inline-tab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-tab.js","sourceRoot":"","sources":["../../../../../src/components/tabs/inline-tabs-default/inline-tab/inline-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,eAAe;;;oBAGE,KAAK;mBAEN,KAAK;;EAEhC,MAAM;IACJ,OAAO,CACL,EAAC,IAAI;MACH,eAAa,CACR,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sdds-inline-tab',\n styleUrl: 'inline-tab.scss',\n shadow: true,\n})\nexport class InlineTabsChild {\n @Prop() label: string;\n\n @Prop() disabled: boolean = false;\n\n @Prop() default: boolean = false;\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
outline: 0 !important;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
}
|
|
5
|
+
:host * {
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sdds-inline-tabs {
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
outline: 0;
|
|
12
|
+
}
|
|
13
|
+
.sdds-inline-tabs-header {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
.sdds-inline-tabs-main {
|
|
17
|
+
background-color: var(--sdds-inline-tabs-main-background);
|
|
18
|
+
padding: 24px 24px 48px;
|
|
19
|
+
}
|
|
20
|
+
.sdds-inline-tabs-wrapper {
|
|
21
|
+
display: flex;
|
|
22
|
+
overflow-x: scroll;
|
|
23
|
+
scrollbar-width: none;
|
|
24
|
+
}
|
|
25
|
+
.sdds-inline-tabs-wrapper::-webkit-scrollbar {
|
|
26
|
+
display: none;
|
|
27
|
+
}
|
|
28
|
+
.sdds-inline-tabs--forward, .sdds-inline-tabs--back {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
width: 48px;
|
|
31
|
+
height: 100%;
|
|
32
|
+
border: 0;
|
|
33
|
+
position: absolute;
|
|
34
|
+
top: 0;
|
|
35
|
+
background-color: var(--sdds-inline-tabs-scroll-btn-background);
|
|
36
|
+
display: flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
opacity: 0;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
}
|
|
42
|
+
.sdds-inline-tabs--forward__show, .sdds-inline-tabs--back__show {
|
|
43
|
+
opacity: 1;
|
|
44
|
+
pointer-events: all;
|
|
45
|
+
}
|
|
46
|
+
.sdds-inline-tabs--forward:hover, .sdds-inline-tabs--back:hover {
|
|
47
|
+
background-color: var(--sdds-inline-tabs-scroll-btn-background-hover);
|
|
48
|
+
}
|
|
49
|
+
.sdds-inline-tabs--forward:active, .sdds-inline-tabs--back:active {
|
|
50
|
+
background-color: var(--sdds-inline-tabs-scroll-btn-background-active);
|
|
51
|
+
}
|
|
52
|
+
.sdds-inline-tabs--forward:focus, .sdds-inline-tabs--back:focus {
|
|
53
|
+
outline: 2px solid var(--sdds-blue-400);
|
|
54
|
+
outline-offset: -2px;
|
|
55
|
+
}
|
|
56
|
+
.sdds-inline-tabs--forward svg, .sdds-inline-tabs--back svg {
|
|
57
|
+
fill: var(--sdds-inline-tabs-scroll-btn-color);
|
|
58
|
+
}
|
|
59
|
+
.sdds-inline-tabs--back {
|
|
60
|
+
left: 0;
|
|
61
|
+
}
|
|
62
|
+
.sdds-inline-tabs--forward {
|
|
63
|
+
right: 0;
|
|
64
|
+
}
|
|
65
|
+
.sdds-inline-tabs--tab {
|
|
66
|
+
font: var(--sdds-headline-07);
|
|
67
|
+
letter-spacing: var(--sdds-headline-07-ls);
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
border: 0;
|
|
70
|
+
color: var(--sdds-inline-tabs-tab-color);
|
|
71
|
+
background-color: var(--sdds-inline-tabs-tab-background);
|
|
72
|
+
padding: 16px;
|
|
73
|
+
min-width: 142px;
|
|
74
|
+
text-decoration: none;
|
|
75
|
+
display: block;
|
|
76
|
+
position: relative;
|
|
77
|
+
transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
flex-shrink: 0;
|
|
80
|
+
text-align: left;
|
|
81
|
+
outline: none;
|
|
82
|
+
}
|
|
83
|
+
.sdds-inline-tabs--tab > * {
|
|
84
|
+
opacity: 0.6;
|
|
85
|
+
}
|
|
86
|
+
.sdds-inline-tabs--tab:not(:last-child) {
|
|
87
|
+
border-right: 1px solid var(--sdds-inline-tabs-tab-border-color);
|
|
88
|
+
}
|
|
89
|
+
.sdds-inline-tabs--tab::after {
|
|
90
|
+
content: " ";
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: 0;
|
|
93
|
+
right: 0;
|
|
94
|
+
left: 0;
|
|
95
|
+
margin-left: auto;
|
|
96
|
+
width: 0;
|
|
97
|
+
margin-right: auto;
|
|
98
|
+
height: 2px;
|
|
99
|
+
background-color: var(--sdds-inline-tabs-tab-indicator-background);
|
|
100
|
+
transition: width 0.15s ease-in-out;
|
|
101
|
+
}
|
|
102
|
+
.sdds-inline-tabs--tab:hover {
|
|
103
|
+
background-color: var(--sdds-inline-tabs-tab-background-hover);
|
|
104
|
+
color: var(--sdds-inline-tabs-tab-color-hover);
|
|
105
|
+
text-decoration: none;
|
|
106
|
+
}
|
|
107
|
+
.sdds-inline-tabs--tab:focus {
|
|
108
|
+
outline: 2px solid var(--sdds-blue-400);
|
|
109
|
+
outline-offset: -2px;
|
|
110
|
+
}
|
|
111
|
+
.sdds-inline-tabs--tab__active {
|
|
112
|
+
background-color: var(--sdds-inline-tabs-tab-background-active);
|
|
113
|
+
color: var(--sdds-inline-tabs-tab-color-active);
|
|
114
|
+
cursor: initial;
|
|
115
|
+
border-right: 1px solid transparent !important;
|
|
116
|
+
}
|
|
117
|
+
.sdds-inline-tabs--tab__active > * {
|
|
118
|
+
opacity: 1;
|
|
119
|
+
}
|
|
120
|
+
.sdds-inline-tabs--tab__active:hover {
|
|
121
|
+
background-color: var(--sdds-inline-tabs-tab-background-active);
|
|
122
|
+
}
|
|
123
|
+
.sdds-inline-tabs--tab__active::after {
|
|
124
|
+
width: calc(100% + 2px);
|
|
125
|
+
left: -1px;
|
|
126
|
+
background-color: var(--sdds-inline-tabs-tab-indicator-background-active);
|
|
127
|
+
}
|
|
128
|
+
.sdds-inline-tabs--tab__active::before {
|
|
129
|
+
content: " ";
|
|
130
|
+
background-color: var(--sdds-inline-tabs-tab-background-active);
|
|
131
|
+
width: 1px;
|
|
132
|
+
top: 0;
|
|
133
|
+
bottom: 0;
|
|
134
|
+
left: -1px;
|
|
135
|
+
display: block;
|
|
136
|
+
position: absolute;
|
|
137
|
+
}
|
|
138
|
+
.sdds-inline-tabs--tab__active:first-child:focus::before {
|
|
139
|
+
left: 0;
|
|
140
|
+
}
|
|
141
|
+
.sdds-inline-tabs--tab:disabled, .sdds-inline-tabs--tab__disabled {
|
|
142
|
+
cursor: initial;
|
|
143
|
+
color: var(--sdds-navigation-tabs-tab-color-disabled);
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
}
|
|
146
|
+
.sdds-inline-tabs--tab:disabled > *, .sdds-inline-tabs--tab__disabled > * {
|
|
147
|
+
opacity: 0.16;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.sdds-inline-tabs--tab__active {
|
|
151
|
+
background-color: var(--sdds-inline-tabs-tab-background-active);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.sdds-inline-tabs-main {
|
|
155
|
+
background-color: var(--sdds-inline-tabs-main-background);
|
|
156
|
+
}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
function generateKeyFromName(name) {
|
|
3
|
+
return name
|
|
4
|
+
.replace(/\s/g, '-')
|
|
5
|
+
.replace(/[^a-z0-9-]/gi, '')
|
|
6
|
+
.toLowerCase();
|
|
7
|
+
}
|
|
8
|
+
export class InlineTabs {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.startingTab = null; // name of the tab to show by default (infered from either "default-tab"-prop (on component) or "default"-prop (on a slotted child)
|
|
11
|
+
this.navWrapperElement = null; // reference to container with nav buttons
|
|
12
|
+
this.tabWrapperElement = null; // reference to container with slotted children
|
|
13
|
+
this.componentWidth = 0; // visible width of this component
|
|
14
|
+
this.buttonsWidth = 0; // total width of all nav items combined
|
|
15
|
+
this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
|
|
16
|
+
this.useAutoHeight = false; // set height for slotted children or not
|
|
17
|
+
this.defaultTab = '';
|
|
18
|
+
this.autoHeight = false;
|
|
19
|
+
this.modeVariant = null;
|
|
20
|
+
this.tabs = [];
|
|
21
|
+
this.buttonWidth = 0;
|
|
22
|
+
this.tabHeight = 0;
|
|
23
|
+
this.showLeftScroll = false;
|
|
24
|
+
this.showRightScroll = false;
|
|
25
|
+
}
|
|
26
|
+
/** used for switching to a tab programmatically */
|
|
27
|
+
async showTab(key) {
|
|
28
|
+
this.switchToTab(key);
|
|
29
|
+
}
|
|
30
|
+
componentWillLoad() {
|
|
31
|
+
this.initComponent();
|
|
32
|
+
}
|
|
33
|
+
initComponent(createInitialState = true) {
|
|
34
|
+
if (this.autoHeight) {
|
|
35
|
+
this.useAutoHeight = true;
|
|
36
|
+
}
|
|
37
|
+
this.tabs = Array.from(this.host.children).map((item, index) => {
|
|
38
|
+
const name = item.label ? item.label : item.getAttribute('name') || `Tab ${index + 1}`;
|
|
39
|
+
const key = generateKeyFromName(name);
|
|
40
|
+
if (item.default) {
|
|
41
|
+
this.startingTab = key;
|
|
42
|
+
}
|
|
43
|
+
let disabled = false;
|
|
44
|
+
if (item.disabled) {
|
|
45
|
+
disabled = true;
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
name,
|
|
49
|
+
key,
|
|
50
|
+
element: item,
|
|
51
|
+
disabled,
|
|
52
|
+
visible: true,
|
|
53
|
+
initialDisplay: window.getComputedStyle(item).display,
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
if (createInitialState) {
|
|
57
|
+
this.setInitialState();
|
|
58
|
+
}
|
|
59
|
+
this.tabs = Array.from(this.tabs);
|
|
60
|
+
}
|
|
61
|
+
calculateButtonWidth() {
|
|
62
|
+
const navButtons = this.navWrapperElement.querySelectorAll('button.sdds-inline-tabs--tab');
|
|
63
|
+
let best = 0;
|
|
64
|
+
Array.from(navButtons).forEach((navButton) => {
|
|
65
|
+
const oldStyle = navButton.style.width;
|
|
66
|
+
// eslint-disable-next-line no-param-reassign
|
|
67
|
+
navButton.style.width = '';
|
|
68
|
+
const width = navButton.clientWidth;
|
|
69
|
+
// eslint-disable-next-line no-param-reassign
|
|
70
|
+
navButton.style.width = oldStyle;
|
|
71
|
+
if (navButton.clientWidth > best) {
|
|
72
|
+
best = width;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
this.buttonWidth = best;
|
|
76
|
+
}
|
|
77
|
+
calculateTabHeight() {
|
|
78
|
+
let best = 0;
|
|
79
|
+
this.tabs.forEach((_, tabIndex) => {
|
|
80
|
+
const tab = this.tabs[tabIndex];
|
|
81
|
+
// TODO: add comment on what this does
|
|
82
|
+
const oldStyle = tab.element.style.display;
|
|
83
|
+
tab.element.style.display = '';
|
|
84
|
+
const height = tab.element.clientHeight;
|
|
85
|
+
tab.element.style.display = oldStyle;
|
|
86
|
+
if (height > best) {
|
|
87
|
+
best = height;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
this.tabHeight = best;
|
|
91
|
+
}
|
|
92
|
+
componentDidRender() {
|
|
93
|
+
this.calculateTabHeight();
|
|
94
|
+
this.calculateButtonWidth();
|
|
95
|
+
}
|
|
96
|
+
componentDidLoad() {
|
|
97
|
+
const mutationObserver = new MutationObserver(( /* mutations, observer */) => {
|
|
98
|
+
const visibleTab = this.tabs.find((tab) => tab.visible);
|
|
99
|
+
this.initComponent(false);
|
|
100
|
+
this.calculateTabHeight();
|
|
101
|
+
this.calculateButtonWidth();
|
|
102
|
+
if (visibleTab) {
|
|
103
|
+
this.switchToTab(visibleTab.key);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
107
|
+
entries.forEach((entry) => {
|
|
108
|
+
const componentWidth = entry.contentRect.width;
|
|
109
|
+
let buttonsWidth = 0;
|
|
110
|
+
const navButtons = entry.target.querySelectorAll('button.sdds-inline-tabs--tab');
|
|
111
|
+
Array.from(navButtons).forEach((navButton) => {
|
|
112
|
+
buttonsWidth += navButton.clientWidth;
|
|
113
|
+
});
|
|
114
|
+
this.componentWidth = componentWidth;
|
|
115
|
+
this.buttonsWidth = buttonsWidth;
|
|
116
|
+
this.scrollWidth = buttonsWidth - componentWidth;
|
|
117
|
+
if (this.buttonsWidth > this.componentWidth) {
|
|
118
|
+
this.evaluateScrollButtons();
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
this.showLeftScroll = false;
|
|
122
|
+
this.showRightScroll = false;
|
|
123
|
+
}
|
|
124
|
+
this.calculateTabHeight();
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
mutationObserver.observe(this.host, {
|
|
128
|
+
childList: true,
|
|
129
|
+
attributes: true,
|
|
130
|
+
});
|
|
131
|
+
resizeObserver.observe(this.navWrapperElement);
|
|
132
|
+
this.calculateButtonWidth();
|
|
133
|
+
this.calculateTabHeight();
|
|
134
|
+
}
|
|
135
|
+
setInitialState() {
|
|
136
|
+
if (this.defaultTab) {
|
|
137
|
+
this.startingTab = this.defaultTab;
|
|
138
|
+
}
|
|
139
|
+
this.tabs.forEach((tab, index) => {
|
|
140
|
+
if (this.startingTab) {
|
|
141
|
+
if (tab.key !== this.startingTab) {
|
|
142
|
+
this.hideTab(index);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
if (index > 0) {
|
|
147
|
+
this.hideTab(index);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
unhideTab(tabIndex) {
|
|
153
|
+
const tab = this.tabs[tabIndex];
|
|
154
|
+
tab.element.style.display = '';
|
|
155
|
+
tab.visible = true;
|
|
156
|
+
}
|
|
157
|
+
hideTab(tabIndex) {
|
|
158
|
+
const tab = this.tabs[tabIndex];
|
|
159
|
+
tab.element.style.display = 'none';
|
|
160
|
+
tab.visible = false;
|
|
161
|
+
}
|
|
162
|
+
switchToTab(key) {
|
|
163
|
+
this.tabs.forEach((tab, index) => {
|
|
164
|
+
if (tab.key === key) {
|
|
165
|
+
this.unhideTab(index);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
this.hideTab(index);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
this.tabs = Array.from(this.tabs);
|
|
172
|
+
}
|
|
173
|
+
scrollRight() {
|
|
174
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
175
|
+
this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
|
|
176
|
+
this.evaluateScrollButtons();
|
|
177
|
+
}
|
|
178
|
+
scrollLeft() {
|
|
179
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
180
|
+
this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
|
|
181
|
+
this.evaluateScrollButtons();
|
|
182
|
+
}
|
|
183
|
+
evaluateScrollButtons() {
|
|
184
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
185
|
+
if (scroll >= this.scrollWidth) {
|
|
186
|
+
this.showRightScroll = false;
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
this.showRightScroll = true;
|
|
190
|
+
}
|
|
191
|
+
if (scroll <= 0) {
|
|
192
|
+
this.showLeftScroll = false;
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
this.showLeftScroll = true;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
render() {
|
|
199
|
+
const style = {};
|
|
200
|
+
if (this.useAutoHeight) {
|
|
201
|
+
style.height = `${this.tabHeight}px`;
|
|
202
|
+
}
|
|
203
|
+
return (h(Host, { class: `${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { class: `sdds-inline-tabs sdds-inline-tabs` }, h("nav", { class: "sdds-inline-tabs-header" }, h("div", { ref: (el) => {
|
|
204
|
+
this.navWrapperElement = el;
|
|
205
|
+
}, class: "sdds-inline-tabs-wrapper" }, this.tabs.map((tab) => (h("button", { style: { width: `${this.buttonWidth}px` }, disabled: tab.disabled, class: `sdds-inline-tabs--tab ${tab.visible ? 'sdds-inline-tabs--tab__active' : ''}`, onClick: () => this.switchToTab(tab.key) }, h("span", null, tab.name))))), h("div", { class: "sdds-inline-tabs-header-navigation" }, h("button", { class: `sdds-inline-tabs--forward ${this.showRightScroll ? 'sdds-inline-tabs--back__show' : ''}`, disabled: !this.showRightScroll, onClick: () => this.scrollRight() }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.1147 17.3291C5.87062 17.0851 5.87062 16.6893 6.1147 16.4453L12.2948 10.2652C12.4412 10.1187 12.4412 9.8813 12.2948 9.73485L6.1147 3.55476C5.87062 3.31068 5.87062 2.91496 6.1147 2.67088C6.35878 2.4268 6.75451 2.4268 6.99858 2.67088L13.1787 8.85097C13.8133 9.48557 13.8133 10.5145 13.1787 11.1491L6.99858 17.3291C6.75451 17.5732 6.35878 17.5732 6.1147 17.3291Z" }))), h("button", { class: `sdds-inline-tabs--back ${this.showLeftScroll ? 'sdds-inline-tabs--back__show' : ''}`, disabled: !this.showLeftScroll, onClick: () => this.scrollLeft() }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.8853 2.67085C14.1294 2.91493 14.1294 3.31066 13.8853 3.55473L7.70522 9.73482C7.55878 9.88127 7.55878 10.1187 7.70522 10.2652L13.8853 16.4452C14.1294 16.6893 14.1294 17.085 13.8853 17.3291C13.6412 17.5732 13.2455 17.5732 13.0014 17.3291L6.82134 11.149C6.18674 10.5144 6.18674 9.48554 6.82134 8.85094L13.0014 2.67085C13.2455 2.42677 13.6412 2.42677 13.8853 2.67085Z" }))))), h("div", { ref: (el) => {
|
|
206
|
+
this.tabWrapperElement = el;
|
|
207
|
+
}, class: "sdds-inline-tabs-main", style: style }, h("slot", null)))));
|
|
208
|
+
}
|
|
209
|
+
static get is() { return "sdds-inline-tabs"; }
|
|
210
|
+
static get encapsulation() { return "shadow"; }
|
|
211
|
+
static get originalStyleUrls() {
|
|
212
|
+
return {
|
|
213
|
+
"$": ["inline-tabs.scss"]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
static get styleUrls() {
|
|
217
|
+
return {
|
|
218
|
+
"$": ["inline-tabs.css"]
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
static get properties() {
|
|
222
|
+
return {
|
|
223
|
+
"defaultTab": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"mutable": false,
|
|
226
|
+
"complexType": {
|
|
227
|
+
"original": "string",
|
|
228
|
+
"resolved": "string",
|
|
229
|
+
"references": {}
|
|
230
|
+
},
|
|
231
|
+
"required": false,
|
|
232
|
+
"optional": false,
|
|
233
|
+
"docs": {
|
|
234
|
+
"tags": [],
|
|
235
|
+
"text": "either use this (default-tab=\"...\") or read attribute \"default\" from one of the slotted children."
|
|
236
|
+
},
|
|
237
|
+
"attribute": "default-tab",
|
|
238
|
+
"reflect": false,
|
|
239
|
+
"defaultValue": "''"
|
|
240
|
+
},
|
|
241
|
+
"autoHeight": {
|
|
242
|
+
"type": "boolean",
|
|
243
|
+
"mutable": false,
|
|
244
|
+
"complexType": {
|
|
245
|
+
"original": "boolean",
|
|
246
|
+
"resolved": "boolean",
|
|
247
|
+
"references": {}
|
|
248
|
+
},
|
|
249
|
+
"required": false,
|
|
250
|
+
"optional": false,
|
|
251
|
+
"docs": {
|
|
252
|
+
"tags": [],
|
|
253
|
+
"text": "different height settings. right now only supports \"auto\", otherwise ignored"
|
|
254
|
+
},
|
|
255
|
+
"attribute": "auto-height",
|
|
256
|
+
"reflect": false,
|
|
257
|
+
"defaultValue": "false"
|
|
258
|
+
},
|
|
259
|
+
"modeVariant": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"mutable": false,
|
|
262
|
+
"complexType": {
|
|
263
|
+
"original": "'primary' | 'secondary'",
|
|
264
|
+
"resolved": "\"primary\" | \"secondary\"",
|
|
265
|
+
"references": {}
|
|
266
|
+
},
|
|
267
|
+
"required": false,
|
|
268
|
+
"optional": false,
|
|
269
|
+
"docs": {
|
|
270
|
+
"tags": [],
|
|
271
|
+
"text": "Variant of the tabs, primary= on white, secondary= on grey50"
|
|
272
|
+
},
|
|
273
|
+
"attribute": "mode-variant",
|
|
274
|
+
"reflect": false,
|
|
275
|
+
"defaultValue": "null"
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
static get states() {
|
|
280
|
+
return {
|
|
281
|
+
"tabs": {},
|
|
282
|
+
"buttonWidth": {},
|
|
283
|
+
"tabHeight": {},
|
|
284
|
+
"showLeftScroll": {},
|
|
285
|
+
"showRightScroll": {}
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
static get methods() {
|
|
289
|
+
return {
|
|
290
|
+
"showTab": {
|
|
291
|
+
"complexType": {
|
|
292
|
+
"signature": "(key: string) => Promise<void>",
|
|
293
|
+
"parameters": [{
|
|
294
|
+
"tags": [],
|
|
295
|
+
"text": ""
|
|
296
|
+
}],
|
|
297
|
+
"references": {
|
|
298
|
+
"Promise": {
|
|
299
|
+
"location": "global"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"return": "Promise<void>"
|
|
303
|
+
},
|
|
304
|
+
"docs": {
|
|
305
|
+
"text": "used for switching to a tab programmatically",
|
|
306
|
+
"tags": []
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
static get elementRef() { return "host"; }
|
|
312
|
+
}
|
|
313
|
+
//# sourceMappingURL=inline-tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-tabs.js","sourceRoot":"","sources":["../../../../src/components/tabs/inline-tabs-default/inline-tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEjF,SAAS,mBAAmB,CAAC,IAAY;EACvC,OAAO,IAAI;KACR,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;KACnB,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC;KAC3B,WAAW,EAAE,CAAC;AACnB,CAAC;AAOD,MAAM,OAAO,UAAU;;IA+BrB,gBAAW,GAAW,IAAI,CAAC,CAAC,mIAAmI;IAE/J,sBAAiB,GAAgB,IAAI,CAAC,CAAC,0CAA0C;IAEjF,sBAAiB,GAAgB,IAAI,CAAC,CAAC,+CAA+C;IAEtF,mBAAc,GAAW,CAAC,CAAC,CAAC,kCAAkC;IAE9D,iBAAY,GAAW,CAAC,CAAC,CAAC,wCAAwC;IAElE,gBAAW,GAAW,CAAC,CAAC,CAAC,6DAA6D;IAEtF,kBAAa,GAAY,KAAK,CAAC,CAAC,yCAAyC;sBAvC5C,EAAE;sBAGD,KAAK;uBAGY,IAAI;gBAGvB,EAAE;uBAGC,CAAC;qBAGH,CAAC;0BAEK,KAAK;2BAEJ,KAAK;;EAEzC,mDAAmD;EAEnD,KAAK,CAAC,OAAO,CAAC,GAAW;IACvB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;EACxB,CAAC;EAgBD,iBAAiB;IACf,IAAI,CAAC,aAAa,EAAE,CAAC;EACvB,CAAC;EAED,aAAa,CAAC,kBAAkB,GAAG,IAAI;IACrC,IAAI,IAAI,CAAC,UAAU,EAAE;MACnB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;KAC3B;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cAAc,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,EACzD,EAAE,EACF,QAAQ,EAAE,CAAC,IAAI,CAAC,cAAc,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE;cAEhC,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B;gBAElC,yBACY,SAAS,eACT,SAAS,EACnB,CAAC,EAAC,iXAAiX,GACnX,CACE,CACC,CACL,CACF;QACN,WACE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE;YACV,IAAI,CAAC,iBAAiB,GAAG,EAAiB,CAAC;UAC7C,CAAC,EACD,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,KAAK;UAEZ,eAAQ,CACJ,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, State, Element, Prop, h, Method } from '@stencil/core';\n\nfunction generateKeyFromName(name: string) {\n return name\n .replace(/\\s/g, '-')\n .replace(/[^a-z0-9-]/gi, '')\n .toLowerCase();\n}\n\n@Component({\n tag: 'sdds-inline-tabs',\n styleUrl: 'inline-tabs.scss',\n shadow: true,\n})\nexport class InlineTabs {\n @Element() host: HTMLElement;\n\n /** either use this (default-tab=\"...\") or read attribute \"default\" from one of the slotted children. */\n @Prop() defaultTab: string = '';\n\n /** different height settings. right now only supports \"auto\", otherwise ignored */\n @Prop() autoHeight: boolean = false;\n\n /** Variant of the tabs, primary= on white, secondary= on grey50 */\n @Prop() modeVariant: 'primary' | 'secondary' = null;\n\n /** array with metadata for slotted children */\n @State() tabs: Array<any> = [];\n\n /** current calculated width of each nav button (calculated from the largest one) */\n @State() buttonWidth: number = 0;\n\n /** current calculated tab height (calculated from the one with the most height) */\n @State() tabHeight: number = 0;\n\n @State() showLeftScroll: boolean = false;\n\n @State() showRightScroll: boolean = false;\n\n /** used for switching to a tab programmatically */\n @Method()\n async showTab(key: string) {\n this.switchToTab(key);\n }\n\n startingTab: string = null; // name of the tab to show by default (infered from either \"default-tab\"-prop (on component) or \"default\"-prop (on a slotted child)\n\n navWrapperElement: HTMLElement = null; // reference to container with nav buttons\n\n tabWrapperElement: HTMLElement = null; // reference to container with slotted children\n\n componentWidth: number = 0; // visible width of this component\n\n buttonsWidth: number = 0; // total width of all nav items combined\n\n scrollWidth: number = 0; // total amount that is possible to scroll in the nav wrapper\n\n useAutoHeight: boolean = false; // set height for slotted children or not\n\n componentWillLoad() {\n this.initComponent();\n }\n\n initComponent(createInitialState = true) {\n if (this.autoHeight) {\n this.useAutoHeight = true;\n }\n\n this.tabs = Array.from(this.host.children).map((item: HTMLSddsInlineTabElement, index) => {\n const name = item.label ? item.label : item.getAttribute('name') || `Tab ${index + 1}`;\n const key = generateKeyFromName(name);\n if (item.default) {\n this.startingTab = key;\n }\n let disabled = false;\n if (item.disabled) {\n disabled = true;\n }\n return {\n name,\n key,\n element: item,\n disabled,\n visible: true,\n initialDisplay: window.getComputedStyle(item).display,\n };\n });\n\n if (createInitialState) {\n this.setInitialState();\n }\n this.tabs = Array.from(this.tabs);\n }\n\n calculateButtonWidth() {\n const navButtons = this.navWrapperElement.querySelectorAll('button.sdds-inline-tabs--tab');\n let best = 0;\n Array.from(navButtons).forEach((navButton: HTMLElement) => {\n const oldStyle = navButton.style.width;\n // eslint-disable-next-line no-param-reassign\n navButton.style.width = '';\n const width = navButton.clientWidth;\n // eslint-disable-next-line no-param-reassign\n navButton.style.width = oldStyle;\n\n if (navButton.clientWidth > best) {\n best = width;\n }\n });\n\n this.buttonWidth = best;\n }\n\n calculateTabHeight() {\n let best = 0;\n this.tabs.forEach((_, tabIndex) => {\n const tab = this.tabs[tabIndex];\n // TODO: add comment on what this does\n const oldStyle = tab.element.style.display;\n tab.element.style.display = '';\n const height = tab.element.clientHeight;\n tab.element.style.display = oldStyle;\n\n if (height > best) {\n best = height;\n }\n });\n\n this.tabHeight = best;\n }\n\n componentDidRender() {\n this.calculateTabHeight();\n this.calculateButtonWidth();\n }\n\n componentDidLoad() {\n const mutationObserver = new MutationObserver((/* mutations, observer */) => {\n const visibleTab = this.tabs.find((tab) => tab.visible);\n this.initComponent(false);\n this.calculateTabHeight();\n this.calculateButtonWidth();\n if (visibleTab) {\n this.switchToTab(visibleTab.key);\n }\n });\n\n const resizeObserver = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n const componentWidth = entry.contentRect.width;\n let buttonsWidth = 0;\n\n const navButtons = entry.target.querySelectorAll('button.sdds-inline-tabs--tab');\n Array.from(navButtons).forEach((navButton: HTMLElement) => {\n buttonsWidth += navButton.clientWidth;\n });\n\n this.componentWidth = componentWidth;\n this.buttonsWidth = buttonsWidth;\n this.scrollWidth = buttonsWidth - componentWidth;\n\n if (this.buttonsWidth > this.componentWidth) {\n this.evaluateScrollButtons();\n } else {\n this.showLeftScroll = false;\n this.showRightScroll = false;\n }\n\n this.calculateTabHeight();\n });\n });\n\n mutationObserver.observe(this.host, {\n childList: true,\n attributes: true,\n });\n\n resizeObserver.observe(this.navWrapperElement);\n\n this.calculateButtonWidth();\n this.calculateTabHeight();\n }\n\n setInitialState() {\n if (this.defaultTab) {\n this.startingTab = this.defaultTab;\n }\n\n this.tabs.forEach((tab, index) => {\n if (this.startingTab) {\n if (tab.key !== this.startingTab) {\n this.hideTab(index);\n }\n } else {\n if (index > 0) {\n this.hideTab(index);\n }\n }\n });\n }\n\n unhideTab(tabIndex) {\n const tab = this.tabs[tabIndex];\n tab.element.style.display = '';\n tab.visible = true;\n }\n\n hideTab(tabIndex) {\n const tab = this.tabs[tabIndex];\n tab.element.style.display = 'none';\n tab.visible = false;\n }\n\n switchToTab(key: string) {\n this.tabs.forEach((tab, index) => {\n if (tab.key === key) {\n this.unhideTab(index);\n } else {\n this.hideTab(index);\n }\n });\n\n this.tabs = Array.from(this.tabs);\n }\n\n scrollRight() {\n const scroll = this.navWrapperElement.scrollLeft;\n this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;\n\n this.evaluateScrollButtons();\n }\n\n scrollLeft() {\n const scroll = this.navWrapperElement.scrollLeft;\n this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;\n\n this.evaluateScrollButtons();\n }\n\n evaluateScrollButtons() {\n const scroll = this.navWrapperElement.scrollLeft;\n\n if (scroll >= this.scrollWidth) {\n this.showRightScroll = false;\n } else {\n this.showRightScroll = true;\n }\n\n if (scroll <= 0) {\n this.showLeftScroll = false;\n } else {\n this.showLeftScroll = true;\n }\n }\n\n render() {\n const style: Record<string, string> = {};\n if (this.useAutoHeight) {\n style.height = `${this.tabHeight}px`;\n }\n\n return (\n <Host class={`${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}`: ''}`}>\n <div class={`sdds-inline-tabs sdds-inline-tabs`}>\n <nav class=\"sdds-inline-tabs-header\">\n <div\n ref={(el) => {\n this.navWrapperElement = el as HTMLDivElement;\n }}\n class=\"sdds-inline-tabs-wrapper\"\n >\n {this.tabs.map((tab) => (\n <button\n style={{ width: `${this.buttonWidth}px` }}\n disabled={tab.disabled}\n class={`sdds-inline-tabs--tab ${\n tab.visible ? 'sdds-inline-tabs--tab__active' : ''\n }`}\n onClick={() => this.switchToTab(tab.key)}\n >\n <span>{tab.name}</span>\n </button>\n ))}\n </div>\n <div class=\"sdds-inline-tabs-header-navigation\">\n <button\n class={`sdds-inline-tabs--forward ${\n this.showRightScroll ? 'sdds-inline-tabs--back__show' : ''\n }`}\n disabled={!this.showRightScroll}\n onClick={() => this.scrollRight()}\n >\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M6.1147 17.3291C5.87062 17.0851 5.87062 16.6893 6.1147 16.4453L12.2948 10.2652C12.4412 10.1187 12.4412 9.8813 12.2948 9.73485L6.1147 3.55476C5.87062 3.31068 5.87062 2.91496 6.1147 2.67088C6.35878 2.4268 6.75451 2.4268 6.99858 2.67088L13.1787 8.85097C13.8133 9.48557 13.8133 10.5145 13.1787 11.1491L6.99858 17.3291C6.75451 17.5732 6.35878 17.5732 6.1147 17.3291Z\"\n />\n </svg>\n </button>\n <button\n class={`sdds-inline-tabs--back ${\n this.showLeftScroll ? 'sdds-inline-tabs--back__show' : ''\n }`}\n disabled={!this.showLeftScroll}\n onClick={() => this.scrollLeft()}\n >\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M13.8853 2.67085C14.1294 2.91493 14.1294 3.31066 13.8853 3.55473L7.70522 9.73482C7.55878 9.88127 7.55878 10.1187 7.70522 10.2652L13.8853 16.4452C14.1294 16.6893 14.1294 17.085 13.8853 17.3291C13.6412 17.5732 13.2455 17.5732 13.0014 17.3291L6.82134 11.149C6.18674 10.5144 6.18674 9.48554 6.82134 8.85094L13.0014 2.67085C13.2455 2.42677 13.6412 2.42677 13.8853 2.67085Z\"\n />\n </svg>\n </button>\n </div>\n </nav>\n <div\n ref={(el) => {\n this.tabWrapperElement = el as HTMLElement;\n }}\n class=\"sdds-inline-tabs-main\"\n style={style}\n >\n <slot />\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|