@scania/tegel 0.0.34 → 0.0.52
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-aff9d4d5.js → index-5ad19933.js} +60 -99
- package/dist/cjs/index-5ad19933.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sdds-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/sdds-accordion.cjs.entry.js +2 -3
- package/dist/cjs/sdds-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-badges.cjs.entry.js +1 -1
- package/dist/cjs/sdds-banner.cjs.entry.js +8 -8
- package/dist/cjs/sdds-banner.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-block.cjs.entry.js +1 -1
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +13 -13
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-breadcrumb-link.cjs.entry.js +27 -0
- package/dist/cjs/sdds-breadcrumb-link.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js +5 -5
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-button.cjs.entry.js +2 -2
- package/dist/cjs/sdds-button.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-card.cjs.entry.js +2 -2
- package/dist/cjs/sdds-card.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/sdds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-datetime.cjs.entry.js +15 -6
- package/dist/cjs/sdds-datetime.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-divider.cjs.entry.js +22 -0
- package/dist/cjs/sdds-divider.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +10 -7
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +20 -20
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-folder-tabs-button.cjs.entry.js +29 -0
- package/dist/cjs/sdds-folder-tabs-button.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-folder-tabs-link.cjs.entry.js +34 -0
- package/dist/cjs/sdds-folder-tabs-link.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-folder-tabs.cjs.entry.js +180 -0
- package/dist/cjs/sdds-folder-tabs.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 +9 -13
- package/dist/cjs/sdds-header-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-icon.cjs.entry.js +3 -2
- package/dist/cjs/sdds-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-inline-tabs-button.cjs.entry.js +24 -0
- package/dist/cjs/sdds-inline-tabs-button.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tabs-link.cjs.entry.js +29 -0
- package/dist/cjs/sdds-inline-tabs-link.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +113 -148
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-link.cjs.entry.js +1 -1
- package/dist/cjs/sdds-message.cjs.entry.js +1 -1
- package/dist/cjs/sdds-modal.cjs.entry.js +67 -22
- package/dist/cjs/sdds-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-navigation-tabs-button.cjs.entry.js +24 -0
- package/dist/cjs/sdds-navigation-tabs-button.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-navigation-tabs-link.cjs.entry.js +29 -0
- package/dist/cjs/sdds-navigation-tabs-link.cjs.entry.js.map +1 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +69 -24
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +68 -41
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/sdds-radio-button.cjs.entry.js +7 -3
- package/dist/cjs/sdds-radio-button.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-slider.cjs.entry.js +17 -17
- package/dist/cjs/sdds-slider.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/sdds-spinner.cjs.entry.js.map +1 -1
- 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 +6 -6
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-table-body.cjs.entry.js +13 -13
- package/dist/cjs/sdds-table-body.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-table-footer.cjs.entry.js +7 -7
- package/dist/cjs/sdds-table-footer.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-table-header.cjs.entry.js +7 -7
- package/dist/cjs/sdds-table-header.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +4 -4
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-table.cjs.entry.js +10 -10
- package/dist/cjs/sdds-table.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-textarea.cjs.entry.js +13 -11
- package/dist/cjs/sdds-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-textfield.cjs.entry.js +13 -24
- package/dist/cjs/sdds-textfield.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-toast.cjs.entry.js +1 -1
- package/dist/cjs/sdds-toggle.cjs.entry.js +11 -12
- package/dist/cjs/sdds-toggle.cjs.entry.js.map +1 -1
- package/dist/cjs/sdds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/sdds-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/tegel.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +16 -5
- package/dist/collection/components/accordion/accordion.js +1 -20
- package/dist/collection/components/accordion/accordion.js.map +1 -1
- package/dist/collection/components/accordion/accordion.stories.js +21 -21
- package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
- package/dist/collection/components/badge/badge.stories.js +16 -19
- package/dist/collection/components/badge/badge.stories.js.map +1 -1
- package/dist/collection/components/banner/banner.stories.js +5 -5
- package/dist/collection/components/banner/banner.stories.js.map +1 -1
- package/dist/collection/components/banner/sdds-banner.css +8 -2
- package/dist/collection/components/banner/sdds-banner.js +12 -93
- package/dist/collection/components/banner/sdds-banner.js.map +1 -1
- package/dist/collection/components/banner/sdds-banner.stories.js +12 -38
- package/dist/collection/components/banner/sdds-banner.stories.js.map +1 -1
- package/dist/collection/components/breadcrumb/{breadcrumb-item/breadcrumb-item.css → sdds-breadcrumb-link/sdds-breadcrumb-link.css} +13 -13
- package/dist/collection/components/breadcrumb/{breadcrumb-item/breadcrumb-item.js → sdds-breadcrumb-link/sdds-breadcrumb-link.js} +45 -9
- package/dist/collection/components/breadcrumb/sdds-breadcrumb-link/sdds-breadcrumb-link.js.map +1 -0
- package/dist/collection/components/breadcrumb/sdds-breadcrumb.css +15 -0
- package/dist/collection/components/breadcrumb/{breadcrumb.js → sdds-breadcrumb.js} +5 -5
- package/dist/collection/components/breadcrumb/sdds-breadcrumb.js.map +1 -0
- package/dist/collection/components/breadcrumb/sdds-breadcrumb.stories.js +36 -0
- package/dist/collection/components/breadcrumb/sdds-breadcrumb.stories.js.map +1 -0
- package/dist/collection/components/button/button-native.stories.js +39 -32
- package/dist/collection/components/button/button-native.stories.js.map +1 -1
- package/dist/collection/components/button/button-webcomponent.stories.js +36 -33
- package/dist/collection/components/button/button-webcomponent.stories.js.map +1 -1
- package/dist/collection/components/button/button.css +29 -60
- package/dist/collection/components/card/card.stories.js +48 -51
- package/dist/collection/components/card/card.stories.js.map +1 -1
- package/dist/collection/components/card/sdds-card.css +1 -0
- package/dist/collection/components/card/sdds-card.stories.js +27 -36
- package/dist/collection/components/card/sdds-card.stories.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.stories.js +20 -12
- package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
- package/dist/collection/components/checkbox/sdds-checkbox.css +5 -4
- package/dist/collection/components/checkbox/sdds-checkbox.js +1 -1
- package/dist/collection/components/checkbox/sdds-checkbox.js.map +1 -1
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js +21 -13
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js.map +1 -1
- package/dist/collection/components/chips/chips.stories.js +51 -31
- package/dist/collection/components/chips/chips.stories.js.map +1 -1
- package/dist/collection/components/data-table/native-table.stories.js +44 -67
- package/dist/collection/components/data-table/native-table.stories.js.map +1 -1
- package/dist/collection/components/data-table/table/table.js +17 -14
- package/dist/collection/components/data-table/table/table.js.map +1 -1
- package/dist/collection/components/data-table/table-body/table-body.js +37 -28
- package/dist/collection/components/data-table/table-body/table-body.js.map +1 -1
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +10 -10
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js.map +1 -1
- package/dist/collection/components/data-table/table-body-row/table-body-row.css +10 -5
- package/dist/collection/components/data-table/table-body-row/table-body-row.js +24 -18
- package/dist/collection/components/data-table/table-body-row/table-body-row.js.map +1 -1
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +19 -13
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js.map +1 -1
- package/dist/collection/components/data-table/table-component-basic.stories.js +61 -39
- package/dist/collection/components/data-table/table-component-basic.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js +61 -40
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-bodydata.stories.js +0 -6
- package/dist/collection/components/data-table/table-component-bodydata.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-custom-width.stories.js +31 -55
- package/dist/collection/components/data-table/table-component-custom-width.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js +65 -41
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +59 -35
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-filtering.stories.js +63 -44
- package/dist/collection/components/data-table/table-component-filtering.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-multiselect.stories.js +67 -45
- package/dist/collection/components/data-table/table-component-multiselect.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-pagination.stories.js +65 -43
- package/dist/collection/components/data-table/table-component-pagination.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-component-sorting.stories.js +87 -31
- package/dist/collection/components/data-table/table-component-sorting.stories.js.map +1 -1
- package/dist/collection/components/data-table/table-footer/table-footer.js +18 -15
- package/dist/collection/components/data-table/table-footer/table-footer.js.map +1 -1
- package/dist/collection/components/data-table/table-header/table-header.css +10 -5
- package/dist/collection/components/data-table/table-header/table-header.js +17 -14
- package/dist/collection/components/data-table/table-header/table-header.js.map +1 -1
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +27 -31
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js.map +1 -1
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +7 -7
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js.map +1 -1
- package/dist/collection/components/datetime/datetime.js +56 -11
- package/dist/collection/components/datetime/datetime.js.map +1 -1
- package/dist/collection/components/datetime/datetime.stories.js +62 -62
- package/dist/collection/components/datetime/datetime.stories.js.map +1 -1
- package/dist/collection/components/divider/divider-component.css +16 -0
- package/dist/collection/components/divider/divider-webcomponent.stories.js +62 -0
- package/dist/collection/components/divider/divider-webcomponent.stories.js.map +1 -0
- package/dist/collection/components/divider/divider.js +44 -0
- package/dist/collection/components/divider/divider.js.map +1 -0
- package/dist/collection/components/divider/divider.stories.js +21 -24
- package/dist/collection/components/divider/divider.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +35 -13
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +78 -26
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown-native.stories.js +35 -22
- package/dist/collection/components/dropdown/dropdown-native.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +21 -16
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +58 -51
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +73 -50
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.css +14 -167
- package/dist/collection/components/dropdown/dropdown.js +22 -17
- package/dist/collection/components/dropdown/dropdown.js.map +1 -1
- package/dist/collection/components/footer/footer.stories.js +6 -6
- package/dist/collection/components/footer/footer.stories.js.map +1 -1
- 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 +4 -2
- package/dist/collection/components/header/header-all.stories.js.map +1 -1
- package/dist/collection/components/header/header-default.stories.js +4 -2
- package/dist/collection/components/header/header-default.stories.js.map +1 -1
- package/dist/collection/components/header/header-inline.stories.js +4 -2
- package/dist/collection/components/header/header-inline.stories.js.map +1 -1
- package/dist/collection/components/header/header-search.stories.js +4 -2
- package/dist/collection/components/header/header-search.stories.js.map +1 -1
- package/dist/collection/components/header/header-toolbar.stories.js +4 -2
- package/dist/collection/components/header/header-toolbar.stories.js.map +1 -1
- package/dist/collection/components/icon/iconsArray.js +111 -2
- package/dist/collection/components/link/link.stories.js +15 -9
- package/dist/collection/components/link/link.stories.js.map +1 -1
- package/dist/collection/components/link/sdds-link.stories.js +15 -15
- package/dist/collection/components/link/sdds-link.stories.js.map +1 -1
- package/dist/collection/components/message/message.stories.js +53 -33
- package/dist/collection/components/message/message.stories.js.map +1 -1
- package/dist/collection/components/message/sdds-message.stories.js +23 -22
- package/dist/collection/components/message/sdds-message.stories.js.map +1 -1
- package/dist/collection/components/modal/modal-native.stories.js +28 -20
- package/dist/collection/components/modal/modal-native.stories.js.map +1 -1
- package/dist/collection/components/modal/modal-webcomponent.stories.js +33 -22
- package/dist/collection/components/modal/modal-webcomponent.stories.js.map +1 -1
- package/dist/collection/components/modal/modal.js +147 -29
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/popover-canvas/popover-canvas.css +0 -4
- package/dist/collection/components/popover-canvas/popover-canvas.js +99 -46
- package/dist/collection/components/popover-canvas/popover-canvas.js.map +1 -1
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +16 -14
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js.map +1 -1
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +7 -3
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js.map +1 -1
- package/dist/collection/components/popover-menu/popover-menu.stories.js +7 -3
- package/dist/collection/components/popover-menu/popover-menu.stories.js.map +1 -1
- package/dist/collection/components/radio-button/radio-button-component.stories.js +7 -8
- package/dist/collection/components/radio-button/radio-button-component.stories.js.map +1 -1
- package/dist/collection/components/radio-button/radio-button.js +6 -2
- package/dist/collection/components/radio-button/radio-button.js.map +1 -1
- package/dist/collection/components/radio-button/radio-button.stories.js +9 -6
- package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
- package/dist/collection/components/slider/slider.css +27 -16
- package/dist/collection/components/slider/slider.js +27 -27
- package/dist/collection/components/slider/slider.js.map +1 -1
- package/dist/collection/components/slider/slider.stories.js +93 -67
- package/dist/collection/components/slider/slider.stories.js.map +1 -1
- package/dist/collection/components/spinner/spinner.stories.js +8 -2
- package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
- 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 +31 -41
- package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
- package/dist/collection/components/tabs/folder-tabs/folder-tabs-button/sdds-folder-tabs-button.css +79 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs-button/sdds-folder-tabs-button.js +100 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs-button/sdds-folder-tabs-button.js.map +1 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs-link/sdds-folder-tabs-link.css +77 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs-link/sdds-folder-tabs-link.js +158 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs-link/sdds-folder-tabs-link.js.map +1 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.css +64 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +256 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js.map +1 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.stories.js +114 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.stories.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs-button/sdds-inline-tabs-button.css +73 -0
- package/dist/collection/components/tabs/{inline-tabs-default/inline-tab/inline-tab.js → inline-tabs/inline-tabs-button/sdds-inline-tabs-button.js} +12 -29
- package/dist/collection/components/tabs/inline-tabs/inline-tabs-button/sdds-inline-tabs-button.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs-link/sdds-inline-tabs-link.css +75 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs-link/sdds-inline-tabs-link.js +122 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs-link/sdds-inline-tabs-link.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.css +76 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +261 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js.map +1 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.stories.js +109 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.stories.js.map +1 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs-button/sdds-navigation-tabs-button.css +73 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs-button/sdds-navigation-tabs-button.js +64 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs-button/sdds-navigation-tabs-button.js.map +1 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs-link/sdds-navigation-tabs-link.css +73 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs-link/sdds-navigation-tabs-link.js +122 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs-link/sdds-navigation-tabs-link.js.map +1 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +37 -118
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +114 -26
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js.map +1 -1
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +79 -9
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js.map +1 -1
- package/dist/collection/components/textarea/textarea.css +44 -114
- package/dist/collection/components/textarea/textarea.js +30 -9
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/components/textarea/textarea.stories.js +66 -48
- package/dist/collection/components/textarea/textarea.stories.js.map +1 -1
- package/dist/collection/components/textfield/textfield.css +87 -226
- package/dist/collection/components/textfield/textfield.js +12 -22
- package/dist/collection/components/textfield/textfield.js.map +1 -1
- package/dist/collection/components/textfield/textfield.stories.js +94 -80
- package/dist/collection/components/textfield/textfield.stories.js.map +1 -1
- package/dist/collection/components/toast/sdds-toast.stories.js +6 -6
- package/dist/collection/components/toast/sdds-toast.stories.js.map +1 -1
- package/dist/collection/components/toast/toast.stories.js +19 -17
- package/dist/collection/components/toast/toast.stories.js.map +1 -1
- package/dist/collection/components/toggle/sdds-toggle.js +12 -64
- package/dist/collection/components/toggle/sdds-toggle.js.map +1 -1
- package/dist/collection/components/toggle/sdds-toggle.stories.js +22 -20
- package/dist/collection/components/toggle/sdds-toggle.stories.js.map +1 -1
- package/dist/collection/components/toggle/toggle.stories.js +19 -14
- package/dist/collection/components/toggle/toggle.stories.js.map +1 -1
- package/dist/collection/components/tooltip/tooltip.stories.js +30 -18
- package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
- package/dist/components/dropdown-option.js +9 -11
- package/dist/components/dropdown-option.js.map +1 -1
- package/dist/components/dropdown.js +13 -10
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/icon.js +2 -1
- package/dist/components/icon.js.map +1 -1
- package/dist/components/index.d.ts +0 -12
- package/dist/components/index.js +0 -95
- package/dist/components/index.js.map +1 -1
- package/dist/components/sdds-accordion.js +1 -3
- package/dist/components/sdds-accordion.js.map +1 -1
- package/dist/components/sdds-banner.js +11 -20
- package/dist/components/sdds-banner.js.map +1 -1
- package/dist/components/{sdds-breadcrumb-item.d.ts → sdds-breadcrumb-link.d.ts} +4 -4
- package/dist/components/sdds-breadcrumb-link.js +47 -0
- package/dist/components/sdds-breadcrumb-link.js.map +1 -0
- package/dist/components/sdds-breadcrumb.js +4 -4
- package/dist/components/sdds-breadcrumb.js.map +1 -1
- package/dist/components/sdds-button.js +1 -1
- package/dist/components/sdds-button.js.map +1 -1
- package/dist/components/sdds-card.js +1 -1
- package/dist/components/sdds-card.js.map +1 -1
- package/dist/components/sdds-checkbox.js +2 -2
- package/dist/components/sdds-checkbox.js.map +1 -1
- package/dist/components/sdds-datetime.js +14 -5
- package/dist/components/sdds-datetime.js.map +1 -1
- package/dist/components/{sdds-inline-tab.d.ts → sdds-divider.d.ts} +4 -4
- package/dist/components/sdds-divider.js +38 -0
- package/dist/components/sdds-divider.js.map +1 -0
- package/dist/components/sdds-dropdown-filter.js +12 -8
- package/dist/components/sdds-dropdown-filter.js.map +1 -1
- package/dist/components/sdds-folder-tabs-button.d.ts +11 -0
- package/dist/components/sdds-folder-tabs-button.js +48 -0
- package/dist/components/sdds-folder-tabs-button.js.map +1 -0
- package/dist/components/sdds-folder-tabs-link.d.ts +11 -0
- package/dist/components/sdds-folder-tabs-link.js +56 -0
- package/dist/components/sdds-folder-tabs-link.js.map +1 -0
- package/dist/components/sdds-folder-tabs.d.ts +11 -0
- package/dist/components/sdds-folder-tabs.js +208 -0
- package/dist/components/sdds-folder-tabs.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 +9 -13
- package/dist/components/sdds-header-cell.js.map +1 -1
- package/dist/components/sdds-inline-tabs-button.d.ts +11 -0
- package/dist/components/sdds-inline-tabs-button.js +41 -0
- package/dist/components/sdds-inline-tabs-button.js.map +1 -0
- package/dist/components/sdds-inline-tabs-link.d.ts +11 -0
- package/dist/components/sdds-inline-tabs-link.js +49 -0
- package/dist/components/sdds-inline-tabs-link.js.map +1 -0
- package/dist/components/sdds-inline-tabs.js +123 -155
- package/dist/components/sdds-inline-tabs.js.map +1 -1
- package/dist/components/sdds-link.js +42 -1
- package/dist/components/sdds-link.js.map +1 -1
- package/dist/components/sdds-modal.js +73 -24
- package/dist/components/sdds-modal.js.map +1 -1
- package/dist/components/sdds-navigation-tabs-button.d.ts +11 -0
- package/dist/components/sdds-navigation-tabs-button.js +41 -0
- package/dist/components/sdds-navigation-tabs-button.js.map +1 -0
- package/dist/components/sdds-navigation-tabs-link.d.ts +11 -0
- package/dist/components/sdds-navigation-tabs-link.js +49 -0
- package/dist/components/sdds-navigation-tabs-link.js.map +1 -0
- package/dist/components/sdds-navigation-tabs.js +79 -27
- package/dist/components/sdds-navigation-tabs.js.map +1 -1
- package/dist/components/sdds-popover-canvas.js +71 -42
- package/dist/components/sdds-popover-canvas.js.map +1 -1
- package/dist/components/sdds-radio-button.js +6 -2
- package/dist/components/sdds-radio-button.js.map +1 -1
- package/dist/components/sdds-slider.js +17 -17
- package/dist/components/sdds-slider.js.map +1 -1
- package/dist/components/sdds-spinner.js.map +1 -1
- 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 +6 -6
- package/dist/components/sdds-table-body-row-expandable.js.map +1 -1
- package/dist/components/sdds-table-body.js +13 -13
- package/dist/components/sdds-table-body.js.map +1 -1
- package/dist/components/sdds-table-footer.js +7 -7
- package/dist/components/sdds-table-footer.js.map +1 -1
- package/dist/components/sdds-table-header.js +7 -7
- package/dist/components/sdds-table-header.js.map +1 -1
- package/dist/components/sdds-table-toolbar.js +4 -4
- package/dist/components/sdds-table-toolbar.js.map +1 -1
- package/dist/components/sdds-table.js +9 -9
- package/dist/components/sdds-table.js.map +1 -1
- package/dist/components/sdds-textarea.js +14 -11
- package/dist/components/sdds-textarea.js.map +1 -1
- package/dist/components/sdds-textfield.js +13 -24
- package/dist/components/sdds-textfield.js.map +1 -1
- package/dist/components/sdds-toggle.js +10 -14
- package/dist/components/sdds-toggle.js.map +1 -1
- package/dist/components/sdds-tooltip.js.map +1 -1
- package/dist/components/table-body-cell.js +5 -5
- package/dist/components/table-body-cell.js.map +1 -1
- package/dist/components/table-body-row.js +9 -9
- package/dist/components/table-body-row.js.map +1 -1
- package/dist/esm/{index-b21fe3b7.js → index-fdfb114c.js} +60 -99
- package/dist/{tegel/p-1b74896d.js.map → esm/index-fdfb114c.js.map} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sdds-accordion-item.entry.js +1 -1
- package/dist/esm/sdds-accordion.entry.js +2 -3
- package/dist/esm/sdds-accordion.entry.js.map +1 -1
- package/dist/esm/sdds-badges.entry.js +1 -1
- package/dist/esm/sdds-banner.entry.js +8 -8
- package/dist/esm/sdds-banner.entry.js.map +1 -1
- package/dist/esm/sdds-block.entry.js +1 -1
- package/dist/esm/sdds-body-cell_2.entry.js +13 -13
- package/dist/esm/sdds-body-cell_2.entry.js.map +1 -1
- package/dist/esm/sdds-breadcrumb-link.entry.js +23 -0
- package/dist/esm/sdds-breadcrumb-link.entry.js.map +1 -0
- package/dist/esm/sdds-breadcrumb.entry.js +5 -5
- package/dist/esm/sdds-breadcrumb.entry.js.map +1 -1
- package/dist/esm/sdds-button.entry.js +2 -2
- package/dist/esm/sdds-button.entry.js.map +1 -1
- package/dist/esm/sdds-card.entry.js +2 -2
- package/dist/esm/sdds-card.entry.js.map +1 -1
- package/dist/esm/sdds-checkbox.entry.js +3 -3
- package/dist/esm/sdds-checkbox.entry.js.map +1 -1
- package/dist/esm/sdds-datetime.entry.js +15 -6
- package/dist/esm/sdds-datetime.entry.js.map +1 -1
- package/dist/esm/sdds-divider.entry.js +18 -0
- package/dist/esm/sdds-divider.entry.js.map +1 -0
- package/dist/esm/sdds-dropdown-filter.entry.js +10 -7
- package/dist/esm/sdds-dropdown-filter.entry.js.map +1 -1
- package/dist/esm/sdds-dropdown_2.entry.js +20 -20
- package/dist/esm/sdds-dropdown_2.entry.js.map +1 -1
- package/dist/esm/sdds-folder-tabs-button.entry.js +25 -0
- package/dist/esm/sdds-folder-tabs-button.entry.js.map +1 -0
- package/dist/esm/sdds-folder-tabs-link.entry.js +30 -0
- package/dist/esm/sdds-folder-tabs-link.entry.js.map +1 -0
- package/dist/esm/sdds-folder-tabs.entry.js +176 -0
- package/dist/esm/sdds-folder-tabs.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 +9 -13
- package/dist/esm/sdds-header-cell.entry.js.map +1 -1
- package/dist/esm/sdds-icon.entry.js +3 -2
- package/dist/esm/sdds-icon.entry.js.map +1 -1
- package/dist/esm/sdds-inline-tabs-button.entry.js +20 -0
- package/dist/esm/sdds-inline-tabs-button.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tabs-link.entry.js +25 -0
- package/dist/esm/sdds-inline-tabs-link.entry.js.map +1 -0
- package/dist/esm/sdds-inline-tabs.entry.js +113 -148
- package/dist/esm/sdds-inline-tabs.entry.js.map +1 -1
- package/dist/esm/sdds-link.entry.js +1 -1
- package/dist/esm/sdds-message.entry.js +1 -1
- package/dist/esm/sdds-modal.entry.js +67 -22
- package/dist/esm/sdds-modal.entry.js.map +1 -1
- package/dist/esm/sdds-navigation-tabs-button.entry.js +20 -0
- package/dist/esm/sdds-navigation-tabs-button.entry.js.map +1 -0
- package/dist/esm/sdds-navigation-tabs-link.entry.js +25 -0
- package/dist/esm/sdds-navigation-tabs-link.entry.js.map +1 -0
- package/dist/esm/sdds-navigation-tabs.entry.js +69 -24
- package/dist/esm/sdds-navigation-tabs.entry.js.map +1 -1
- package/dist/esm/sdds-popover-canvas.entry.js +68 -41
- package/dist/esm/sdds-popover-canvas.entry.js.map +1 -1
- package/dist/esm/sdds-popover-menu.entry.js +1 -1
- package/dist/esm/sdds-radio-button.entry.js +7 -3
- package/dist/esm/sdds-radio-button.entry.js.map +1 -1
- package/dist/esm/sdds-slider.entry.js +17 -17
- package/dist/esm/sdds-slider.entry.js.map +1 -1
- package/dist/esm/sdds-spinner.entry.js +1 -1
- package/dist/esm/sdds-spinner.entry.js.map +1 -1
- 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 +6 -6
- package/dist/esm/sdds-table-body-row-expandable.entry.js.map +1 -1
- package/dist/esm/sdds-table-body.entry.js +13 -13
- package/dist/esm/sdds-table-body.entry.js.map +1 -1
- package/dist/esm/sdds-table-footer.entry.js +7 -7
- package/dist/esm/sdds-table-footer.entry.js.map +1 -1
- package/dist/esm/sdds-table-header.entry.js +7 -7
- package/dist/esm/sdds-table-header.entry.js.map +1 -1
- package/dist/esm/sdds-table-toolbar.entry.js +4 -4
- package/dist/esm/sdds-table-toolbar.entry.js.map +1 -1
- package/dist/esm/sdds-table.entry.js +10 -10
- package/dist/esm/sdds-table.entry.js.map +1 -1
- package/dist/esm/sdds-textarea.entry.js +13 -11
- package/dist/esm/sdds-textarea.entry.js.map +1 -1
- package/dist/esm/sdds-textfield.entry.js +13 -24
- package/dist/esm/sdds-textfield.entry.js.map +1 -1
- package/dist/esm/sdds-toast.entry.js +1 -1
- package/dist/esm/sdds-toggle.entry.js +11 -12
- package/dist/esm/sdds-toggle.entry.js.map +1 -1
- package/dist/esm/sdds-tooltip.entry.js +1 -1
- package/dist/esm/sdds-tooltip.entry.js.map +1 -1
- package/dist/esm/tegel.js +3 -3
- package/dist/tegel/{p-c5b3ef65.entry.js → p-067789d2.entry.js} +2 -2
- package/dist/tegel/p-067789d2.entry.js.map +1 -0
- package/dist/tegel/p-12f566b7.entry.js +2 -0
- package/dist/tegel/p-12f566b7.entry.js.map +1 -0
- package/dist/tegel/p-15c44320.entry.js +2 -0
- package/dist/tegel/p-15c44320.entry.js.map +1 -0
- package/dist/tegel/{p-7e41ac2c.entry.js → p-1a7f94d3.entry.js} +2 -2
- package/dist/tegel/p-1a7f94d3.entry.js.map +1 -0
- package/dist/tegel/p-1df2e987.entry.js +2 -0
- package/dist/tegel/p-1df2e987.entry.js.map +1 -0
- package/dist/tegel/p-1e196fff.entry.js +2 -0
- package/dist/tegel/p-1e196fff.entry.js.map +1 -0
- package/dist/tegel/p-2080db62.entry.js +2 -0
- package/dist/tegel/p-2080db62.entry.js.map +1 -0
- package/dist/tegel/p-23998948.entry.js +2 -0
- package/dist/tegel/p-23998948.entry.js.map +1 -0
- package/dist/tegel/p-29bcd369.entry.js +2 -0
- package/dist/tegel/p-29bcd369.entry.js.map +1 -0
- package/dist/tegel/p-2c57f4bb.entry.js +2 -0
- package/dist/tegel/p-2c57f4bb.entry.js.map +1 -0
- package/dist/tegel/p-387e1798.js +3 -0
- package/dist/tegel/p-387e1798.js.map +1 -0
- package/dist/tegel/p-3a93619e.entry.js +2 -0
- package/dist/tegel/p-3a93619e.entry.js.map +1 -0
- package/dist/tegel/p-3a9db8c4.entry.js +2 -0
- package/dist/tegel/p-3a9db8c4.entry.js.map +1 -0
- package/dist/tegel/{p-7d097f54.entry.js → p-400d74c2.entry.js} +2 -2
- package/dist/tegel/{p-73ebb46d.entry.js → p-4499e5cd.entry.js} +2 -2
- package/dist/tegel/p-479b1c4e.entry.js +2 -0
- package/dist/tegel/p-479b1c4e.entry.js.map +1 -0
- package/dist/tegel/p-4dee91c9.entry.js +2 -0
- package/dist/tegel/p-4dee91c9.entry.js.map +1 -0
- package/dist/tegel/p-52ecce88.entry.js +2 -0
- package/dist/tegel/p-52ecce88.entry.js.map +1 -0
- package/dist/tegel/p-5812ec42.entry.js +2 -0
- package/dist/tegel/p-5812ec42.entry.js.map +1 -0
- package/dist/tegel/p-595c05f4.entry.js +2 -0
- package/dist/tegel/p-595c05f4.entry.js.map +1 -0
- package/dist/tegel/p-5ca26ce8.entry.js +2 -0
- package/dist/tegel/p-5ca26ce8.entry.js.map +1 -0
- package/dist/tegel/p-5cc6d070.entry.js +2 -0
- package/dist/tegel/p-5cc6d070.entry.js.map +1 -0
- package/dist/tegel/{p-c1f9c2a8.entry.js → p-5dc33f45.entry.js} +2 -2
- package/dist/tegel/p-5f6fe516.entry.js +2 -0
- package/dist/tegel/p-5f6fe516.entry.js.map +1 -0
- package/dist/tegel/p-626434af.entry.js +2 -0
- package/dist/tegel/p-626434af.entry.js.map +1 -0
- package/dist/tegel/{p-847f81ac.entry.js → p-64dd37d4.entry.js} +2 -2
- package/dist/tegel/p-64dd37d4.entry.js.map +1 -0
- package/dist/tegel/p-68e4c190.entry.js +2 -0
- package/dist/tegel/p-68e4c190.entry.js.map +1 -0
- package/dist/tegel/{p-f9d14b96.entry.js → p-750b7e5f.entry.js} +2 -2
- package/dist/tegel/{p-94c6ef69.entry.js → p-7991d22f.entry.js} +2 -2
- package/dist/tegel/p-7f10356d.entry.js +2 -0
- package/dist/tegel/p-7f10356d.entry.js.map +1 -0
- package/dist/tegel/p-7f22cee6.entry.js +2 -0
- package/dist/tegel/p-7f22cee6.entry.js.map +1 -0
- package/dist/tegel/p-88ba44a7.entry.js +2 -0
- package/dist/tegel/p-88ba44a7.entry.js.map +1 -0
- package/dist/tegel/p-8b807df5.entry.js +2 -0
- package/dist/tegel/p-8b807df5.entry.js.map +1 -0
- package/dist/tegel/{p-c46e2117.entry.js → p-a2cbef2c.entry.js} +2 -2
- package/dist/tegel/p-a5cd0006.entry.js +2 -0
- package/dist/tegel/p-a5cd0006.entry.js.map +1 -0
- package/dist/tegel/{p-35146934.entry.js → p-ad3439b8.entry.js} +2 -2
- package/dist/tegel/p-ad3439b8.entry.js.map +1 -0
- package/dist/tegel/p-ae631412.entry.js +2 -0
- package/dist/tegel/p-ae631412.entry.js.map +1 -0
- package/dist/tegel/p-b8d838d1.entry.js +2 -0
- package/dist/tegel/p-b8d838d1.entry.js.map +1 -0
- package/dist/tegel/{p-ce848ab7.entry.js → p-b9b329c0.entry.js} +2 -2
- package/dist/tegel/p-bdae6bc9.entry.js +2 -0
- package/dist/tegel/p-bdae6bc9.entry.js.map +1 -0
- package/dist/tegel/p-bdaf0bc2.entry.js +2 -0
- package/dist/tegel/p-bdaf0bc2.entry.js.map +1 -0
- package/dist/tegel/{p-991b5017.entry.js → p-c4d28002.entry.js} +2 -2
- package/dist/tegel/p-c4d28002.entry.js.map +1 -0
- package/dist/tegel/p-c6c75439.entry.js +2 -0
- package/dist/tegel/p-c6c75439.entry.js.map +1 -0
- package/dist/tegel/{p-c037d66f.entry.js → p-ccb82bc3.entry.js} +2 -2
- package/dist/tegel/p-ccb82bc3.entry.js.map +1 -0
- package/dist/tegel/p-ce84159b.entry.js +2 -0
- package/dist/tegel/p-ce84159b.entry.js.map +1 -0
- package/dist/tegel/p-d517eaef.entry.js +2 -0
- package/dist/tegel/p-d517eaef.entry.js.map +1 -0
- package/dist/tegel/p-edc4d742.entry.js +2 -0
- package/dist/tegel/p-edc4d742.entry.js.map +1 -0
- package/dist/tegel/{p-243cc1a5.entry.js → p-ef5487a3.entry.js} +2 -2
- package/dist/tegel/p-ef5487a3.entry.js.map +1 -0
- package/dist/tegel/p-f23cb0ae.entry.js +2 -0
- package/dist/tegel/p-f23cb0ae.entry.js.map +1 -0
- package/dist/tegel/p-f55ab621.entry.js +2 -0
- package/dist/tegel/p-f55ab621.entry.js.map +1 -0
- package/dist/tegel/p-fcb9e2c1.entry.js +2 -0
- package/dist/tegel/p-fcb9e2c1.entry.js.map +1 -0
- package/dist/tegel/tegel.css +10 -10
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/tegel/tegel.esm.js.map +1 -1
- package/dist/types/components/accordion/accordion.d.ts +0 -2
- package/dist/types/components/accordion/accordion.stories.d.ts +14 -14
- package/dist/types/components/badge/badge.stories.d.ts +9 -14
- package/dist/types/components/banner/sdds-banner.d.ts +2 -10
- package/dist/types/components/banner/sdds-banner.stories.d.ts +3 -30
- package/dist/types/components/breadcrumb/sdds-breadcrumb-link/sdds-breadcrumb-link.d.ts +13 -0
- package/dist/types/components/breadcrumb/sdds-breadcrumb.stories.d.ts +16 -0
- package/dist/types/components/button/button-native.stories.d.ts +36 -25
- package/dist/types/components/button/button-webcomponent.stories.d.ts +30 -26
- package/dist/types/components/card/card.stories.d.ts +29 -30
- package/dist/types/components/card/sdds-card.stories.d.ts +13 -24
- package/dist/types/components/checkbox/checkbox.stories.d.ts +17 -5
- package/dist/types/components/checkbox/sdds-checkbox.stories.d.ts +17 -5
- package/dist/types/components/chips/chips.stories.d.ts +42 -18
- package/dist/types/components/data-table/native-table.stories.d.ts +17 -31
- package/dist/types/components/data-table/table/table.d.ts +5 -4
- package/dist/types/components/data-table/table-body/table-body.d.ts +9 -9
- package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +4 -4
- package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +7 -7
- package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +6 -6
- package/dist/types/components/data-table/table-component-basic.stories.d.ts +54 -11
- package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +54 -14
- package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +0 -5
- package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +15 -32
- package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +54 -11
- package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +54 -11
- package/dist/types/components/data-table/table-component-filtering.stories.d.ts +54 -16
- package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +57 -14
- package/dist/types/components/data-table/table-component-pagination.stories.d.ts +58 -15
- package/dist/types/components/data-table/table-component-sorting.stories.d.ts +93 -10
- package/dist/types/components/data-table/table-footer/table-footer.d.ts +7 -7
- package/dist/types/components/data-table/table-header/table-header.d.ts +6 -6
- package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +9 -10
- package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +4 -4
- package/dist/types/components/datetime/datetime.d.ts +11 -5
- package/dist/types/components/datetime/datetime.stories.d.ts +36 -35
- package/dist/types/components/divider/divider-webcomponent.stories.d.ts +58 -0
- package/dist/types/components/divider/divider.d.ts +5 -0
- package/dist/types/components/divider/divider.stories.d.ts +11 -16
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +4 -2
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +76 -12
- package/dist/types/components/dropdown/dropdown-native.stories.d.ts +26 -11
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +7 -2
- package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +48 -33
- package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +61 -32
- package/dist/types/components/dropdown/dropdown.d.ts +4 -3
- package/dist/types/components/footer/footer.stories.d.ts +5 -5
- 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/{tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts → footer/webcomponent/sdds-footer.stories.d.ts} +16 -2
- package/dist/types/components/header/header-all.stories.d.ts +3 -1
- package/dist/types/components/header/header-default.stories.d.ts +3 -1
- package/dist/types/components/header/header-inline.stories.d.ts +3 -1
- package/dist/types/components/header/header-search.stories.d.ts +3 -1
- package/dist/types/components/header/header-toolbar.stories.d.ts +3 -1
- package/dist/types/components/link/link.stories.d.ts +13 -3
- package/dist/types/components/link/sdds-link.stories.d.ts +9 -9
- package/dist/types/components/message/message.stories.d.ts +32 -12
- package/dist/types/components/message/sdds-message.stories.d.ts +9 -8
- package/dist/types/components/modal/modal-native.stories.d.ts +23 -8
- package/dist/types/components/modal/modal-webcomponent.stories.d.ts +22 -4
- package/dist/types/components/modal/modal.d.ts +27 -7
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +13 -4
- package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +5 -3
- package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +5 -0
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +5 -0
- package/dist/types/components/radio-button/radio-button-component.stories.d.ts +1 -1
- package/dist/types/components/radio-button/radio-button.stories.d.ts +6 -1
- package/dist/types/components/slider/slider.d.ts +2 -2
- package/dist/types/components/slider/slider.stories.d.ts +90 -24
- package/dist/types/components/spinner/spinner.stories.d.ts +12 -2
- package/dist/types/components/stepper/sdds-stepper.d.ts +17 -0
- package/dist/types/components/stepper/stepper-item/sdds-stepper-item.d.ts +17 -0
- package/dist/types/components/stepper/stepper.stories.d.ts +25 -9
- package/dist/types/components/tabs/folder-tabs/folder-tabs-button/sdds-folder-tabs-button.d.ts +10 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs-link/sdds-folder-tabs-link.d.ts +16 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +38 -0
- package/dist/types/components/tabs/{inline-tabs-default/inline-tabs.stories.d.ts → folder-tabs/folder-tabs.stories.d.ts} +14 -11
- package/dist/types/components/tabs/inline-tabs/inline-tabs-button/sdds-inline-tabs-button.d.ts +7 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs-link/sdds-inline-tabs-link.d.ts +13 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +40 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.stories.d.ts +44 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs-button/sdds-navigation-tabs-button.d.ts +7 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs-link/sdds-navigation-tabs-link.d.ts +13 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +25 -10
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +32 -1
- package/dist/types/components/textarea/textarea.d.ts +2 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +50 -27
- package/dist/types/components/textfield/textfield.stories.d.ts +68 -47
- package/dist/types/components/toast/sdds-toast.d.ts +1 -1
- package/dist/types/components/toast/toast.stories.d.ts +8 -9
- package/dist/types/components/toggle/sdds-toggle.d.ts +4 -7
- package/dist/types/components/toggle/sdds-toggle.stories.d.ts +9 -9
- package/dist/types/components/toggle/toggle.stories.d.ts +10 -7
- package/dist/types/components/tooltip/tooltip.stories.d.ts +15 -3
- package/dist/types/components.d.ts +607 -219
- package/{dist/loader → loader}/cdn.js +1 -1
- package/{dist/loader → loader}/index.cjs.js +1 -1
- package/{dist/loader → loader}/index.d.ts +1 -1
- package/loader/index.es2017.js +3 -0
- package/{dist/loader → loader}/index.js +2 -2
- package/package.json +5 -3
- package/readme.md +23 -1
- package/dist/cjs/index-aff9d4d5.js.map +0 -1
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js +0 -27
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js.map +0 -1
- package/dist/cjs/sdds-inline-tab.cjs.entry.js +0 -24
- package/dist/cjs/sdds-inline-tab.cjs.entry.js.map +0 -1
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +0 -100
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js.map +0 -1
- package/dist/collection/components/breadcrumb/breadcrumb-component.css +0 -30
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js.map +0 -1
- package/dist/collection/components/breadcrumb/breadcrumb.js.map +0 -1
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.css +0 -3
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js.map +0 -1
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +0 -156
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +0 -313
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js.map +0 -1
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +0 -72
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js.map +0 -1
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +0 -141
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +0 -129
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js.map +0 -1
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +0 -47
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js.map +0 -1
- package/dist/components/sdds-breadcrumb-item.js +0 -45
- package/dist/components/sdds-breadcrumb-item.js.map +0 -1
- package/dist/components/sdds-inline-tab.js +0 -42
- package/dist/components/sdds-inline-tab.js.map +0 -1
- package/dist/components/sdds-inline-tabs-fullbleed.d.ts +0 -11
- package/dist/components/sdds-inline-tabs-fullbleed.js +0 -119
- package/dist/components/sdds-inline-tabs-fullbleed.js.map +0 -1
- package/dist/components/sdds-link2.js +0 -46
- package/dist/components/sdds-link2.js.map +0 -1
- package/dist/esm/index-b21fe3b7.js.map +0 -1
- package/dist/esm/sdds-breadcrumb-item.entry.js +0 -23
- package/dist/esm/sdds-breadcrumb-item.entry.js.map +0 -1
- package/dist/esm/sdds-inline-tab.entry.js +0 -20
- package/dist/esm/sdds-inline-tab.entry.js.map +0 -1
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +0 -96
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js.map +0 -1
- package/dist/loader/index.es2017.js +0 -3
- package/dist/node_modules/@types/jest/index.d.ts +0 -1512
- package/dist/tegel/p-0d53607f.entry.js +0 -2
- package/dist/tegel/p-0d53607f.entry.js.map +0 -1
- package/dist/tegel/p-15ae0f77.entry.js +0 -2
- package/dist/tegel/p-15ae0f77.entry.js.map +0 -1
- package/dist/tegel/p-1b74896d.js +0 -3
- package/dist/tegel/p-1dc0c48a.entry.js +0 -2
- package/dist/tegel/p-1dc0c48a.entry.js.map +0 -1
- package/dist/tegel/p-243cc1a5.entry.js.map +0 -1
- package/dist/tegel/p-24d22924.entry.js +0 -2
- package/dist/tegel/p-24d22924.entry.js.map +0 -1
- package/dist/tegel/p-26241196.entry.js +0 -2
- package/dist/tegel/p-26241196.entry.js.map +0 -1
- package/dist/tegel/p-35146934.entry.js.map +0 -1
- package/dist/tegel/p-3fcf9763.entry.js +0 -2
- package/dist/tegel/p-3fcf9763.entry.js.map +0 -1
- package/dist/tegel/p-3fd7d6ce.entry.js +0 -2
- package/dist/tegel/p-3fd7d6ce.entry.js.map +0 -1
- package/dist/tegel/p-4835650e.entry.js +0 -2
- package/dist/tegel/p-4835650e.entry.js.map +0 -1
- package/dist/tegel/p-4ee81b96.entry.js +0 -2
- package/dist/tegel/p-4ee81b96.entry.js.map +0 -1
- package/dist/tegel/p-58cfea69.entry.js +0 -2
- package/dist/tegel/p-58cfea69.entry.js.map +0 -1
- package/dist/tegel/p-591dfbcd.entry.js +0 -2
- package/dist/tegel/p-591dfbcd.entry.js.map +0 -1
- package/dist/tegel/p-5b615b67.entry.js +0 -2
- package/dist/tegel/p-5b615b67.entry.js.map +0 -1
- package/dist/tegel/p-650d5e31.entry.js +0 -2
- package/dist/tegel/p-650d5e31.entry.js.map +0 -1
- package/dist/tegel/p-7abe1300.entry.js +0 -2
- package/dist/tegel/p-7abe1300.entry.js.map +0 -1
- package/dist/tegel/p-7e41ac2c.entry.js.map +0 -1
- package/dist/tegel/p-847f81ac.entry.js.map +0 -1
- package/dist/tegel/p-991b5017.entry.js.map +0 -1
- package/dist/tegel/p-9cf4bc66.entry.js +0 -2
- package/dist/tegel/p-9cf4bc66.entry.js.map +0 -1
- package/dist/tegel/p-af6e7c14.entry.js +0 -2
- package/dist/tegel/p-af6e7c14.entry.js.map +0 -1
- package/dist/tegel/p-b65ffb92.entry.js +0 -2
- package/dist/tegel/p-b65ffb92.entry.js.map +0 -1
- package/dist/tegel/p-b72c66f3.entry.js +0 -2
- package/dist/tegel/p-b72c66f3.entry.js.map +0 -1
- package/dist/tegel/p-bd0af26a.entry.js +0 -2
- package/dist/tegel/p-bd0af26a.entry.js.map +0 -1
- package/dist/tegel/p-c037d66f.entry.js.map +0 -1
- package/dist/tegel/p-c5b3ef65.entry.js.map +0 -1
- package/dist/tegel/p-cea5bfcd.entry.js +0 -2
- package/dist/tegel/p-cea5bfcd.entry.js.map +0 -1
- package/dist/tegel/p-d3d8828b.entry.js +0 -2
- package/dist/tegel/p-d3d8828b.entry.js.map +0 -1
- package/dist/tegel/p-d42d3400.entry.js +0 -2
- package/dist/tegel/p-d42d3400.entry.js.map +0 -1
- package/dist/tegel/p-df17ed7c.entry.js +0 -2
- package/dist/tegel/p-df17ed7c.entry.js.map +0 -1
- package/dist/tegel/p-e7332a61.entry.js +0 -2
- package/dist/tegel/p-e7332a61.entry.js.map +0 -1
- package/dist/tegel/p-ef70c653.entry.js +0 -2
- package/dist/tegel/p-ef70c653.entry.js.map +0 -1
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +0 -9
- package/dist/types/components/tabs/inline-tabs-default/inline-tab/inline-tab.d.ts +0 -6
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +0 -40
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +0 -20
- /package/dist/tegel/{p-7d097f54.entry.js.map → p-400d74c2.entry.js.map} +0 -0
- /package/dist/tegel/{p-73ebb46d.entry.js.map → p-4499e5cd.entry.js.map} +0 -0
- /package/dist/tegel/{p-c1f9c2a8.entry.js.map → p-5dc33f45.entry.js.map} +0 -0
- /package/dist/tegel/{p-f9d14b96.entry.js.map → p-750b7e5f.entry.js.map} +0 -0
- /package/dist/tegel/{p-94c6ef69.entry.js.map → p-7991d22f.entry.js.map} +0 -0
- /package/dist/tegel/{p-c46e2117.entry.js.map → p-a2cbef2c.entry.js.map} +0 -0
- /package/dist/tegel/{p-ce848ab7.entry.js.map → p-b9b329c0.entry.js.map} +0 -0
- /package/dist/types/components/breadcrumb/{breadcrumb.d.ts → sdds-breadcrumb.d.ts} +0 -0
- /package/{dist/loader → loader}/package.json +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SddsInlineTabsButton extends Components.SddsInlineTabsButton, HTMLElement {}
|
|
4
|
+
export const SddsInlineTabsButton: {
|
|
5
|
+
prototype: SddsInlineTabsButton;
|
|
6
|
+
new (): SddsInlineTabsButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const sddsInlineTabsButtonCss = ":host{box-sizing:border-box;display:block;position:relative;z-index:200}:host *{box-sizing:border-box}:host button{all:unset;font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);color:var(--sdds-inline-tabs-tab-color);padding:8px 4px;margin-right:32px;text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out 0s;white-space:nowrap;background-color:transparent;border:0}:host button .label{margin:12px 0}:host button:hover{cursor:pointer}:host button:hover::after{width:100%}:host button:focus-visible .label{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}:host button::after{content:\" \";position:absolute;bottom:0;right:0;left:0;margin-left:auto;width:0%;margin-right:auto;height:2px;background-color:var(--sdds-inline-tabs-tab-indicator-background-hover);transition:width 0.15s ease-in-out 0s;z-index:1}:host button.selected{color:var(--sdds-inline-tabs-tab-color-selected)}:host button.selected::after{width:100%;background-color:var(--sdds-inline-tabs-tab-indicator-background-active)}:host button.disabled{color:var(--sdds-inline-tabs-tab-color-disabled);pointer-events:none}:host button.disabled .label{opacity:var(--sdds-inline-tabs-tab-color-opacity-disabled)}:host(.first){margin-left:32px}:host(.last){margin-right:32px}";
|
|
4
|
+
|
|
5
|
+
const SddsInlineTabsButton$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.disabled = false;
|
|
11
|
+
this.selected = false;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, { role: "listitem" }, h("button", { class: `${this.selected ? 'selected' : ''}
|
|
15
|
+
${this.disabled ? 'disabled' : ''}`, disabled: this.disabled }, h("div", { class: "label" }, h("slot", { name: "label" })))));
|
|
16
|
+
}
|
|
17
|
+
static get style() { return sddsInlineTabsButtonCss; }
|
|
18
|
+
}, [1, "sdds-inline-tabs-button", {
|
|
19
|
+
"disabled": [4],
|
|
20
|
+
"selected": [4]
|
|
21
|
+
}]);
|
|
22
|
+
function defineCustomElement$1() {
|
|
23
|
+
if (typeof customElements === "undefined") {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const components = ["sdds-inline-tabs-button"];
|
|
27
|
+
components.forEach(tagName => { switch (tagName) {
|
|
28
|
+
case "sdds-inline-tabs-button":
|
|
29
|
+
if (!customElements.get(tagName)) {
|
|
30
|
+
customElements.define(tagName, SddsInlineTabsButton$1);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
} });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const SddsInlineTabsButton = SddsInlineTabsButton$1;
|
|
37
|
+
const defineCustomElement = defineCustomElement$1;
|
|
38
|
+
|
|
39
|
+
export { SddsInlineTabsButton, defineCustomElement };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=sdds-inline-tabs-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"sdds-inline-tabs-button.js","mappings":";;AAAA,MAAM,uBAAuB,GAAG,8wCAA8wC;;MCOjyCA,sBAAoB;;;;;oBAEH,KAAK;oBAGL,KAAK;;EAEjC,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,IAAI,EAAC,UAAU,IACnB,cACE,KAAK,EAAE,GAAG,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE;UACzC,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,EAAE,EACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAEvB,WAAK,KAAK,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,CACC,CACJ,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SddsInlineTabsButton"],"sources":["./src/components/tabs/inline-tabs/inline-tabs-button/sdds-inline-tabs-button.scss?tag=sdds-inline-tabs-button&encapsulation=shadow","./src/components/tabs/inline-tabs/inline-tabs-button/sdds-inline-tabs-button.tsx"],"sourcesContent":["@import '../../../../mixins/focus-state';\n@import '../../../../mixins/z-index';\n@import '../../../../mixins/box-sizing';\n\n:host {\n @include sdds-box-sizing;\n\n display: block;\n position: relative;\n z-index: z(tab);\n\n button {\n all: unset;\n font: var(--sdds-headline-07);\n letter-spacing: var(--sdds-headline-07-ls);\n color: var(--sdds-inline-tabs-tab-color);\n padding: 8px 4px;\n margin-right: 32px;\n text-decoration: none;\n display: block;\n position: relative;\n transition: color 0.15s ease-in-out 0s;\n white-space: nowrap;\n background-color: transparent;\n border: 0;\n\n .label {\n margin: 12px 0;\n }\n\n &:hover {\n cursor: pointer;\n\n &::after {\n width: 100%;\n }\n }\n\n &:focus-visible {\n .label {\n @include sdds-focus-state;\n }\n }\n\n &::after {\n content: ' ';\n position: absolute;\n bottom: 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-hover);\n transition: width 0.15s ease-in-out 0s;\n z-index: 1;\n }\n\n &.selected {\n color: var(--sdds-inline-tabs-tab-color-selected);\n\n &::after {\n width: 100%;\n background-color: var(--sdds-inline-tabs-tab-indicator-background-active);\n }\n }\n\n &.disabled {\n color: var(--sdds-inline-tabs-tab-color-disabled);\n pointer-events: none;\n\n .label {\n opacity: var(--sdds-inline-tabs-tab-color-opacity-disabled);\n }\n }\n }\n}\n\n:host(.first) {\n margin-left: 32px;\n}\n\n:host(.last) {\n margin-right: 32px;\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sdds-inline-tabs-button',\n styleUrl: 'sdds-inline-tabs-button.scss',\n shadow: true,\n})\nexport class SddsInlineTabsButton {\n /** Disables the tab. */\n @Prop() disabled: boolean = false;\n\n /** Marks the tab as the selected one. */\n @Prop() selected: boolean = false;\n\n render() {\n return (\n <Host role=\"listitem\">\n <button\n class={`${this.selected ? 'selected' : ''}\n ${this.disabled ? 'disabled' : ''}`}\n disabled={this.disabled}\n >\n <div class=\"label\">\n <slot name=\"label\"></slot>\n </div>\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SddsInlineTabsLink extends Components.SddsInlineTabsLink, HTMLElement {}
|
|
4
|
+
export const SddsInlineTabsLink: {
|
|
5
|
+
prototype: SddsInlineTabsLink;
|
|
6
|
+
new (): SddsInlineTabsLink;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const sddsInlineTabsLinkCss = ":host{box-sizing:border-box;display:block;position:relative;z-index:200}:host *{box-sizing:border-box}:host a{font:var(--sdds-headline-07);letter-spacing:var(--sdds-headline-07-ls);color:var(--sdds-inline-tabs-tab-color);padding:8px 4px;margin-right:32px;text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out 0s;white-space:nowrap;background-color:transparent;border:0}:host a .label{margin:12px 0}:host a:hover{cursor:pointer}:host a:hover::after{width:100%}:host a:focus-visible{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}:host a::after{content:\" \";position:absolute;bottom:0;right:0;left:0;margin-left:auto;width:0%;margin-right:auto;height:2px;background-color:var(--sdds-inline-tabs-tab-indicator-background-hover);transition:width 0.15s ease-in-out 0s;z-index:1}:host a.selected{color:var(--sdds-inline-tabs-tab-color-selected)}:host a.selected .label{opacity:var(--sdds-inline-tab-color-opacity-selected)}:host a.selected::after{width:100%;background-color:var(--sdds-inline-tabs-tab-indicator-background-active)}:host a.disabled{color:var(--sdds-inline-tabs-tab-color-disabled);pointer-events:none}:host a.disabled .label{opacity:var(--sdds-inline-tabs-tab-color-opacity-disabled)}:host(.first){margin-left:32px}:host(.last){margin-right:32px}";
|
|
4
|
+
|
|
5
|
+
const SddsInlineTabsLink$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
this.disabled = false;
|
|
11
|
+
this.selected = false;
|
|
12
|
+
this.href = undefined;
|
|
13
|
+
this.target = '_self';
|
|
14
|
+
this.rel = 'noopener';
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return (h(Host, { role: "listitem" }, h("a", { class: `
|
|
18
|
+
${this.selected ? 'selected' : ''}
|
|
19
|
+
${this.disabled ? 'disabled' : ''}
|
|
20
|
+
`, href: this.href, target: this.target, rel: this.rel }, h("div", { class: "label" }, h("slot", { name: "label" })))));
|
|
21
|
+
}
|
|
22
|
+
static get style() { return sddsInlineTabsLinkCss; }
|
|
23
|
+
}, [1, "sdds-inline-tabs-link", {
|
|
24
|
+
"disabled": [4],
|
|
25
|
+
"selected": [4],
|
|
26
|
+
"href": [1],
|
|
27
|
+
"target": [1],
|
|
28
|
+
"rel": [1]
|
|
29
|
+
}]);
|
|
30
|
+
function defineCustomElement$1() {
|
|
31
|
+
if (typeof customElements === "undefined") {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const components = ["sdds-inline-tabs-link"];
|
|
35
|
+
components.forEach(tagName => { switch (tagName) {
|
|
36
|
+
case "sdds-inline-tabs-link":
|
|
37
|
+
if (!customElements.get(tagName)) {
|
|
38
|
+
customElements.define(tagName, SddsInlineTabsLink$1);
|
|
39
|
+
}
|
|
40
|
+
break;
|
|
41
|
+
} });
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const SddsInlineTabsLink = SddsInlineTabsLink$1;
|
|
45
|
+
const defineCustomElement = defineCustomElement$1;
|
|
46
|
+
|
|
47
|
+
export { SddsInlineTabsLink, defineCustomElement };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=sdds-inline-tabs-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"sdds-inline-tabs-link.js","mappings":";;AAAA,MAAM,qBAAqB,GAAG,yxCAAyxC;;MCO1yCA,oBAAkB;;;;;oBAED,KAAK;oBAGL,KAAK;;kBAMyB,OAAO;eAG3C,UAAU;;EAEhC,MAAM;IACJ,QACE,EAAC,IAAI,IAAC,IAAI,EAAC,UAAU,IACnB,SACE,KAAK,EAAE;UACP,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE;UAC/B,IAAI,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE;SAChC,EACC,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,GAAG,EAAE,IAAI,CAAC,GAAG,IAEb,WAAK,KAAK,EAAC,OAAO,IAChB,YAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,CACJ,CACC,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SddsInlineTabsLink"],"sources":["./src/components/tabs/inline-tabs/inline-tabs-link/sdds-inline-tabs-link.scss?tag=sdds-inline-tabs-link&encapsulation=shadow","./src/components/tabs/inline-tabs/inline-tabs-link/sdds-inline-tabs-link.tsx"],"sourcesContent":["@import '../../../../mixins/focus-state';\n@import '../../../../mixins/z-index';\n@import '../../../../mixins/box-sizing';\n\n:host {\n @include sdds-box-sizing;\n\n display: block;\n position: relative;\n z-index: z(tab);\n\n a {\n font: var(--sdds-headline-07);\n letter-spacing: var(--sdds-headline-07-ls);\n color: var(--sdds-inline-tabs-tab-color);\n padding: 8px 4px;\n margin-right: 32px;\n text-decoration: none;\n display: block;\n position: relative;\n transition: color 0.15s ease-in-out 0s;\n white-space: nowrap;\n background-color: transparent;\n border: 0;\n \n .label {\n margin: 12px 0;\n }\n\n &:hover {\n cursor: pointer;\n\n &::after {\n width: 100%;\n }\n }\n\n &:focus-visible {\n @include sdds-focus-state;\n }\n\n &::after {\n content: ' ';\n position: absolute;\n bottom: 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-hover);\n transition: width 0.15s ease-in-out 0s;\n z-index: 1;\n }\n\n &.selected {\n color: var(--sdds-inline-tabs-tab-color-selected);\n\n .label {\n opacity: var(--sdds-inline-tab-color-opacity-selected);\n }\n\n &::after {\n width: 100%;\n background-color: var(--sdds-inline-tabs-tab-indicator-background-active);\n }\n }\n\n &.disabled {\n color: var(--sdds-inline-tabs-tab-color-disabled);\n pointer-events: none;\n\n .label {\n opacity: var(--sdds-inline-tabs-tab-color-opacity-disabled);\n }\n }\n }\n}\n\n\n:host(.first) {\n margin-left: 32px;\n}\n\n:host(.last) {\n margin-right: 32px;\n}","import { Component, Host, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'sdds-inline-tabs-link',\n styleUrl: 'sdds-inline-tabs-link.scss',\n shadow: true,\n})\nexport class SddsInlineTabsLink {\n /** Disables the tab. */\n @Prop() disabled: boolean = false;\n\n /** Marks the tab as the selected one. */\n @Prop() selected: boolean = false;\n\n /** Href 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 /** '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 <Host role=\"listitem\">\n <a\n class={`\n ${this.selected ? 'selected' : ''}\n ${this.disabled ? 'disabled' : ''}\n `}\n href={this.href}\n target={this.target}\n rel={this.rel}\n >\n <div class=\"label\">\n <slot name=\"label\"></slot>\n </div>\n </a>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,121 +1,111 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
2
3
|
|
|
3
|
-
const inlineTabsCss = ":host{
|
|
4
|
+
const inlineTabsCss = ":host{box-sizing:border-box;display:flex;background-color:var(--sdds-inline-tabs-background);position:relative}:host *{box-sizing:border-box}:host::after{content:\" \";display:block;border-bottom:1px solid var(--sdds-inline-tabs-horizontal-divider-background);opacity:var(--sdds-inline-tabs-horizontal-divider-opacity);left:0;right:0;bottom:0;position:absolute}:host .wrapper{display:flex;flex-wrap:nowrap;white-space:nowrap;width:100%;overflow-x:scroll;scrollbar-width:none}:host .wrapper::-webkit-scrollbar{display:none}:host .scroll-right-button{right:0;z-index:201}:host .scroll-left-button{left:0;z-index:201}:host .scroll-right-button,:host .scroll-left-button{color:var(--sdds-folder-tabs-scroll-btn-color);cursor:pointer;border:0;width:0;background-color:var(--sdds-inline-tabs-scroll-btn-background);display:none;justify-content:center;align-items:center;opacity:0;pointer-events:none;position:sticky}:host .scroll-right-button.show,:host .scroll-left-button.show{min-width:48px;display:block;opacity:1;pointer-events:all}:host .scroll-right-button:hover,:host .scroll-left-button:hover{background-color:var(--sdds-folder-tabs-scroll-btn-background-hover)}:host .scroll-right-button:active,:host .scroll-left-button:active{background-color:var(--sdds-folder-tabs-scroll-btn-background-active)}:host .scroll-right-button:focus,:host .scroll-left-button:focus{outline:2px solid var(--sdds-blue-400);outline-offset:-2px}:host .scroll-right-button svg,:host .scroll-left-button svg{fill:var(--sdds-folder-tabs-scroll-btn-color)}";
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
return name
|
|
7
|
-
.replace(/\s/g, '-')
|
|
8
|
-
.replace(/[^a-z0-9-]/gi, '')
|
|
9
|
-
.toLowerCase();
|
|
10
|
-
}
|
|
11
|
-
const InlineTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
const InlineTabsFullbleed = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
12
7
|
constructor() {
|
|
13
8
|
super();
|
|
14
9
|
this.__registerHost();
|
|
15
10
|
this.__attachShadow();
|
|
16
|
-
this.
|
|
11
|
+
this.sddsChange = createEvent(this, "sddsChange", 7);
|
|
17
12
|
this.navWrapperElement = null; // reference to container with nav buttons
|
|
18
|
-
this.tabWrapperElement = null; // reference to container with slotted children
|
|
19
13
|
this.componentWidth = 0; // visible width of this component
|
|
20
14
|
this.buttonsWidth = 0; // total width of all nav items combined
|
|
21
15
|
this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
|
|
22
|
-
this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
16
|
+
this.addResizeObserver = () => {
|
|
17
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
18
|
+
entries.forEach((entry) => {
|
|
19
|
+
const componentWidth = entry.contentRect.width;
|
|
20
|
+
let buttonsWidth = 0;
|
|
21
|
+
const navButtons = Array.from(this.host.children);
|
|
22
|
+
navButtons.forEach((navButton) => {
|
|
23
|
+
const style = window.getComputedStyle(navButton);
|
|
24
|
+
buttonsWidth +=
|
|
25
|
+
navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
26
|
+
});
|
|
27
|
+
this.componentWidth = componentWidth;
|
|
28
|
+
this.buttonsWidth = buttonsWidth;
|
|
29
|
+
this.scrollWidth = buttonsWidth - componentWidth;
|
|
30
|
+
if (this.buttonsWidth > this.componentWidth) {
|
|
31
|
+
this.evaluateScrollButtons();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this.showLeftScroll = false;
|
|
35
|
+
this.showRightScroll = false;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
resizeObserver.observe(this.navWrapperElement);
|
|
40
|
+
};
|
|
41
|
+
this.modeVariant = 'primary';
|
|
29
42
|
this.showLeftScroll = false;
|
|
30
43
|
this.showRightScroll = false;
|
|
44
|
+
this.selectedTab = undefined;
|
|
45
|
+
this.buttonWidth = 0;
|
|
31
46
|
}
|
|
32
|
-
/**
|
|
33
|
-
async
|
|
34
|
-
this.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if (item.default) {
|
|
47
|
-
this.startingTab = key;
|
|
48
|
-
}
|
|
49
|
-
let disabled = false;
|
|
50
|
-
if (item.disabled) {
|
|
51
|
-
disabled = true;
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
name,
|
|
55
|
-
key,
|
|
56
|
-
element: item,
|
|
57
|
-
disabled,
|
|
58
|
-
visible: true,
|
|
59
|
-
initialDisplay: window.getComputedStyle(item).display,
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
if (createInitialState) {
|
|
63
|
-
this.setInitialState();
|
|
47
|
+
/** Selects a tab based on tabindex, will not select a disabled tab. */
|
|
48
|
+
async selectTab(tabIndex) {
|
|
49
|
+
if (!this.children[tabIndex].disabled) {
|
|
50
|
+
this.children.forEach((element) => element.removeAttribute('selected'));
|
|
51
|
+
this.children = this.children.map((element, index) => {
|
|
52
|
+
if (index === tabIndex) {
|
|
53
|
+
element.setAttribute('selected', '');
|
|
54
|
+
this.selectedTab = {
|
|
55
|
+
tab: element.innerText,
|
|
56
|
+
tabIndex: index,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return element;
|
|
60
|
+
});
|
|
64
61
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
// eslint-disable-next-line no-param-reassign
|
|
76
|
-
navButton.style.width = oldStyle;
|
|
77
|
-
if (navButton.clientWidth > best) {
|
|
78
|
-
best = width;
|
|
79
|
-
}
|
|
62
|
+
return {
|
|
63
|
+
selectedTab: this.selectedTab.tab,
|
|
64
|
+
selectedTabIndex: this.selectedTab.tabIndex,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
handleSelectedTabChange() {
|
|
68
|
+
this.host.setAttribute('selected-tab', this.selectedTab.tab);
|
|
69
|
+
this.host.setAttribute('selected-tab-index', `${this.selectedTab.tabIndex}`);
|
|
70
|
+
this.sddsChange.emit({
|
|
71
|
+
selectedTab: this.selectedTab,
|
|
80
72
|
});
|
|
81
|
-
this.buttonWidth = best;
|
|
82
73
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
connectedCallback() {
|
|
75
|
+
this.children = Array.from(this.host.children);
|
|
76
|
+
this.children = this.children.map((item, index) => {
|
|
77
|
+
item.addEventListener('click', () => {
|
|
78
|
+
if (!item.disabled) {
|
|
79
|
+
this.children.forEach((element) => element.removeAttribute('selected'));
|
|
80
|
+
item.setAttribute('selected', '');
|
|
81
|
+
this.selectedTab = {
|
|
82
|
+
tab: item.innerText,
|
|
83
|
+
tabIndex: index,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
if (item.selected) {
|
|
88
|
+
this.selectedTab = {
|
|
89
|
+
tab: item.innerText,
|
|
90
|
+
tabIndex: index,
|
|
91
|
+
};
|
|
94
92
|
}
|
|
93
|
+
return item;
|
|
95
94
|
});
|
|
96
|
-
this.
|
|
97
|
-
|
|
98
|
-
componentDidRender() {
|
|
99
|
-
this.calculateTabHeight();
|
|
100
|
-
this.calculateButtonWidth();
|
|
95
|
+
this.children[0].classList.add('first');
|
|
96
|
+
this.children[this.children.length - 1].classList.add('last');
|
|
101
97
|
}
|
|
102
98
|
componentDidLoad() {
|
|
103
|
-
const mutationObserver = new MutationObserver(( /* mutations, observer */) => {
|
|
104
|
-
const visibleTab = this.tabs.find((tab) => tab.visible);
|
|
105
|
-
this.initComponent(false);
|
|
106
|
-
this.calculateTabHeight();
|
|
107
|
-
this.calculateButtonWidth();
|
|
108
|
-
if (visibleTab) {
|
|
109
|
-
this.switchToTab(visibleTab.key);
|
|
110
|
-
}
|
|
111
|
-
});
|
|
112
99
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
113
100
|
entries.forEach((entry) => {
|
|
114
101
|
const componentWidth = entry.contentRect.width;
|
|
115
102
|
let buttonsWidth = 0;
|
|
116
|
-
const navButtons =
|
|
117
|
-
|
|
118
|
-
|
|
103
|
+
const navButtons = Array.from(this.host.children);
|
|
104
|
+
navButtons.forEach((navButton) => {
|
|
105
|
+
const style = window.getComputedStyle(navButton);
|
|
106
|
+
buttonsWidth +=
|
|
107
|
+
navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
108
|
+
navButton.classList.add('sdds-inline-tabs-fullbleed--tab');
|
|
119
109
|
});
|
|
120
110
|
this.componentWidth = componentWidth;
|
|
121
111
|
this.buttonsWidth = buttonsWidth;
|
|
@@ -127,63 +117,42 @@ const InlineTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
127
117
|
this.showLeftScroll = false;
|
|
128
118
|
this.showRightScroll = false;
|
|
129
119
|
}
|
|
130
|
-
this.calculateTabHeight();
|
|
131
120
|
});
|
|
132
121
|
});
|
|
133
|
-
mutationObserver.observe(this.host, {
|
|
134
|
-
childList: true,
|
|
135
|
-
attributes: true,
|
|
136
|
-
});
|
|
137
122
|
resizeObserver.observe(this.navWrapperElement);
|
|
138
|
-
this.calculateButtonWidth();
|
|
139
|
-
this.calculateTabHeight();
|
|
140
123
|
}
|
|
141
|
-
|
|
142
|
-
if (this.
|
|
143
|
-
this.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
124
|
+
componentWillRender() {
|
|
125
|
+
if (!this.selectedTab) {
|
|
126
|
+
this.children = Array.from(this.host.children);
|
|
127
|
+
this.children = this.children.map((item, index) => {
|
|
128
|
+
if (item.selected) {
|
|
129
|
+
this.selectedTab = {
|
|
130
|
+
tab: item.innerText,
|
|
131
|
+
tabIndex: index,
|
|
132
|
+
};
|
|
149
133
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
this.hideTab(index);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
unhideTab(tabIndex) {
|
|
159
|
-
const tab = this.tabs[tabIndex];
|
|
160
|
-
tab.element.style.display = '';
|
|
161
|
-
tab.visible = true;
|
|
162
|
-
}
|
|
163
|
-
hideTab(tabIndex) {
|
|
164
|
-
const tab = this.tabs[tabIndex];
|
|
165
|
-
tab.element.style.display = 'none';
|
|
166
|
-
tab.visible = false;
|
|
134
|
+
return item;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
167
137
|
}
|
|
168
|
-
|
|
169
|
-
this.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
this.tabs = Array.from(this.tabs);
|
|
138
|
+
componentDidRender() {
|
|
139
|
+
if (this.buttonsWidth > this.componentWidth) {
|
|
140
|
+
this.evaluateScrollButtons();
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
this.showLeftScroll = false;
|
|
144
|
+
this.showRightScroll = false;
|
|
145
|
+
}
|
|
146
|
+
this.addResizeObserver();
|
|
178
147
|
}
|
|
179
148
|
scrollRight() {
|
|
180
149
|
const scroll = this.navWrapperElement.scrollLeft;
|
|
181
|
-
this.navWrapperElement.scrollLeft = scroll +
|
|
150
|
+
this.navWrapperElement.scrollLeft = scroll + 95;
|
|
182
151
|
this.evaluateScrollButtons();
|
|
183
152
|
}
|
|
184
153
|
scrollLeft() {
|
|
185
154
|
const scroll = this.navWrapperElement.scrollLeft;
|
|
186
|
-
this.navWrapperElement.scrollLeft = scroll -
|
|
155
|
+
this.navWrapperElement.scrollLeft = scroll - 10;
|
|
187
156
|
this.evaluateScrollButtons();
|
|
188
157
|
}
|
|
189
158
|
evaluateScrollButtons() {
|
|
@@ -202,44 +171,43 @@ const InlineTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
202
171
|
}
|
|
203
172
|
}
|
|
204
173
|
render() {
|
|
205
|
-
|
|
206
|
-
if (this.useAutoHeight) {
|
|
207
|
-
style.height = `${this.tabHeight}px`;
|
|
208
|
-
}
|
|
209
|
-
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) => {
|
|
174
|
+
return (h(Host, { class: `${this.modeVariant ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { role: "list", class: "wrapper", ref: (el) => {
|
|
210
175
|
this.navWrapperElement = el;
|
|
211
|
-
}
|
|
212
|
-
this.tabWrapperElement = el;
|
|
213
|
-
}, class: "sdds-inline-tabs-main", style: style }, h("slot", null)))));
|
|
176
|
+
} }, h("button", { class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("sdds-icon", { name: "chevron_left", size: "20px" })), h("slot", null), h("button", { class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("sdds-icon", { name: "chevron_right", size: "20px" })))));
|
|
214
177
|
}
|
|
215
178
|
get host() { return this; }
|
|
179
|
+
static get watchers() { return {
|
|
180
|
+
"selectedTab": ["handleSelectedTabChange"]
|
|
181
|
+
}; }
|
|
216
182
|
static get style() { return inlineTabsCss; }
|
|
217
183
|
}, [1, "sdds-inline-tabs", {
|
|
218
|
-
"defaultTab": [1, "default-tab"],
|
|
219
|
-
"autoHeight": [4, "auto-height"],
|
|
220
184
|
"modeVariant": [1, "mode-variant"],
|
|
221
|
-
"tabs": [32],
|
|
222
|
-
"buttonWidth": [32],
|
|
223
|
-
"tabHeight": [32],
|
|
224
185
|
"showLeftScroll": [32],
|
|
225
186
|
"showRightScroll": [32],
|
|
226
|
-
"
|
|
187
|
+
"selectedTab": [32],
|
|
188
|
+
"buttonWidth": [32],
|
|
189
|
+
"selectTab": [64]
|
|
227
190
|
}]);
|
|
228
191
|
function defineCustomElement$1() {
|
|
229
192
|
if (typeof customElements === "undefined") {
|
|
230
193
|
return;
|
|
231
194
|
}
|
|
232
|
-
const components = ["sdds-inline-tabs"];
|
|
195
|
+
const components = ["sdds-inline-tabs", "sdds-icon"];
|
|
233
196
|
components.forEach(tagName => { switch (tagName) {
|
|
234
197
|
case "sdds-inline-tabs":
|
|
235
198
|
if (!customElements.get(tagName)) {
|
|
236
|
-
customElements.define(tagName,
|
|
199
|
+
customElements.define(tagName, InlineTabsFullbleed);
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case "sdds-icon":
|
|
203
|
+
if (!customElements.get(tagName)) {
|
|
204
|
+
defineCustomElement$2();
|
|
237
205
|
}
|
|
238
206
|
break;
|
|
239
207
|
} });
|
|
240
208
|
}
|
|
241
209
|
|
|
242
|
-
const SddsInlineTabs =
|
|
210
|
+
const SddsInlineTabs = InlineTabsFullbleed;
|
|
243
211
|
const defineCustomElement = defineCustomElement$1;
|
|
244
212
|
|
|
245
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,CAChB,CACV,CAAC,CACE,EACN,WAAK,KAAK,EAAC,oCAAoC,IAC7C,cACE,KAAK,EAAE,6BACL,IAAI,CAAC,eAAe,GAAG,8BAA8B,GAAG,EAC1D,EAAE,EACF,QAAQ,EAAE,CAAC,IAAI,CAAC,eAAe,EAC/B,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IAEjC,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,IAElC,yBACY,SAAS,eACT,SAAS,EACnB,CAAC,EAAC,2WAA2W,GAC7W,CACE,CACC,EACT,cACE,KAAK,EAAE,0BACL,IAAI,CAAC,cAAc,GAAG,8BAA8B,GAAG,EACzD,EAAE,EACF,QAAQ,EAAE,CAAC,IAAI,CAAC,cAAc,EAC9B,OAAO,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,IAEhC,WACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,IAElC,yBACY,SAAS,eACT,SAAS,EACnB,CAAC,EAAC,iXAAiX,GACnX,CACE,CACC,CACL,CACF,EACN,WACE,GAAG,EAAE,CAAC,EAAE;QACN,IAAI,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
|
+
{"file":"sdds-inline-tabs.js","mappings":";;;AAAA,MAAM,aAAa,GAAG,+/CAA+/C;;MCQxgD,mBAAmB;;;;;;IAiBtB,sBAAiB,GAAgB,IAAI,CAAC;IAEtC,mBAAc,GAAW,CAAC,CAAC;IAE3B,iBAAY,GAAW,CAAC,CAAC;IAEzB,gBAAW,GAAW,CAAC,CAAC;IAiKhC,sBAAiB,GAAG;MAClB,MAAM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AAG,EAAE,EAAE,EAClE,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,EACjC,QAAQ,EAAE,CAAC,IAAI,CAAC,eAAe,IAE/B,iBAAW,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,MAAM,GAAa,CACjD,CACL,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/tabs/inline-tabs/inline-tabs.scss?tag=sdds-inline-tabs&encapsulation=shadow","./src/components/tabs/inline-tabs/inline-tabs.tsx"],"sourcesContent":["@import '../../../mixins/focus-state';\n@import '../../../mixins/box-sizing';\n@import '../../../mixins/z-index';\n\n:host {\n @include sdds-box-sizing;\n\n display: flex;\n background-color: var(--sdds-inline-tabs-background);\n position: relative;\n\n &::after {\n content: ' ';\n display: block;\n border-bottom: 1px solid var(--sdds-inline-tabs-horizontal-divider-background);\n opacity: var(--sdds-inline-tabs-horizontal-divider-opacity);\n left: 0;\n right: 0;\n bottom: 0;\n position: absolute;\n }\n\n .wrapper {\n display: flex;\n flex-wrap: nowrap;\n white-space: nowrap;\n width: 100%;\n overflow-x: scroll;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n\n .scroll-right-button {\n right: 0;\n z-index: calc(z(tab) + 1);\n }\n\n .scroll-left-button {\n left: 0;\n z-index: calc(z(tab) + 1);\n }\n\n .scroll-right-button,\n .scroll-left-button {\n color: var(--sdds-folder-tabs-scroll-btn-color);\n cursor: pointer;\n border: 0;\n width: 0;\n background-color: var(--sdds-inline-tabs-scroll-btn-background);\n display: none;\n justify-content: center;\n align-items: center;\n opacity: 0;\n pointer-events: none;\n position: sticky;\n\n &.show {\n min-width: 48px;\n display: block;\n opacity: 1;\n pointer-events: all;\n }\n\n &:hover {\n background-color: var(--sdds-folder-tabs-scroll-btn-background-hover);\n }\n\n &:active {\n background-color: var(--sdds-folder-tabs-scroll-btn-background-active);\n }\n\n &:focus {\n @include sdds-focus-state;\n }\n\n svg {\n fill: var(--sdds-folder-tabs-scroll-btn-color);\n }\n }\n}\n","import { Component, Host, State, Element, h, Prop, Event, EventEmitter } from '@stencil/core';\nimport { HostElement, Method, Watch } from '@stencil/core/internal';\n\n@Component({\n tag: 'sdds-inline-tabs',\n styleUrl: 'inline-tabs.scss',\n shadow: true,\n})\nexport class InlineTabsFullbleed {\n /** Variant of the tabs, primary= on white, secondary= on grey50 */\n @Prop() modeVariant: 'primary' | 'secondary' = 'primary';\n\n @Element() host: HostElement;\n\n @State() showLeftScroll: boolean = false;\n\n @State() showRightScroll: boolean = false;\n\n @State() selectedTab: {\n tab: string;\n tabIndex: number;\n };\n\n @State() buttonWidth: number = 0; // current calculated width of the largest nav button\n\n private navWrapperElement: HTMLElement = null; // reference to container with nav buttons\n\n private componentWidth: number = 0; // visible width of this component\n\n private buttonsWidth: number = 0; // total width of all nav items combined\n\n private scrollWidth: number = 0; // total amount that is possible to scroll in the nav wrapper\n\n private children: Array<HTMLSddsInlineTabsButtonElement | HTMLSddsInlineTabsLinkElement>;\n\n /** Selects a tab based on tabindex, will not select a disabled tab. */\n @Method()\n async selectTab(tabIndex: number) {\n if (!this.children[tabIndex].disabled) {\n this.children.forEach((element) => element.removeAttribute('selected'));\n this.children = this.children.map((element, index) => {\n if (index === tabIndex) {\n element.setAttribute('selected', '');\n this.selectedTab = {\n tab: element.innerText,\n tabIndex: index,\n };\n }\n return element;\n });\n }\n return {\n selectedTab: this.selectedTab.tab,\n selectedTabIndex: this.selectedTab.tabIndex,\n };\n }\n\n @Event({\n eventName: 'sddsChange',\n composed: true,\n cancelable: true,\n bubbles: true,\n })\n sddsChange: EventEmitter<{\n selectedTab: {\n tab: string;\n tabIndex: number;\n };\n }>;\n\n @Watch('selectedTab')\n handleSelectedTabChange() {\n this.host.setAttribute('selected-tab', this.selectedTab.tab);\n this.host.setAttribute('selected-tab-index', `${this.selectedTab.tabIndex}`);\n this.sddsChange.emit({\n selectedTab: this.selectedTab,\n });\n }\n\n connectedCallback() {\n this.children = Array.from(this.host.children) as Array<\n HTMLSddsInlineTabsButtonElement | HTMLSddsInlineTabsLinkElement\n >;\n this.children = this.children.map((item, index) => {\n item.addEventListener('click', () => {\n if (!item.disabled) {\n this.children.forEach((element) => element.removeAttribute('selected'));\n item.setAttribute('selected', '');\n this.selectedTab = {\n tab: item.innerText,\n tabIndex: index,\n };\n }\n });\n if (item.selected) {\n this.selectedTab = {\n tab: item.innerText,\n tabIndex: index,\n };\n }\n return item;\n });\n this.children[0].classList.add('first');\n this.children[this.children.length - 1].classList.add('last');\n }\n\n componentDidLoad() {\n const resizeObserver = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n const componentWidth = entry.contentRect.width;\n let buttonsWidth = 0;\n\n const navButtons = Array.from(this.host.children);\n navButtons.forEach((navButton: HTMLElement) => {\n const style = window.getComputedStyle(navButton);\n buttonsWidth +=\n navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);\n\n navButton.classList.add('sdds-inline-tabs-fullbleed--tab');\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 });\n\n resizeObserver.observe(this.navWrapperElement);\n }\n\n componentWillRender() {\n if (!this.selectedTab) {\n this.children = Array.from(this.host.children) as Array<\n HTMLSddsInlineTabsButtonElement | HTMLSddsInlineTabsLinkElement\n >;\n this.children = this.children.map((item, index) => {\n if (item.selected) {\n this.selectedTab = {\n tab: item.innerText,\n tabIndex: index,\n };\n }\n return item;\n });\n }\n }\n\n componentDidRender() {\n if (this.buttonsWidth > this.componentWidth) {\n this.evaluateScrollButtons();\n } else {\n this.showLeftScroll = false;\n this.showRightScroll = false;\n }\n this.addResizeObserver();\n }\n\n scrollRight() {\n const scroll = this.navWrapperElement.scrollLeft;\n this.navWrapperElement.scrollLeft = scroll + 95;\n this.evaluateScrollButtons();\n }\n\n scrollLeft() {\n const scroll = this.navWrapperElement.scrollLeft;\n this.navWrapperElement.scrollLeft = scroll - 10;\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 addResizeObserver = () => {\n const resizeObserver = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n const componentWidth = entry.contentRect.width;\n let buttonsWidth = 0;\n\n const navButtons = Array.from(this.host.children);\n navButtons.forEach((navButton: HTMLElement) => {\n const style = window.getComputedStyle(navButton);\n buttonsWidth +=\n navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);\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 });\n\n resizeObserver.observe(this.navWrapperElement);\n };\n\n render() {\n return (\n <Host class={`${this.modeVariant ? `sdds-mode-variant-${this.modeVariant}` : ''}`}>\n <div\n role=\"list\"\n class=\"wrapper\"\n ref={(el) => {\n this.navWrapperElement = el as HTMLElement;\n }}\n >\n <button\n class={`scroll-left-button ${this.showLeftScroll ? 'show' : ''}`}\n onClick={() => this.scrollLeft()}\n disabled={!this.showLeftScroll}\n >\n <sdds-icon name=\"chevron_left\" size=\"20px\"></sdds-icon>\n </button>\n <slot />\n <button\n class={`scroll-right-button ${this.showRightScroll ? 'show' : ''}`}\n onClick={() => this.scrollRight()}\n disabled={!this.showRightScroll}\n >\n <sdds-icon name=\"chevron_right\" size=\"20px\"></sdds-icon>\n </button>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|