@scania/tegel 0.0.2 → 0.0.4
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-b98965c7.js → index-18eb94f0.js} +287 -4
- package/dist/cjs/index-18eb94f0.js.map +1 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -3
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/popper-11d5f714.js +2 -0
- package/dist/cjs/popper-11d5f714.js.map +1 -0
- package/dist/cjs/sdds-accordion-item.cjs.entry.js +25 -23
- package/dist/cjs/sdds-accordion-item.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-accordion.cjs.entry.js +13 -11
- package/dist/cjs/sdds-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-badges.cjs.entry.js +46 -44
- package/dist/cjs/sdds-badges.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-banner.cjs.entry.js +71 -69
- package/dist/cjs/sdds-banner.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-block.cjs.entry.js +24 -22
- package/dist/cjs/sdds-block.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +160 -158
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js +19 -17
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js +17 -15
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-button.cjs.entry.js +25 -23
- package/dist/cjs/sdds-button.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-card.cjs.entry.js +40 -38
- package/dist/cjs/sdds-card.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-checkbox.cjs.entry.js +47 -45
- package/dist/cjs/sdds-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-datetime.cjs.entry.js +78 -76
- package/dist/cjs/sdds-datetime.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +84 -82
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +318 -316
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-footer-link-group.cjs.entry.js +36 -0
- package/dist/cjs/sdds-footer-link-group.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-footer-link.cjs.entry.js +29 -0
- package/dist/cjs/sdds-footer-link.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-footer.cjs.entry.js +28 -0
- package/dist/cjs/sdds-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-header-cell.cjs.entry.js +131 -129
- package/dist/cjs/sdds-header-cell.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-icon.cjs.entry.js +32 -30
- package/dist/cjs/sdds-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tab.cjs.entry.js +14 -12
- package/dist/cjs/sdds-inline-tab.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +90 -88
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +213 -211
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-link.cjs.entry.js +16 -14
- package/dist/cjs/sdds-link.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-message.cjs.entry.js +30 -28
- package/dist/cjs/sdds-message.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-modal.cjs.entry.js +43 -41
- package/dist/cjs/sdds-modal.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +90 -88
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +75 -73
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +76 -74
- package/dist/cjs/sdds-popover-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-radio-button.cjs.entry.js +24 -22
- package/dist/cjs/sdds-radio-button.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-slider.cjs.entry.js +349 -347
- package/dist/cjs/sdds-slider.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-spinner.cjs.entry.js +13 -11
- package/dist/cjs/sdds-spinner.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-stepper-item.cjs.entry.js +40 -0
- package/dist/cjs/sdds-stepper-item.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-stepper.cjs.entry.js +45 -0
- package/dist/cjs/sdds-stepper.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +74 -72
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-body.cjs.entry.js +236 -234
- package/dist/cjs/sdds-table-body.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-footer.cjs.entry.js +156 -154
- package/dist/cjs/sdds-table-footer.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-header.cjs.entry.js +91 -89
- package/dist/cjs/sdds-table-header.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +57 -55
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-table.cjs.entry.js +60 -58
- package/dist/cjs/sdds-table.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-textarea.cjs.entry.js +60 -56
- package/dist/cjs/sdds-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-textfield.cjs.entry.js +72 -70
- package/dist/cjs/sdds-textfield.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-toast.cjs.entry.js +74 -72
- package/dist/cjs/sdds-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-toggle.cjs.entry.js +35 -34
- package/dist/cjs/sdds-toggle.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-tooltip.cjs.entry.js +95 -93
- package/dist/cjs/sdds-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/tegel.cjs.js +12 -3
- package/dist/cjs/tegel.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +9 -4
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +146 -145
- package/dist/collection/components/accordion/accordion-item/accordion-item.js.map +1 -0
- package/dist/collection/components/accordion/accordion.js +63 -62
- package/dist/collection/components/accordion/accordion.js.map +1 -0
- package/dist/collection/components/accordion/accordion.stories.js +89 -79
- package/dist/collection/components/accordion/accordion.stories.js.map +1 -0
- package/dist/collection/components/badge/badge.stories.js +68 -67
- package/dist/collection/components/badge/badge.stories.js.map +1 -0
- package/dist/collection/components/badge/badges.js +148 -147
- package/dist/collection/components/badge/badges.js.map +1 -0
- package/dist/collection/components/banner/banner.stories.js +79 -78
- package/dist/collection/components/banner/banner.stories.js.map +1 -0
- package/dist/collection/components/banner/sdds-banner.js +331 -330
- package/dist/collection/components/banner/sdds-banner.js.map +1 -0
- package/dist/collection/components/banner/sdds-banner.stories.js +110 -109
- package/dist/collection/components/banner/sdds-banner.stories.js.map +1 -0
- package/dist/collection/components/block/block-native.stories.js +40 -39
- package/dist/collection/components/block/block-native.stories.js.map +1 -0
- package/dist/collection/components/block/sdds-block.js +56 -55
- package/dist/collection/components/block/sdds-block.js.map +1 -0
- package/dist/collection/components/block/sdds-block.stories.js +40 -39
- package/dist/collection/components/block/sdds-block.stories.js.map +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +21 -20
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -0
- package/dist/collection/components/breadcrumb/{breadcrumb-item/breadcrumb-item.css → sdds-breadcrumb-item/sdds-breadcrumb-item.css} +6 -6
- package/dist/collection/components/breadcrumb/{breadcrumb-item/breadcrumb-item.js → sdds-breadcrumb-item/sdds-breadcrumb-item.js} +120 -83
- package/dist/collection/components/breadcrumb/sdds-breadcrumb-item/sdds-breadcrumb-item.js.map +1 -0
- package/dist/collection/components/breadcrumb/{breadcrumb.js → sdds-breadcrumb.js} +23 -22
- package/dist/collection/components/breadcrumb/sdds-breadcrumb.js.map +1 -0
- package/dist/collection/components/breadcrumb/sdds-breadcrumb.stories.js +29 -0
- package/dist/collection/components/breadcrumb/sdds-breadcrumb.stories.js.map +1 -0
- package/dist/collection/components/button/button-component.js +152 -151
- package/dist/collection/components/button/button-component.js.map +1 -0
- package/dist/collection/components/button/button-native.stories.js +168 -167
- package/dist/collection/components/button/button-native.stories.js.map +1 -0
- package/dist/collection/components/button/button-webcomponent.stories.js +168 -167
- package/dist/collection/components/button/button-webcomponent.stories.js.map +1 -0
- package/dist/collection/components/card/card.stories.js +140 -139
- package/dist/collection/components/card/card.stories.js.map +1 -0
- package/dist/collection/components/card/sdds-card.js +269 -268
- package/dist/collection/components/card/sdds-card.js.map +1 -0
- package/dist/collection/components/card/sdds-card.stories.js +138 -137
- package/dist/collection/components/card/sdds-card.stories.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.stories.js +50 -49
- package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -0
- package/dist/collection/components/checkbox/sdds-checkbox.js +240 -239
- package/dist/collection/components/checkbox/sdds-checkbox.js.map +1 -0
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js +50 -49
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js.map +1 -0
- package/dist/collection/components/chips/chips.stories.js +94 -93
- package/dist/collection/components/chips/chips.stories.js.map +1 -0
- package/dist/collection/components/data-table/native-table.stories.js +125 -124
- package/dist/collection/components/data-table/native-table.stories.js.map +1 -0
- package/dist/collection/components/data-table/table/table.js +254 -252
- package/dist/collection/components/data-table/table/table.js.map +1 -0
- package/dist/collection/components/data-table/table-body/table-body.js +426 -425
- 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.js +169 -168
- 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.js +166 -165
- 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.js +157 -156
- 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 +111 -110
- 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 +109 -108
- 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 +50 -49
- 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 +146 -145
- 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 +98 -97
- 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 +98 -97
- 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 +118 -117
- 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 +111 -110
- 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 +111 -110
- 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 +110 -109
- package/dist/collection/components/data-table/table-component-sorting.stories.js.map +1 -0
- package/dist/collection/components/data-table/table-footer/table-footer.js +355 -354
- package/dist/collection/components/data-table/table-footer/table-footer.js.map +1 -0
- package/dist/collection/components/data-table/table-header/table-header.js +153 -152
- 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.js +318 -317
- 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.js +142 -141
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js.map +1 -0
- package/dist/collection/components/datetime/datetime.js +344 -343
- package/dist/collection/components/datetime/datetime.js.map +1 -0
- package/dist/collection/components/datetime/datetime.stories.js +171 -170
- package/dist/collection/components/datetime/datetime.stories.js.map +1 -0
- package/dist/collection/components/divider/divider.stories.js +94 -93
- package/dist/collection/components/divider/divider.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +340 -339
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +94 -93
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-native.stories.js +69 -68
- package/dist/collection/components/dropdown/dropdown-native.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +186 -185
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +139 -138
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +120 -119
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js.map +1 -0
- package/dist/collection/components/dropdown/dropdown.js +568 -567
- package/dist/collection/components/dropdown/dropdown.js.map +1 -0
- package/dist/collection/components/footer/footer.stories.js +53 -52
- package/dist/collection/components/footer/footer.stories.js.map +1 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer-link/sdds-footer-link.css +45 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer-link/sdds-footer-link.js +86 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer-link/sdds-footer-link.js.map +1 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer-link-group/sdds-footer-link-group.css +67 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer-link-group/sdds-footer-link-group.js +62 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer-link-group/sdds-footer-link-group.js.map +1 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer.css +85 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer.js +56 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer.js.map +1 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer.stories.js +118 -0
- package/dist/collection/components/footer/webcomponent/sdds-footer.stories.js.map +1 -0
- package/dist/collection/components/header/header-all.stories.js +39 -38
- package/dist/collection/components/header/header-all.stories.js.map +1 -0
- package/dist/collection/components/header/header-default.stories.js +39 -38
- package/dist/collection/components/header/header-default.stories.js.map +1 -0
- package/dist/collection/components/header/header-inline.stories.js +39 -38
- package/dist/collection/components/header/header-inline.stories.js.map +1 -0
- package/dist/collection/components/header/header-search.stories.js +39 -38
- package/dist/collection/components/header/header-search.stories.js.map +1 -0
- package/dist/collection/components/header/header-toolbar.stories.js +39 -38
- package/dist/collection/components/header/header-toolbar.stories.js.map +1 -0
- package/dist/collection/components/icon/icon-font.stories.js +50 -49
- package/dist/collection/components/icon/icon-font.stories.js.map +1 -0
- package/dist/collection/components/icon/icon-web-component.stories.js +50 -49
- package/dist/collection/components/icon/icon-web-component.stories.js.map +1 -0
- package/dist/collection/components/icon/icon.js +90 -89
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/link/link.stories.js +42 -41
- package/dist/collection/components/link/link.stories.js.map +1 -0
- package/dist/collection/components/link/sdds-link.js +118 -117
- package/dist/collection/components/link/sdds-link.js.map +1 -0
- package/dist/collection/components/link/sdds-link.stories.js +62 -61
- package/dist/collection/components/link/sdds-link.stories.js.map +1 -0
- package/dist/collection/components/message/message.stories.js +94 -93
- package/dist/collection/components/message/message.stories.js.map +1 -0
- package/dist/collection/components/message/sdds-message.js +133 -132
- package/dist/collection/components/message/sdds-message.js.map +1 -0
- package/dist/collection/components/message/sdds-message.stories.js +89 -88
- package/dist/collection/components/message/sdds-message.stories.js.map +1 -0
- package/dist/collection/components/modal/modal-native.stories.js +75 -74
- package/dist/collection/components/modal/modal-native.stories.js.map +1 -0
- package/dist/collection/components/modal/modal-webcomponent.stories.js +69 -68
- package/dist/collection/components/modal/modal-webcomponent.stories.js.map +1 -0
- package/dist/collection/components/modal/modal.js +149 -148
- package/dist/collection/components/modal/modal.js.map +1 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +220 -219
- package/dist/collection/components/popover-canvas/popover-canvas.js.map +1 -0
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +56 -55
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js.map +1 -0
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +67 -66
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js.map +1 -0
- package/dist/collection/components/popover-menu/popover-menu.js +221 -220
- package/dist/collection/components/popover-menu/popover-menu.js.map +1 -0
- package/dist/collection/components/popover-menu/popover-menu.stories.js +67 -66
- package/dist/collection/components/popover-menu/popover-menu.stories.js.map +1 -0
- package/dist/collection/components/radio-button/radio-button-component.stories.js +47 -46
- package/dist/collection/components/radio-button/radio-button-component.stories.js.map +1 -0
- package/dist/collection/components/radio-button/radio-button.js +161 -160
- package/dist/collection/components/radio-button/radio-button.js.map +1 -0
- package/dist/collection/components/radio-button/radio-button.stories.js +42 -41
- package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -0
- package/dist/collection/components/side-menu/side-menu.stories.js +51 -50
- package/dist/collection/components/side-menu/side-menu.stories.js.map +1 -0
- package/dist/collection/components/slider/slider.css +2 -2
- package/dist/collection/components/slider/slider.js +722 -721
- package/dist/collection/components/slider/slider.js.map +1 -0
- package/dist/collection/components/slider/slider.stories.js +179 -178
- package/dist/collection/components/slider/slider.stories.js.map +1 -0
- package/dist/collection/components/spinner/spinner.js +62 -61
- package/dist/collection/components/spinner/spinner.js.map +1 -0
- package/dist/collection/components/spinner/spinner.stories.js +55 -54
- package/dist/collection/components/spinner/spinner.stories.js.map +1 -0
- package/dist/collection/components/stepper/sdds-stepper.css +13 -0
- package/dist/collection/components/stepper/sdds-stepper.js +126 -0
- package/dist/collection/components/stepper/sdds-stepper.js.map +1 -0
- package/dist/collection/components/stepper/stepper-item/sdds-stepper-item.css +197 -0
- package/dist/collection/components/stepper/stepper-item/sdds-stepper-item.js +112 -0
- package/dist/collection/components/stepper/stepper-item/sdds-stepper-item.js.map +1 -0
- package/dist/collection/components/stepper/stepper.stories.js +77 -98
- package/dist/collection/components/stepper/stepper.stories.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js +81 -80
- 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.js +313 -312
- 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 +57 -56
- 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.js +129 -128
- 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 +39 -38
- 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.js +129 -128
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js.map +1 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +25 -24
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js.map +1 -0
- package/dist/collection/components/textarea/textarea.css +13 -2
- package/dist/collection/components/textarea/textarea.js +414 -393
- package/dist/collection/components/textarea/textarea.js.map +1 -0
- package/dist/collection/components/textarea/textarea.stories.js +143 -130
- package/dist/collection/components/textarea/textarea.stories.js.map +1 -0
- package/dist/collection/components/textfield/textfield.js +429 -428
- package/dist/collection/components/textfield/textfield.js.map +1 -0
- package/dist/collection/components/textfield/textfield.stories.js +191 -190
- package/dist/collection/components/textfield/textfield.stories.js.map +1 -0
- package/dist/collection/components/toast/sdds-toast.js +253 -252
- package/dist/collection/components/toast/sdds-toast.js.map +1 -0
- package/dist/collection/components/toast/sdds-toast.stories.js +70 -69
- package/dist/collection/components/toast/sdds-toast.stories.js.map +1 -0
- package/dist/collection/components/toast/toast.stories.js +101 -100
- package/dist/collection/components/toast/toast.stories.js.map +1 -0
- package/dist/collection/components/toggle/sdds-toggle.js +210 -261
- package/dist/collection/components/toggle/sdds-toggle.js.map +1 -0
- package/dist/collection/components/toggle/sdds-toggle.stories.js +81 -78
- package/dist/collection/components/toggle/sdds-toggle.stories.js.map +1 -0
- package/dist/collection/components/toggle/toggle.stories.js +66 -65
- package/dist/collection/components/toggle/toggle.stories.js.map +1 -0
- package/dist/collection/components/tooltip/tooltip.js +230 -229
- package/dist/collection/components/tooltip/tooltip.js.map +1 -0
- package/dist/collection/components/tooltip/tooltip.stories.js +91 -90
- package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -0
- package/dist/collection/components/utility/colour/background-color.stories.js +84 -83
- package/dist/collection/components/utility/colour/background-color.stories.js.map +1 -0
- package/dist/collection/components/utility/colour/text-color.stories.js +84 -83
- package/dist/collection/components/utility/colour/text-color.stories.js.map +1 -0
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js +15 -14
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js.map +1 -0
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js +54 -53
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js.map +1 -0
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +15 -14
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js.map +1 -0
- package/dist/collection/foundations-stories/grid/grid.stories.js +53 -52
- package/dist/collection/foundations-stories/grid/grid.stories.js.map +1 -0
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +11 -10
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js.map +1 -0
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +11 -10
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-body.stories.js +10 -9
- package/dist/collection/foundations-stories/typography/typography-body.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js +10 -9
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js +23 -22
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js.map +1 -0
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +10 -9
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js.map +1 -0
- package/dist/collection/index.js +2 -1
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/utils/utils.js +13 -12
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/dropdown-option.js +95 -93
- package/dist/components/dropdown-option.js.map +1 -0
- package/dist/components/dropdown.js +288 -286
- package/dist/components/dropdown.js.map +1 -0
- package/dist/components/icon.js +51 -49
- package/dist/components/icon.js.map +1 -0
- package/dist/components/index.d.ts +9 -44
- package/dist/components/index.js +3 -42
- package/dist/components/index.js.map +1 -0
- package/dist/components/popper.js +2 -0
- package/dist/components/popper.js.map +1 -0
- package/dist/components/sdds-accordion-item.js +50 -48
- package/dist/components/sdds-accordion-item.js.map +1 -0
- package/dist/components/sdds-accordion.js +30 -28
- package/dist/components/sdds-accordion.js.map +1 -0
- package/dist/components/sdds-badges.js +67 -65
- package/dist/components/sdds-badges.js.map +1 -0
- package/dist/components/sdds-banner.js +109 -107
- package/dist/components/sdds-banner.js.map +1 -0
- package/dist/components/sdds-block.js +40 -38
- package/dist/components/sdds-block.js.map +1 -0
- package/dist/components/sdds-body-cell.js +2 -0
- package/dist/components/sdds-body-cell.js.map +1 -0
- package/dist/components/sdds-breadcrumb-item.js +38 -34
- package/dist/components/sdds-breadcrumb-item.js.map +1 -0
- package/dist/components/sdds-breadcrumb.js +30 -28
- package/dist/components/sdds-breadcrumb.js.map +1 -0
- package/dist/components/sdds-button.js +47 -45
- package/dist/components/sdds-button.js.map +1 -0
- package/dist/components/sdds-card.js +68 -66
- package/dist/components/sdds-card.js.map +1 -0
- package/dist/components/sdds-checkbox.js +68 -66
- package/dist/components/sdds-checkbox.js.map +1 -0
- package/dist/components/sdds-datetime.js +111 -109
- package/dist/components/sdds-datetime.js.map +1 -0
- package/dist/components/sdds-dropdown-filter.js +128 -126
- package/dist/components/sdds-dropdown-filter.js.map +1 -0
- package/dist/components/sdds-dropdown-option.js +2 -0
- package/dist/components/sdds-dropdown-option.js.map +1 -0
- package/dist/components/sdds-dropdown.js +2 -0
- package/dist/components/sdds-dropdown.js.map +1 -0
- package/dist/components/sdds-footer-link-group.d.ts +11 -0
- package/dist/components/sdds-footer-link-group.js +58 -0
- package/dist/components/sdds-footer-link-group.js.map +1 -0
- package/dist/components/sdds-footer-link.d.ts +11 -0
- package/dist/components/sdds-footer-link.js +46 -0
- package/dist/components/sdds-footer-link.js.map +1 -0
- package/dist/components/sdds-footer.d.ts +11 -0
- package/dist/components/sdds-footer.js +45 -0
- package/dist/components/sdds-footer.js.map +1 -0
- package/dist/components/sdds-header-cell.js +162 -160
- package/dist/components/sdds-header-cell.js.map +1 -0
- package/dist/components/sdds-icon.js +2 -0
- package/dist/components/sdds-icon.js.map +1 -0
- package/dist/components/sdds-inline-tab.js +32 -30
- package/dist/components/sdds-inline-tab.js.map +1 -0
- package/dist/components/sdds-inline-tabs-fullbleed.js +109 -107
- package/dist/components/sdds-inline-tabs-fullbleed.js.map +1 -0
- package/dist/components/sdds-inline-tabs.js +237 -235
- package/dist/components/sdds-inline-tabs.js.map +1 -0
- package/dist/components/sdds-link.js +2 -0
- package/dist/components/sdds-link.js.map +1 -0
- package/dist/components/sdds-link2.js +35 -33
- package/dist/components/sdds-link2.js.map +1 -0
- package/dist/components/sdds-message.js +55 -53
- package/dist/components/sdds-message.js.map +1 -0
- package/dist/components/sdds-modal.js +68 -66
- package/dist/components/sdds-modal.js.map +1 -0
- package/dist/components/sdds-navigation-tabs.js +109 -107
- package/dist/components/sdds-navigation-tabs.js.map +1 -0
- package/dist/components/sdds-popover-canvas.js +99 -97
- package/dist/components/sdds-popover-canvas.js.map +1 -0
- package/dist/components/sdds-popover-menu.js +100 -98
- package/dist/components/sdds-popover-menu.js.map +1 -0
- package/dist/components/sdds-radio-button.js +44 -42
- package/dist/components/sdds-radio-button.js.map +1 -0
- package/dist/components/sdds-slider.js +385 -383
- package/dist/components/sdds-slider.js.map +1 -0
- package/dist/components/sdds-spinner.js +29 -27
- package/dist/components/sdds-spinner.js.map +1 -0
- package/dist/components/sdds-stepper-item.d.ts +11 -0
- package/dist/components/sdds-stepper-item.js +69 -0
- package/dist/components/sdds-stepper-item.js.map +1 -0
- package/dist/components/sdds-stepper.d.ts +11 -0
- package/dist/components/sdds-stepper.js +65 -0
- package/dist/components/sdds-stepper.js.map +1 -0
- package/dist/components/sdds-table-body-row-expandable.js +97 -95
- package/dist/components/sdds-table-body-row-expandable.js.map +1 -0
- package/dist/components/sdds-table-body-row.js +2 -0
- package/dist/components/sdds-table-body-row.js.map +1 -0
- package/dist/components/sdds-table-body.js +282 -280
- package/dist/components/sdds-table-body.js.map +1 -0
- package/dist/components/sdds-table-footer.js +187 -185
- package/dist/components/sdds-table-footer.js.map +1 -0
- package/dist/components/sdds-table-header.js +116 -114
- package/dist/components/sdds-table-header.js.map +1 -0
- package/dist/components/sdds-table-toolbar.js +79 -77
- package/dist/components/sdds-table-toolbar.js.map +1 -0
- package/dist/components/sdds-table.js +83 -81
- package/dist/components/sdds-table.js.map +1 -0
- package/dist/components/sdds-textarea.js +95 -90
- package/dist/components/sdds-textarea.js.map +1 -0
- package/dist/components/sdds-textfield.js +107 -105
- package/dist/components/sdds-textfield.js.map +1 -0
- package/dist/components/sdds-toast.js +104 -102
- package/dist/components/sdds-toast.js.map +1 -0
- package/dist/components/sdds-toggle.js +57 -59
- package/dist/components/sdds-toggle.js.map +1 -0
- package/dist/components/sdds-tooltip.js +118 -116
- package/dist/components/sdds-tooltip.js.map +1 -0
- package/dist/components/table-body-cell.js +96 -94
- package/dist/components/table-body-cell.js.map +1 -0
- package/dist/components/table-body-row.js +115 -113
- package/dist/components/table-body-row.js.map +1 -0
- package/dist/esm/{index-32571711.js → index-96563708.js} +287 -5
- package/dist/esm/index-96563708.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +6 -3
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/popper-f860750c.js +2 -0
- package/dist/esm/popper-f860750c.js.map +1 -0
- package/dist/esm/sdds-accordion-item.entry.js +25 -23
- package/dist/esm/sdds-accordion-item.entry.js.map +1 -0
- package/dist/esm/sdds-accordion.entry.js +13 -11
- package/dist/esm/sdds-accordion.entry.js.map +1 -0
- package/dist/esm/sdds-badges.entry.js +46 -44
- package/dist/esm/sdds-badges.entry.js.map +1 -0
- package/dist/esm/sdds-banner.entry.js +71 -69
- package/dist/esm/sdds-banner.entry.js.map +1 -0
- package/dist/esm/sdds-block.entry.js +24 -22
- package/dist/esm/sdds-block.entry.js.map +1 -0
- package/dist/esm/sdds-body-cell_2.entry.js +160 -158
- package/dist/esm/sdds-body-cell_2.entry.js.map +1 -0
- package/dist/esm/sdds-breadcrumb-item.entry.js +19 -17
- package/dist/esm/sdds-breadcrumb-item.entry.js.map +1 -0
- package/dist/esm/sdds-breadcrumb.entry.js +17 -15
- package/dist/esm/sdds-breadcrumb.entry.js.map +1 -0
- package/dist/esm/sdds-button.entry.js +25 -23
- package/dist/esm/sdds-button.entry.js.map +1 -0
- package/dist/esm/sdds-card.entry.js +40 -38
- package/dist/esm/sdds-card.entry.js.map +1 -0
- package/dist/esm/sdds-checkbox.entry.js +47 -45
- package/dist/esm/sdds-checkbox.entry.js.map +1 -0
- package/dist/esm/sdds-datetime.entry.js +78 -76
- package/dist/esm/sdds-datetime.entry.js.map +1 -0
- package/dist/esm/sdds-dropdown-filter.entry.js +84 -82
- package/dist/esm/sdds-dropdown-filter.entry.js.map +1 -0
- package/dist/esm/sdds-dropdown_2.entry.js +318 -316
- package/dist/esm/sdds-dropdown_2.entry.js.map +1 -0
- package/dist/esm/sdds-footer-link-group.entry.js +32 -0
- package/dist/esm/sdds-footer-link-group.entry.js.map +1 -0
- package/dist/esm/sdds-footer-link.entry.js +25 -0
- package/dist/esm/sdds-footer-link.entry.js.map +1 -0
- package/dist/esm/sdds-footer.entry.js +24 -0
- package/dist/esm/sdds-footer.entry.js.map +1 -0
- package/dist/esm/sdds-header-cell.entry.js +131 -129
- package/dist/esm/sdds-header-cell.entry.js.map +1 -0
- package/dist/esm/sdds-icon.entry.js +32 -30
- package/dist/esm/sdds-icon.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tab.entry.js +14 -12
- package/dist/esm/sdds-inline-tab.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +90 -88
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tabs.entry.js +213 -211
- package/dist/esm/sdds-inline-tabs.entry.js.map +1 -0
- package/dist/esm/sdds-link.entry.js +16 -14
- package/dist/esm/sdds-link.entry.js.map +1 -0
- package/dist/esm/sdds-message.entry.js +30 -28
- package/dist/esm/sdds-message.entry.js.map +1 -0
- package/dist/esm/sdds-modal.entry.js +43 -41
- package/dist/esm/sdds-modal.entry.js.map +1 -0
- package/dist/esm/sdds-navigation-tabs.entry.js +90 -88
- package/dist/esm/sdds-navigation-tabs.entry.js.map +1 -0
- package/dist/esm/sdds-popover-canvas.entry.js +75 -73
- package/dist/esm/sdds-popover-canvas.entry.js.map +1 -0
- package/dist/esm/sdds-popover-menu.entry.js +76 -74
- package/dist/esm/sdds-popover-menu.entry.js.map +1 -0
- package/dist/esm/sdds-radio-button.entry.js +24 -22
- package/dist/esm/sdds-radio-button.entry.js.map +1 -0
- package/dist/esm/sdds-slider.entry.js +349 -347
- package/dist/esm/sdds-slider.entry.js.map +1 -0
- package/dist/esm/sdds-spinner.entry.js +13 -11
- package/dist/esm/sdds-spinner.entry.js.map +1 -0
- package/dist/esm/sdds-stepper-item.entry.js +36 -0
- package/dist/esm/sdds-stepper-item.entry.js.map +1 -0
- package/dist/esm/sdds-stepper.entry.js +41 -0
- package/dist/esm/sdds-stepper.entry.js.map +1 -0
- package/dist/esm/sdds-table-body-row-expandable.entry.js +74 -72
- package/dist/esm/sdds-table-body-row-expandable.entry.js.map +1 -0
- package/dist/esm/sdds-table-body.entry.js +236 -234
- package/dist/esm/sdds-table-body.entry.js.map +1 -0
- package/dist/esm/sdds-table-footer.entry.js +156 -154
- package/dist/esm/sdds-table-footer.entry.js.map +1 -0
- package/dist/esm/sdds-table-header.entry.js +91 -89
- package/dist/esm/sdds-table-header.entry.js.map +1 -0
- package/dist/esm/sdds-table-toolbar.entry.js +57 -55
- package/dist/esm/sdds-table-toolbar.entry.js.map +1 -0
- package/dist/esm/sdds-table.entry.js +60 -58
- package/dist/esm/sdds-table.entry.js.map +1 -0
- package/dist/esm/sdds-textarea.entry.js +60 -56
- package/dist/esm/sdds-textarea.entry.js.map +1 -0
- package/dist/esm/sdds-textfield.entry.js +72 -70
- package/dist/esm/sdds-textfield.entry.js.map +1 -0
- package/dist/esm/sdds-toast.entry.js +74 -72
- package/dist/esm/sdds-toast.entry.js.map +1 -0
- package/dist/esm/sdds-toggle.entry.js +35 -34
- package/dist/esm/sdds-toggle.entry.js.map +1 -0
- package/dist/esm/sdds-tooltip.entry.js +95 -93
- package/dist/esm/sdds-tooltip.entry.js.map +1 -0
- package/dist/esm/tegel.js +9 -3
- package/dist/esm/tegel.js.map +1 -0
- package/dist/tegel/index.esm.js +2 -0
- package/dist/tegel/index.esm.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-22c49f25.entry.js +2 -0
- package/dist/tegel/p-22c49f25.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-2d45bffe.entry.js +2 -0
- package/dist/tegel/p-2d45bffe.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-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-675d10c6.entry.js +2 -0
- package/dist/tegel/p-675d10c6.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-a4127075.entry.js +2 -0
- package/dist/tegel/p-a4127075.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-b2e46497.entry.js +2 -0
- package/dist/tegel/p-b2e46497.entry.js.map +1 -0
- package/dist/tegel/p-b2f1ec40.entry.js +2 -0
- package/dist/tegel/p-b2f1ec40.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-c5537ff7.entry.js +2 -0
- package/dist/tegel/p-c5537ff7.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 -1
- package/dist/tegel/p-ec26fc38.js.map +1 -0
- package/dist/tegel/p-f51fe381.entry.js +2 -0
- package/dist/tegel/p-f51fe381.entry.js.map +1 -0
- package/dist/tegel/p-f9dacc11.entry.js +2 -0
- package/dist/tegel/p-f9dacc11.entry.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-fc96cf21.entry.js +2 -0
- package/dist/tegel/p-fc96cf21.entry.js.map +1 -0
- package/dist/tegel/tegel.css +16 -4
- package/dist/tegel/tegel.esm.js +2 -1
- package/dist/tegel/tegel.esm.js.map +1 -0
- package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +17 -17
- package/dist/types/components/accordion/accordion.d.ts +7 -7
- package/dist/types/components/accordion/accordion.stories.d.ts +77 -77
- package/dist/types/components/badge/badge.stories.d.ts +66 -66
- package/dist/types/components/badge/badges.d.ts +16 -16
- package/dist/types/components/banner/banner.stories.d.ts +68 -68
- package/dist/types/components/banner/sdds-banner.d.ts +48 -48
- package/dist/types/components/banner/sdds-banner.stories.d.ts +109 -109
- package/dist/types/components/block/block-native.stories.d.ts +31 -31
- package/dist/types/components/block/sdds-block.d.ts +9 -9
- package/dist/types/components/block/sdds-block.stories.d.ts +32 -32
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +12 -12
- package/dist/types/components/breadcrumb/sdds-breadcrumb-item/sdds-breadcrumb-item.d.ts +13 -0
- package/dist/types/components/breadcrumb/{breadcrumb.d.ts → sdds-breadcrumb.d.ts} +5 -5
- package/dist/types/components/breadcrumb/sdds-breadcrumb.stories.d.ts +15 -0
- package/dist/types/components/button/button-component.d.ts +18 -18
- package/dist/types/components/button/button-native.stories.d.ts +148 -148
- package/dist/types/components/button/button-webcomponent.stories.d.ts +147 -147
- package/dist/types/components/card/card.stories.d.ts +138 -138
- package/dist/types/components/card/sdds-card.d.ts +39 -39
- package/dist/types/components/card/sdds-card.stories.d.ts +139 -139
- package/dist/types/components/checkbox/checkbox.stories.d.ts +39 -39
- package/dist/types/components/checkbox/sdds-checkbox.d.ts +38 -38
- package/dist/types/components/checkbox/sdds-checkbox.stories.d.ts +40 -40
- package/dist/types/components/chips/chips.stories.d.ts +77 -77
- package/dist/types/components/data-table/native-table.stories.d.ts +133 -133
- package/dist/types/components/data-table/table/table.d.ts +47 -47
- package/dist/types/components/data-table/table-body/table-body.d.ts +54 -54
- package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +24 -24
- package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +27 -27
- package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +27 -27
- package/dist/types/components/data-table/table-component-basic.stories.d.ts +101 -101
- package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +99 -99
- package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +38 -38
- package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +148 -148
- package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +88 -88
- package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +88 -88
- package/dist/types/components/data-table/table-component-filtering.stories.d.ts +101 -101
- package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +101 -101
- package/dist/types/components/data-table/table-component-pagination.stories.d.ts +101 -101
- package/dist/types/components/data-table/table-component-sorting.stories.d.ts +100 -100
- package/dist/types/components/data-table/table-footer/table-footer.d.ts +50 -50
- package/dist/types/components/data-table/table-header/table-header.d.ts +27 -27
- package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +44 -44
- package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +22 -22
- package/dist/types/components/datetime/datetime.d.ts +42 -42
- package/dist/types/components/datetime/datetime.stories.d.ts +127 -127
- package/dist/types/components/divider/divider.stories.d.ts +65 -65
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +42 -42
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +73 -73
- package/dist/types/components/dropdown/dropdown-native.stories.d.ts +57 -57
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +19 -19
- package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +129 -129
- package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +115 -115
- package/dist/types/components/dropdown/dropdown.d.ts +58 -58
- package/dist/types/components/footer/footer.stories.d.ts +45 -45
- package/dist/types/components/footer/webcomponent/sdds-footer-link/sdds-footer-link.d.ts +13 -0
- package/dist/types/components/footer/webcomponent/sdds-footer-link-group/sdds-footer-link-group.d.ts +11 -0
- package/dist/types/components/footer/webcomponent/sdds-footer.d.ts +9 -0
- package/dist/types/components/footer/webcomponent/sdds-footer.stories.d.ts +44 -0
- package/dist/types/components/header/header-all.stories.d.ts +29 -29
- package/dist/types/components/header/header-default.stories.d.ts +29 -29
- package/dist/types/components/header/header-inline.stories.d.ts +29 -29
- package/dist/types/components/header/header-search.stories.d.ts +29 -29
- package/dist/types/components/header/header-toolbar.stories.d.ts +29 -29
- package/dist/types/components/icon/icon-font.stories.d.ts +38 -38
- package/dist/types/components/icon/icon-web-component.stories.d.ts +38 -38
- package/dist/types/components/icon/icon.d.ts +12 -12
- package/dist/types/components/link/link.stories.d.ts +33 -33
- package/dist/types/components/link/sdds-link.d.ts +13 -13
- package/dist/types/components/link/sdds-link.stories.d.ts +58 -58
- package/dist/types/components/message/message.stories.d.ts +69 -69
- package/dist/types/components/message/sdds-message.d.ts +14 -14
- package/dist/types/components/message/sdds-message.stories.d.ts +87 -87
- package/dist/types/components/modal/modal-native.stories.d.ts +59 -59
- package/dist/types/components/modal/modal-webcomponent.stories.d.ts +52 -52
- package/dist/types/components/modal/modal.d.ts +17 -17
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +24 -24
- package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +25 -25
- package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +27 -27
- package/dist/types/components/popover-menu/popover-menu.d.ts +24 -24
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +27 -27
- package/dist/types/components/radio-button/radio-button-component.stories.d.ts +39 -39
- package/dist/types/components/radio-button/radio-button.d.ts +26 -26
- package/dist/types/components/radio-button/radio-button.stories.d.ts +33 -33
- package/dist/types/components/side-menu/side-menu.stories.d.ts +42 -42
- package/dist/types/components/slider/slider.d.ts +86 -86
- package/dist/types/components/slider/slider.stories.d.ts +169 -169
- package/dist/types/components/spinner/spinner.d.ts +7 -7
- package/dist/types/components/spinner/spinner.stories.d.ts +37 -37
- package/dist/types/components/stepper/stepper.stories.d.ts +52 -56
- package/dist/types/components/tabs/inline-tabs-default/inline-tab/inline-tab.d.ts +6 -6
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +40 -40
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +49 -49
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +20 -20
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts +30 -30
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +20 -20
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +13 -13
- package/dist/types/components/textarea/textarea.d.ts +50 -48
- package/dist/types/components/textarea/textarea.stories.d.ts +129 -116
- package/dist/types/components/textfield/textfield.d.ts +52 -52
- package/dist/types/components/textfield/textfield.stories.d.ts +180 -180
- package/dist/types/components/toast/sdds-toast.d.ts +36 -36
- package/dist/types/components/toast/sdds-toast.stories.d.ts +56 -56
- package/dist/types/components/toast/toast.stories.d.ts +69 -69
- package/dist/types/components/toggle/sdds-toggle.d.ts +31 -34
- package/dist/types/components/toggle/sdds-toggle.stories.d.ts +74 -74
- package/dist/types/components/toggle/toggle.stories.d.ts +55 -55
- package/dist/types/components/tooltip/tooltip.d.ts +24 -24
- package/dist/types/components/tooltip/tooltip.stories.d.ts +54 -54
- package/dist/types/components/utility/colour/background-color.stories.d.ts +58 -58
- package/dist/types/components/utility/colour/text-color.stories.d.ts +58 -58
- package/dist/types/components.d.ts +193 -34
- package/dist/types/foundations-stories/colour/colour-brand.stories.d.ts +13 -13
- package/dist/types/foundations-stories/colour/colour-scales.stories.d.ts +13 -13
- package/dist/types/foundations-stories/colour/colour-semantic.stories.d.ts +13 -13
- package/dist/types/foundations-stories/grid/grid.stories.d.ts +35 -35
- package/dist/types/foundations-stories/spacing/spacing-element.stories.d.ts +8 -8
- package/dist/types/foundations-stories/spacing/spacing-layout.stories.d.ts +8 -8
- package/dist/types/foundations-stories/typography/typography-body.stories.d.ts +8 -8
- package/dist/types/foundations-stories/typography/typography-detail.stories.d.ts +8 -8
- package/dist/types/foundations-stories/typography/typography-headline.stories.d.ts +21 -21
- package/dist/types/foundations-stories/typography/typography-paragraph.stories.d.ts +8 -8
- package/dist/types/index.d.ts +1 -1
- package/dist/types/stencil-public-runtime.d.ts +71 -15
- package/dist/types/utils/utils.d.ts +2 -2
- package/loader/index.d.ts +9 -0
- package/package.json +4 -3
- package/dist/node_modules/@types/jest/index.d.ts +0 -1512
- package/dist/tegel/p-05d3cfc8.entry.js +0 -1
- package/dist/tegel/p-13a25c7f.entry.js +0 -1
- package/dist/tegel/p-13b783f1.js +0 -2
- package/dist/tegel/p-1dda8de9.entry.js +0 -1
- package/dist/tegel/p-2248b59e.entry.js +0 -1
- package/dist/tegel/p-232e5c9a.entry.js +0 -1
- package/dist/tegel/p-2375f0eb.entry.js +0 -1
- package/dist/tegel/p-29deedc6.entry.js +0 -1
- package/dist/tegel/p-2f52021b.entry.js +0 -1
- package/dist/tegel/p-3344582d.entry.js +0 -1
- package/dist/tegel/p-4b14324d.entry.js +0 -1
- package/dist/tegel/p-561fbe77.entry.js +0 -1
- package/dist/tegel/p-5a215722.entry.js +0 -1
- package/dist/tegel/p-5f7b1539.entry.js +0 -1
- package/dist/tegel/p-6f382b38.entry.js +0 -1
- package/dist/tegel/p-765e2719.entry.js +0 -1
- package/dist/tegel/p-76f60546.entry.js +0 -1
- package/dist/tegel/p-7a5244b6.entry.js +0 -1
- package/dist/tegel/p-816ff5f7.entry.js +0 -1
- package/dist/tegel/p-81d2d57b.entry.js +0 -1
- package/dist/tegel/p-87650f36.entry.js +0 -1
- package/dist/tegel/p-8e6f885c.entry.js +0 -1
- package/dist/tegel/p-8e9dcc20.entry.js +0 -1
- package/dist/tegel/p-997fc919.entry.js +0 -1
- package/dist/tegel/p-9a057c9a.entry.js +0 -1
- package/dist/tegel/p-9a95e92c.entry.js +0 -1
- package/dist/tegel/p-a75ff060.entry.js +0 -1
- package/dist/tegel/p-bf1216f9.entry.js +0 -1
- package/dist/tegel/p-bf597564.entry.js +0 -1
- package/dist/tegel/p-d2217bf0.entry.js +0 -1
- package/dist/tegel/p-e335137d.entry.js +0 -1
- package/dist/tegel/p-e34cce75.entry.js +0 -1
- package/dist/tegel/p-e55d09f2.entry.js +0 -1
- package/dist/tegel/p-ebbffa8a.entry.js +0 -1
- package/dist/tegel/p-ed076d47.entry.js +0 -1
- package/dist/tegel/p-ef887910.entry.js +0 -1
- package/dist/tegel/p-f4b70868.entry.js +0 -1
- package/dist/tegel/p-f52a0b63.entry.js +0 -1
- package/dist/tegel/p-f5bf214b.entry.js +0 -1
- package/dist/tegel/p-fd1b5923.entry.js +0 -1
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +0 -9
- /package/dist/collection/components/breadcrumb/{breadcrumb-component.css → sdds-breadcrumb.css} +0 -0
|
@@ -1,217 +1,219 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-96563708.js';
|
|
2
2
|
|
|
3
3
|
const inlineTabsCss = ":host{outline:0 !important;box-sizing:border-box}:host *{box-sizing:border-box}.sdds-inline-tabs{overflow:hidden;outline:0}.sdds-inline-tabs-header{position:relative}.sdds-inline-tabs-main{background-color:var(--sdds-inline-tabs-main-background);padding:24px 24px 48px}.sdds-inline-tabs-wrapper{display:flex;overflow-x:scroll;scrollbar-width:none}.sdds-inline-tabs-wrapper::-webkit-scrollbar{display:none}.sdds-inline-tabs--forward,.sdds-inline-tabs--back{cursor:pointer;width:48px;height:100%;border:0;position:absolute;top:0;background-color:var(--sdds-inline-tabs-scroll-btn-background);display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none}.sdds-inline-tabs--forward__show,.sdds-inline-tabs--back__show{opacity:1;pointer-events:all}.sdds-inline-tabs--forward:hover,.sdds-inline-tabs--back:hover{background-color:var(--sdds-inline-tabs-scroll-btn-background-hover)}.sdds-inline-tabs--forward:active,.sdds-inline-tabs--back:active{background-color:var(--sdds-inline-tabs-scroll-btn-background-active)}.sdds-inline-tabs--forward:focus,.sdds-inline-tabs--back:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}.sdds-inline-tabs--forward svg,.sdds-inline-tabs--back svg{fill:var(--sdds-inline-tabs-scroll-btn-color)}.sdds-inline-tabs--back{left:0}.sdds-inline-tabs--forward{right:0}.sdds-inline-tabs--tab{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);cursor:pointer;border:0;color:var(--sdds-inline-tabs-tab-color);background-color:var(--sdds-inline-tabs-tab-background);padding:16px;min-width:142px;text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out, background-color 0.15s ease-in-out;white-space:nowrap;flex-shrink:0;text-align:left;outline:none}.sdds-inline-tabs--tab>*{opacity:0.6}.sdds-inline-tabs--tab:not(:last-child){border-right:1px solid var(--sdds-inline-tabs-tab-border-color)}.sdds-inline-tabs--tab::after{content:\" \";position:absolute;top:0;right:0;left:0;margin-left:auto;width:0;margin-right:auto;height:2px;background-color:var(--sdds-inline-tabs-tab-indicator-background);transition:width 0.15s ease-in-out}.sdds-inline-tabs--tab:hover{background-color:var(--sdds-inline-tabs-tab-background-hover);color:var(--sdds-inline-tabs-tab-color-hover);text-decoration:none}.sdds-inline-tabs--tab:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}.sdds-inline-tabs--tab__active{background-color:var(--sdds-inline-tabs-tab-background-active);color:var(--sdds-inline-tabs-tab-color-active);cursor:initial;border-right:1px solid transparent !important}.sdds-inline-tabs--tab__active>*{opacity:1}.sdds-inline-tabs--tab__active:hover{background-color:var(--sdds-inline-tabs-tab-background-active)}.sdds-inline-tabs--tab__active::after{width:calc(100% + 2px);left:-1px;background-color:var(--sdds-inline-tabs-tab-indicator-background-active)}.sdds-inline-tabs--tab__active::before{content:\" \";background-color:var(--sdds-inline-tabs-tab-background-active);width:1px;top:0;bottom:0;left:-1px;display:block;position:absolute}.sdds-inline-tabs--tab__active:first-child:focus::before{left:0}.sdds-inline-tabs--tab:disabled,.sdds-inline-tabs--tab__disabled{cursor:initial;color:var(--sdds-navigation-tabs-tab-color-disabled);pointer-events:none}.sdds-inline-tabs--tab:disabled>*,.sdds-inline-tabs--tab__disabled>*{opacity:0.16}.sdds-inline-tabs--tab__active{background-color:var(--sdds-inline-tabs-tab-background-active)}.sdds-inline-tabs-main{background-color:var(--sdds-inline-tabs-main-background)}";
|
|
4
4
|
|
|
5
|
-
function generateKeyFromName(name) {
|
|
6
|
-
return name
|
|
7
|
-
.replace(/\s/g, '-')
|
|
8
|
-
.replace(/[^a-z0-9-]/gi, '')
|
|
9
|
-
.toLowerCase();
|
|
10
|
-
}
|
|
11
|
-
const InlineTabs = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
registerInstance(this, hostRef);
|
|
14
|
-
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)
|
|
15
|
-
this.navWrapperElement = null; // reference to container with nav buttons
|
|
16
|
-
this.tabWrapperElement = null; // reference to container with slotted children
|
|
17
|
-
this.componentWidth = 0; // visible width of this component
|
|
18
|
-
this.buttonsWidth = 0; // total width of all nav items combined
|
|
19
|
-
this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
|
|
20
|
-
this.useAutoHeight = false; // set height for slotted children or not
|
|
21
|
-
this.defaultTab = '';
|
|
22
|
-
this.autoHeight = false;
|
|
23
|
-
this.modeVariant = null;
|
|
24
|
-
this.tabs = [];
|
|
25
|
-
this.buttonWidth = 0;
|
|
26
|
-
this.tabHeight = 0;
|
|
27
|
-
this.showLeftScroll = false;
|
|
28
|
-
this.showRightScroll = false;
|
|
29
|
-
}
|
|
30
|
-
/** used for switching to a tab programmatically */
|
|
31
|
-
async showTab(key) {
|
|
32
|
-
this.switchToTab(key);
|
|
33
|
-
}
|
|
34
|
-
componentWillLoad() {
|
|
35
|
-
this.initComponent();
|
|
36
|
-
}
|
|
37
|
-
initComponent(createInitialState = true) {
|
|
38
|
-
if (this.autoHeight) {
|
|
39
|
-
this.useAutoHeight = true;
|
|
40
|
-
}
|
|
41
|
-
this.tabs = Array.from(this.host.children).map((item, index) => {
|
|
42
|
-
const name = item.label ? item.label : item.getAttribute('name') || `Tab ${index + 1}`;
|
|
43
|
-
const key = generateKeyFromName(name);
|
|
44
|
-
if (item.default) {
|
|
45
|
-
this.startingTab = key;
|
|
46
|
-
}
|
|
47
|
-
let disabled = false;
|
|
48
|
-
if (item.disabled) {
|
|
49
|
-
disabled = true;
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
name,
|
|
53
|
-
key,
|
|
54
|
-
element: item,
|
|
55
|
-
disabled,
|
|
56
|
-
visible: true,
|
|
57
|
-
initialDisplay: window.getComputedStyle(item).display,
|
|
58
|
-
};
|
|
59
|
-
});
|
|
60
|
-
if (createInitialState) {
|
|
61
|
-
this.setInitialState();
|
|
62
|
-
}
|
|
63
|
-
this.tabs = Array.from(this.tabs);
|
|
64
|
-
}
|
|
65
|
-
calculateButtonWidth() {
|
|
66
|
-
const navButtons = this.navWrapperElement.querySelectorAll('button.sdds-inline-tabs--tab');
|
|
67
|
-
let best = 0;
|
|
68
|
-
Array.from(navButtons).forEach((navButton) => {
|
|
69
|
-
const oldStyle = navButton.style.width;
|
|
70
|
-
// eslint-disable-next-line no-param-reassign
|
|
71
|
-
navButton.style.width = '';
|
|
72
|
-
const width = navButton.clientWidth;
|
|
73
|
-
// eslint-disable-next-line no-param-reassign
|
|
74
|
-
navButton.style.width = oldStyle;
|
|
75
|
-
if (navButton.clientWidth > best) {
|
|
76
|
-
best = width;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
this.buttonWidth = best;
|
|
80
|
-
}
|
|
81
|
-
calculateTabHeight() {
|
|
82
|
-
let best = 0;
|
|
83
|
-
this.tabs.forEach((_, tabIndex) => {
|
|
84
|
-
const tab = this.tabs[tabIndex];
|
|
85
|
-
// TODO: add comment on what this does
|
|
86
|
-
const oldStyle = tab.element.style.display;
|
|
87
|
-
tab.element.style.display = '';
|
|
88
|
-
const height = tab.element.clientHeight;
|
|
89
|
-
tab.element.style.display = oldStyle;
|
|
90
|
-
if (height > best) {
|
|
91
|
-
best = height;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
this.tabHeight = best;
|
|
95
|
-
}
|
|
96
|
-
componentDidRender() {
|
|
97
|
-
this.calculateTabHeight();
|
|
98
|
-
this.calculateButtonWidth();
|
|
99
|
-
}
|
|
100
|
-
componentDidLoad() {
|
|
101
|
-
const mutationObserver = new MutationObserver(( /* mutations, observer */) => {
|
|
102
|
-
const visibleTab = this.tabs.find((tab) => tab.visible);
|
|
103
|
-
this.initComponent(false);
|
|
104
|
-
this.calculateTabHeight();
|
|
105
|
-
this.calculateButtonWidth();
|
|
106
|
-
if (visibleTab) {
|
|
107
|
-
this.switchToTab(visibleTab.key);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
111
|
-
entries.forEach((entry) => {
|
|
112
|
-
const componentWidth = entry.contentRect.width;
|
|
113
|
-
let buttonsWidth = 0;
|
|
114
|
-
const navButtons = entry.target.querySelectorAll('button.sdds-inline-tabs--tab');
|
|
115
|
-
Array.from(navButtons).forEach((navButton) => {
|
|
116
|
-
buttonsWidth += navButton.clientWidth;
|
|
117
|
-
});
|
|
118
|
-
this.componentWidth = componentWidth;
|
|
119
|
-
this.buttonsWidth = buttonsWidth;
|
|
120
|
-
this.scrollWidth = buttonsWidth - componentWidth;
|
|
121
|
-
if (this.buttonsWidth > this.componentWidth) {
|
|
122
|
-
this.evaluateScrollButtons();
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
this.showLeftScroll = false;
|
|
126
|
-
this.showRightScroll = false;
|
|
127
|
-
}
|
|
128
|
-
this.calculateTabHeight();
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
mutationObserver.observe(this.host, {
|
|
132
|
-
childList: true,
|
|
133
|
-
attributes: true,
|
|
134
|
-
});
|
|
135
|
-
resizeObserver.observe(this.navWrapperElement);
|
|
136
|
-
this.calculateButtonWidth();
|
|
137
|
-
this.calculateTabHeight();
|
|
138
|
-
}
|
|
139
|
-
setInitialState() {
|
|
140
|
-
if (this.defaultTab) {
|
|
141
|
-
this.startingTab = this.defaultTab;
|
|
142
|
-
}
|
|
143
|
-
this.tabs.forEach((tab, index) => {
|
|
144
|
-
if (this.startingTab) {
|
|
145
|
-
if (tab.key !== this.startingTab) {
|
|
146
|
-
this.hideTab(index);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
if (index > 0) {
|
|
151
|
-
this.hideTab(index);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
unhideTab(tabIndex) {
|
|
157
|
-
const tab = this.tabs[tabIndex];
|
|
158
|
-
tab.element.style.display = '';
|
|
159
|
-
tab.visible = true;
|
|
160
|
-
}
|
|
161
|
-
hideTab(tabIndex) {
|
|
162
|
-
const tab = this.tabs[tabIndex];
|
|
163
|
-
tab.element.style.display = 'none';
|
|
164
|
-
tab.visible = false;
|
|
165
|
-
}
|
|
166
|
-
switchToTab(key) {
|
|
167
|
-
this.tabs.forEach((tab, index) => {
|
|
168
|
-
if (tab.key === key) {
|
|
169
|
-
this.unhideTab(index);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
this.hideTab(index);
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
this.tabs = Array.from(this.tabs);
|
|
176
|
-
}
|
|
177
|
-
scrollRight() {
|
|
178
|
-
const scroll = this.navWrapperElement.scrollLeft;
|
|
179
|
-
this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
|
|
180
|
-
this.evaluateScrollButtons();
|
|
181
|
-
}
|
|
182
|
-
scrollLeft() {
|
|
183
|
-
const scroll = this.navWrapperElement.scrollLeft;
|
|
184
|
-
this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
|
|
185
|
-
this.evaluateScrollButtons();
|
|
186
|
-
}
|
|
187
|
-
evaluateScrollButtons() {
|
|
188
|
-
const scroll = this.navWrapperElement.scrollLeft;
|
|
189
|
-
if (scroll >= this.scrollWidth) {
|
|
190
|
-
this.showRightScroll = false;
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
this.showRightScroll = true;
|
|
194
|
-
}
|
|
195
|
-
if (scroll <= 0) {
|
|
196
|
-
this.showLeftScroll = false;
|
|
197
|
-
}
|
|
198
|
-
else {
|
|
199
|
-
this.showLeftScroll = true;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
render() {
|
|
203
|
-
const style = {};
|
|
204
|
-
if (this.useAutoHeight) {
|
|
205
|
-
style.height = `${this.tabHeight}px`;
|
|
206
|
-
}
|
|
207
|
-
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) => {
|
|
208
|
-
this.navWrapperElement = el;
|
|
209
|
-
}, 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) => {
|
|
210
|
-
this.tabWrapperElement = el;
|
|
211
|
-
}, class: "sdds-inline-tabs-main", style: style }, h("slot", null)))));
|
|
212
|
-
}
|
|
213
|
-
get host() { return getElement(this); }
|
|
214
|
-
};
|
|
5
|
+
function generateKeyFromName(name) {
|
|
6
|
+
return name
|
|
7
|
+
.replace(/\s/g, '-')
|
|
8
|
+
.replace(/[^a-z0-9-]/gi, '')
|
|
9
|
+
.toLowerCase();
|
|
10
|
+
}
|
|
11
|
+
const InlineTabs = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
registerInstance(this, hostRef);
|
|
14
|
+
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)
|
|
15
|
+
this.navWrapperElement = null; // reference to container with nav buttons
|
|
16
|
+
this.tabWrapperElement = null; // reference to container with slotted children
|
|
17
|
+
this.componentWidth = 0; // visible width of this component
|
|
18
|
+
this.buttonsWidth = 0; // total width of all nav items combined
|
|
19
|
+
this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
|
|
20
|
+
this.useAutoHeight = false; // set height for slotted children or not
|
|
21
|
+
this.defaultTab = '';
|
|
22
|
+
this.autoHeight = false;
|
|
23
|
+
this.modeVariant = null;
|
|
24
|
+
this.tabs = [];
|
|
25
|
+
this.buttonWidth = 0;
|
|
26
|
+
this.tabHeight = 0;
|
|
27
|
+
this.showLeftScroll = false;
|
|
28
|
+
this.showRightScroll = false;
|
|
29
|
+
}
|
|
30
|
+
/** used for switching to a tab programmatically */
|
|
31
|
+
async showTab(key) {
|
|
32
|
+
this.switchToTab(key);
|
|
33
|
+
}
|
|
34
|
+
componentWillLoad() {
|
|
35
|
+
this.initComponent();
|
|
36
|
+
}
|
|
37
|
+
initComponent(createInitialState = true) {
|
|
38
|
+
if (this.autoHeight) {
|
|
39
|
+
this.useAutoHeight = true;
|
|
40
|
+
}
|
|
41
|
+
this.tabs = Array.from(this.host.children).map((item, index) => {
|
|
42
|
+
const name = item.label ? item.label : item.getAttribute('name') || `Tab ${index + 1}`;
|
|
43
|
+
const key = generateKeyFromName(name);
|
|
44
|
+
if (item.default) {
|
|
45
|
+
this.startingTab = key;
|
|
46
|
+
}
|
|
47
|
+
let disabled = false;
|
|
48
|
+
if (item.disabled) {
|
|
49
|
+
disabled = true;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
name,
|
|
53
|
+
key,
|
|
54
|
+
element: item,
|
|
55
|
+
disabled,
|
|
56
|
+
visible: true,
|
|
57
|
+
initialDisplay: window.getComputedStyle(item).display,
|
|
58
|
+
};
|
|
59
|
+
});
|
|
60
|
+
if (createInitialState) {
|
|
61
|
+
this.setInitialState();
|
|
62
|
+
}
|
|
63
|
+
this.tabs = Array.from(this.tabs);
|
|
64
|
+
}
|
|
65
|
+
calculateButtonWidth() {
|
|
66
|
+
const navButtons = this.navWrapperElement.querySelectorAll('button.sdds-inline-tabs--tab');
|
|
67
|
+
let best = 0;
|
|
68
|
+
Array.from(navButtons).forEach((navButton) => {
|
|
69
|
+
const oldStyle = navButton.style.width;
|
|
70
|
+
// eslint-disable-next-line no-param-reassign
|
|
71
|
+
navButton.style.width = '';
|
|
72
|
+
const width = navButton.clientWidth;
|
|
73
|
+
// eslint-disable-next-line no-param-reassign
|
|
74
|
+
navButton.style.width = oldStyle;
|
|
75
|
+
if (navButton.clientWidth > best) {
|
|
76
|
+
best = width;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
this.buttonWidth = best;
|
|
80
|
+
}
|
|
81
|
+
calculateTabHeight() {
|
|
82
|
+
let best = 0;
|
|
83
|
+
this.tabs.forEach((_, tabIndex) => {
|
|
84
|
+
const tab = this.tabs[tabIndex];
|
|
85
|
+
// TODO: add comment on what this does
|
|
86
|
+
const oldStyle = tab.element.style.display;
|
|
87
|
+
tab.element.style.display = '';
|
|
88
|
+
const height = tab.element.clientHeight;
|
|
89
|
+
tab.element.style.display = oldStyle;
|
|
90
|
+
if (height > best) {
|
|
91
|
+
best = height;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
this.tabHeight = best;
|
|
95
|
+
}
|
|
96
|
+
componentDidRender() {
|
|
97
|
+
this.calculateTabHeight();
|
|
98
|
+
this.calculateButtonWidth();
|
|
99
|
+
}
|
|
100
|
+
componentDidLoad() {
|
|
101
|
+
const mutationObserver = new MutationObserver(( /* mutations, observer */) => {
|
|
102
|
+
const visibleTab = this.tabs.find((tab) => tab.visible);
|
|
103
|
+
this.initComponent(false);
|
|
104
|
+
this.calculateTabHeight();
|
|
105
|
+
this.calculateButtonWidth();
|
|
106
|
+
if (visibleTab) {
|
|
107
|
+
this.switchToTab(visibleTab.key);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
111
|
+
entries.forEach((entry) => {
|
|
112
|
+
const componentWidth = entry.contentRect.width;
|
|
113
|
+
let buttonsWidth = 0;
|
|
114
|
+
const navButtons = entry.target.querySelectorAll('button.sdds-inline-tabs--tab');
|
|
115
|
+
Array.from(navButtons).forEach((navButton) => {
|
|
116
|
+
buttonsWidth += navButton.clientWidth;
|
|
117
|
+
});
|
|
118
|
+
this.componentWidth = componentWidth;
|
|
119
|
+
this.buttonsWidth = buttonsWidth;
|
|
120
|
+
this.scrollWidth = buttonsWidth - componentWidth;
|
|
121
|
+
if (this.buttonsWidth > this.componentWidth) {
|
|
122
|
+
this.evaluateScrollButtons();
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.showLeftScroll = false;
|
|
126
|
+
this.showRightScroll = false;
|
|
127
|
+
}
|
|
128
|
+
this.calculateTabHeight();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
mutationObserver.observe(this.host, {
|
|
132
|
+
childList: true,
|
|
133
|
+
attributes: true,
|
|
134
|
+
});
|
|
135
|
+
resizeObserver.observe(this.navWrapperElement);
|
|
136
|
+
this.calculateButtonWidth();
|
|
137
|
+
this.calculateTabHeight();
|
|
138
|
+
}
|
|
139
|
+
setInitialState() {
|
|
140
|
+
if (this.defaultTab) {
|
|
141
|
+
this.startingTab = this.defaultTab;
|
|
142
|
+
}
|
|
143
|
+
this.tabs.forEach((tab, index) => {
|
|
144
|
+
if (this.startingTab) {
|
|
145
|
+
if (tab.key !== this.startingTab) {
|
|
146
|
+
this.hideTab(index);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
if (index > 0) {
|
|
151
|
+
this.hideTab(index);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
unhideTab(tabIndex) {
|
|
157
|
+
const tab = this.tabs[tabIndex];
|
|
158
|
+
tab.element.style.display = '';
|
|
159
|
+
tab.visible = true;
|
|
160
|
+
}
|
|
161
|
+
hideTab(tabIndex) {
|
|
162
|
+
const tab = this.tabs[tabIndex];
|
|
163
|
+
tab.element.style.display = 'none';
|
|
164
|
+
tab.visible = false;
|
|
165
|
+
}
|
|
166
|
+
switchToTab(key) {
|
|
167
|
+
this.tabs.forEach((tab, index) => {
|
|
168
|
+
if (tab.key === key) {
|
|
169
|
+
this.unhideTab(index);
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
this.hideTab(index);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
this.tabs = Array.from(this.tabs);
|
|
176
|
+
}
|
|
177
|
+
scrollRight() {
|
|
178
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
179
|
+
this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
|
|
180
|
+
this.evaluateScrollButtons();
|
|
181
|
+
}
|
|
182
|
+
scrollLeft() {
|
|
183
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
184
|
+
this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
|
|
185
|
+
this.evaluateScrollButtons();
|
|
186
|
+
}
|
|
187
|
+
evaluateScrollButtons() {
|
|
188
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
189
|
+
if (scroll >= this.scrollWidth) {
|
|
190
|
+
this.showRightScroll = false;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
this.showRightScroll = true;
|
|
194
|
+
}
|
|
195
|
+
if (scroll <= 0) {
|
|
196
|
+
this.showLeftScroll = false;
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this.showLeftScroll = true;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
render() {
|
|
203
|
+
const style = {};
|
|
204
|
+
if (this.useAutoHeight) {
|
|
205
|
+
style.height = `${this.tabHeight}px`;
|
|
206
|
+
}
|
|
207
|
+
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) => {
|
|
208
|
+
this.navWrapperElement = el;
|
|
209
|
+
}, 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) => {
|
|
210
|
+
this.tabWrapperElement = el;
|
|
211
|
+
}, class: "sdds-inline-tabs-main", style: style }, h("slot", null)))));
|
|
212
|
+
}
|
|
213
|
+
get host() { return getElement(this); }
|
|
214
|
+
};
|
|
215
215
|
InlineTabs.style = inlineTabsCss;
|
|
216
216
|
|
|
217
217
|
export { InlineTabs as sdds_inline_tabs };
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=sdds-inline-tabs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"sdds-inline-tabs.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,w8GAAw8G;;ACE99G,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;MAOY,UAAU;;;IA+BrB,gBAAW,GAAW,IAAI,CAAC;IAE3B,sBAAiB,GAAgB,IAAI,CAAC;IAEtC,sBAAiB,GAAgB,IAAI,CAAC;IAEtC,mBAAc,GAAW,CAAC,CAAC;IAE3B,iBAAY,GAAW,CAAC,CAAC;IAEzB,gBAAW,GAAW,CAAC,CAAC;IAExB,kBAAa,GAAY,KAAK,CAAC;sBAvCF,EAAE;sBAGD,KAAK;uBAGY,IAAI;gBAGvB,EAAE;uBAGC,CAAC;qBAGH,CAAC;0BAEK,KAAK;2BAEJ,KAAK;;;EAIzC,MAAM,OAAO,CAAC,GAAW;IACvB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;GACvB;EAgBD,iBAAiB;IACf,IAAI,CAAC,aAAa,EAAE,CAAC;GACtB;EAED,aAAa,CAAC,kBAAkB,GAAG,IAAI;IAC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I,CAAC,iBAAiB,GAAG,EAAiB,CAAC;OAC5C,EACD,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,KAAK,IAEZ,eAAQ,CACJ,CACF,CACD,EACP;GACH;;;;;;;","names":[],"sources":["./src/components/tabs/inline-tabs-default/inline-tabs.scss?tag=sdds-inline-tabs&encapsulation=shadow","./src/components/tabs/inline-tabs-default/inline-tabs.tsx"],"sourcesContent":["@import '../../../mixins/focus-state';\n@import '../../../mixins/box-sizing';\n\n:host {\n outline: 0 !important;\n @include sdds-box-sizing;\n}\n\n.sdds-inline-tabs {\n overflow: hidden;\n outline: 0;\n\n &-header {\n position: relative;\n }\n\n &-main {\n background-color: var(--sdds-inline-tabs-main-background);\n padding: 24px 24px 48px;\n }\n\n &-wrapper {\n display: flex;\n overflow-x: scroll;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n &--forward,\n &--back {\n cursor: pointer;\n width: 48px;\n height: 100%;\n border: 0;\n position: absolute;\n top: 0;\n background-color: var(--sdds-inline-tabs-scroll-btn-background);\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0;\n pointer-events: none;\n\n &__show {\n opacity: 1;\n pointer-events: all;\n }\n\n &:hover {\n background-color: var(--sdds-inline-tabs-scroll-btn-background-hover);\n }\n\n &:active {\n background-color: var(--sdds-inline-tabs-scroll-btn-background-active);\n }\n\n &:focus {\n @include sdds-focus-state;\n }\n svg{\n fill:var(--sdds-inline-tabs-scroll-btn-color);\n }\n }\n\n &--back {\n left: 0;\n }\n\n &--forward {\n right: 0;\n }\n\n &--tab {\n font: var(--sdds-headline-07);\n letter-spacing: var(--sdds-headline-07-ls);\n cursor: pointer;\n border: 0;\n color: var(--sdds-inline-tabs-tab-color);\n background-color: var(--sdds-inline-tabs-tab-background);\n padding: 16px;\n min-width: 142px;\n text-decoration: none;\n display: block;\n position: relative;\n transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;\n white-space: nowrap;\n flex-shrink: 0;\n text-align: left;\n outline: none;\n\n & > * {\n opacity: 0.6;\n }\n\n &:not(:last-child) {\n border-right: 1px solid var(--sdds-inline-tabs-tab-border-color);\n }\n\n &::after {\n content: ' ';\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n margin-left: auto;\n width: 0;\n margin-right: auto;\n height: 2px;\n background-color: var(--sdds-inline-tabs-tab-indicator-background);\n transition: width 0.15s ease-in-out;\n }\n\n &:hover {\n background-color: var(--sdds-inline-tabs-tab-background-hover);\n color: var(--sdds-inline-tabs-tab-color-hover);\n text-decoration: none;\n }\n\n &:focus {\n @include sdds-focus-state;\n }\n\n &__active {\n background-color: var(--sdds-inline-tabs-tab-background-active);\n color: var(--sdds-inline-tabs-tab-color-active);\n cursor: initial;\n border-right: 1px solid transparent !important;\n\n & > * {\n opacity: 1;\n }\n\n &:hover {\n background-color: var(--sdds-inline-tabs-tab-background-active);\n }\n\n &::after {\n width: calc(100% + 2px);\n left: -1px;\n background-color: var(--sdds-inline-tabs-tab-indicator-background-active);\n }\n\n &::before {\n content: ' ';\n background-color: var(--sdds-inline-tabs-tab-background-active);\n width: 1px;\n top: 0;\n bottom: 0;\n left: -1px;\n display: block;\n position: absolute;\n }\n\n &:first-child {\n &:focus {\n &::before {\n left: 0;\n }\n }\n }\n }\n\n &:disabled,\n &__disabled {\n cursor: initial;\n color: var(--sdds-navigation-tabs-tab-color-disabled);\n pointer-events: none;\n\n & > * {\n opacity: 0.16;\n }\n }\n }\n}\n\n .sdds-inline-tabs--tab__active {\n background-color: var(--sdds-inline-tabs-tab-background-active);\n }\n\n .sdds-inline-tabs-main {\n background-color: var(--sdds-inline-tabs-main-background);\n }\n","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"],"version":3}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-96563708.js';
|
|
2
2
|
|
|
3
3
|
const sddsLinkCss = "a{cursor:pointer;outline:none;color:var(--sdds-link)}a:active{color:var(--sdds-link);text-decoration:underline;text-decoration-color:var(--sdds-link)}a:hover{color:var(--sdds-link-hover);text-decoration:underline;text-decoration-color:var(--sdds-link-hover)}a:visited{color:var(--sdds-link-visited);text-decoration-color:var(--sdds-link-visited)}a:focus{color:var(--sdds-link-focus);text-decoration:none;outline:2px solid var(--sdds-link-focus);outline-offset:-2px}a.disabled{color:var(--sdds-link-disabled);text-decoration-color:var(--sdds-link-disabled);pointer-events:none}a.no-underline{text-decoration:none}a.no-underline:hover{text-decoration:none}";
|
|
4
4
|
|
|
5
|
-
const SddsLink = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.href = undefined;
|
|
9
|
-
this.target = '_self';
|
|
10
|
-
this.disabled = false;
|
|
11
|
-
this.underline = true;
|
|
12
|
-
this.rel = 'noopener';
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
5
|
+
const SddsLink = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.href = undefined;
|
|
9
|
+
this.target = '_self';
|
|
10
|
+
this.disabled = false;
|
|
11
|
+
this.underline = true;
|
|
12
|
+
this.rel = 'noopener';
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
15
|
return (h("a", { class: `
|
|
16
16
|
${this.disabled ? 'disabled' : ''}
|
|
17
17
|
${this.underline ? '' : 'no-underline'}
|
|
18
18
|
|
|
19
|
-
`, href: this.href, target: this.target, rel: this.rel }, h("slot", null)));
|
|
20
|
-
}
|
|
21
|
-
};
|
|
19
|
+
`, href: this.href, target: this.target, rel: this.rel }, h("slot", null)));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
22
|
SddsLink.style = sddsLinkCss;
|
|
23
23
|
|
|
24
24
|
export { SddsLink as sdds_link };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=sdds-link.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"sdds-link.entry.js","mappings":";;AAAA,MAAM,WAAW,GAAG,gpBAAgpB;;MCOvpB,QAAQ;;;;kBAKuC,OAAO;oBAGrC,KAAK;qBAGJ,IAAI;eAGX,UAAU;;EAEhC,MAAM;IACJ,QACE,SACE,KAAK,EAAE;UACL,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE;UAC/B,IAAI,CAAC,SAAS,GAAG,EAAE,GAAG,cAAc;;SAErC,EACD,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,IAEb,eAAa,CACX,EACJ;GACH;;;;;;","names":[],"sources":["./src/components/link/sdds-link.scss?tag=sdds-link","./src/components/link/sdds-link.tsx"],"sourcesContent":["a {\n cursor: pointer;\n outline: none;\n color: var(--sdds-link);\n\n &:active {\n color: var(--sdds-link);\n text-decoration: underline;\n text-decoration-color: var(--sdds-link);\n }\n\n &:hover {\n color: var(--sdds-link-hover);\n text-decoration: underline;\n text-decoration-color: var(--sdds-link-hover);\n }\n\n &:visited {\n color: var(--sdds-link-visited);\n text-decoration-color: var(--sdds-link-visited);\n }\n\n &:focus {\n color: var(--sdds-link-focus);\n text-decoration: none;\n outline: 2px solid var(--sdds-link-focus);\n outline-offset: -2px;\n }\n\n &.disabled {\n color: var(--sdds-link-disabled);\n text-decoration-color: var(--sdds-link-disabled);\n pointer-events: none;\n }\n\n &.no-underline {\n text-decoration: none;\n\n &:hover {\n text-decoration: none;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sdds-link',\n styleUrl: 'sdds-link.scss',\n shadow: false,\n})\nexport class SddsLink {\n /** URL for the link */\n @Prop() href: string;\n\n /** Where to open the linked URL */\n @Prop() target: '_self' | '_blank' | '_parent' | '_top' = '_self';\n\n /** Disables the link */\n @Prop() disabled: boolean = false;\n\n /** Displays the link with an underline. */\n @Prop() underline: boolean = true;\n\n /** 'noopener' is a security measure for legacy browsers that preventsthe opened page from getting access to the original page when using target='_blank'. */\n @Prop() rel: string = 'noopener';\n\n render() {\n return (\n <a\n class={`\n ${this.disabled ? 'disabled' : ''}\n ${this.underline ? '' : 'no-underline'}\n \n `}\n href={this.href}\n target={this.target}\n rel={this.rel}\n >\n <slot></slot>\n </a>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-96563708.js';
|
|
2
2
|
|
|
3
3
|
const sddsMessageCss = ":host .message-wrapper{display:flex;padding:16px;background-color:var(--sdds-message-background);border-radius:4px}:host .message-wrapper.information{border-left:4px solid var(--sdds-information)}:host .message-wrapper.information sdds-icon{color:var(--sdds-information)}:host .message-wrapper.success{border-left:4px solid var(--sdds-positive)}:host .message-wrapper.success sdds-icon{color:var(--sdds-positive)}:host .message-wrapper.error{background-color:var(--sdds-message-type-error-background);border-left:4px solid var(--sdds-negative)}:host .message-wrapper.error sdds-icon{color:var(--sdds-negative)}:host .message-wrapper.warning{border-left:4px solid var(--sdds-warning)}:host .message-wrapper.warning sdds-icon{color:var(--sdds-warning)}:host .message-wrapper.message-minimal{border:none;display:flex;align-items:center;padding:0;background-color:transparent}:host .message-wrapper.message-minimal .message-header{font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls)}:host .message-wrapper.message-minimal sdds-icon{padding-right:8px}:host sdds-icon{padding-right:16px}:host .message-content{display:flex;flex-direction:column;gap:4px;color:var(--sdds-message-color);padding:2px 0}:host .message-content .message-header{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls)}:host .message-content .message-extended-message{color:var(--sdds-message-color);font:var(--sdds-detail-02);letter-spacing:var(--sdds-detail-02-ls)}:host .sdds-mode-variant-primary{--sdds-message-background:var(--sdds-message-background-primary)}:host .sdds-mode-variant-secondary{--sdds-message-background:var(--sdds-message-background-secondary)}";
|
|
4
4
|
|
|
5
|
-
const SddsMessage = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this.getIconName = () => {
|
|
9
|
-
switch (this.type) {
|
|
10
|
-
case 'information':
|
|
11
|
-
return 'info';
|
|
12
|
-
case 'error':
|
|
13
|
-
return 'error';
|
|
14
|
-
case 'warning':
|
|
15
|
-
return 'warning';
|
|
16
|
-
case 'success':
|
|
17
|
-
return 'tick';
|
|
18
|
-
default:
|
|
19
|
-
return 'info';
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
this.header = undefined;
|
|
23
|
-
this.modeVariant = null;
|
|
24
|
-
this.type = 'information';
|
|
25
|
-
this.noIcon = false;
|
|
26
|
-
this.minimal = false;
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
5
|
+
const SddsMessage = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.getIconName = () => {
|
|
9
|
+
switch (this.type) {
|
|
10
|
+
case 'information':
|
|
11
|
+
return 'info';
|
|
12
|
+
case 'error':
|
|
13
|
+
return 'error';
|
|
14
|
+
case 'warning':
|
|
15
|
+
return 'warning';
|
|
16
|
+
case 'success':
|
|
17
|
+
return 'tick';
|
|
18
|
+
default:
|
|
19
|
+
return 'info';
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
this.header = undefined;
|
|
23
|
+
this.modeVariant = null;
|
|
24
|
+
this.type = 'information';
|
|
25
|
+
this.noIcon = false;
|
|
26
|
+
this.minimal = false;
|
|
27
|
+
}
|
|
28
|
+
render() {
|
|
29
29
|
return (h(Host, null, h("div", { class: `
|
|
30
30
|
message-wrapper ${this.type}
|
|
31
31
|
${this.minimal ? 'message-minimal' : ''}
|
|
32
|
-
${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, !this.noIcon && h("sdds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `message-content` }, this.header && h("div", { class: "message-header" }, this.header), !this.minimal && (h("div", { class: "message-extended-message" }, h("slot", null)))))));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
32
|
+
${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, !this.noIcon && h("sdds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `message-content` }, this.header && h("div", { class: "message-header" }, this.header), !this.minimal && (h("div", { class: "message-extended-message" }, h("slot", null)))))));
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
35
|
SddsMessage.style = sddsMessageCss;
|
|
36
36
|
|
|
37
37
|
export { SddsMessage as sdds_message };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=sdds-message.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"sdds-message.entry.js","mappings":";;AAAA,MAAM,cAAc,GAAG,ooDAAooD;;MCO9oD,WAAW;;;IAgBtB,gBAAW,GAAG;MACZ,QAAQ,IAAI,CAAC,IAAI;QACf,KAAK,aAAa;UAChB,OAAO,MAAM,CAAC;QAChB,KAAK,OAAO;UACV,OAAO,OAAO,CAAC;QACjB,KAAK,SAAS;UACZ,OAAO,SAAS,CAAC;QACnB,KAAK,SAAS;UACZ,OAAO,MAAM,CAAC;QAChB;UACE,OAAO,MAAM,CAAC;OACjB;KACF,CAAC;;uBAxB6C,IAAI;gBAGa,aAAa;kBAGnD,KAAK;mBAGJ,KAAK;;EAiBhC,MAAM;IACJ,QACE,EAAC,IAAI,QACH,WACE,KAAK,EAAE;0BACS,IAAI,CAAC,IAAI;UACzB,IAAI,CAAC,OAAO,GAAG,iBAAiB,GAAG,EAAE;UACrC,IAAI,CAAC,WAAW,KAAK,IAAI,GAAG,qBAAqB,IAAI,CAAC,WAAW,EAAE,GAAE,EAAE,EAAE,IAExE,CAAC,IAAI,CAAC,MAAM,IAAI,iBAAW,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,IAAI,EAAC,MAAM,GAAa,EAC9E,WAAK,KAAK,EAAE,iBAAiB,IAC1B,IAAI,CAAC,MAAM,IAAI,WAAK,KAAK,EAAC,gBAAgB,IAAE,IAAI,CAAC,MAAM,CAAO,EAC9D,CAAC,IAAI,CAAC,OAAO,KACZ,WAAK,KAAK,EAAC,0BAA0B,IACnC,eAAa,CACT,CACP,CACG,CACF,CACD,EACP;GACH;;;;;;","names":[],"sources":["./src/components/message/sdds-message.scss?tag=sdds-message&encapsulation=shadow","./src/components/message/sdds-message.tsx"],"sourcesContent":[":host {\n .message-wrapper {\n display: flex;\n padding: 16px;\n background-color: var(--sdds-message-background);\n border-radius: 4px;\n\n &.information {\n border-left: 4px solid var(--sdds-information);\n\n sdds-icon {\n color: var(--sdds-information);\n }\n }\n\n &.success {\n border-left: 4px solid var(--sdds-positive);\n\n sdds-icon {\n color: var(--sdds-positive);\n }\n }\n\n &.error {\n background-color: var(--sdds-message-type-error-background);\n border-left: 4px solid var(--sdds-negative);\n\n sdds-icon {\n color: var(--sdds-negative);\n }\n }\n\n &.warning {\n border-left: 4px solid var(--sdds-warning);\n\n sdds-icon {\n color: var(--sdds-warning);\n }\n }\n\n &.message-minimal {\n border: none;\n display: flex;\n align-items: center;\n padding: 0;\n background-color: transparent;\n\n .message-header {\n font: var(--sdds-detail-02);\n letter-spacing: var(--sdds-detail-02-ls);\n }\n\n sdds-icon {\n padding-right: 8px;\n }\n }\n }\n\n sdds-icon {\n padding-right: 16px;\n }\n\n .message-content {\n display: flex;\n flex-direction: column;\n gap: 4px;\n color: var(--sdds-message-color);\n padding: 2px 0;\n\n .message-header {\n font: var(--sdds-headline-07);\n letter-spacing: var(--sdds-headline-07-ls);\n }\n\n .message-extended-message {\n color: var(--sdds-message-color);\n font: var(--sdds-detail-02);\n letter-spacing: var(--sdds-detail-02-ls);\n }\n }\n\n .sdds-mode-variant-primary {\n --sdds-message-background: var(--sdds-message-background-primary);\n }\n\n .sdds-mode-variant-secondary {\n --sdds-message-background: var(--sdds-message-background-secondary);\n }\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sdds-message',\n styleUrl: 'sdds-message.scss',\n shadow: true,\n})\nexport class SddsMessage {\n /** Header text for the component. */\n @Prop() header: string;\n\n /** Variant of the component, based on current mode. */\n @Prop() modeVariant: 'primary' | 'secondary' = null;\n\n /** Type of message. */\n @Prop() type: 'information' | 'error' | 'warning' | 'success' = 'information';\n\n /** Removes the icon in the message. */\n @Prop() noIcon: boolean = false;\n\n /** Minimal message styling. */\n @Prop() minimal: boolean = false;\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 render() {\n return (\n <Host>\n <div\n class={`\n message-wrapper ${this.type}\n ${this.minimal ? 'message-minimal' : ''}\n ${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}`: ''}`}\n >\n {!this.noIcon && <sdds-icon name={this.getIconName()} size=\"20px\"></sdds-icon>}\n <div class={`message-content`}>\n {this.header && <div class=\"message-header\">{this.header}</div>}\n {!this.minimal && (\n <div class=\"message-extended-message\">\n <slot></slot>\n </div>\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|