@scania/tegel 0.0.1-beta.9 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-b98965c7.js +1919 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/popper-11d5f714.js +1801 -0
- package/dist/cjs/sdds-accordion-item.cjs.entry.js +34 -0
- package/dist/cjs/sdds-accordion.cjs.entry.js +21 -0
- package/dist/cjs/sdds-badges.cjs.entry.js +54 -0
- package/dist/cjs/sdds-banner.cjs.entry.js +79 -0
- package/dist/cjs/sdds-block.cjs.entry.js +32 -0
- package/dist/cjs/sdds-body-cell_2.cjs.entry.js +173 -0
- package/dist/cjs/sdds-breadcrumb-item.cjs.entry.js +25 -0
- package/dist/cjs/sdds-breadcrumb.cjs.entry.js +23 -0
- package/dist/cjs/sdds-button.cjs.entry.js +37 -0
- package/dist/cjs/sdds-card.cjs.entry.js +56 -0
- package/dist/cjs/sdds-checkbox.cjs.entry.js +55 -0
- package/dist/cjs/sdds-datetime.cjs.entry.js +95 -0
- package/dist/cjs/sdds-dropdown-filter.cjs.entry.js +92 -0
- package/dist/cjs/sdds-dropdown_2.cjs.entry.js +341 -0
- package/dist/cjs/sdds-header-cell.cjs.entry.js +139 -0
- package/dist/cjs/sdds-icon.cjs.entry.js +42 -0
- package/dist/cjs/sdds-inline-tab.cjs.entry.js +22 -0
- package/dist/cjs/sdds-inline-tabs-fullbleed.cjs.entry.js +98 -0
- package/dist/cjs/sdds-inline-tabs.cjs.entry.js +221 -0
- package/dist/cjs/sdds-link.cjs.entry.js +28 -0
- package/dist/cjs/sdds-message.cjs.entry.js +41 -0
- package/dist/cjs/sdds-modal.cjs.entry.js +51 -0
- package/dist/cjs/sdds-navigation-tabs.cjs.entry.js +98 -0
- package/dist/cjs/sdds-popover-canvas.cjs.entry.js +84 -0
- package/dist/cjs/sdds-popover-menu.cjs.entry.js +85 -0
- package/dist/cjs/sdds-radio-button.cjs.entry.js +32 -0
- package/dist/cjs/sdds-slider.cjs.entry.js +357 -0
- package/dist/cjs/sdds-spinner.cjs.entry.js +21 -0
- package/dist/cjs/sdds-table-body-row-expandable.cjs.entry.js +82 -0
- package/dist/cjs/sdds-table-body.cjs.entry.js +289 -0
- package/dist/cjs/sdds-table-footer.cjs.entry.js +164 -0
- package/dist/cjs/sdds-table-header.cjs.entry.js +99 -0
- package/dist/cjs/sdds-table-toolbar.cjs.entry.js +65 -0
- package/dist/cjs/sdds-table.cjs.entry.js +68 -0
- package/dist/cjs/sdds-textarea.cjs.entry.js +74 -0
- package/dist/cjs/sdds-textfield.cjs.entry.js +91 -0
- package/dist/cjs/sdds-toast.cjs.entry.js +86 -0
- package/dist/cjs/sdds-toggle.cjs.entry.js +44 -0
- package/dist/cjs/sdds-tooltip.cjs.entry.js +104 -0
- package/dist/cjs/tegel.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +52 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.css +153 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +146 -0
- package/dist/collection/components/accordion/accordion.css +63 -0
- package/dist/collection/components/accordion/accordion.js +62 -0
- package/dist/collection/components/accordion/accordion.stories.js +90 -0
- package/dist/collection/components/badge/badge.stories.js +102 -0
- package/dist/collection/components/badge/badges.css +42 -0
- package/dist/collection/components/badge/badges.js +147 -0
- package/dist/collection/components/banner/banner.stories.js +92 -0
- package/dist/collection/components/banner/sdds-banner.css +88 -0
- package/dist/collection/components/banner/sdds-banner.js +330 -0
- package/dist/collection/components/banner/sdds-banner.stories.js +129 -0
- package/dist/collection/components/block/block-native.stories.js +48 -0
- package/dist/collection/components/block/sdds-block.css +22 -0
- package/dist/collection/components/block/sdds-block.js +55 -0
- package/dist/collection/components/block/sdds-block.stories.js +48 -0
- package/dist/collection/components/breadcrumb/breadcrumb-component.css +30 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.css +43 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item/breadcrumb-item.js +83 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +22 -0
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +26 -0
- package/dist/collection/components/button/button-component.js +155 -0
- package/dist/collection/components/button/button-native.stories.js +187 -0
- package/dist/collection/components/button/button-webcomponent.stories.js +189 -0
- package/dist/collection/components/button/button.css +670 -0
- package/dist/collection/components/card/card.stories.js +167 -0
- package/dist/collection/components/card/sdds-card.css +78 -0
- package/dist/collection/components/card/sdds-card.js +276 -0
- package/dist/collection/components/card/sdds-card.stories.js +168 -0
- package/dist/collection/components/checkbox/checkbox.stories.js +54 -0
- package/dist/collection/components/checkbox/sdds-checkbox.css +95 -0
- package/dist/collection/components/checkbox/sdds-checkbox.js +239 -0
- package/dist/collection/components/checkbox/sdds-checkbox.stories.js +71 -0
- package/dist/collection/components/chips/chips.stories.js +106 -0
- package/dist/collection/components/data-table/native-table.stories.js +160 -0
- package/dist/collection/components/data-table/table/table.css +15 -0
- package/dist/collection/components/data-table/table/table.js +252 -0
- package/dist/collection/components/data-table/table-body/table-body.css +22 -0
- package/dist/collection/components/data-table/table-body/table-body.js +425 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.css +40 -0
- package/dist/collection/components/data-table/table-body-cell/table-body-cell.js +168 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.css +175 -0
- package/dist/collection/components/data-table/table-body-row/table-body-row.js +165 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.css +78 -0
- package/dist/collection/components/data-table/table-body-row-expandable/table-body-row-expandable.js +156 -0
- package/dist/collection/components/data-table/table-component-basic.stories.js +161 -0
- package/dist/collection/components/data-table/table-component-batch-actions.stories.js +128 -0
- package/dist/collection/components/data-table/table-component-bodydata.stories.js +58 -0
- package/dist/collection/components/data-table/table-component-custom-width.stories.js +197 -0
- package/dist/collection/components/data-table/table-component-event-listeners.stories.js +151 -0
- package/dist/collection/components/data-table/table-component-expandable-rows.stories.js +135 -0
- package/dist/collection/components/data-table/table-component-filtering.stories.js +137 -0
- package/dist/collection/components/data-table/table-component-multiselect.stories.js +158 -0
- package/dist/collection/components/data-table/table-component-pagination.stories.js +127 -0
- package/dist/collection/components/data-table/table-component-sorting.stories.js +126 -0
- package/dist/collection/components/data-table/table-footer/table-footer.css +97 -0
- package/dist/collection/components/data-table/table-footer/table-footer.js +354 -0
- package/dist/collection/components/data-table/table-header/table-header.css +190 -0
- package/dist/collection/components/data-table/table-header/table-header.js +152 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.css +127 -0
- package/dist/collection/components/data-table/table-header-cell/table-header-cell.js +317 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.css +93 -0
- package/dist/collection/components/data-table/table-toolbar/table-toolbar.js +141 -0
- package/dist/collection/components/datetime/datetime.css +385 -0
- package/dist/collection/components/datetime/datetime.js +352 -0
- package/dist/collection/components/datetime/datetime.stories.js +207 -0
- package/dist/collection/components/divider/divider.stories.js +133 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +339 -0
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.stories.js +130 -0
- package/dist/collection/components/dropdown/dropdown-native.stories.js +90 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +185 -0
- package/dist/collection/components/dropdown/dropdown-wc-default.stories.js +167 -0
- package/dist/collection/components/dropdown/dropdown-wc-multiselect.stories.js +146 -0
- package/dist/collection/components/dropdown/dropdown.css +951 -0
- package/dist/collection/components/dropdown/dropdown.js +577 -0
- package/dist/collection/components/footer/footer.stories.js +117 -0
- package/dist/collection/components/header/header-all.stories.js +217 -0
- package/dist/collection/components/header/header-default.stories.js +47 -0
- package/dist/collection/components/header/header-inline.stories.js +113 -0
- package/dist/collection/components/header/header-search.stories.js +263 -0
- package/dist/collection/components/header/header-toolbar.stories.js +204 -0
- package/dist/collection/components/icon/icon-font.stories.js +57 -0
- package/dist/collection/components/icon/icon-web-component.stories.js +51 -0
- package/dist/collection/components/icon/icon.css +16 -0
- package/dist/collection/components/icon/icon.js +89 -0
- package/dist/collection/components/icon/iconsArray.js +2 -0
- package/dist/collection/components/link/link.stories.js +45 -0
- package/dist/collection/components/link/sdds-link.css +36 -0
- package/dist/collection/components/link/sdds-link.js +121 -0
- package/dist/collection/components/link/sdds-link.stories.js +70 -0
- package/dist/collection/components/message/message.stories.js +108 -0
- package/dist/collection/components/message/sdds-message.css +70 -0
- package/dist/collection/components/message/sdds-message.js +135 -0
- package/dist/collection/components/message/sdds-message.stories.js +106 -0
- package/dist/collection/components/modal/modal-native.stories.js +129 -0
- package/dist/collection/components/modal/modal-webcomponent.stories.js +86 -0
- package/dist/collection/components/modal/modal.css +350 -0
- package/dist/collection/components/modal/modal.js +148 -0
- package/dist/collection/components/popover-canvas/popover-canvas.css +20 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +219 -0
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +89 -0
- package/dist/collection/components/popover-menu/popover-menu-icons.stories.js +121 -0
- package/dist/collection/components/popover-menu/popover-menu.css +19 -0
- package/dist/collection/components/popover-menu/popover-menu.js +220 -0
- package/dist/collection/components/popover-menu/popover-menu.stories.js +114 -0
- package/dist/collection/components/radio-button/radio-button-component.css +123 -0
- package/dist/collection/components/radio-button/radio-button-component.stories.js +91 -0
- package/dist/collection/components/radio-button/radio-button.js +160 -0
- package/dist/collection/components/radio-button/radio-button.stories.js +68 -0
- package/dist/collection/components/side-menu/side-menu.stories.js +182 -0
- package/dist/collection/components/slider/slider.css +297 -0
- package/dist/collection/components/slider/slider.js +721 -0
- package/dist/collection/components/slider/slider.stories.js +208 -0
- package/dist/collection/components/spinner/spinner.css +79 -0
- package/dist/collection/components/spinner/spinner.js +61 -0
- package/dist/collection/components/spinner/spinner.stories.js +59 -0
- package/dist/collection/components/stepper/stepper.stories.js +139 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.css +3 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tab/inline-tab.js +80 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.css +156 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.js +312 -0
- package/dist/collection/components/tabs/inline-tabs-default/inline-tabs.stories.js +71 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.css +141 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.js +128 -0
- package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js +46 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +157 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +128 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +32 -0
- package/dist/collection/components/textarea/textarea.css +298 -0
- package/dist/collection/components/textarea/textarea.js +402 -0
- package/dist/collection/components/textarea/textarea.stories.js +169 -0
- package/dist/collection/components/textfield/textfield.css +502 -0
- package/dist/collection/components/textfield/textfield.js +439 -0
- package/dist/collection/components/textfield/textfield.stories.js +239 -0
- package/dist/collection/components/toast/sdds-toast.css +102 -0
- package/dist/collection/components/toast/sdds-toast.js +256 -0
- package/dist/collection/components/toast/sdds-toast.stories.js +86 -0
- package/dist/collection/components/toast/toast.stories.js +129 -0
- package/dist/collection/components/toggle/sdds-toggle.css +104 -0
- package/dist/collection/components/toggle/sdds-toggle.js +261 -0
- package/dist/collection/components/toggle/sdds-toggle.stories.js +92 -0
- package/dist/collection/components/toggle/toggle.stories.js +72 -0
- package/dist/collection/components/tooltip/tooltip.css +46 -0
- package/dist/collection/components/tooltip/tooltip.js +229 -0
- package/dist/collection/components/tooltip/tooltip.stories.js +115 -0
- package/dist/collection/components/utility/colour/background-color.stories.js +96 -0
- package/dist/collection/components/utility/colour/text-color.stories.js +94 -0
- package/dist/collection/foundations-stories/colour/colour-brand.stories.js +38 -0
- package/dist/collection/foundations-stories/colour/colour-scales.stories.js +71 -0
- package/dist/collection/foundations-stories/colour/colour-semantic.stories.js +40 -0
- package/dist/collection/foundations-stories/grid/grid.stories.js +386 -0
- package/dist/collection/foundations-stories/spacing/spacing-element.stories.js +100 -0
- package/dist/collection/foundations-stories/spacing/spacing-layout.stories.js +94 -0
- package/dist/collection/foundations-stories/typography/typography-body.stories.js +16 -0
- package/dist/collection/foundations-stories/typography/typography-detail.stories.js +17 -0
- package/dist/collection/foundations-stories/typography/typography-headline.stories.js +39 -0
- package/dist/collection/foundations-stories/typography/typography-paragraph.stories.js +12 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/stories/assets/code-brackets.svg +1 -0
- package/dist/collection/stories/assets/colors.svg +1 -0
- package/dist/collection/stories/assets/comments.svg +1 -0
- package/dist/collection/stories/assets/direction.svg +1 -0
- package/dist/collection/stories/assets/flow.svg +1 -0
- package/dist/collection/stories/assets/plugin.svg +1 -0
- package/dist/collection/stories/assets/repo.svg +1 -0
- package/dist/collection/stories/assets/stackalt.svg +1 -0
- package/dist/collection/utils/utils.js +12 -0
- package/dist/components/dropdown-option.js +100 -0
- package/dist/components/dropdown.js +303 -0
- package/dist/components/icon.js +58 -0
- package/dist/components/index.d.ts +62 -0
- package/dist/components/index.js +42 -0
- package/dist/components/popper.js +1799 -0
- package/dist/components/sdds-accordion-item.d.ts +11 -0
- package/dist/components/sdds-accordion-item.js +60 -0
- package/dist/components/sdds-accordion.d.ts +11 -0
- package/dist/components/sdds-accordion.js +38 -0
- package/dist/components/sdds-badges.d.ts +11 -0
- package/dist/components/sdds-badges.js +75 -0
- package/dist/components/sdds-banner.d.ts +11 -0
- package/dist/components/sdds-banner.js +119 -0
- package/dist/components/sdds-block.d.ts +11 -0
- package/dist/components/sdds-block.js +48 -0
- package/dist/components/sdds-body-cell.d.ts +11 -0
- package/dist/components/sdds-body-cell.js +6 -0
- package/dist/components/sdds-breadcrumb-item.d.ts +11 -0
- package/dist/components/sdds-breadcrumb-item.js +43 -0
- package/dist/components/sdds-breadcrumb.d.ts +11 -0
- package/dist/components/sdds-breadcrumb.js +37 -0
- package/dist/components/sdds-button.d.ts +11 -0
- package/dist/components/sdds-button.js +59 -0
- package/dist/components/sdds-card.d.ts +11 -0
- package/dist/components/sdds-card.js +84 -0
- package/dist/components/sdds-checkbox.d.ts +11 -0
- package/dist/components/sdds-checkbox.js +76 -0
- package/dist/components/sdds-datetime.d.ts +11 -0
- package/dist/components/sdds-datetime.js +129 -0
- package/dist/components/sdds-dropdown-filter.d.ts +11 -0
- package/dist/components/sdds-dropdown-filter.js +138 -0
- package/dist/components/sdds-dropdown-option.d.ts +11 -0
- package/dist/components/sdds-dropdown-option.js +6 -0
- package/dist/components/sdds-dropdown.d.ts +11 -0
- package/dist/components/sdds-dropdown.js +6 -0
- package/dist/components/sdds-header-cell.d.ts +11 -0
- package/dist/components/sdds-header-cell.js +170 -0
- package/dist/components/sdds-icon.d.ts +11 -0
- package/dist/components/sdds-icon.js +6 -0
- package/dist/components/sdds-inline-tab.d.ts +11 -0
- package/dist/components/sdds-inline-tab.js +40 -0
- package/dist/components/sdds-inline-tabs-fullbleed.d.ts +11 -0
- package/dist/components/sdds-inline-tabs-fullbleed.js +117 -0
- package/dist/components/sdds-inline-tabs.d.ts +11 -0
- package/dist/components/sdds-inline-tabs.js +245 -0
- package/dist/components/sdds-link.d.ts +11 -0
- package/dist/components/sdds-link.js +6 -0
- package/dist/components/sdds-link2.js +44 -0
- package/dist/components/sdds-message.d.ts +11 -0
- package/dist/components/sdds-message.js +67 -0
- package/dist/components/sdds-modal.d.ts +11 -0
- package/dist/components/sdds-modal.js +77 -0
- package/dist/components/sdds-navigation-tabs.d.ts +11 -0
- package/dist/components/sdds-navigation-tabs.js +117 -0
- package/dist/components/sdds-popover-canvas.d.ts +11 -0
- package/dist/components/sdds-popover-canvas.js +108 -0
- package/dist/components/sdds-popover-menu.d.ts +11 -0
- package/dist/components/sdds-popover-menu.js +109 -0
- package/dist/components/sdds-radio-button.d.ts +11 -0
- package/dist/components/sdds-radio-button.js +52 -0
- package/dist/components/sdds-slider.d.ts +11 -0
- package/dist/components/sdds-slider.js +394 -0
- package/dist/components/sdds-spinner.d.ts +11 -0
- package/dist/components/sdds-spinner.js +37 -0
- package/dist/components/sdds-table-body-row-expandable.d.ts +11 -0
- package/dist/components/sdds-table-body-row-expandable.js +105 -0
- package/dist/components/sdds-table-body-row.d.ts +11 -0
- package/dist/components/sdds-table-body-row.js +6 -0
- package/dist/components/sdds-table-body.d.ts +11 -0
- package/dist/components/sdds-table-body.js +337 -0
- package/dist/components/sdds-table-footer.d.ts +11 -0
- package/dist/components/sdds-table-footer.js +195 -0
- package/dist/components/sdds-table-header.d.ts +11 -0
- package/dist/components/sdds-table-header.js +124 -0
- package/dist/components/sdds-table-toolbar.d.ts +11 -0
- package/dist/components/sdds-table-toolbar.js +87 -0
- package/dist/components/sdds-table.d.ts +11 -0
- package/dist/components/sdds-table.js +91 -0
- package/dist/components/sdds-textarea.d.ts +11 -0
- package/dist/components/sdds-textarea.js +109 -0
- package/dist/components/sdds-textfield.d.ts +11 -0
- package/dist/components/sdds-textfield.js +127 -0
- package/dist/components/sdds-toast.d.ts +11 -0
- package/dist/components/sdds-toast.js +117 -0
- package/dist/components/sdds-toggle.d.ts +11 -0
- package/dist/components/sdds-toggle.js +69 -0
- package/dist/components/sdds-tooltip.d.ts +11 -0
- package/dist/components/sdds-tooltip.js +127 -0
- package/dist/components/table-body-cell.js +101 -0
- package/dist/components/table-body-row.js +120 -0
- package/dist/esm/index-32571711.js +1891 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/popper-f860750c.js +1799 -0
- package/dist/esm/sdds-accordion-item.entry.js +30 -0
- package/dist/esm/sdds-accordion.entry.js +17 -0
- package/dist/esm/sdds-badges.entry.js +50 -0
- package/dist/esm/sdds-banner.entry.js +75 -0
- package/dist/esm/sdds-block.entry.js +28 -0
- package/dist/esm/sdds-body-cell_2.entry.js +168 -0
- package/dist/esm/sdds-breadcrumb-item.entry.js +21 -0
- package/dist/esm/sdds-breadcrumb.entry.js +19 -0
- package/dist/esm/sdds-button.entry.js +33 -0
- package/dist/esm/sdds-card.entry.js +52 -0
- package/dist/esm/sdds-checkbox.entry.js +51 -0
- package/dist/esm/sdds-datetime.entry.js +91 -0
- package/dist/esm/sdds-dropdown-filter.entry.js +88 -0
- package/dist/esm/sdds-dropdown_2.entry.js +336 -0
- package/dist/esm/sdds-header-cell.entry.js +135 -0
- package/dist/esm/sdds-icon.entry.js +38 -0
- package/dist/esm/sdds-inline-tab.entry.js +18 -0
- package/dist/esm/sdds-inline-tabs-fullbleed.entry.js +94 -0
- package/dist/esm/sdds-inline-tabs.entry.js +217 -0
- package/dist/esm/sdds-link.entry.js +24 -0
- package/dist/esm/sdds-message.entry.js +37 -0
- package/dist/esm/sdds-modal.entry.js +47 -0
- package/dist/esm/sdds-navigation-tabs.entry.js +94 -0
- package/dist/esm/sdds-popover-canvas.entry.js +80 -0
- package/dist/esm/sdds-popover-menu.entry.js +81 -0
- package/dist/esm/sdds-radio-button.entry.js +28 -0
- package/dist/esm/sdds-slider.entry.js +353 -0
- package/dist/esm/sdds-spinner.entry.js +17 -0
- package/dist/esm/sdds-table-body-row-expandable.entry.js +78 -0
- package/dist/esm/sdds-table-body.entry.js +285 -0
- package/dist/esm/sdds-table-footer.entry.js +160 -0
- package/dist/esm/sdds-table-header.entry.js +95 -0
- package/dist/esm/sdds-table-toolbar.entry.js +61 -0
- package/dist/esm/sdds-table.entry.js +64 -0
- package/dist/esm/sdds-textarea.entry.js +70 -0
- package/dist/esm/sdds-textfield.entry.js +87 -0
- package/dist/esm/sdds-toast.entry.js +82 -0
- package/dist/esm/sdds-toggle.entry.js +40 -0
- package/dist/esm/sdds-tooltip.entry.js +100 -0
- package/dist/esm/tegel.js +17 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/node_modules/@types/jest/index.d.ts +1512 -0
- package/dist/tegel/index.esm.js +0 -0
- package/dist/tegel/p-05d3cfc8.entry.js +1 -0
- package/dist/tegel/p-13a25c7f.entry.js +1 -0
- package/dist/tegel/p-13b783f1.js +2 -0
- package/dist/tegel/p-1dda8de9.entry.js +1 -0
- package/dist/tegel/p-2248b59e.entry.js +1 -0
- package/dist/tegel/p-232e5c9a.entry.js +1 -0
- package/dist/tegel/p-2375f0eb.entry.js +1 -0
- package/dist/tegel/p-29deedc6.entry.js +1 -0
- package/dist/tegel/p-2f52021b.entry.js +1 -0
- package/dist/tegel/p-3344582d.entry.js +1 -0
- package/dist/tegel/p-4b14324d.entry.js +1 -0
- package/dist/tegel/p-561fbe77.entry.js +1 -0
- package/dist/tegel/p-5a215722.entry.js +1 -0
- package/dist/tegel/p-5f7b1539.entry.js +1 -0
- package/dist/tegel/p-6f382b38.entry.js +1 -0
- package/dist/tegel/p-765e2719.entry.js +1 -0
- package/dist/tegel/p-76f60546.entry.js +1 -0
- package/dist/tegel/p-7a5244b6.entry.js +1 -0
- package/dist/tegel/p-816ff5f7.entry.js +1 -0
- package/dist/tegel/p-81d2d57b.entry.js +1 -0
- package/dist/tegel/p-87650f36.entry.js +1 -0
- package/dist/tegel/p-8e6f885c.entry.js +1 -0
- package/dist/tegel/p-8e9dcc20.entry.js +1 -0
- package/dist/tegel/p-997fc919.entry.js +1 -0
- package/dist/tegel/p-9a057c9a.entry.js +1 -0
- package/dist/tegel/p-9a95e92c.entry.js +1 -0
- package/dist/tegel/p-a75ff060.entry.js +1 -0
- package/dist/tegel/p-bf1216f9.entry.js +1 -0
- package/dist/tegel/p-bf597564.entry.js +1 -0
- package/dist/tegel/p-d2217bf0.entry.js +1 -0
- package/dist/tegel/p-e335137d.entry.js +1 -0
- package/dist/tegel/p-e34cce75.entry.js +1 -0
- package/dist/tegel/p-e55d09f2.entry.js +1 -0
- package/dist/tegel/p-ebbffa8a.entry.js +1 -0
- package/dist/tegel/p-ec26fc38.js +1 -0
- package/dist/tegel/p-ed076d47.entry.js +1 -0
- package/dist/tegel/p-ef887910.entry.js +1 -0
- package/dist/tegel/p-f4b70868.entry.js +1 -0
- package/dist/tegel/p-f52a0b63.entry.js +1 -0
- package/dist/tegel/p-f5bf214b.entry.js +1 -0
- package/dist/tegel/p-fd1b5923.entry.js +1 -0
- package/dist/tegel/tegel.css +109 -0
- package/dist/tegel/tegel.esm.js +1 -0
- package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +17 -0
- package/dist/types/components/accordion/accordion.d.ts +7 -0
- package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
- package/dist/types/components/badge/badge.stories.d.ts +66 -0
- package/dist/types/components/badge/badges.d.ts +16 -0
- package/dist/types/components/banner/banner.stories.d.ts +68 -0
- package/dist/types/components/banner/sdds-banner.d.ts +48 -0
- package/dist/types/components/banner/sdds-banner.stories.d.ts +109 -0
- package/dist/types/components/block/block-native.stories.d.ts +31 -0
- package/dist/types/components/block/sdds-block.d.ts +9 -0
- package/dist/types/components/block/sdds-block.stories.d.ts +32 -0
- package/dist/types/components/breadcrumb/breadcrumb-item/breadcrumb-item.d.ts +9 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +5 -0
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +12 -0
- package/dist/types/components/button/button-component.d.ts +18 -0
- package/dist/types/components/button/button-native.stories.d.ts +148 -0
- package/dist/types/components/button/button-webcomponent.stories.d.ts +147 -0
- package/dist/types/components/card/card.stories.d.ts +138 -0
- package/dist/types/components/card/sdds-card.d.ts +39 -0
- package/dist/types/components/card/sdds-card.stories.d.ts +139 -0
- package/dist/types/components/checkbox/checkbox.stories.d.ts +39 -0
- package/dist/types/components/checkbox/sdds-checkbox.d.ts +38 -0
- package/dist/types/components/checkbox/sdds-checkbox.stories.d.ts +40 -0
- package/dist/types/components/chips/chips.stories.d.ts +77 -0
- package/dist/types/components/data-table/native-table.stories.d.ts +133 -0
- package/dist/types/components/data-table/table/table.d.ts +47 -0
- package/dist/types/components/data-table/table-body/table-body.d.ts +54 -0
- package/dist/types/components/data-table/table-body-cell/table-body-cell.d.ts +24 -0
- package/dist/types/components/data-table/table-body-row/table-body-row.d.ts +27 -0
- package/dist/types/components/data-table/table-body-row-expandable/table-body-row-expandable.d.ts +27 -0
- package/dist/types/components/data-table/table-component-basic.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-batch-actions.stories.d.ts +99 -0
- package/dist/types/components/data-table/table-component-bodydata.stories.d.ts +38 -0
- package/dist/types/components/data-table/table-component-custom-width.stories.d.ts +148 -0
- package/dist/types/components/data-table/table-component-event-listeners.stories.d.ts +88 -0
- package/dist/types/components/data-table/table-component-expandable-rows.stories.d.ts +88 -0
- package/dist/types/components/data-table/table-component-filtering.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-multiselect.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-pagination.stories.d.ts +101 -0
- package/dist/types/components/data-table/table-component-sorting.stories.d.ts +100 -0
- package/dist/types/components/data-table/table-footer/table-footer.d.ts +50 -0
- package/dist/types/components/data-table/table-header/table-header.d.ts +27 -0
- package/dist/types/components/data-table/table-header-cell/table-header-cell.d.ts +44 -0
- package/dist/types/components/data-table/table-toolbar/table-toolbar.d.ts +22 -0
- package/dist/types/components/datetime/datetime.d.ts +42 -0
- package/dist/types/components/datetime/datetime.stories.d.ts +127 -0
- package/dist/types/components/divider/divider.stories.d.ts +65 -0
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +42 -0
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.stories.d.ts +73 -0
- package/dist/types/components/dropdown/dropdown-native.stories.d.ts +57 -0
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +19 -0
- package/dist/types/components/dropdown/dropdown-wc-default.stories.d.ts +129 -0
- package/dist/types/components/dropdown/dropdown-wc-multiselect.stories.d.ts +115 -0
- package/dist/types/components/dropdown/dropdown.d.ts +58 -0
- package/dist/types/components/footer/footer.stories.d.ts +45 -0
- package/dist/types/components/header/header-all.stories.d.ts +29 -0
- package/dist/types/components/header/header-default.stories.d.ts +29 -0
- package/dist/types/components/header/header-inline.stories.d.ts +29 -0
- package/dist/types/components/header/header-search.stories.d.ts +29 -0
- package/dist/types/components/header/header-toolbar.stories.d.ts +29 -0
- package/dist/types/components/icon/icon-font.stories.d.ts +38 -0
- package/dist/types/components/icon/icon-web-component.stories.d.ts +38 -0
- package/dist/types/components/icon/icon.d.ts +12 -0
- package/dist/types/components/link/link.stories.d.ts +33 -0
- package/dist/types/components/link/sdds-link.d.ts +13 -0
- package/dist/types/components/link/sdds-link.stories.d.ts +58 -0
- package/dist/types/components/message/message.stories.d.ts +69 -0
- package/dist/types/components/message/sdds-message.d.ts +14 -0
- package/dist/types/components/message/sdds-message.stories.d.ts +87 -0
- package/dist/types/components/modal/modal-native.stories.d.ts +59 -0
- package/dist/types/components/modal/modal-webcomponent.stories.d.ts +52 -0
- package/dist/types/components/modal/modal.d.ts +17 -0
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +24 -0
- package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +25 -0
- package/dist/types/components/popover-menu/popover-menu-icons.stories.d.ts +27 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +24 -0
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +27 -0
- package/dist/types/components/radio-button/radio-button-component.stories.d.ts +39 -0
- package/dist/types/components/radio-button/radio-button.d.ts +26 -0
- package/dist/types/components/radio-button/radio-button.stories.d.ts +33 -0
- package/dist/types/components/side-menu/side-menu.stories.d.ts +42 -0
- package/dist/types/components/slider/slider.d.ts +86 -0
- package/dist/types/components/slider/slider.stories.d.ts +169 -0
- package/dist/types/components/spinner/spinner.d.ts +7 -0
- package/dist/types/components/spinner/spinner.stories.d.ts +37 -0
- package/dist/types/components/stepper/stepper.stories.d.ts +56 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tab/inline-tab.d.ts +6 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.d.ts +40 -0
- package/dist/types/components/tabs/inline-tabs-default/inline-tabs.stories.d.ts +49 -0
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.d.ts +20 -0
- package/dist/types/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.d.ts +30 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +20 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +13 -0
- package/dist/types/components/textarea/textarea.d.ts +48 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +116 -0
- package/dist/types/components/textfield/textfield.d.ts +52 -0
- package/dist/types/components/textfield/textfield.stories.d.ts +180 -0
- package/dist/types/components/toast/sdds-toast.d.ts +36 -0
- package/dist/types/components/toast/sdds-toast.stories.d.ts +56 -0
- package/dist/types/components/toast/toast.stories.d.ts +69 -0
- package/dist/types/components/toggle/sdds-toggle.d.ts +34 -0
- package/dist/types/components/toggle/sdds-toggle.stories.d.ts +74 -0
- package/dist/types/components/toggle/toggle.stories.d.ts +55 -0
- package/dist/types/components/tooltip/tooltip.d.ts +24 -0
- package/dist/types/components/tooltip/tooltip.stories.d.ts +54 -0
- package/dist/types/components/utility/colour/background-color.stories.d.ts +58 -0
- package/dist/types/components/utility/colour/text-color.stories.d.ts +58 -0
- package/dist/types/components.d.ts +2643 -0
- package/dist/types/foundations-stories/colour/colour-brand.stories.d.ts +13 -0
- package/dist/types/foundations-stories/colour/colour-scales.stories.d.ts +13 -0
- package/dist/types/foundations-stories/colour/colour-semantic.stories.d.ts +13 -0
- package/dist/types/foundations-stories/grid/grid.stories.d.ts +35 -0
- package/dist/types/foundations-stories/spacing/spacing-element.stories.d.ts +8 -0
- package/dist/types/foundations-stories/spacing/spacing-layout.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-body.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-detail.stories.d.ts +8 -0
- package/dist/types/foundations-stories/typography/typography-headline.stories.d.ts +21 -0
- package/dist/types/foundations-stories/typography/typography-paragraph.stories.d.ts +8 -0
- package/dist/types/global.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1581 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +1 -1
- package/readme.md +34 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class InlineTabsFullbleed {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.navWrapperElement = null; // reference to container with nav buttons
|
|
5
|
+
this.componentWidth = 0; // visible width of this component
|
|
6
|
+
this.buttonsWidth = 0; // total width of all nav items combined
|
|
7
|
+
this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
|
|
8
|
+
this.buttonWidth = 0; // current calculated width of the largest nav button
|
|
9
|
+
this.modeVariant = null;
|
|
10
|
+
this.tabs = [];
|
|
11
|
+
this.showLeftScroll = false;
|
|
12
|
+
this.showRightScroll = false;
|
|
13
|
+
}
|
|
14
|
+
componentDidRender() {
|
|
15
|
+
this.calculateButtonWidth();
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
19
|
+
entries.forEach((entry) => {
|
|
20
|
+
const componentWidth = entry.contentRect.width;
|
|
21
|
+
let buttonsWidth = 0;
|
|
22
|
+
const navButtons = Array.from(this.host.children);
|
|
23
|
+
navButtons.forEach((navButton) => {
|
|
24
|
+
const style = window.getComputedStyle(navButton);
|
|
25
|
+
buttonsWidth +=
|
|
26
|
+
navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
27
|
+
navButton.classList.add('sdds-inline-tabs-fullbleed--tab');
|
|
28
|
+
});
|
|
29
|
+
this.componentWidth = componentWidth;
|
|
30
|
+
this.buttonsWidth = buttonsWidth;
|
|
31
|
+
this.scrollWidth = buttonsWidth - componentWidth;
|
|
32
|
+
if (this.buttonsWidth > this.componentWidth) {
|
|
33
|
+
this.evaluateScrollButtons();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.showLeftScroll = false;
|
|
37
|
+
this.showRightScroll = false;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
resizeObserver.observe(this.navWrapperElement);
|
|
42
|
+
this.calculateButtonWidth();
|
|
43
|
+
}
|
|
44
|
+
calculateButtonWidth() {
|
|
45
|
+
let best = 0;
|
|
46
|
+
const navButtons = Array.from(this.host.children);
|
|
47
|
+
navButtons.forEach((navButton) => {
|
|
48
|
+
const style = window.getComputedStyle(navButton);
|
|
49
|
+
const width = navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
50
|
+
if (width > best) {
|
|
51
|
+
best = width;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
this.buttonWidth = best;
|
|
55
|
+
}
|
|
56
|
+
scrollRight() {
|
|
57
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
58
|
+
this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
|
|
59
|
+
this.evaluateScrollButtons();
|
|
60
|
+
}
|
|
61
|
+
scrollLeft() {
|
|
62
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
63
|
+
this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
|
|
64
|
+
this.evaluateScrollButtons();
|
|
65
|
+
}
|
|
66
|
+
evaluateScrollButtons() {
|
|
67
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
68
|
+
if (scroll >= this.scrollWidth) {
|
|
69
|
+
this.showRightScroll = false;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.showRightScroll = true;
|
|
73
|
+
}
|
|
74
|
+
if (scroll <= 0) {
|
|
75
|
+
this.showLeftScroll = false;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.showLeftScroll = true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
return (h(Host, { class: `${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { class: `sdds-inline-tabs-fullbleed` }, h("div", { class: "sdds-inline-tabs-fullbleed-wrapper", ref: (el) => {
|
|
83
|
+
this.navWrapperElement = el;
|
|
84
|
+
} }, h("slot", null)), h("div", { class: "sdds-inline-tabs-fullbleed-navigation" }, h("button", { class: `sdds-inline-tabs-fullbleed--forward ${this.showRightScroll ? 'sdds-inline-tabs-fullbleed--back__show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.1147 17.3291C5.87062 17.0851 5.87062 16.6893 6.1147 16.4453L12.2948 10.2652C12.4412 10.1187 12.4412 9.8813 12.2948 9.73485L6.1147 3.55476C5.87062 3.31068 5.87062 2.91496 6.1147 2.67088C6.35878 2.4268 6.75451 2.4268 6.99858 2.67088L13.1787 8.85097C13.8133 9.48557 13.8133 10.5145 13.1787 11.1491L6.99858 17.3291C6.75451 17.5732 6.35878 17.5732 6.1147 17.3291Z" }))), h("button", { class: `sdds-inline-tabs-fullbleed--back ${this.showLeftScroll ? 'sdds-inline-tabs-fullbleed--back__show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.8853 2.67085C14.1294 2.91493 14.1294 3.31066 13.8853 3.55473L7.70522 9.73482C7.55878 9.88127 7.55878 10.1187 7.70522 10.2652L13.8853 16.4452C14.1294 16.6893 14.1294 17.085 13.8853 17.3291C13.6412 17.5732 13.2455 17.5732 13.0014 17.3291L6.82134 11.149C6.18674 10.5144 6.18674 9.48554 6.82134 8.85094L13.0014 2.67085C13.2455 2.42677 13.6412 2.42677 13.8853 2.67085Z" })))))));
|
|
85
|
+
}
|
|
86
|
+
static get is() { return "sdds-inline-tabs-fullbleed"; }
|
|
87
|
+
static get encapsulation() { return "shadow"; }
|
|
88
|
+
static get originalStyleUrls() {
|
|
89
|
+
return {
|
|
90
|
+
"$": ["inline-tabs-fullbleed.scss"]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get styleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["inline-tabs-fullbleed.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get properties() {
|
|
99
|
+
return {
|
|
100
|
+
"modeVariant": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "'primary' | 'secondary'",
|
|
105
|
+
"resolved": "\"primary\" | \"secondary\"",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Variant of the tabs, primary= on white, secondary= on grey50"
|
|
113
|
+
},
|
|
114
|
+
"attribute": "mode-variant",
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"defaultValue": "null"
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
static get states() {
|
|
121
|
+
return {
|
|
122
|
+
"tabs": {},
|
|
123
|
+
"showLeftScroll": {},
|
|
124
|
+
"showRightScroll": {}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
static get elementRef() { return "host"; }
|
|
128
|
+
}
|
package/dist/collection/components/tabs/inline-tabs-fullbleed/inline-tabs-fullbleed.stories.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Tabs',
|
|
5
|
+
parameters: {
|
|
6
|
+
notes: readme,
|
|
7
|
+
design: [
|
|
8
|
+
{
|
|
9
|
+
name: 'Figma',
|
|
10
|
+
type: 'figma',
|
|
11
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10544%3A32834&t=Ne6myqwca5m00de7-1',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'Link',
|
|
15
|
+
type: 'link',
|
|
16
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10544%3A32834&t=Ne6myqwca5m00de7-1',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
argTypes: {
|
|
21
|
+
modeVariant: {
|
|
22
|
+
name: 'Mode variant',
|
|
23
|
+
control: {
|
|
24
|
+
type: 'radio',
|
|
25
|
+
},
|
|
26
|
+
options: ['Inherit from parent', 'Primary', 'Secondary'],
|
|
27
|
+
table: {
|
|
28
|
+
defaultValue: { summary: 'Inherit from parent' },
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
modeVariant: 'Inherit from parent',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const Template = ({ modeVariant }) => formatHtmlPreview(`
|
|
37
|
+
<sdds-inline-tabs-fullbleed id="inline-tabs-fullbleed-example" ${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}>
|
|
38
|
+
<a href="#">Tab name</a>
|
|
39
|
+
<a href="#" class="sdds-inline-tabs-fullbleed--tab__active">Active tab</a>
|
|
40
|
+
<a href="#">Tab name</a>
|
|
41
|
+
<a href="#">Tab name</a>
|
|
42
|
+
<a href="#" class="sdds-inline-tabs-fullbleed--tab__disabled" aria-disabled="true" tabindex="-1">Disabled tab</a>
|
|
43
|
+
</sdds-inline-tabs-fullbleed>
|
|
44
|
+
`);
|
|
45
|
+
export const InlineTabsFullbleed = Template.bind({});
|
|
46
|
+
InlineTabsFullbleed.args = {};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
.sdds-navigation-tabs {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
background-color: var(--sdds-navigation-tabs-background);
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
/* tab */
|
|
7
|
+
/* tab states */
|
|
8
|
+
}
|
|
9
|
+
.sdds-navigation-tabs * {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
.sdds-navigation-tabs::after {
|
|
13
|
+
content: " ";
|
|
14
|
+
display: block;
|
|
15
|
+
border-bottom: 1px solid var(--sdds-navigation-tabs-horizontal-divider-background);
|
|
16
|
+
opacity: var(--sdds-navigation-tabs-horizontal-divider-opacity);
|
|
17
|
+
left: 0;
|
|
18
|
+
right: 0;
|
|
19
|
+
bottom: 0;
|
|
20
|
+
position: absolute;
|
|
21
|
+
}
|
|
22
|
+
.sdds-navigation-tabs-wrapper {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: nowrap;
|
|
25
|
+
width: 100%;
|
|
26
|
+
overflow-x: scroll;
|
|
27
|
+
scrollbar-width: none;
|
|
28
|
+
}
|
|
29
|
+
.sdds-navigation-tabs-wrapper::-webkit-scrollbar {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
.sdds-navigation-tabs-forward {
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
width: 48px;
|
|
35
|
+
height: 100%;
|
|
36
|
+
border: 0;
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: 0;
|
|
39
|
+
top: 0;
|
|
40
|
+
background-color: var(--sdds-navigation-tabs-scroll-btn-background);
|
|
41
|
+
display: flex;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
align-items: center;
|
|
44
|
+
opacity: 0;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
}
|
|
47
|
+
.sdds-navigation-tabs-forward__show {
|
|
48
|
+
opacity: 1;
|
|
49
|
+
pointer-events: all;
|
|
50
|
+
}
|
|
51
|
+
.sdds-navigation-tabs-forward:hover {
|
|
52
|
+
background-color: var(--sdds-navigation-tabs-scroll-btn-background-hover);
|
|
53
|
+
text-decoration: none;
|
|
54
|
+
}
|
|
55
|
+
.sdds-navigation-tabs-forward:active {
|
|
56
|
+
background-color: var(--sdds-navigation-tabs-scroll-btn-background-active);
|
|
57
|
+
}
|
|
58
|
+
.sdds-navigation-tabs-forward:focus {
|
|
59
|
+
outline: 2px solid var(--sdds-blue-400);
|
|
60
|
+
outline-offset: -2px;
|
|
61
|
+
}
|
|
62
|
+
.sdds-navigation-tabs-back {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
width: 48px;
|
|
65
|
+
height: 100%;
|
|
66
|
+
border: 0;
|
|
67
|
+
position: absolute;
|
|
68
|
+
left: 0;
|
|
69
|
+
top: 0;
|
|
70
|
+
background-color: var(--sdds-navigation-tabs-scroll-btn-background);
|
|
71
|
+
display: flex;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
align-items: center;
|
|
74
|
+
opacity: 0;
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
}
|
|
77
|
+
.sdds-navigation-tabs-back__show {
|
|
78
|
+
opacity: 1;
|
|
79
|
+
pointer-events: all;
|
|
80
|
+
}
|
|
81
|
+
.sdds-navigation-tabs-back:hover {
|
|
82
|
+
background-color: var(--sdds-navigation-tabs-scroll-btn-background-hover);
|
|
83
|
+
}
|
|
84
|
+
.sdds-navigation-tabs-back:active {
|
|
85
|
+
background-color: var(--sdds-navigation-tabs-scroll-btn-background-active);
|
|
86
|
+
}
|
|
87
|
+
.sdds-navigation-tabs-back:focus {
|
|
88
|
+
outline: 2px solid var(--sdds-blue-400);
|
|
89
|
+
outline-offset: -2px;
|
|
90
|
+
}
|
|
91
|
+
::slotted(.sdds-navigation-tabs-tab) {
|
|
92
|
+
font: var(--sdds-headline-07);
|
|
93
|
+
letter-spacing: var(--sdds-headline-07-ls);
|
|
94
|
+
color: var(--sdds-navigation-tabs-tab-color);
|
|
95
|
+
opacity: 0.6;
|
|
96
|
+
padding: 26px 0;
|
|
97
|
+
margin-right: 32px;
|
|
98
|
+
text-decoration: none;
|
|
99
|
+
display: block;
|
|
100
|
+
position: relative;
|
|
101
|
+
transition: color 0.15s ease-in-out;
|
|
102
|
+
white-space: nowrap;
|
|
103
|
+
background-color: transparent;
|
|
104
|
+
border: 0;
|
|
105
|
+
}
|
|
106
|
+
::slotted(.sdds-navigation-tabs-tab)::after {
|
|
107
|
+
content: " ";
|
|
108
|
+
position: absolute;
|
|
109
|
+
bottom: 0;
|
|
110
|
+
right: 0;
|
|
111
|
+
left: 0;
|
|
112
|
+
margin-left: auto;
|
|
113
|
+
width: 0;
|
|
114
|
+
margin-right: auto;
|
|
115
|
+
height: 2px;
|
|
116
|
+
background-color: var(--sdds-navigation-tabs-tab-indicator-background-hover);
|
|
117
|
+
transition: width 0.15s ease-in-out;
|
|
118
|
+
z-index: 1;
|
|
119
|
+
}
|
|
120
|
+
::slotted(.sdds-navigation-tabs-tab:first-child) {
|
|
121
|
+
margin-left: 32px;
|
|
122
|
+
}
|
|
123
|
+
::slotted(.sdds-navigation-tabs-tab:last-child) {
|
|
124
|
+
margin-right: 32px;
|
|
125
|
+
}
|
|
126
|
+
::slotted(.sdds-navigation-tabs-tab:hover) {
|
|
127
|
+
color: var(--sdds-navigation-tabs-tab-color-hover);
|
|
128
|
+
opacity: 1;
|
|
129
|
+
}
|
|
130
|
+
::slotted(.sdds-navigation-tabs-tab:hover)::after {
|
|
131
|
+
width: 100%;
|
|
132
|
+
}
|
|
133
|
+
::slotted(.sdds-navigation-tabs-tab:focus) {
|
|
134
|
+
outline: 2px solid var(--sdds-blue-400);
|
|
135
|
+
outline-offset: -2px;
|
|
136
|
+
color: var(--sdds-navigation-tabs-tab-color-focus);
|
|
137
|
+
opacity: 1;
|
|
138
|
+
}
|
|
139
|
+
::slotted(.sdds-navigation-tabs-tab:focus)::after {
|
|
140
|
+
width: 0;
|
|
141
|
+
}
|
|
142
|
+
::slotted(.sdds-navigation-tabs-tab-active) {
|
|
143
|
+
color: var(--sdds-navigation-tabs-tab-color-active);
|
|
144
|
+
opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
::slotted(.sdds-navigation-tabs-tab-active)::after {
|
|
147
|
+
width: 100%;
|
|
148
|
+
background-color: var(--sdds-navigation-tabs-tab-indicator-background-active);
|
|
149
|
+
}
|
|
150
|
+
::slotted(.sdds-navigation-tabs-tab-active:focus)::after {
|
|
151
|
+
width: 100%;
|
|
152
|
+
}
|
|
153
|
+
::slotted(.sdds-navigation-tabs-tab-disabled) {
|
|
154
|
+
color: var(--sdds-navigation-tabs-tab-color-disabled);
|
|
155
|
+
opacity: var(--sdds-navigation-tabs-tab-color-opacity-disabled);
|
|
156
|
+
pointer-events: none;
|
|
157
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
|
+
export class NavigationTabs {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.navWrapperElement = null; // reference to container with nav buttons
|
|
5
|
+
this.componentWidth = 0; // visible width of this component
|
|
6
|
+
this.buttonsWidth = 0; // total width of all nav items combined
|
|
7
|
+
this.scrollWidth = 0; // total amount that is possible to scroll in the nav wrapper
|
|
8
|
+
this.buttonWidth = 0; // current calculated width of the largest nav button
|
|
9
|
+
this.tabs = [];
|
|
10
|
+
this.showLeftScroll = false;
|
|
11
|
+
this.showRightScroll = false;
|
|
12
|
+
this.modeVariant = null;
|
|
13
|
+
}
|
|
14
|
+
componentDidRender() {
|
|
15
|
+
this.calculateButtonWidth();
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
19
|
+
entries.forEach((entry) => {
|
|
20
|
+
const componentWidth = entry.contentRect.width;
|
|
21
|
+
let buttonsWidth = 0;
|
|
22
|
+
const navButtons = Array.from(this.host.children);
|
|
23
|
+
navButtons.forEach((navButton) => {
|
|
24
|
+
const style = window.getComputedStyle(navButton);
|
|
25
|
+
buttonsWidth +=
|
|
26
|
+
navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
27
|
+
navButton.classList.add('sdds-navigation-tabs-tab');
|
|
28
|
+
});
|
|
29
|
+
this.componentWidth = componentWidth;
|
|
30
|
+
this.buttonsWidth = buttonsWidth;
|
|
31
|
+
this.scrollWidth = buttonsWidth - componentWidth;
|
|
32
|
+
if (this.buttonsWidth > this.componentWidth) {
|
|
33
|
+
this.evaluateScrollButtons();
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.showLeftScroll = false;
|
|
37
|
+
this.showRightScroll = false;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
resizeObserver.observe(this.navWrapperElement);
|
|
42
|
+
this.calculateButtonWidth();
|
|
43
|
+
}
|
|
44
|
+
calculateButtonWidth() {
|
|
45
|
+
let best = 0;
|
|
46
|
+
const navButtons = Array.from(this.host.children);
|
|
47
|
+
navButtons.forEach((navButton) => {
|
|
48
|
+
const style = window.getComputedStyle(navButton);
|
|
49
|
+
const width = navButton.clientWidth + parseFloat(style.marginLeft) + parseFloat(style.marginRight);
|
|
50
|
+
if (width > best) {
|
|
51
|
+
best = width;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
this.buttonWidth = best;
|
|
55
|
+
}
|
|
56
|
+
scrollRight() {
|
|
57
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
58
|
+
this.navWrapperElement.scrollLeft = scroll + this.buttonWidth;
|
|
59
|
+
this.evaluateScrollButtons();
|
|
60
|
+
}
|
|
61
|
+
scrollLeft() {
|
|
62
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
63
|
+
this.navWrapperElement.scrollLeft = scroll - this.buttonWidth;
|
|
64
|
+
this.evaluateScrollButtons();
|
|
65
|
+
}
|
|
66
|
+
evaluateScrollButtons() {
|
|
67
|
+
const scroll = this.navWrapperElement.scrollLeft;
|
|
68
|
+
if (scroll >= this.scrollWidth) {
|
|
69
|
+
this.showRightScroll = false;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
this.showRightScroll = true;
|
|
73
|
+
}
|
|
74
|
+
if (scroll <= 0) {
|
|
75
|
+
this.showLeftScroll = false;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.showLeftScroll = true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
return (h(Host, { class: `${this.modeVariant !== null ? `sdds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { class: "sdds-navigation-tabs" }, h("div", { class: "sdds-navigation-tabs-wrapper", ref: (el) => {
|
|
83
|
+
this.navWrapperElement = el;
|
|
84
|
+
} }, h("slot", null)), h("div", { class: "sdds-navigation-tabs-navigation" }, h("button", { class: `sdds-navigation-tabs-forward ${this.showRightScroll ? 'sdds-navigation-tabs-forward-show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.1147 17.3291C5.87062 17.0851 5.87062 16.6893 6.1147 16.4453L12.2948 10.2652C12.4412 10.1187 12.4412 9.8813 12.2948 9.73485L6.1147 3.55476C5.87062 3.31068 5.87062 2.91496 6.1147 2.67088C6.35878 2.4268 6.75451 2.4268 6.99858 2.67088L13.1787 8.85097C13.8133 9.48557 13.8133 10.5145 13.1787 11.1491L6.99858 17.3291C6.75451 17.5732 6.35878 17.5732 6.1147 17.3291Z", fill: "#0D0F13" }))), h("button", { class: `sdds-navigation-tabs-back ${this.showLeftScroll ? 'sdds-navigation-tabs-back-show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M13.8853 2.67085C14.1294 2.91493 14.1294 3.31066 13.8853 3.55473L7.70522 9.73482C7.55878 9.88127 7.55878 10.1187 7.70522 10.2652L13.8853 16.4452C14.1294 16.6893 14.1294 17.085 13.8853 17.3291C13.6412 17.5732 13.2455 17.5732 13.0014 17.3291L6.82134 11.149C6.18674 10.5144 6.18674 9.48554 6.82134 8.85094L13.0014 2.67085C13.2455 2.42677 13.6412 2.42677 13.8853 2.67085Z", fill: "#0D0F13" })))))));
|
|
85
|
+
}
|
|
86
|
+
static get is() { return "sdds-navigation-tabs"; }
|
|
87
|
+
static get encapsulation() { return "shadow"; }
|
|
88
|
+
static get originalStyleUrls() {
|
|
89
|
+
return {
|
|
90
|
+
"$": ["navigation-tabs.scss"]
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static get styleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["navigation-tabs.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get properties() {
|
|
99
|
+
return {
|
|
100
|
+
"modeVariant": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "'primary' | 'secondary'",
|
|
105
|
+
"resolved": "\"primary\" | \"secondary\"",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Variant of the tabs, primary= on white, secondary= on grey50"
|
|
113
|
+
},
|
|
114
|
+
"attribute": "mode-variant",
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"defaultValue": "null"
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
static get states() {
|
|
121
|
+
return {
|
|
122
|
+
"tabs": {},
|
|
123
|
+
"showLeftScroll": {},
|
|
124
|
+
"showRightScroll": {}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
static get elementRef() { return "host"; }
|
|
128
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/Tabs',
|
|
5
|
+
parameters: {
|
|
6
|
+
notes: readme,
|
|
7
|
+
design: [
|
|
8
|
+
{
|
|
9
|
+
name: 'Figma',
|
|
10
|
+
type: 'figma',
|
|
11
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10544%3A31546&t=Ne6myqwca5m00de7-1',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'Link',
|
|
15
|
+
type: 'link',
|
|
16
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10544%3A31546&t=Ne6myqwca5m00de7-1',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
// Why role="link" on a disabled link: https://www.scottohara.me/blog/2021/05/28/disabled-links.html
|
|
22
|
+
const Template = () => formatHtmlPreview(`
|
|
23
|
+
<sdds-navigation-tabs>
|
|
24
|
+
<a href="#" class="sdds-navigation-tabs-tab-active">Active tab</a>
|
|
25
|
+
<a href="#">Tab name</a>
|
|
26
|
+
<a href="#">Tab name</a>
|
|
27
|
+
<a href="#">Tab name</a>
|
|
28
|
+
<a role="link" aria-disabled="true" tabindex="-1" class="sdds-navigation-tabs-tab-disabled">Disabled tab</a>
|
|
29
|
+
</sdds-navigation-tabs>
|
|
30
|
+
`);
|
|
31
|
+
export const NavigationTabs = Template.bind({});
|
|
32
|
+
NavigationTabs.args = {};
|