@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,268 @@
|
|
|
1
|
+
import readme from './readme.md';
|
|
2
|
+
import readmeDropdownOption from './dropdown-option/readme.md';
|
|
3
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
4
|
+
import { ComponentsFolder } from '../../utils/constants';
|
|
5
|
+
export default {
|
|
6
|
+
title: `${ComponentsFolder}/Dropdown`,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
notes: { 'Dropdown': readme, 'Dropdown option': readmeDropdownOption },
|
|
10
|
+
design: [
|
|
11
|
+
{
|
|
12
|
+
name: 'Figma',
|
|
13
|
+
type: 'figma',
|
|
14
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9754%3A22916&t=M7Ova7xZaoeMwb5e-1',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'Link',
|
|
18
|
+
type: 'link',
|
|
19
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9754%3A22916&t=M7Ova7xZaoeMwb5e-1',
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
argTypes: {
|
|
24
|
+
modeVariant: {
|
|
25
|
+
name: 'Mode variant',
|
|
26
|
+
description: 'Mode variant of the component.',
|
|
27
|
+
control: {
|
|
28
|
+
type: 'radio',
|
|
29
|
+
},
|
|
30
|
+
options: ['Inherit from parent', 'Primary', 'Secondary'],
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: { summary: 'Inherit from parent' },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
error: {
|
|
36
|
+
name: 'Error',
|
|
37
|
+
description: 'Sets the Dropdown in an error state.',
|
|
38
|
+
control: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
},
|
|
41
|
+
table: {
|
|
42
|
+
defaultValue: { summary: 'false' },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
filter: {
|
|
46
|
+
name: 'Filter',
|
|
47
|
+
description: 'Adds filter functionality to the Dropdown.',
|
|
48
|
+
control: {
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
},
|
|
51
|
+
table: {
|
|
52
|
+
defaultValue: { summary: 'false' },
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
multiselect: {
|
|
56
|
+
name: 'Multiselect',
|
|
57
|
+
description: 'Adds multiselect functionality to the Dropdown.',
|
|
58
|
+
control: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
},
|
|
61
|
+
table: {
|
|
62
|
+
defaultValue: { summary: 'false' },
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
name: 'Size',
|
|
67
|
+
description: 'Size of the Dropdown.',
|
|
68
|
+
control: {
|
|
69
|
+
type: 'radio',
|
|
70
|
+
},
|
|
71
|
+
options: ['Large', 'Medium', 'Small'],
|
|
72
|
+
table: {
|
|
73
|
+
defaultValue: { summary: 'lg' },
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
labelText: {
|
|
77
|
+
name: 'Label text',
|
|
78
|
+
control: 'text',
|
|
79
|
+
description: 'Label text helps to describe what the Dropdown contains',
|
|
80
|
+
if: { arg: 'labelPosition', neq: 'None' },
|
|
81
|
+
},
|
|
82
|
+
labelPosition: {
|
|
83
|
+
name: 'Label position',
|
|
84
|
+
description: 'Label text position',
|
|
85
|
+
control: {
|
|
86
|
+
type: 'radio',
|
|
87
|
+
},
|
|
88
|
+
options: ['Outside', 'Inside', 'None'],
|
|
89
|
+
table: {
|
|
90
|
+
defaultValue: { summary: 'null' },
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
helperText: {
|
|
94
|
+
name: 'Helper text',
|
|
95
|
+
description: 'Helper text assists the user with additional information about the Dropdown.',
|
|
96
|
+
control: 'text',
|
|
97
|
+
},
|
|
98
|
+
placeholder: {
|
|
99
|
+
name: 'Placeholder',
|
|
100
|
+
type: 'string',
|
|
101
|
+
description: 'Placeholder text when no option is selected',
|
|
102
|
+
},
|
|
103
|
+
disabled: {
|
|
104
|
+
name: 'Disabled',
|
|
105
|
+
description: 'Disables the component',
|
|
106
|
+
control: {
|
|
107
|
+
type: 'boolean',
|
|
108
|
+
},
|
|
109
|
+
table: {
|
|
110
|
+
defaultValue: { summary: 'false' },
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
openDirection: {
|
|
114
|
+
name: 'Open direction',
|
|
115
|
+
description: 'The direction the Dropdown will open.',
|
|
116
|
+
control: {
|
|
117
|
+
type: 'radio',
|
|
118
|
+
},
|
|
119
|
+
options: ['Auto', 'Up', 'Down'],
|
|
120
|
+
table: {
|
|
121
|
+
summary: {
|
|
122
|
+
defaultValue: 'auto',
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
optionType: {
|
|
127
|
+
name: 'Option type',
|
|
128
|
+
description: 'Render the options either via the options prop, or passing them as children to the Dropdown.',
|
|
129
|
+
control: 'radio',
|
|
130
|
+
options: ['Children', 'Property'],
|
|
131
|
+
},
|
|
132
|
+
defaultOption: {
|
|
133
|
+
name: 'Default options',
|
|
134
|
+
description: 'Sets a pre-selected option.',
|
|
135
|
+
control: {
|
|
136
|
+
type: 'radio',
|
|
137
|
+
},
|
|
138
|
+
options: ['No default', 'Option 1', 'Option 2', 'Option 3'],
|
|
139
|
+
if: { arg: 'multiselect', eq: false },
|
|
140
|
+
},
|
|
141
|
+
multiDefaultOption: {
|
|
142
|
+
name: 'Default options',
|
|
143
|
+
description: 'Sets a pre-selected option.',
|
|
144
|
+
control: {
|
|
145
|
+
type: 'check',
|
|
146
|
+
},
|
|
147
|
+
options: ['Option 1', 'Option 2', 'Option 3', 'Option 4'],
|
|
148
|
+
if: { arg: 'multiselect', eq: true },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
args: {
|
|
152
|
+
modeVariant: 'Inherit from parent',
|
|
153
|
+
error: false,
|
|
154
|
+
filter: false,
|
|
155
|
+
multiselect: false,
|
|
156
|
+
size: 'Large',
|
|
157
|
+
labelText: 'Label text',
|
|
158
|
+
labelPosition: 'Outside',
|
|
159
|
+
helperText: 'Helper text',
|
|
160
|
+
placeholder: 'Placeholder',
|
|
161
|
+
disabled: false,
|
|
162
|
+
openDirection: 'Auto',
|
|
163
|
+
defaultOption: 'No default',
|
|
164
|
+
optionType: 'Children',
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
const sizeLookUp = {
|
|
168
|
+
Large: 'lg',
|
|
169
|
+
Medium: 'md',
|
|
170
|
+
Small: 'sm',
|
|
171
|
+
};
|
|
172
|
+
const defaultOptionLookUp = {
|
|
173
|
+
'Option 1': 'option-1',
|
|
174
|
+
'Option 2': 'option-2',
|
|
175
|
+
'Option 3': 'option-3',
|
|
176
|
+
};
|
|
177
|
+
const getMultiselectDefaultValue = (multiDefaultOption) => multiDefaultOption.map((item) => defaultOptionLookUp[item]);
|
|
178
|
+
const Template = ({ placeholder, labelText, labelPosition, helperText, size, error, filter, multiselect, openDirection, modeVariant, disabled, optionType, defaultOption, multiDefaultOption, }) => formatHtmlPreview(`
|
|
179
|
+
<style>
|
|
180
|
+
/* demo-wrapper is for demonstration purposes only*/
|
|
181
|
+
.demo-wrapper {
|
|
182
|
+
width: 300px;
|
|
183
|
+
height:200px;
|
|
184
|
+
}
|
|
185
|
+
</style>
|
|
186
|
+
|
|
187
|
+
<div class="demo-wrapper">
|
|
188
|
+
<tds-dropdown
|
|
189
|
+
${defaultOption && defaultOption !== 'No default'
|
|
190
|
+
? `default-value="${defaultOptionLookUp[defaultOption]}"`
|
|
191
|
+
: ''}
|
|
192
|
+
${multiDefaultOption
|
|
193
|
+
? `default-value="${getMultiselectDefaultValue(multiDefaultOption)}"`
|
|
194
|
+
: ''}
|
|
195
|
+
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
196
|
+
name="dropdown"
|
|
197
|
+
label="${labelText}"
|
|
198
|
+
${labelPosition && labelPosition !== 'None'
|
|
199
|
+
? `label-position="${labelPosition.toLowerCase()}"`
|
|
200
|
+
: ''}
|
|
201
|
+
placeholder="${placeholder}"
|
|
202
|
+
helper="${helperText}"
|
|
203
|
+
size="${sizeLookUp[size]}"
|
|
204
|
+
${error ? 'error' : ''}
|
|
205
|
+
${filter ? 'filter' : ''}
|
|
206
|
+
${multiselect ? 'multiselect' : ''}
|
|
207
|
+
${disabled ? 'disabled' : ''}
|
|
208
|
+
open-direction="${openDirection.toLowerCase()}"
|
|
209
|
+
>
|
|
210
|
+
${optionType === 'Children'
|
|
211
|
+
? `
|
|
212
|
+
<tds-dropdown-option value="option-1">
|
|
213
|
+
Option 1
|
|
214
|
+
</tds-dropdown-option>
|
|
215
|
+
<tds-dropdown-option disabled value="option-2">
|
|
216
|
+
Option 2
|
|
217
|
+
</tds-dropdown-option>
|
|
218
|
+
<tds-dropdown-option value="option-3">
|
|
219
|
+
Option 3
|
|
220
|
+
</tds-dropdown-option>
|
|
221
|
+
<tds-dropdown-option value="option-4">
|
|
222
|
+
Option 4
|
|
223
|
+
</tds-dropdown-option>
|
|
224
|
+
<tds-dropdown-option value="option-5">
|
|
225
|
+
Option 5
|
|
226
|
+
</tds-dropdown-option>
|
|
227
|
+
<tds-dropdown-option value="option-6">
|
|
228
|
+
Option 6
|
|
229
|
+
</tds-dropdown-option>
|
|
230
|
+
<tds-dropdown-option value="option-7">
|
|
231
|
+
Option 7
|
|
232
|
+
</tds-dropdown-option>`
|
|
233
|
+
: ''}
|
|
234
|
+
</tds-dropdown>
|
|
235
|
+
</div>
|
|
236
|
+
|
|
237
|
+
<script>
|
|
238
|
+
dropdown = document.querySelector('tds-dropdown')
|
|
239
|
+
dropdown.addEventListener('tdsChange', (event) => {
|
|
240
|
+
console.log(event)
|
|
241
|
+
})
|
|
242
|
+
|
|
243
|
+
${optionType === 'Property'
|
|
244
|
+
? `
|
|
245
|
+
dropdown.options = [
|
|
246
|
+
{
|
|
247
|
+
label: 'Option 1',
|
|
248
|
+
value: 'option-1',
|
|
249
|
+
disabled: 'false',
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: 'Option 2',
|
|
253
|
+
value: 'option-2',
|
|
254
|
+
disabled: 'false',
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
label: 'Option 3',
|
|
258
|
+
value: 'option-3',
|
|
259
|
+
disabled: 'false',
|
|
260
|
+
},
|
|
261
|
+
]
|
|
262
|
+
|
|
263
|
+
`
|
|
264
|
+
: ''}
|
|
265
|
+
</script>
|
|
266
|
+
|
|
267
|
+
`);
|
|
268
|
+
export const Default = Template.bind({});
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
display: flex;
|
|
48
48
|
gap: 8px;
|
|
49
49
|
}
|
|
50
|
-
:host [role=list].
|
|
50
|
+
:host [role=list].start, :host [role=list].end {
|
|
51
51
|
gap: 24px;
|
|
52
52
|
}
|
|
53
53
|
:host [role=list].top-part-child {
|
|
54
54
|
flex-direction: column;
|
|
55
55
|
}
|
|
56
56
|
@media all and (max-width: 992px) {
|
|
57
|
-
:host [role=list].
|
|
57
|
+
:host [role=list].start:not(.top-part-child) {
|
|
58
58
|
flex-direction: column;
|
|
59
59
|
}
|
|
60
|
-
:host [role=list].
|
|
60
|
+
:host [role=list].start:not(.top-part-child).start, :host [role=list].start:not(.top-part-child).end {
|
|
61
61
|
gap: 8px;
|
|
62
62
|
}
|
|
63
63
|
:host [role=list].top-part-child.closed {
|
|
@@ -2,7 +2,7 @@ import { Host, h } from '@stencil/core';
|
|
|
2
2
|
export class TdsFooterGroup {
|
|
3
3
|
constructor() {
|
|
4
4
|
/** If the group is placed in the main part of the Footer,
|
|
5
|
-
* it can have either
|
|
5
|
+
* it can have either start or end as a slot position otherwise undefined. */
|
|
6
6
|
this.slotPosition = null;
|
|
7
7
|
/** Indicates if a group is part of the top part of the Footer. */
|
|
8
8
|
this.topPartGroup = false;
|
|
@@ -12,7 +12,7 @@ export class TdsFooterGroup {
|
|
|
12
12
|
connectedCallback() {
|
|
13
13
|
this.topPartGroup = this.host.parentElement.slot === 'top';
|
|
14
14
|
if (!this.topPartGroup) {
|
|
15
|
-
this.slotPosition = this.host.parentElement.slot === '
|
|
15
|
+
this.slotPosition = this.host.parentElement.slot === 'end' ? 'end' : 'start';
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
[role=listitem] ::slotted(
|
|
1
|
+
[role=listitem] ::slotted(a),
|
|
2
|
+
[role=listitem] ::slotted(button) {
|
|
2
3
|
font: var(--tds-headline-06);
|
|
3
4
|
letter-spacing: var(--tds-headline-06-ls);
|
|
4
5
|
color: var(--tds-footer-main-links);
|
|
5
6
|
opacity: var(--tds-footer-main-links-opacity);
|
|
6
7
|
text-decoration: none;
|
|
7
8
|
}
|
|
8
|
-
[role=listitem] ::slotted(
|
|
9
|
+
[role=listitem] ::slotted(a:focus-visible),
|
|
10
|
+
[role=listitem] ::slotted(button:focus-visible) {
|
|
9
11
|
outline: 2px solid var(--tds-blue-400);
|
|
10
12
|
outline-offset: -2px;
|
|
11
13
|
}
|
|
12
|
-
[role=listitem] ::slotted(
|
|
14
|
+
[role=listitem] ::slotted(a:hover),
|
|
15
|
+
[role=listitem] ::slotted(button:hover) {
|
|
13
16
|
text-decoration: underline;
|
|
14
17
|
}
|
|
15
|
-
[role=listitem].top-part-child ::slotted(
|
|
18
|
+
[role=listitem].top-part-child ::slotted(a),
|
|
19
|
+
[role=listitem].top-part-child ::slotted(button) {
|
|
16
20
|
color: var(--tds-footer-top-links);
|
|
17
21
|
font-family: "Scania Sans Semi Condensed", "Scania Sans Condensed", arial, helvetica, sans-serif;
|
|
18
22
|
font-weight: bold;
|
|
19
23
|
font-size: 14px;
|
|
20
24
|
line-height: 18px;
|
|
21
25
|
}
|
|
22
|
-
[role=listitem].top-part-child ::slotted(
|
|
26
|
+
[role=listitem].top-part-child ::slotted(a:focus-visible),
|
|
27
|
+
[role=listitem].top-part-child ::slotted(button:focus-visible) {
|
|
23
28
|
outline: 2px solid var(--tds-blue-400);
|
|
24
29
|
outline-offset: -2px;
|
|
25
30
|
}
|
|
@@ -28,17 +33,20 @@
|
|
|
28
33
|
[role=listitem].top-part-child {
|
|
29
34
|
border-bottom: 1px solid var(--tds-footer-top-divider);
|
|
30
35
|
}
|
|
31
|
-
[role=listitem].top-part-child ::slotted(
|
|
36
|
+
[role=listitem].top-part-child ::slotted(a),
|
|
37
|
+
[role=listitem].top-part-child ::slotted(button) {
|
|
32
38
|
display: block;
|
|
33
39
|
height: 100%;
|
|
34
40
|
padding: 19px 40px;
|
|
35
41
|
font-weight: normal;
|
|
36
42
|
}
|
|
37
|
-
[role=listitem].top-part-child ::slotted(
|
|
43
|
+
[role=listitem].top-part-child ::slotted(a:hover),
|
|
44
|
+
[role=listitem].top-part-child ::slotted(button:hover) {
|
|
38
45
|
text-decoration: underline;
|
|
39
46
|
background-color: var(--tds-footer-top-links-background-hover);
|
|
40
47
|
}
|
|
41
|
-
[role=listitem].top-part-child ::slotted(
|
|
48
|
+
[role=listitem].top-part-child ::slotted(a:focus-visible),
|
|
49
|
+
[role=listitem].top-part-child ::slotted(button:focus-visible) {
|
|
42
50
|
outline: 2px solid var(--tds-blue-400);
|
|
43
51
|
outline-offset: -2px;
|
|
44
52
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
:host {
|
|
2
2
|
display: block;
|
|
3
3
|
}
|
|
4
|
-
:host
|
|
4
|
+
:host slot[name=top]::slotted(*) {
|
|
5
5
|
background-color: var(--tds-footer-top-background);
|
|
6
6
|
padding: 40px;
|
|
7
|
-
}
|
|
8
|
-
:host .footer-top ::slotted(*) {
|
|
9
7
|
display: grid;
|
|
10
|
-
grid-template-columns:
|
|
8
|
+
grid-template-columns: repeat(4, 1fr);
|
|
11
9
|
row-gap: 40px;
|
|
12
10
|
width: 100%;
|
|
13
11
|
}
|
|
@@ -20,8 +18,8 @@
|
|
|
20
18
|
display: flex;
|
|
21
19
|
justify-content: space-between;
|
|
22
20
|
}
|
|
23
|
-
:host
|
|
24
|
-
:host
|
|
21
|
+
:host slot[name=start]::slotted(*),
|
|
22
|
+
:host slot[name=end]::slotted(*) {
|
|
25
23
|
display: flex;
|
|
26
24
|
column-gap: 24px;
|
|
27
25
|
}
|
|
@@ -53,12 +51,10 @@
|
|
|
53
51
|
visibility: hidden;
|
|
54
52
|
}
|
|
55
53
|
@media all and (max-width: 992px) {
|
|
56
|
-
:host
|
|
57
|
-
padding: 0;
|
|
58
|
-
}
|
|
59
|
-
:host .footer-top ::slotted(*) {
|
|
54
|
+
:host slot[name=top]::slotted(*) {
|
|
60
55
|
display: block;
|
|
61
56
|
width: 100%;
|
|
57
|
+
padding: 0;
|
|
62
58
|
}
|
|
63
59
|
:host .footer-main {
|
|
64
60
|
padding: 0 24px;
|
|
@@ -68,8 +64,8 @@
|
|
|
68
64
|
row-gap: 48px;
|
|
69
65
|
padding: 24px 0;
|
|
70
66
|
}
|
|
71
|
-
:host
|
|
72
|
-
flex-direction:
|
|
67
|
+
:host slot[name=end]::slotted(*) {
|
|
68
|
+
flex-direction: row;
|
|
73
69
|
gap: 8px;
|
|
74
70
|
}
|
|
75
71
|
:host .footer-main-bottom {
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
import { Host } from '@stencil/core/internal';
|
|
3
|
+
import { hasSlot } from '../../utils/utils';
|
|
4
|
+
/**
|
|
5
|
+
* @slot top - Slot for the top part of the Footer.
|
|
6
|
+
* @slot start - Slot for start (left side) of the Footers main part.
|
|
7
|
+
* @slot end - Slot for end (right side) of the Footers main part.
|
|
8
|
+
*/
|
|
3
9
|
export class TdsFooter {
|
|
4
10
|
constructor() {
|
|
5
11
|
this.modeVariant = null;
|
|
6
|
-
this.hasTopPart = undefined;
|
|
7
|
-
}
|
|
8
|
-
connectedCallback() {
|
|
9
|
-
this.hasTopPart = Array.from(this.host.children).some((element) => element.slot === 'top');
|
|
10
12
|
}
|
|
11
13
|
render() {
|
|
12
|
-
|
|
14
|
+
const usesTopSlot = hasSlot('top', this.host);
|
|
15
|
+
const usesStartSlot = hasSlot('start', this.host);
|
|
16
|
+
const usesEndSlot = hasSlot('end', this.host);
|
|
17
|
+
return (h(Host, { class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("footer", null, usesTopSlot && h("slot", { name: "top" }), h("div", { class: "footer-main" }, h("div", { class: "footer-main-top" }, usesStartSlot && h("slot", { name: "start" }), usesEndSlot && h("slot", { name: "end" })), h("div", { class: "footer-main-bottom" }, h("small", { class: "copyright" }, "Copyright \u00A9 ", new Date().getFullYear(), " Scania"), h("div", { class: "brand" }, h("p", null, "Scania")))))));
|
|
13
18
|
}
|
|
14
19
|
static get is() { return "tds-footer"; }
|
|
15
20
|
static get encapsulation() { return "shadow"; }
|
|
@@ -45,10 +50,5 @@ export class TdsFooter {
|
|
|
45
50
|
}
|
|
46
51
|
};
|
|
47
52
|
}
|
|
48
|
-
static get states() {
|
|
49
|
-
return {
|
|
50
|
-
"hasTopPart": {}
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
53
|
static get elementRef() { return "host"; }
|
|
54
54
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
import { ComponentsFolder } from '../../utils/constants';
|
|
3
|
+
import readme from './readme.md';
|
|
4
|
+
import readmeItem from './footer-item/readme.md';
|
|
5
|
+
import readmeLinkGroup from './footer-group/readme.md';
|
|
6
|
+
export default {
|
|
7
|
+
title: `${ComponentsFolder}/Footer`,
|
|
8
|
+
parameters: {
|
|
9
|
+
notes: { 'Footer': readme, 'Footer link group': readmeLinkGroup, 'Footer item': readmeItem },
|
|
10
|
+
layout: 'fullscreen',
|
|
11
|
+
design: [
|
|
12
|
+
{
|
|
13
|
+
name: 'Figma',
|
|
14
|
+
type: 'figma',
|
|
15
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=7568%3A298118&t=Ne6myqwca5m00de7-1',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'Link',
|
|
19
|
+
type: 'link',
|
|
20
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=7568%3A298118&t=Ne6myqwca5m00de7-1',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
argTypes: {
|
|
25
|
+
modeVariant: {
|
|
26
|
+
name: 'Mode variant',
|
|
27
|
+
description: 'Mode variant adjusts component colors to have better visibility depending on global mode and background.',
|
|
28
|
+
control: {
|
|
29
|
+
type: 'radio',
|
|
30
|
+
},
|
|
31
|
+
options: ['Inherit from parent', 'Primary', 'Secondary'],
|
|
32
|
+
table: {
|
|
33
|
+
defaultValue: { summary: 'Inherit from parent' },
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
topPart: {
|
|
37
|
+
name: 'Top part',
|
|
38
|
+
description: 'Adds the top part of the Footer with more links.',
|
|
39
|
+
control: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
args: {
|
|
45
|
+
modeVariant: 'Inherit from parent',
|
|
46
|
+
topPart: false,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
const Template = ({ topPart, modeVariant }) => formatHtmlPreview(`
|
|
50
|
+
<main>
|
|
51
|
+
<div class="tds-u-p3 ">
|
|
52
|
+
<div class="tds-body-01">
|
|
53
|
+
Resize the window to see how the Footer behaves on smaller/bigger screens.
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</main>
|
|
57
|
+
<tds-footer
|
|
58
|
+
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
59
|
+
>
|
|
60
|
+
${topPart
|
|
61
|
+
? `
|
|
62
|
+
<div slot="top">
|
|
63
|
+
<tds-footer-group title-text="Title">
|
|
64
|
+
<tds-footer-item >
|
|
65
|
+
<a href="#"> Link text</a>
|
|
66
|
+
</tds-footer-item>
|
|
67
|
+
<tds-footer-item >
|
|
68
|
+
<a href="#"> Link text</a>
|
|
69
|
+
</tds-footer-item>
|
|
70
|
+
<tds-footer-item >
|
|
71
|
+
<a href="#"> Link text</a>
|
|
72
|
+
</tds-footer-item>
|
|
73
|
+
</tds-footer-group>
|
|
74
|
+
|
|
75
|
+
<tds-footer-group title-text="Title">
|
|
76
|
+
<tds-footer-item >
|
|
77
|
+
<a href="#"> Link text</a>
|
|
78
|
+
</tds-footer-item>
|
|
79
|
+
<tds-footer-item >
|
|
80
|
+
<a href="#"> Link text</a>
|
|
81
|
+
</tds-footer-item>
|
|
82
|
+
<tds-footer-item >
|
|
83
|
+
<a href="#"> Link text</a>
|
|
84
|
+
</tds-footer-item>
|
|
85
|
+
</tds-footer-group>
|
|
86
|
+
|
|
87
|
+
<tds-footer-group title-text="Title">
|
|
88
|
+
<tds-footer-item >
|
|
89
|
+
<a href="#"> Link text</a>
|
|
90
|
+
</tds-footer-item>
|
|
91
|
+
<tds-footer-item >
|
|
92
|
+
<a href="#"> Link text</a>
|
|
93
|
+
</tds-footer-item>
|
|
94
|
+
<tds-footer-item >
|
|
95
|
+
<a href="#"> Link text</a>
|
|
96
|
+
</tds-footer-item>
|
|
97
|
+
</tds-footer-group>
|
|
98
|
+
|
|
99
|
+
<tds-footer-group title-text="Title">
|
|
100
|
+
<tds-footer-item >
|
|
101
|
+
<a href="#"> Link text</a>
|
|
102
|
+
</tds-footer-item>
|
|
103
|
+
<tds-footer-item >
|
|
104
|
+
<a href="#"> Link text</a>
|
|
105
|
+
</tds-footer-item>
|
|
106
|
+
<tds-footer-item >
|
|
107
|
+
<a href="#"> Link text</a>
|
|
108
|
+
</tds-footer-item>
|
|
109
|
+
</tds-footer-group>
|
|
110
|
+
</div>
|
|
111
|
+
`
|
|
112
|
+
: ''}
|
|
113
|
+
<div slot="start">
|
|
114
|
+
<tds-footer-group>
|
|
115
|
+
<tds-footer-item >
|
|
116
|
+
<a href="#"> Link text</a>
|
|
117
|
+
</tds-footer-item>
|
|
118
|
+
<tds-footer-item >
|
|
119
|
+
<a href="#"> Link text</a>
|
|
120
|
+
</tds-footer-item>
|
|
121
|
+
<tds-footer-item >
|
|
122
|
+
<a href="#"> Link text</a>
|
|
123
|
+
</tds-footer-item>
|
|
124
|
+
<tds-footer-item >
|
|
125
|
+
<a href="#"> Link text</a>
|
|
126
|
+
</tds-footer-item>
|
|
127
|
+
</tds-footer-group>
|
|
128
|
+
</div>
|
|
129
|
+
<div slot="end">
|
|
130
|
+
<tds-footer-group>
|
|
131
|
+
<tds-footer-item >
|
|
132
|
+
<a href="#"> <tds-icon name="truck"></tds-icon></a>
|
|
133
|
+
</tds-footer-item>
|
|
134
|
+
<tds-footer-item >
|
|
135
|
+
<a href="#"> <tds-icon name="truck"></tds-icon></a>
|
|
136
|
+
</tds-footer-item>
|
|
137
|
+
<tds-footer-item >
|
|
138
|
+
<a href="#"> <tds-icon name="truck"></tds-icon></a>
|
|
139
|
+
</tds-footer-item>
|
|
140
|
+
</tds-footer-group>
|
|
141
|
+
</div>
|
|
142
|
+
</tds-footer>
|
|
143
|
+
|
|
144
|
+
`);
|
|
145
|
+
export const Default = Template.bind({});
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { generateUniqueId } from '../../../utils/utils';
|
|
3
|
+
/**
|
|
4
|
+
* @slot icon - Slot for an Icon in the dropdown button.
|
|
5
|
+
* @slot label - Slot for a label text in the dropdown button.
|
|
6
|
+
*/
|
|
2
7
|
export class TdsHeaderDropdown {
|
|
3
8
|
constructor() {
|
|
4
|
-
this.uuid =
|
|
5
|
-
this.
|
|
9
|
+
this.uuid = generateUniqueId();
|
|
10
|
+
this.label = undefined;
|
|
6
11
|
this.noDropdownIcon = false;
|
|
7
12
|
this.selected = false;
|
|
8
13
|
this.open = false;
|
|
@@ -25,7 +30,7 @@ export class TdsHeaderDropdown {
|
|
|
25
30
|
this.buttonEl = el;
|
|
26
31
|
}, "aria-expanded": `${this.open}`, "aria-controls": `launcher-${this.uuid}`, "aria-current": this.selected ? 'location' : 'false', onClick: () => {
|
|
27
32
|
this.toggleDropdown();
|
|
28
|
-
} }, h("slot", { name: "
|
|
33
|
+
} }, h("slot", { name: "icon" }), this.label, h("slot", { name: "label" }), !this.noDropdownIcon && (h("tds-icon", { class: "dropdown-icon", name: "chevron_down", size: "16px" })))), this.buttonEl && (h("tds-popover-canvas", { id: `tds-dropdown-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
29
34
|
{
|
|
30
35
|
name: 'flip',
|
|
31
36
|
options: {
|
|
@@ -48,7 +53,7 @@ export class TdsHeaderDropdown {
|
|
|
48
53
|
}
|
|
49
54
|
static get properties() {
|
|
50
55
|
return {
|
|
51
|
-
"
|
|
56
|
+
"label": {
|
|
52
57
|
"type": "string",
|
|
53
58
|
"mutable": false,
|
|
54
59
|
"complexType": {
|
|
@@ -62,7 +67,7 @@ export class TdsHeaderDropdown {
|
|
|
62
67
|
"tags": [],
|
|
63
68
|
"text": "The label of the button that opens the dropdown.\nThis is an alternative to the button-label slot."
|
|
64
69
|
},
|
|
65
|
-
"attribute": "
|
|
70
|
+
"attribute": "label",
|
|
66
71
|
"reflect": false
|
|
67
72
|
},
|
|
68
73
|
"noDropdownIcon": {
|