@scania/tegel 0.0.9 → 0.0.10
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/README.md +3 -0
- package/dist/cjs/index-ee36ffa1.js +8 -16
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{popper-9def2535.js → popper-d7adcfc6.js} +6 -12
- package/dist/cjs/tds-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-badge.cjs.entry.js +3 -3
- package/dist/cjs/tds-banner.cjs.entry.js +10 -10
- package/dist/cjs/tds-breadcrumb.cjs.entry.js +2 -4
- package/dist/cjs/tds-breadcrumbs.cjs.entry.js +0 -3
- package/dist/cjs/tds-button.cjs.entry.js +4 -11
- package/dist/cjs/tds-card.cjs.entry.js +19 -23
- package/dist/cjs/tds-checkbox.cjs.entry.js +2 -1
- package/dist/cjs/tds-chip.cjs.entry.js +14 -3
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/{tds-dropdown-option-v2.cjs.entry.js → tds-dropdown-option.cjs.entry.js} +5 -5
- package/dist/cjs/{tds-dropdown-v2.cjs.entry.js → tds-dropdown.cjs.entry.js} +19 -19
- package/dist/cjs/tds-folder-tab.cjs.entry.js +2 -3
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +5 -5
- package/dist/cjs/tds-footer-group.cjs.entry.js +3 -3
- package/dist/cjs/tds-footer-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer.cjs.entry.js +6 -6
- package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown-list-user.cjs.entry.js +4 -4
- package/dist/cjs/tds-header-dropdown-list.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +4 -3
- package/dist/cjs/tds-header-hamburger.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-grid-title.cjs.entry.js +3 -2
- package/dist/cjs/tds-header-launcher-grid.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-list-title.cjs.entry.js +3 -2
- package/dist/cjs/tds-header-launcher-list.cjs.entry.js +2 -1
- package/dist/cjs/tds-header-launcher.cjs.entry.js +2 -2
- package/dist/cjs/tds-header.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +5 -5
- package/dist/cjs/tds-link.cjs.entry.js +1 -1
- package/dist/cjs/tds-message.cjs.entry.js +4 -4
- package/dist/cjs/tds-modal.cjs.entry.js +13 -5
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +5 -5
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/tds-radio-button.cjs.entry.js +3 -2
- package/dist/cjs/tds-side-menu-close-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu.cjs.entry.js +2 -2
- package/dist/cjs/tds-slider.cjs.entry.js +12 -15
- package/dist/cjs/tds-stepper.cjs.entry.js +3 -2
- package/dist/cjs/tds-table-body.cjs.entry.js +4 -51
- package/dist/cjs/tds-table-footer.cjs.entry.js +47 -39
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/tds-table.cjs.entry.js +2 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +6 -2
- package/dist/cjs/tds-toast.cjs.entry.js +11 -26
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -1
- package/dist/cjs/tds-tooltip.cjs.entry.js +6 -2
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/cjs/{utils-2beb1aa0.js → utils-41de5fb2.js} +32 -12
- package/dist/collection/collection-manifest.json +0 -3
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +4 -1
- package/dist/collection/components/accordion/accordion.stories.js +100 -0
- package/dist/collection/components/badge/badge.js +4 -4
- package/dist/collection/components/badge/badge.stories.js +106 -0
- package/dist/collection/components/banner/banner.css +12 -9
- package/dist/collection/components/banner/banner.js +33 -17
- package/dist/collection/components/banner/banner.stories.js +107 -0
- package/dist/collection/components/block/block.stories.js +49 -0
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.css +4 -4
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.js +1 -21
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +0 -3
- package/dist/collection/components/breadcrumbs/breadcrumbs.stories.js +36 -0
- package/dist/collection/components/button/button.css +16 -0
- package/dist/collection/components/button/button.js +7 -12
- package/dist/collection/components/button/button.stories.js +167 -0
- package/dist/collection/components/card/card.css +18 -17
- package/dist/collection/components/card/card.js +32 -68
- package/dist/collection/components/card/card.stories.js +162 -0
- package/dist/collection/components/checkbox/checkbox.js +6 -2
- package/dist/collection/components/checkbox/checkbox.stories.js +80 -0
- package/dist/collection/components/chip/chip.css +23 -8
- package/dist/collection/components/chip/chip.js +19 -3
- package/dist/collection/components/chip/chip.stories.js +230 -0
- package/dist/collection/components/datetime/datetime.stories.js +195 -0
- package/dist/collection/components/divider/divider.stories.js +62 -0
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +142 -116
- package/dist/collection/components/dropdown/dropdown.css +212 -386
- package/dist/collection/components/dropdown/dropdown.js +472 -329
- package/dist/collection/components/dropdown/dropdown.stories.js +268 -0
- package/dist/collection/components/footer/footer-group/footer-group.css +3 -3
- package/dist/collection/components/footer/footer-group/footer-group.js +2 -2
- package/dist/collection/components/footer/footer-item/footer-item.css +16 -8
- package/dist/collection/components/footer/footer.css +8 -12
- package/dist/collection/components/footer/footer.js +10 -10
- package/dist/collection/components/footer/footer.stories.js +145 -0
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +10 -5
- package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.css +1 -1
- package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.js +13 -9
- package/dist/collection/components/header/header-hamburger/header-hamburger.css +0 -1
- package/dist/collection/components/header/header-launcher/header-launcher.js +2 -2
- package/dist/collection/components/header/header-launcher-grid-title/header-launcher-grid-title.js +3 -2
- package/dist/collection/components/header/header-launcher-list/header-launcher-list.js +2 -1
- package/dist/collection/components/header/header-launcher-list-title/header-launcher-list-title.js +3 -2
- package/dist/collection/components/header/header.css +1 -1
- package/dist/collection/components/header/header.js +5 -0
- package/dist/collection/components/header/header.stories.js +80 -0
- package/dist/collection/components/icon/icon.stories.js +48 -0
- package/dist/collection/components/link/link.css +16 -13
- package/dist/collection/components/link/link.js +1 -0
- package/dist/collection/components/link/link.stories.js +57 -0
- package/dist/collection/components/message/message.css +16 -16
- package/dist/collection/components/message/message.js +6 -3
- package/dist/collection/components/message/message.stories.js +110 -0
- package/dist/collection/components/modal/modal.css +19 -33
- package/dist/collection/components/modal/modal.js +36 -6
- package/dist/collection/components/modal/modal.stories.js +109 -0
- package/dist/collection/components/popover-canvas/popover-canvas.js +2 -2
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +92 -0
- package/dist/collection/components/popover-menu/popover-menu.js +2 -2
- package/dist/collection/components/popover-menu/popover-menu.stories.js +140 -0
- package/dist/collection/components/radio-button/radio-button.css +1 -1
- package/dist/collection/components/radio-button/radio-button.js +6 -2
- package/dist/collection/components/radio-button/radio-button.stories.js +91 -0
- package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +3 -0
- package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.css +1 -1
- package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.js +5 -0
- package/dist/collection/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.js +3 -0
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.js +3 -0
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +1 -1
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.js +3 -0
- package/dist/collection/components/side-menu/side-menu-user/side-menu-user.js +3 -0
- package/dist/collection/components/side-menu/side-menu-user-image/side-menu-user-image.js +5 -0
- package/dist/collection/components/side-menu/side-menu.css +6 -5
- package/dist/collection/components/side-menu/side-menu.js +11 -3
- package/dist/collection/components/side-menu/side-menu.stories.js +215 -0
- package/dist/collection/components/slider/slider.js +13 -16
- package/dist/collection/components/slider/slider.stories.js +243 -0
- package/dist/collection/components/spinner/spinner.stories.js +61 -0
- package/dist/collection/components/stepper/step/step.js +3 -0
- package/dist/collection/components/stepper/stepper.css +3 -0
- package/dist/collection/components/stepper/stepper.js +4 -3
- package/dist/collection/components/stepper/stepper.stories.js +95 -0
- package/dist/collection/components/table/table/table.js +4 -3
- package/dist/collection/components/table/table-body/table-body.js +15 -60
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +3 -0
- package/dist/collection/components/table/table-component-basic.stories.js +184 -0
- package/dist/collection/components/table/table-component-batch-actions.stories.js +201 -0
- package/dist/collection/components/table/table-component-bodydata.stories.js +101 -0
- package/dist/collection/components/table/table-component-custom-width.stories.js +174 -0
- package/dist/collection/components/table/table-component-event-listeners.stories.js +193 -0
- package/dist/collection/components/table/table-component-expandable-rows.stories.js +160 -0
- package/dist/collection/components/table/table-component-filtering.stories.js +210 -0
- package/dist/collection/components/table/table-component-multiselect.stories.js +230 -0
- package/dist/collection/components/table/table-component-pagination.stories.js +215 -0
- package/dist/collection/components/table/table-component-sorting.stories.js +238 -0
- package/dist/collection/components/table/table-footer/table-footer.js +65 -54
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
- package/dist/collection/components/table/table-toolbar/table-toolbar.css +2 -1
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +4 -1
- package/dist/collection/components/table/table.filtering.spec.js +0 -6
- package/dist/collection/components/table/table.spec.js +0 -6
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.css +10 -11
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +1 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +5 -5
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.stories.js +105 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.css +13 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +5 -5
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.stories.js +99 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.css +13 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +5 -5
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +101 -0
- package/dist/collection/components/text-field/text-field.js +10 -2
- package/dist/collection/components/text-field/text-field.stories.js +247 -0
- package/dist/collection/components/textarea/textarea.stories.js +188 -0
- package/dist/collection/components/toast/toast.css +32 -25
- package/dist/collection/components/toast/toast.js +17 -33
- package/dist/collection/components/toast/toast.stories.js +79 -0
- package/dist/collection/components/toggle/toggle.js +6 -2
- package/dist/collection/components/toggle/toggle.stories.js +95 -0
- package/dist/collection/components/tooltip/tooltip.js +27 -3
- package/dist/collection/components/tooltip/tooltip.stories.js +128 -0
- package/dist/collection/stories/Installation/installation.stories.js +222 -0
- package/dist/collection/stories/announcements/announce-tegel.stories.js +262 -0
- package/dist/collection/stories/announcements/prefix-change.stories.js +93 -0
- package/dist/collection/stories/foundations/color/color-brand.stories.js +38 -0
- package/dist/collection/stories/foundations/color/color-scales.stories.js +71 -0
- package/dist/collection/stories/foundations/color/color-semantic.stories.js +40 -0
- package/dist/collection/stories/foundations/grid/grid.stories.js +386 -0
- package/dist/collection/stories/foundations/spacing/spacing-element.stories.js +100 -0
- package/dist/collection/stories/foundations/spacing/spacing-layout.stories.js +94 -0
- package/dist/collection/stories/foundations/typography/typography-body.stories.js +16 -0
- package/dist/collection/stories/foundations/typography/typography-detail.stories.js +17 -0
- package/dist/collection/stories/foundations/typography/typography-headline.stories.js +39 -0
- package/dist/collection/stories/foundations/typography/typography-paragraph.stories.js +12 -0
- package/dist/collection/stories/patterns/navigation/navigation-basic.stories.js +85 -0
- package/dist/collection/stories/patterns/navigation/navigation-fewitems.stories.js +259 -0
- package/dist/collection/stories/patterns/navigation/navigation-manyitems.stories.js +246 -0
- package/dist/collection/stories/patterns/navigation/navigation-user-menu.stories.js +140 -0
- package/dist/collection/stories/tegel.stories.js +293 -0
- package/dist/collection/stories/utility/color/background-color.stories.js +96 -0
- package/dist/collection/stories/utility/color/text-color.stories.js +94 -0
- package/dist/collection/utils/utils.js +30 -11
- package/dist/components/checkbox.js +2 -1
- package/dist/components/header-dropdown-list.js +1 -1
- package/dist/components/header-item.js +1 -1
- package/dist/components/popper.js +6 -12
- package/dist/components/side-menu-item.js +1 -1
- package/dist/components/tds-accordion-item.js +1 -1
- package/dist/components/tds-badge.js +4 -4
- package/dist/components/tds-banner.js +12 -13
- package/dist/components/tds-breadcrumb.js +3 -6
- package/dist/components/tds-breadcrumbs.js +0 -3
- package/dist/components/tds-button.js +5 -13
- package/dist/components/tds-card.js +21 -29
- package/dist/components/tds-chip.js +14 -3
- package/dist/components/tds-dropdown-option.js +121 -1
- package/dist/components/tds-dropdown.js +318 -1
- package/dist/components/tds-folder-tab.js +2 -3
- package/dist/components/tds-folder-tabs.js +5 -5
- package/dist/components/tds-footer-group.js +3 -3
- package/dist/components/tds-footer-item.js +1 -1
- package/dist/components/tds-footer.js +7 -8
- package/dist/components/tds-header-cell.js +1 -1
- package/dist/components/tds-header-dropdown-list-user.js +6 -6
- package/dist/components/tds-header-dropdown.js +5 -4
- package/dist/components/tds-header-launcher-grid-title.js +3 -2
- package/dist/components/tds-header-launcher-grid.js +1 -1
- package/dist/components/tds-header-launcher-list-title.js +3 -2
- package/dist/components/tds-header-launcher-list.js +2 -1
- package/dist/components/tds-header-launcher.js +2 -2
- package/dist/components/tds-inline-tab.js +1 -1
- package/dist/components/tds-inline-tabs.js +5 -5
- package/dist/components/tds-link.js +3 -2
- package/dist/components/tds-message.js +4 -4
- package/dist/components/tds-modal.js +14 -5
- package/dist/components/tds-navigation-tab.js +1 -1
- package/dist/components/tds-navigation-tabs.js +5 -5
- package/dist/components/tds-radio-button.js +3 -2
- package/dist/components/tds-side-menu-dropdown.js +1 -1
- package/dist/components/tds-side-menu.js +2 -2
- package/dist/components/tds-slider.js +12 -15
- package/dist/components/tds-stepper.js +3 -2
- package/dist/components/tds-table-body.js +5 -53
- package/dist/components/tds-table-footer.js +50 -42
- package/dist/components/tds-table-toolbar.js +9 -3
- package/dist/components/tds-table.js +2 -1
- package/dist/components/tds-text-field.js +6 -2
- package/dist/components/tds-toast.js +12 -29
- package/dist/components/tds-toggle.js +2 -1
- package/dist/components/tds-tooltip.js +7 -2
- package/dist/components/utils.js +31 -12
- package/dist/esm/index-23ee700b.js +8 -16
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{popper-bfa25c7f.js → popper-15e448b4.js} +6 -12
- package/dist/esm/tds-accordion-item.entry.js +1 -1
- package/dist/esm/tds-badge.entry.js +3 -3
- package/dist/esm/tds-banner.entry.js +10 -10
- package/dist/esm/tds-breadcrumb.entry.js +2 -4
- package/dist/esm/tds-breadcrumbs.entry.js +0 -3
- package/dist/esm/tds-button.entry.js +4 -11
- package/dist/esm/tds-card.entry.js +19 -23
- package/dist/esm/tds-checkbox.entry.js +2 -1
- package/dist/esm/tds-chip.entry.js +15 -4
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/{tds-dropdown-option-v2.entry.js → tds-dropdown-option.entry.js} +5 -5
- package/dist/esm/{tds-dropdown-v2.entry.js → tds-dropdown.entry.js} +19 -19
- package/dist/esm/tds-folder-tab.entry.js +2 -3
- package/dist/esm/tds-folder-tabs.entry.js +5 -5
- package/dist/esm/tds-footer-group.entry.js +3 -3
- package/dist/esm/tds-footer-item.entry.js +1 -1
- package/dist/esm/tds-footer.entry.js +6 -6
- package/dist/esm/tds-header-cell.entry.js +1 -1
- package/dist/esm/tds-header-dropdown-list-user.entry.js +4 -4
- package/dist/esm/tds-header-dropdown-list.entry.js +1 -1
- package/dist/esm/tds-header-dropdown.entry.js +4 -3
- package/dist/esm/tds-header-hamburger.entry.js +1 -1
- package/dist/esm/tds-header-launcher-button.entry.js +1 -1
- package/dist/esm/tds-header-launcher-grid-title.entry.js +3 -2
- package/dist/esm/tds-header-launcher-grid.entry.js +1 -1
- package/dist/esm/tds-header-launcher-list-title.entry.js +3 -2
- package/dist/esm/tds-header-launcher-list.entry.js +2 -1
- package/dist/esm/tds-header-launcher.entry.js +2 -2
- package/dist/esm/tds-header.entry.js +1 -1
- package/dist/esm/tds-inline-tab.entry.js +1 -1
- package/dist/esm/tds-inline-tabs.entry.js +5 -5
- package/dist/esm/tds-link.entry.js +1 -1
- package/dist/esm/tds-message.entry.js +4 -4
- package/dist/esm/tds-modal.entry.js +13 -5
- package/dist/esm/tds-navigation-tab.entry.js +1 -1
- package/dist/esm/tds-navigation-tabs.entry.js +5 -5
- package/dist/esm/tds-popover-canvas.entry.js +1 -1
- package/dist/esm/tds-popover-menu.entry.js +1 -1
- package/dist/esm/tds-radio-button.entry.js +3 -2
- package/dist/esm/tds-side-menu-close-button.entry.js +1 -1
- package/dist/esm/tds-side-menu-dropdown.entry.js +1 -1
- package/dist/esm/tds-side-menu-item.entry.js +1 -1
- package/dist/esm/tds-side-menu.entry.js +2 -2
- package/dist/esm/tds-slider.entry.js +12 -15
- package/dist/esm/tds-stepper.entry.js +3 -2
- package/dist/esm/tds-table-body.entry.js +4 -51
- package/dist/esm/tds-table-footer.entry.js +47 -39
- package/dist/esm/tds-table-toolbar.entry.js +2 -2
- package/dist/esm/tds-table.entry.js +2 -1
- package/dist/esm/tds-text-field.entry.js +7 -3
- package/dist/esm/tds-toast.entry.js +11 -26
- package/dist/esm/tds-toggle.entry.js +2 -1
- package/dist/esm/tds-tooltip.entry.js +6 -2
- package/dist/esm/tegel.js +1 -1
- package/dist/esm/{utils-9ac24735.js → utils-74fb1bed.js} +31 -12
- package/dist/tegel/p-000d60e5.entry.js +1 -0
- package/dist/tegel/p-04bff255.entry.js +1 -0
- package/dist/tegel/p-06093e3e.entry.js +1 -0
- package/dist/tegel/p-099025f0.entry.js +1 -0
- package/dist/tegel/p-0995ca77.entry.js +1 -0
- package/dist/tegel/p-10337d3f.entry.js +1 -0
- package/dist/tegel/p-19fb9ad5.entry.js +1 -0
- package/dist/tegel/p-1bac7d2e.entry.js +1 -0
- package/dist/tegel/p-1c82ccf0.entry.js +1 -0
- package/dist/tegel/p-347414ad.entry.js +1 -0
- package/dist/tegel/p-34a06d2f.entry.js +1 -0
- package/dist/tegel/p-3c9865c3.entry.js +1 -0
- package/dist/tegel/{p-c8d4af09.entry.js → p-40142a58.entry.js} +1 -1
- package/dist/tegel/p-48136431.entry.js +1 -0
- package/dist/tegel/p-49a084db.entry.js +1 -0
- package/dist/tegel/p-4c809685.entry.js +1 -0
- package/dist/tegel/p-54e56257.entry.js +1 -0
- package/dist/tegel/{p-e8fccebc.entry.js → p-56189659.entry.js} +1 -1
- package/dist/tegel/p-6bee84a2.entry.js +1 -0
- package/dist/tegel/p-6f0072cc.entry.js +1 -0
- package/dist/tegel/p-73a8f43e.entry.js +1 -0
- package/dist/tegel/p-8ba77ea3.entry.js +1 -0
- package/dist/tegel/p-8bd0a233.entry.js +1 -0
- package/dist/tegel/{p-e0ee20ee.entry.js → p-8c194dd8.entry.js} +1 -1
- package/dist/tegel/p-95e170f3.entry.js +1 -0
- package/dist/tegel/p-99837611.entry.js +1 -0
- package/dist/tegel/p-9991a816.entry.js +1 -0
- package/dist/tegel/{p-bcb2fad3.entry.js → p-9b29bf68.entry.js} +1 -1
- package/dist/tegel/{p-39227588.js → p-9dc14c21.js} +1 -1
- package/dist/tegel/p-9f1e1cc0.entry.js +1 -0
- package/dist/tegel/{p-232f5889.entry.js → p-9fe0d654.entry.js} +1 -1
- package/dist/tegel/{p-135575ae.entry.js → p-a08be1c3.entry.js} +1 -1
- package/dist/tegel/{p-3aa634ed.entry.js → p-a1ad46d2.entry.js} +1 -1
- package/dist/tegel/p-a34bb501.entry.js +1 -0
- package/dist/tegel/p-a4e3eb95.entry.js +1 -0
- package/dist/tegel/{p-fb3f4a14.entry.js → p-aa443b06.entry.js} +1 -1
- package/dist/tegel/p-afe13096.entry.js +1 -0
- package/dist/tegel/{p-cd2a74d7.entry.js → p-b0d313cd.entry.js} +1 -1
- package/dist/tegel/p-b1067b50.entry.js +1 -0
- package/dist/tegel/{p-7b34156b.entry.js → p-b5424456.entry.js} +1 -1
- package/dist/tegel/p-c15bbe0b.entry.js +1 -0
- package/dist/tegel/p-c411f254.entry.js +1 -0
- package/dist/tegel/p-c5588508.entry.js +1 -0
- package/dist/tegel/{p-b6a16219.entry.js → p-c5ab3a3b.entry.js} +1 -1
- package/dist/tegel/p-d5bd9b2e.entry.js +1 -0
- package/dist/tegel/p-df95f0ae.entry.js +1 -0
- package/dist/tegel/{p-de799b9a.entry.js → p-e24835ba.entry.js} +1 -1
- package/dist/tegel/p-e3f8fc68.entry.js +1 -0
- package/dist/tegel/{p-89283891.entry.js → p-e4dc07bb.entry.js} +1 -1
- package/dist/tegel/p-f36ec03b.entry.js +1 -0
- package/dist/tegel/{p-7331ec7b.entry.js → p-f795bc11.entry.js} +1 -1
- package/dist/tegel/{p-7d3a66ae.entry.js → p-f9d04ff2.entry.js} +1 -1
- package/dist/tegel/p-fc6da19c.entry.js +1 -0
- package/dist/tegel/tegel.css +2 -2
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +3 -0
- package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
- package/dist/types/components/badge/badge.stories.d.ts +73 -0
- package/dist/types/components/banner/banner.d.ts +7 -2
- package/dist/types/components/banner/banner.stories.d.ts +82 -0
- package/dist/types/components/block/block.stories.d.ts +32 -0
- package/dist/types/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +0 -2
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +0 -1
- package/dist/types/components/breadcrumbs/breadcrumbs.stories.d.ts +16 -0
- package/dist/types/components/button/button.d.ts +3 -1
- package/dist/types/components/button/button.stories.d.ts +133 -0
- package/dist/types/components/card/card.d.ts +11 -9
- package/dist/types/components/card/card.stories.d.ts +128 -0
- package/dist/types/components/checkbox/checkbox.d.ts +3 -0
- package/dist/types/components/checkbox/checkbox.stories.d.ts +52 -0
- package/dist/types/components/chip/chip.d.ts +6 -0
- package/dist/types/components/chip/chip.stories.d.ts +99 -0
- package/dist/types/components/datetime/datetime.stories.d.ts +125 -0
- package/dist/types/components/divider/divider.stories.d.ts +58 -0
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +28 -17
- package/dist/types/components/dropdown/dropdown.d.ts +79 -54
- package/dist/types/components/dropdown/dropdown.stories.d.ts +183 -0
- package/dist/types/components/footer/footer-group/footer-group.d.ts +1 -1
- package/dist/types/components/footer/footer.d.ts +5 -3
- package/dist/types/components/footer/footer.stories.d.ts +44 -0
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +5 -1
- package/dist/types/components/header/header-dropdown-list-user/header-dropdown-list-user.d.ts +8 -4
- package/dist/types/components/header/header.d.ts +5 -0
- package/dist/types/components/header/header.stories.d.ts +31 -0
- package/dist/types/components/icon/icon.stories.d.ts +36 -0
- package/dist/types/components/link/link.stories.d.ts +44 -0
- package/dist/types/components/message/message.d.ts +3 -0
- package/dist/types/components/message/message.stories.d.ts +88 -0
- package/dist/types/components/modal/modal.d.ts +9 -3
- package/dist/types/components/modal/modal.stories.d.ts +70 -0
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +1 -1
- package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +27 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +1 -1
- package/dist/types/components/popover-menu/popover-menu.stories.d.ts +40 -0
- package/dist/types/components/radio-button/radio-button.d.ts +3 -0
- package/dist/types/components/radio-button/radio-button.stories.d.ts +39 -0
- package/dist/types/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-dropdown/side-menu-dropdown.d.ts +5 -0
- package/dist/types/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-item/side-menu-item.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-user/side-menu-user.d.ts +3 -0
- package/dist/types/components/side-menu/side-menu-user-image/side-menu-user-image.d.ts +4 -0
- package/dist/types/components/side-menu/side-menu.d.ts +8 -0
- package/dist/types/components/side-menu/side-menu.stories.d.ts +53 -0
- package/dist/types/components/slider/slider.d.ts +0 -1
- package/dist/types/components/slider/slider.stories.d.ts +235 -0
- package/dist/types/components/spinner/spinner.stories.d.ts +46 -0
- package/dist/types/components/stepper/step/step.d.ts +3 -0
- package/dist/types/components/stepper/stepper.stories.d.ts +80 -0
- package/dist/types/components/table/table-body/table-body.d.ts +6 -3
- package/dist/types/components/table/table-body-row-expandable/table-body-row-expandable.d.ts +3 -0
- package/dist/types/components/table/table-component-basic.stories.d.ts +144 -0
- package/dist/types/components/table/table-component-batch-actions.stories.d.ts +139 -0
- package/dist/types/components/table/table-component-bodydata.stories.d.ts +35 -0
- package/dist/types/components/table/table-component-custom-width.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-event-listeners.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-expandable-rows.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-filtering.stories.d.ts +139 -0
- package/dist/types/components/table/table-component-multiselect.stories.d.ts +144 -0
- package/dist/types/components/table/table-component-pagination.stories.d.ts +131 -0
- package/dist/types/components/table/table-component-sorting.stories.d.ts +183 -0
- package/dist/types/components/table/table-footer/table-footer.d.ts +7 -7
- package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +3 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs.stories.d.ts +69 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.stories.d.ts +61 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +61 -0
- package/dist/types/components/text-field/text-field.d.ts +5 -0
- package/dist/types/components/text-field/text-field.stories.d.ts +201 -0
- package/dist/types/components/textarea/textarea.stories.d.ts +139 -0
- package/dist/types/components/toast/toast.d.ts +5 -4
- package/dist/types/components/toast/toast.stories.d.ts +56 -0
- package/dist/types/components/toggle/toggle.d.ts +3 -0
- package/dist/types/components/toggle/toggle.stories.d.ts +74 -0
- package/dist/types/components/tooltip/tooltip.d.ts +3 -1
- package/dist/types/components/tooltip/tooltip.stories.d.ts +66 -0
- package/dist/types/components.d.ts +105 -393
- package/dist/types/stories/Installation/installation.stories.d.ts +7 -0
- package/dist/types/stories/announcements/announce-tegel.stories.d.ts +6 -0
- package/dist/types/stories/announcements/prefix-change.stories.d.ts +6 -0
- package/dist/types/stories/foundations/color/color-brand.stories.d.ts +13 -0
- package/dist/types/stories/foundations/color/color-scales.stories.d.ts +30 -0
- package/dist/types/stories/foundations/color/color-semantic.stories.d.ts +13 -0
- package/dist/types/stories/foundations/grid/grid.stories.d.ts +35 -0
- package/dist/types/stories/foundations/spacing/spacing-element.stories.d.ts +8 -0
- package/dist/types/stories/foundations/spacing/spacing-layout.stories.d.ts +8 -0
- package/dist/types/stories/foundations/typography/typography-body.stories.d.ts +8 -0
- package/dist/types/stories/foundations/typography/typography-detail.stories.d.ts +8 -0
- package/dist/types/stories/foundations/typography/typography-headline.stories.d.ts +21 -0
- package/dist/types/stories/foundations/typography/typography-paragraph.stories.d.ts +8 -0
- package/dist/types/stories/patterns/navigation/navigation-basic.stories.d.ts +23 -0
- package/dist/types/stories/patterns/navigation/navigation-fewitems.stories.d.ts +23 -0
- package/dist/types/stories/patterns/navigation/navigation-manyitems.stories.d.ts +38 -0
- package/dist/types/stories/patterns/navigation/navigation-user-menu.stories.d.ts +33 -0
- package/dist/types/stories/tegel.stories.d.ts +6 -0
- package/dist/types/stories/utility/color/background-color.stories.d.ts +64 -0
- package/dist/types/stories/utility/color/text-color.stories.d.ts +64 -0
- package/dist/types/utils/utils.d.ts +20 -6
- package/package.json +21 -24
- package/dist/cjs/tds-dropdown-filter.cjs.entry.js +0 -96
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +0 -339
- package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +0 -380
- package/dist/collection/components/dropdown-v2/dropdown-option-v2/dropdown-option-v2.js +0 -216
- package/dist/collection/components/dropdown-v2/dropdown-v2.css +0 -286
- package/dist/collection/components/dropdown-v2/dropdown-v2.js +0 -726
- package/dist/components/dropdown-option.js +0 -104
- package/dist/components/dropdown.js +0 -304
- package/dist/components/tds-dropdown-filter.d.ts +0 -11
- package/dist/components/tds-dropdown-filter.js +0 -150
- package/dist/components/tds-dropdown-option-v2.d.ts +0 -11
- package/dist/components/tds-dropdown-option-v2.js +0 -126
- package/dist/components/tds-dropdown-v2.d.ts +0 -11
- package/dist/components/tds-dropdown-v2.js +0 -323
- package/dist/esm/tds-dropdown-filter.entry.js +0 -92
- package/dist/esm/tds-dropdown_2.entry.js +0 -334
- package/dist/tegel/p-07e5df94.entry.js +0 -1
- package/dist/tegel/p-0a3e7512.entry.js +0 -1
- package/dist/tegel/p-0e55d72f.entry.js +0 -1
- package/dist/tegel/p-107d3da8.entry.js +0 -1
- package/dist/tegel/p-13b02a4f.entry.js +0 -1
- package/dist/tegel/p-19e9addd.entry.js +0 -1
- package/dist/tegel/p-1fb5c5d4.entry.js +0 -1
- package/dist/tegel/p-2bee16f6.entry.js +0 -1
- package/dist/tegel/p-2e2c91c4.entry.js +0 -1
- package/dist/tegel/p-330ed982.entry.js +0 -1
- package/dist/tegel/p-3604b5d3.entry.js +0 -1
- package/dist/tegel/p-375e361b.entry.js +0 -1
- package/dist/tegel/p-55dc4711.entry.js +0 -1
- package/dist/tegel/p-59f1cb9b.entry.js +0 -1
- package/dist/tegel/p-5a6aba01.entry.js +0 -1
- package/dist/tegel/p-60733f89.entry.js +0 -1
- package/dist/tegel/p-6a530c2f.entry.js +0 -1
- package/dist/tegel/p-732256e0.entry.js +0 -1
- package/dist/tegel/p-76f941e8.entry.js +0 -1
- package/dist/tegel/p-7b0853e6.entry.js +0 -1
- package/dist/tegel/p-90686bc7.entry.js +0 -1
- package/dist/tegel/p-95da9b7f.entry.js +0 -1
- package/dist/tegel/p-99f540db.entry.js +0 -1
- package/dist/tegel/p-9bcc42cf.entry.js +0 -1
- package/dist/tegel/p-9f57d275.entry.js +0 -1
- package/dist/tegel/p-9fe384ad.entry.js +0 -1
- package/dist/tegel/p-a5604352.entry.js +0 -1
- package/dist/tegel/p-acb62b52.entry.js +0 -1
- package/dist/tegel/p-aeffa257.entry.js +0 -1
- package/dist/tegel/p-b8d88873.entry.js +0 -1
- package/dist/tegel/p-beb8a6bd.entry.js +0 -1
- package/dist/tegel/p-c90a247c.entry.js +0 -1
- package/dist/tegel/p-ca4527de.entry.js +0 -1
- package/dist/tegel/p-cf4cfc54.entry.js +0 -1
- package/dist/tegel/p-d3f5cf74.entry.js +0 -1
- package/dist/tegel/p-d67d67be.entry.js +0 -1
- package/dist/tegel/p-da4c92b9.entry.js +0 -1
- package/dist/tegel/p-f6206d3c.entry.js +0 -1
- package/dist/tegel/p-fc47d911.entry.js +0 -1
- package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +0 -47
- package/dist/types/components/dropdown-v2/dropdown-option-v2/dropdown-option-v2.d.ts +0 -35
- package/dist/types/components/dropdown-v2/dropdown-v2.d.ts +0 -86
- /package/dist/collection/components/{dropdown-v2/dropdown-option-v2/dropdown-option-v2.css → dropdown/dropdown-option/dropdown-option.css} +0 -0
- /package/dist/tegel/{p-9d707f6e.js → p-7c0dcd00.js} +0 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Patterns/Navigation',
|
|
5
|
+
parameters: {
|
|
6
|
+
notes: {
|
|
7
|
+
Readme: readme,
|
|
8
|
+
},
|
|
9
|
+
layout: 'fullscreen',
|
|
10
|
+
docs: {
|
|
11
|
+
source: {
|
|
12
|
+
state: 'closed',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
design: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Figma',
|
|
18
|
+
type: 'figma',
|
|
19
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=11142%3A42941&t=Ne6myqwca5m00de7-1',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Link',
|
|
23
|
+
type: 'link',
|
|
24
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=11142%3A42941&t=Ne6myqwca5m00de7-1',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
},
|
|
28
|
+
argTypes: {
|
|
29
|
+
siteName: {
|
|
30
|
+
name: 'Site name',
|
|
31
|
+
description: 'Set a custom title for the Header.',
|
|
32
|
+
control: {
|
|
33
|
+
type: 'text',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
args: {
|
|
38
|
+
siteName: 'Application',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const Template = () => formatHtmlPreview(`
|
|
42
|
+
<script>
|
|
43
|
+
/* For demonstration purposes only. Do this in the preferred way of your framework instead. */
|
|
44
|
+
window.demoSideMenu = document.querySelector('#demo-side-menu');
|
|
45
|
+
window.demoHamburger = document.querySelector('#demo-hamburger');
|
|
46
|
+
</script>
|
|
47
|
+
<style>
|
|
48
|
+
/* If an extra button in the Header is required except on
|
|
49
|
+
very narrow screens, you can use classes like these: */
|
|
50
|
+
.demo-hide {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (min-width: 992px) {
|
|
55
|
+
.demo-xs-hide {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
.demo-xs-show {
|
|
59
|
+
display: block;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<div class="demo-layout">
|
|
66
|
+
<tds-header>
|
|
67
|
+
<tds-header-hamburger class="demo-xs-hide" onclick="demoSideMenu.open = true;demoHamburger.setAttribute('aria-expanded', true);" aria-label="Open application drawer" aria-haspopup="true" aria-expanded="false"></tds-header-hamburger>
|
|
68
|
+
|
|
69
|
+
<tds-header-title>
|
|
70
|
+
Example: User menu
|
|
71
|
+
</tds-header-title>
|
|
72
|
+
|
|
73
|
+
<tds-header-launcher slot="end">
|
|
74
|
+
<tds-header-launcher-list-title>Sustainable tools</tds-header-launcher-list-title>
|
|
75
|
+
<tds-header-launcher-list>
|
|
76
|
+
<tds-header-launcher-list-item>
|
|
77
|
+
<a href="https://tegel.scania.com">Button</a>
|
|
78
|
+
</tds-header-launcher-list-item>
|
|
79
|
+
<tds-header-launcher-list-item>
|
|
80
|
+
<a href="https://tegel.scania.com">Button</a>
|
|
81
|
+
</tds-header-launcher-list-item>
|
|
82
|
+
</tds-header-launcher-list>
|
|
83
|
+
</tds-header-launcher>
|
|
84
|
+
|
|
85
|
+
<tds-header-dropdown slot="end" class="demo-hide demo-xs-show" no-dropdown-icon selected>
|
|
86
|
+
<img slot="icon" src="https://www.svgrepo.com/show/384676/account-avatar-profile-user-6.svg" alt="User menu."/>
|
|
87
|
+
<tds-header-dropdown-list type="lg">
|
|
88
|
+
<tds-header-dropdown-list-user
|
|
89
|
+
header="Name Nameson"
|
|
90
|
+
subheader="Company name">
|
|
91
|
+
</tds-header-dropdown-list-user>
|
|
92
|
+
<tds-header-dropdown-list-item selected>
|
|
93
|
+
<a href="https://www.scania.com">My Instructions</a>
|
|
94
|
+
</tds-header-dropdown-list-item>
|
|
95
|
+
<tds-header-dropdown-list-item>
|
|
96
|
+
<a href="https://www.scania.com">Task List</a>
|
|
97
|
+
</tds-header-dropdown-list-item>
|
|
98
|
+
</tds-header-dropdown-list>
|
|
99
|
+
</tds-header-dropdown>
|
|
100
|
+
|
|
101
|
+
<tds-header-brand-symbol slot="end">
|
|
102
|
+
<a aria-label="Scania - red gryphon on blue shield" href="https://scania.com"></a>
|
|
103
|
+
</tds-header-brand-symbol>
|
|
104
|
+
|
|
105
|
+
</tds-header>
|
|
106
|
+
|
|
107
|
+
<tds-side-menu id="demo-side-menu" aria-label="Side menu">
|
|
108
|
+
<tds-side-menu-overlay slot="overlay" onclick="demoSideMenu.open = false;demoHamburger.setAttribute('aria-expanded', false);"></tds-side-menu-overlay>
|
|
109
|
+
|
|
110
|
+
<tds-side-menu-close-button slot="close-button" onclick="demoSideMenu.open = false;demoHamburger.setAttribute('aria-expanded', false);"></tds-side-menu-close-button>
|
|
111
|
+
|
|
112
|
+
<tds-side-menu-dropdown slot="end" class="demo-xs-hide" selected default-open>
|
|
113
|
+
<tds-side-menu-user
|
|
114
|
+
slot="button-label"
|
|
115
|
+
heading="Name Namesson"
|
|
116
|
+
subheading="Company name"
|
|
117
|
+
img-src="https://www.svgrepo.com/show/384676/account-avatar-profile-user-6.svg"
|
|
118
|
+
img-alt="">
|
|
119
|
+
</tds-side-menu-user>
|
|
120
|
+
<tds-side-menu-dropdown-list type="lg">
|
|
121
|
+
<tds-side-menu-dropdown-list-item selected>
|
|
122
|
+
<a href="https://www.scania.com">My Instructions</a>
|
|
123
|
+
</tds-side-menu-dropdown-list-item>
|
|
124
|
+
<tds-side-menu-dropdown-list-item>
|
|
125
|
+
<a href="https://www.scania.com">Task List</a>
|
|
126
|
+
</tds-side-menu-dropdown-list-item>
|
|
127
|
+
</tds-side-menu-dropdown-list>
|
|
128
|
+
</tds-side-menu-dropdown>
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
</tds-side-menu>
|
|
132
|
+
|
|
133
|
+
<main class="demo-main tds-u-p3" style="box-sizing: border-box;">
|
|
134
|
+
<p>If you display a user menu, a side menu is needed to show it on extra small screens.</p>
|
|
135
|
+
<br/>
|
|
136
|
+
<p><i>Tip: Resize the window to see the user menu move in to a side menu drawer.</i></p>
|
|
137
|
+
</main>
|
|
138
|
+
</div>
|
|
139
|
+
`);
|
|
140
|
+
export const UserMenu = Template.bind({});
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
const meta = {
|
|
2
|
+
title: 'Intro/Tegel Design System',
|
|
3
|
+
parameters: {
|
|
4
|
+
layout: 'fullscreen',
|
|
5
|
+
options: {
|
|
6
|
+
showPanel: false,
|
|
7
|
+
showToolbar: false,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const TegelDesignSystem = {
|
|
13
|
+
render: () => `<style>
|
|
14
|
+
article {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
max-width: 688px;
|
|
17
|
+
padding: 32px;
|
|
18
|
+
margin: auto;
|
|
19
|
+
> * {
|
|
20
|
+
margin-bottom: 72px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
section > p,
|
|
25
|
+
section > ul,
|
|
26
|
+
section > tds-link {
|
|
27
|
+
margin-bottom: 32px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
tds-link {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mb-72 {
|
|
35
|
+
margin-bottom: 72px;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
<tds-banner type="information" icon="information" header="We are moving away from the sdds prefix!">
|
|
40
|
+
<tds-link slot="banner-link">
|
|
41
|
+
<a target="_self" href="?path=/story/intro-announcements--prefix-change">
|
|
42
|
+
Read more here!
|
|
43
|
+
</a>
|
|
44
|
+
</tds-link>
|
|
45
|
+
</tds-banner>
|
|
46
|
+
|
|
47
|
+
<article class="tds-body-01">
|
|
48
|
+
<section>
|
|
49
|
+
<h1 class="tds-headline-02 mb-72">Tegel Design System</h1>
|
|
50
|
+
<p class="tds-paragraph-01 mb-72">The design system supports the design and development of digital solutions at
|
|
51
|
+
Scania. The purpose is to secure a
|
|
52
|
+
coherent, premium brand and user experience across all of Scania's digital touchpoints.
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
<tds-link>
|
|
56
|
+
<a href="https://tegel.scania.com/">
|
|
57
|
+
https://tegel.scania.com/
|
|
58
|
+
</a>
|
|
59
|
+
</tds-link>
|
|
60
|
+
</section>
|
|
61
|
+
<section>
|
|
62
|
+
<h4 class="tds-u-mb2">Status</h4>
|
|
63
|
+
|
|
64
|
+
<p>
|
|
65
|
+
This package is currently in a <b>pre-beta</b> stage. We are now working hard towards a 1.0-beta release,
|
|
66
|
+
but if
|
|
67
|
+
you
|
|
68
|
+
want to try out the package today you can! It's available via <tds-link><a href="https://www.npmjs.com/package/@scania/tegel">NPM</a></tds-link> and can be installed using the
|
|
69
|
+
installation
|
|
70
|
+
guide which you can find <tds-link><a target="_self" href="?path=/story/intro-installation--page">here.</a></tds-link>
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
</section>
|
|
74
|
+
<section>
|
|
75
|
+
<h4 class="tds-u-mb2">@scania/tegel 🧱</h4>
|
|
76
|
+
|
|
77
|
+
<p>
|
|
78
|
+
<b>TLDR;</b> The new @scania/tegel package is an improvement and continuation of the previous
|
|
79
|
+
@scania/component,
|
|
80
|
+
@scania/theme-light, and @scania/icons packages. It simplifies the installation process and ships with types
|
|
81
|
+
which offers type safety and improves the developer experience with intellisence and autocompletion.
|
|
82
|
+
</p>
|
|
83
|
+
<p>
|
|
84
|
+
The new
|
|
85
|
+
package includes all components as web components, removes the old "native" components and makes the
|
|
86
|
+
installation and updates easier. The current prefix for components, CSS variables, and utility classes -
|
|
87
|
+
"sdds",
|
|
88
|
+
will be changed. We have also created a new Storybook for @scania/tegel, which allows developers and
|
|
89
|
+
designers
|
|
90
|
+
to preview all variants of the components by changing the props.
|
|
91
|
+
</p>
|
|
92
|
+
</section>
|
|
93
|
+
<section>
|
|
94
|
+
<h4 class="tds-u-mb2">
|
|
95
|
+
What is @scania/tegel? 🧱
|
|
96
|
+
</h4>
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
<p>
|
|
102
|
+
In short, the new @scania/tegel package is an improvement and continuation of the previous
|
|
103
|
+
@scania/component,
|
|
104
|
+
@scania/theme-light and @scania/icons packages. These three packages have now instead been merged into one
|
|
105
|
+
to
|
|
106
|
+
simplify both the installation process, but also to make it easier for us to maintain and keep improving
|
|
107
|
+
going
|
|
108
|
+
forward.
|
|
109
|
+
</p>
|
|
110
|
+
<p>
|
|
111
|
+
The new @scania/tegel is also shipped with types. This makes integrations in other Stenciljs
|
|
112
|
+
projects
|
|
113
|
+
possible, but also improves the developer experience with intellisence and autocompletion, and of course
|
|
114
|
+
type
|
|
115
|
+
safety. In this work we have also bumped the Stenciljs version (the compiler used to build our components)
|
|
116
|
+
to
|
|
117
|
+
the
|
|
118
|
+
latest major.
|
|
119
|
+
</p>
|
|
120
|
+
<p>
|
|
121
|
+
And we have saved the best for last, @scania/tegel is 100% web component. Previous packages
|
|
122
|
+
had
|
|
123
|
+
some
|
|
124
|
+
web components, but also "native" components, these were utility classes that could be added to a predefined
|
|
125
|
+
HTML
|
|
126
|
+
structure to create the look and feel of Tegel. Now we are making a big effort to provide all components as
|
|
127
|
+
web
|
|
128
|
+
components.
|
|
129
|
+
</p>
|
|
130
|
+
</section>
|
|
131
|
+
<section>
|
|
132
|
+
<h4 class="tds-u-mb2">
|
|
133
|
+
What improvements does @scania/tegel have? 🚀
|
|
134
|
+
</h4>
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
<p>
|
|
138
|
+
So, what we are striving for in the new package is:
|
|
139
|
+
|
|
140
|
+
<ul>
|
|
141
|
+
<li>Easy installation and updates</li>
|
|
142
|
+
<li>A clear and intuitive API</li>
|
|
143
|
+
<li>Types to be included in package bundle</li>
|
|
144
|
+
<li>All input elements to work within a form</li>
|
|
145
|
+
<li>Only web components</li>
|
|
146
|
+
<li>Dark mode</li>
|
|
147
|
+
<li>Improved interactive documentation - Storybook</li>
|
|
148
|
+
</ul>
|
|
149
|
+
|
|
150
|
+
<p>
|
|
151
|
+
With this new package we are creating a foundation for us to stand on going forward. We will keep improving
|
|
152
|
+
and
|
|
153
|
+
maintaining it after its initial release and with the changes we are introducing now we hope to be able to
|
|
154
|
+
do
|
|
155
|
+
this as
|
|
156
|
+
smoothly as possible.
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
</p>
|
|
162
|
+
</section>
|
|
163
|
+
<section>
|
|
164
|
+
<h4 class="tds-u-mb2">
|
|
165
|
+
Removing "native" components ❌
|
|
166
|
+
</h4>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<p>
|
|
170
|
+
With this new package we are also removing our "native" components and instead introducing web component
|
|
171
|
+
counterparts to these. This means that every component that was available as a "native" component in
|
|
172
|
+
@scania/components will have a web component alternative in @scania/tegel. This removal will be done in our
|
|
173
|
+
next
|
|
174
|
+
release of @scania/tegel. This change does not change the current @scania/components package.
|
|
175
|
+
|
|
176
|
+
</p>
|
|
177
|
+
</section>
|
|
178
|
+
<section>
|
|
179
|
+
<h4 class="tds-u-mb2">
|
|
180
|
+
Prefix change 🔁
|
|
181
|
+
</h4>
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
<tds-link class="tds-u-mt2 tds-body-01">
|
|
185
|
+
<a target="_self" href="?path=/story/intro-announcements--prefix-change">Read more here.</a>
|
|
186
|
+
</tds-link>
|
|
187
|
+
<p>
|
|
188
|
+
We are also working on a prefix change for our new package. Instead of "sdds" the components, CSS variables
|
|
189
|
+
and
|
|
190
|
+
utility classes will instead be prefixed with something else, for example:
|
|
191
|
+
<ul>
|
|
192
|
+
<li> <{prefix}-button /> </li>
|
|
193
|
+
<li> --{prefix}-button-color </li>
|
|
194
|
+
<li>.{prefix}-u-flex</li>
|
|
195
|
+
</ul>
|
|
196
|
+
<p>
|
|
197
|
+
This is done to have a clear distinction between what was @scania/components and what is @scania/tegel. What
|
|
198
|
+
it
|
|
199
|
+
also
|
|
200
|
+
does is that it enables the two solutions to be installed alongside each other. This means that your
|
|
201
|
+
migration
|
|
202
|
+
can
|
|
203
|
+
be
|
|
204
|
+
done incrementally.
|
|
205
|
+
</p>
|
|
206
|
+
</p>
|
|
207
|
+
</section>
|
|
208
|
+
<section>
|
|
209
|
+
<h4 class="tds-u-mb1">
|
|
210
|
+
Migration docs 📜
|
|
211
|
+
</h4>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
<p>
|
|
215
|
+
Migrations are always hard, but during the last couple of months we have put a lot of effort into creating a
|
|
216
|
+
"migration document", which explains and highlights all the changes in our API from version 4 of
|
|
217
|
+
@scania/components
|
|
218
|
+
and @scania/tegel. We hope that this will ease your migration to our new package. The migration document
|
|
219
|
+
will
|
|
220
|
+
continue to be updated until we release 1.0 and is available
|
|
221
|
+
<tds-link><a target="_self"
|
|
222
|
+
href="?path=/story/intro-migrating-from-components-v4--page">here.</a></tds-link>
|
|
223
|
+
</p>
|
|
224
|
+
</section>
|
|
225
|
+
<section>
|
|
226
|
+
<h4 class="tds-u-mb1">
|
|
227
|
+
Support for @scania/components 🤳
|
|
228
|
+
</h4>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<p>
|
|
232
|
+
We will keep supporting @scania/components for a short while going forward, however we see no major
|
|
233
|
+
updates
|
|
234
|
+
being
|
|
235
|
+
done to the package. This means we will keep answering and helping with support questions and do
|
|
236
|
+
minor
|
|
237
|
+
releases with
|
|
238
|
+
bugfixes, but we are not introducing any new features.
|
|
239
|
+
|
|
240
|
+
</p>
|
|
241
|
+
</section>
|
|
242
|
+
<section>
|
|
243
|
+
<h4 class="tds-u-mb1">
|
|
244
|
+
When can I try our @scania/tegel? 🧪
|
|
245
|
+
</h4>
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
<p>
|
|
249
|
+
Today! Some of you have already tried this package out, and provided us with valuable feedback,
|
|
250
|
+
thank
|
|
251
|
+
you!
|
|
252
|
+
But
|
|
253
|
+
please note that this package is still in beta and breaking changes are to be expected before we
|
|
254
|
+
release
|
|
255
|
+
1.0. The
|
|
256
|
+
package is available via npm and an installation guide is available <tds-link><a
|
|
257
|
+
href="https://www.npmjs.com/package/@scania/tegel">here.</a></tds-link>
|
|
258
|
+
|
|
259
|
+
</p>
|
|
260
|
+
</section>
|
|
261
|
+
<section>
|
|
262
|
+
|
|
263
|
+
<h4 class="tds-u-mb1">
|
|
264
|
+
Want to get in touch? 📞
|
|
265
|
+
</h4>
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
<p>
|
|
269
|
+
Awesome! We are available via teams and have two support channels. One for
|
|
270
|
+
<tds-link>
|
|
271
|
+
<a
|
|
272
|
+
href="https://teams.microsoft.com/l/channel/19%3a5e33f67fe502441f914fbcdc6e2548f5%40thread.skype/Development%2520support?groupId=79f9bfeb-73e2-424d-9477-b236191ece5e&tenantId=3bc062e4-ac9d-4c17-b4dd-3aad637ff1ac">development</a>
|
|
273
|
+
</tds-link>
|
|
274
|
+
and one for
|
|
275
|
+
<tds-link>
|
|
276
|
+
<a
|
|
277
|
+
href="https://teams.microsoft.com/l/channel/19%3A8d30ded56af14672b471062ec1e66345%40thread.skype/Design%2520support?groupId=79f9bfeb-73e2-424d-9477-b236191ece5e&tenantId=3bc062e4-ac9d-4c17-b4dd-3aad637ff1ac">design.</a>
|
|
278
|
+
|
|
279
|
+
</tds-link>
|
|
280
|
+
If you want to submit a bug report or feature request, please do so via our
|
|
281
|
+
<tds-link>
|
|
282
|
+
<a href="https://github.com/scania-digital-design-system/tegel/issues">GitHub</a>
|
|
283
|
+
</tds-link>.
|
|
284
|
+
|
|
285
|
+
<p>
|
|
286
|
+
All the best,<br />
|
|
287
|
+
The Tegel Team.
|
|
288
|
+
</p>
|
|
289
|
+
</p>
|
|
290
|
+
</section>
|
|
291
|
+
</article>
|
|
292
|
+
`,
|
|
293
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../../utils/utils';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Utilities/Colors',
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: 'centered',
|
|
6
|
+
},
|
|
7
|
+
argTypes: {
|
|
8
|
+
backgroundColor: {
|
|
9
|
+
name: 'Background color',
|
|
10
|
+
description: 'The color of the text',
|
|
11
|
+
control: {
|
|
12
|
+
type: 'select',
|
|
13
|
+
},
|
|
14
|
+
options: { Red: 'red', Blue: 'blue', Grey: 'grey' },
|
|
15
|
+
},
|
|
16
|
+
greyScale: {
|
|
17
|
+
name: 'Scale',
|
|
18
|
+
description: 'The color scale used.',
|
|
19
|
+
control: {
|
|
20
|
+
type: 'select',
|
|
21
|
+
},
|
|
22
|
+
options: [
|
|
23
|
+
'50',
|
|
24
|
+
'100',
|
|
25
|
+
'200',
|
|
26
|
+
'300',
|
|
27
|
+
'400',
|
|
28
|
+
'500',
|
|
29
|
+
'600',
|
|
30
|
+
'700',
|
|
31
|
+
'800',
|
|
32
|
+
'846',
|
|
33
|
+
'868',
|
|
34
|
+
'900',
|
|
35
|
+
'958',
|
|
36
|
+
],
|
|
37
|
+
if: { arg: 'backgroundColor', eq: 'grey' },
|
|
38
|
+
},
|
|
39
|
+
redScale: {
|
|
40
|
+
name: 'Scale',
|
|
41
|
+
description: 'The color scale used.',
|
|
42
|
+
control: {
|
|
43
|
+
type: 'select',
|
|
44
|
+
},
|
|
45
|
+
options: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
|
46
|
+
if: { arg: 'backgroundColor', eq: 'red' },
|
|
47
|
+
},
|
|
48
|
+
blueScale: {
|
|
49
|
+
name: 'Scale',
|
|
50
|
+
description: 'The color scale used.',
|
|
51
|
+
control: {
|
|
52
|
+
type: 'select',
|
|
53
|
+
},
|
|
54
|
+
options: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
|
55
|
+
if: { arg: 'backgroundColor', eq: 'blue' },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
args: {
|
|
59
|
+
backgroundColor: 'blue',
|
|
60
|
+
blueScale: '500',
|
|
61
|
+
redScale: '500',
|
|
62
|
+
greyScale: '958',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
const Template = ({ backgroundColor, greyScale, blueScale, redScale }) => {
|
|
66
|
+
let scale = 100;
|
|
67
|
+
switch (backgroundColor) {
|
|
68
|
+
case 'blue':
|
|
69
|
+
scale = blueScale;
|
|
70
|
+
break;
|
|
71
|
+
case 'grey':
|
|
72
|
+
scale = greyScale;
|
|
73
|
+
break;
|
|
74
|
+
case 'red':
|
|
75
|
+
scale = redScale;
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
scale = blueScale;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return formatHtmlPreview(`
|
|
82
|
+
<style>
|
|
83
|
+
.demo-wrapper{
|
|
84
|
+
height: 400px;
|
|
85
|
+
width: 400px;
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
align-items: center;
|
|
89
|
+
}
|
|
90
|
+
</style>
|
|
91
|
+
<div class="tds-background-${backgroundColor}-${scale} demo-wrapper">
|
|
92
|
+
<h1>background-color:${backgroundColor}</h1>
|
|
93
|
+
</div>
|
|
94
|
+
`);
|
|
95
|
+
};
|
|
96
|
+
export const BackgroundColor = Template.bind({});
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../../utils/utils';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Utilities/Colors',
|
|
4
|
+
parameters: {
|
|
5
|
+
layout: 'centered',
|
|
6
|
+
},
|
|
7
|
+
argTypes: {
|
|
8
|
+
color: {
|
|
9
|
+
name: 'Color',
|
|
10
|
+
description: 'The color of the text',
|
|
11
|
+
control: {
|
|
12
|
+
type: 'select',
|
|
13
|
+
},
|
|
14
|
+
options: { Red: 'red', Blue: 'blue', Grey: 'grey' },
|
|
15
|
+
},
|
|
16
|
+
greyScale: {
|
|
17
|
+
name: 'Scale',
|
|
18
|
+
description: 'The color scale used.',
|
|
19
|
+
control: {
|
|
20
|
+
type: 'select',
|
|
21
|
+
},
|
|
22
|
+
options: [
|
|
23
|
+
'50',
|
|
24
|
+
'100',
|
|
25
|
+
'200',
|
|
26
|
+
'300',
|
|
27
|
+
'400',
|
|
28
|
+
'500',
|
|
29
|
+
'600',
|
|
30
|
+
'700',
|
|
31
|
+
'800',
|
|
32
|
+
'846',
|
|
33
|
+
'868',
|
|
34
|
+
'900',
|
|
35
|
+
'958',
|
|
36
|
+
],
|
|
37
|
+
if: { arg: 'color', eq: 'grey' },
|
|
38
|
+
},
|
|
39
|
+
redScale: {
|
|
40
|
+
name: 'Scale',
|
|
41
|
+
description: 'The color scale used.',
|
|
42
|
+
control: {
|
|
43
|
+
type: 'select',
|
|
44
|
+
},
|
|
45
|
+
options: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
|
46
|
+
if: { arg: 'color', eq: 'red' },
|
|
47
|
+
},
|
|
48
|
+
blueScale: {
|
|
49
|
+
name: 'Scale',
|
|
50
|
+
description: 'The color scale used.',
|
|
51
|
+
control: {
|
|
52
|
+
type: 'select',
|
|
53
|
+
},
|
|
54
|
+
options: ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'],
|
|
55
|
+
if: { arg: 'color', eq: 'blue' },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
args: {
|
|
59
|
+
color: 'blue',
|
|
60
|
+
blueScale: '500',
|
|
61
|
+
redScale: '500',
|
|
62
|
+
greyScale: '958',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
const Template = ({ color, greyScale, blueScale, redScale }) => {
|
|
66
|
+
let scale = 100;
|
|
67
|
+
switch (color) {
|
|
68
|
+
case 'blue':
|
|
69
|
+
scale = blueScale;
|
|
70
|
+
break;
|
|
71
|
+
case 'grey':
|
|
72
|
+
scale = greyScale;
|
|
73
|
+
break;
|
|
74
|
+
case 'red':
|
|
75
|
+
scale = redScale;
|
|
76
|
+
break;
|
|
77
|
+
default:
|
|
78
|
+
scale = blueScale;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
return formatHtmlPreview(`
|
|
82
|
+
<style>
|
|
83
|
+
.demo-wrapper h1 {
|
|
84
|
+
margin: 0;
|
|
85
|
+
width: 300px;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
88
|
+
<div class="demo-wrapper">
|
|
89
|
+
<h1 class="tds-text-${color}-${scale}">A text ${color} heading</h1>
|
|
90
|
+
<p class="tds-text-${color}-${scale}">A text ${color} paragraph</p>
|
|
91
|
+
</div>
|
|
92
|
+
`);
|
|
93
|
+
};
|
|
94
|
+
export const TextColor = Template.bind({});
|
|
@@ -337,14 +337,33 @@ export function isFocusable(element) {
|
|
|
337
337
|
return false;
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
* @param
|
|
343
|
-
*
|
|
344
|
-
|
|
345
|
-
export const
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
340
|
+
* Checks if the provided element has a slotted element
|
|
341
|
+
* in the slot with the corresponding slotName
|
|
342
|
+
* @param slotName the name of the slot.
|
|
343
|
+
* @param element the element to look for the slot within.
|
|
344
|
+
*/
|
|
345
|
+
export const hasSlot = (slotName, element) => !!element.querySelector(`[slot="${slotName}"]`);
|
|
346
|
+
/**
|
|
347
|
+
* Generates a reasonably unique string ID based on current time (minutes, seconds, milliseconds) and random numbers.
|
|
348
|
+
*
|
|
349
|
+
* This function combines the current time and random numbers to generate
|
|
350
|
+
* a unique string ID. The function assumes that it won't be called frequently
|
|
351
|
+
* enough to generate two identical IDs within a millisecond, or that the random
|
|
352
|
+
* number generator will produce the same value twice in quick succession.
|
|
353
|
+
*
|
|
354
|
+
* Note: The IDs generated by this function are not globally unique and their length may vary.
|
|
355
|
+
* For truly unique and fixed-length IDs, consider using a more robust method such as UUID.
|
|
356
|
+
*
|
|
357
|
+
* @returns {string} A unique string ID.
|
|
358
|
+
*/
|
|
359
|
+
export function generateUniqueId() {
|
|
360
|
+
const now = new Date();
|
|
361
|
+
const timeInMilliseconds = now.getMinutes() * 60000 + now.getSeconds() * 1000 + now.getMilliseconds(); // Get current time in milliseconds from the start of the hour
|
|
362
|
+
const randomNum1 = Math.floor(Math.random() * 1000000); // Random number between 0 and 999999
|
|
363
|
+
const randomNum2 = Math.floor(Math.random() * 1000000); // Another random number
|
|
364
|
+
// Convert to base 36 (using numbers and letters) and remove '0.' from the random number
|
|
365
|
+
const uniqueString = randomNum1.toString(36).substring(2) +
|
|
366
|
+
timeInMilliseconds.toString(36) +
|
|
367
|
+
randomNum2.toString(36).substring(2);
|
|
368
|
+
return uniqueString;
|
|
369
|
+
}
|