@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,243 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
import { ComponentsFolder } from '../../utils/constants';
|
|
4
|
+
export default {
|
|
5
|
+
title: `${ComponentsFolder}/Slider`,
|
|
6
|
+
argTypes: {
|
|
7
|
+
min: {
|
|
8
|
+
name: 'Min. value',
|
|
9
|
+
description: 'Sets the minimum value for the slider.',
|
|
10
|
+
control: {
|
|
11
|
+
type: 'number',
|
|
12
|
+
},
|
|
13
|
+
table: {
|
|
14
|
+
defaultValue: { summary: 0 },
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
max: {
|
|
18
|
+
name: 'Max. value',
|
|
19
|
+
description: 'Sets the maximum value for the slider.',
|
|
20
|
+
control: {
|
|
21
|
+
type: 'number',
|
|
22
|
+
},
|
|
23
|
+
table: {
|
|
24
|
+
defaultValue: { summary: 100 },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
initialValue: {
|
|
28
|
+
name: 'Initial value',
|
|
29
|
+
description: 'Sets the initial value for the slider.',
|
|
30
|
+
control: {
|
|
31
|
+
type: 'number',
|
|
32
|
+
},
|
|
33
|
+
table: {
|
|
34
|
+
defaultValue: { summary: 0 },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
showLabel: {
|
|
38
|
+
name: 'Show label',
|
|
39
|
+
description: 'Toggles if the lable should be shown or hidden.',
|
|
40
|
+
control: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
labelText: {
|
|
45
|
+
name: 'Label text',
|
|
46
|
+
description: 'Sets the text for the label.',
|
|
47
|
+
control: {
|
|
48
|
+
type: 'text',
|
|
49
|
+
},
|
|
50
|
+
if: { arg: 'showLabel', eq: true },
|
|
51
|
+
},
|
|
52
|
+
showTicks: {
|
|
53
|
+
name: 'Show ticks',
|
|
54
|
+
description: 'Toggles if ticks should be shown or hidden.',
|
|
55
|
+
control: {
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
numTicks: {
|
|
60
|
+
name: 'Number of ticks',
|
|
61
|
+
description: 'Sets the number of ticks to be displayed.',
|
|
62
|
+
control: {
|
|
63
|
+
type: 'number',
|
|
64
|
+
},
|
|
65
|
+
if: { arg: 'showTicks', eq: true },
|
|
66
|
+
table: {
|
|
67
|
+
defaultValue: { summary: 0 },
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
showTickNumbers: {
|
|
71
|
+
name: 'Show tick numbers',
|
|
72
|
+
description: 'Toggles if tick numbers should be shown or hidden.',
|
|
73
|
+
control: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
},
|
|
76
|
+
if: { arg: 'showTicks', eq: true },
|
|
77
|
+
table: {
|
|
78
|
+
defaultValue: { summary: false },
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
snapToTicks: {
|
|
82
|
+
name: 'Snap to ticks',
|
|
83
|
+
description: 'Snaps the scrubber to the closest tick when dragging.',
|
|
84
|
+
control: {
|
|
85
|
+
type: 'boolean',
|
|
86
|
+
},
|
|
87
|
+
if: { arg: 'showTicks', eq: true },
|
|
88
|
+
table: {
|
|
89
|
+
defaultValue: { summary: false },
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
showTooltip: {
|
|
93
|
+
name: 'Show tooltip',
|
|
94
|
+
description: 'Toggles if the tooltip should be shown or hidden.',
|
|
95
|
+
control: {
|
|
96
|
+
type: 'boolean',
|
|
97
|
+
},
|
|
98
|
+
table: {
|
|
99
|
+
defaultValue: { summary: false },
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
showControls: {
|
|
103
|
+
name: 'Show controls (not compatible with input field)',
|
|
104
|
+
description: 'Toggles if controls should be shown or hidden.',
|
|
105
|
+
control: {
|
|
106
|
+
type: 'boolean',
|
|
107
|
+
},
|
|
108
|
+
table: {
|
|
109
|
+
defaultValue: { summary: false },
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
step: {
|
|
113
|
+
name: 'Step value',
|
|
114
|
+
description: 'Sets the value to increment/decrement with when using controls.',
|
|
115
|
+
control: {
|
|
116
|
+
type: 'number',
|
|
117
|
+
},
|
|
118
|
+
if: { arg: 'showControls', eq: true },
|
|
119
|
+
table: {
|
|
120
|
+
defaultValue: { summary: 1 },
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
showInput: {
|
|
124
|
+
name: 'Show value input field (not compatible with controls)',
|
|
125
|
+
description: 'Toggles if the values input field should be shown or hidden.',
|
|
126
|
+
control: {
|
|
127
|
+
type: 'boolean',
|
|
128
|
+
},
|
|
129
|
+
if: { arg: 'showControls', eq: false },
|
|
130
|
+
table: {
|
|
131
|
+
defaultValue: { summary: false },
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
scrubberSize: {
|
|
135
|
+
name: 'Scrubber size',
|
|
136
|
+
description: 'Switches between the large and small version of the scrubber.',
|
|
137
|
+
control: {
|
|
138
|
+
type: 'radio',
|
|
139
|
+
},
|
|
140
|
+
options: ['Large', 'Small'],
|
|
141
|
+
table: {
|
|
142
|
+
defaultValue: { summary: 'lg' },
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
readonly: {
|
|
146
|
+
name: 'Read Only',
|
|
147
|
+
description: 'Puts the control in a read-only state.',
|
|
148
|
+
control: {
|
|
149
|
+
type: 'boolean',
|
|
150
|
+
},
|
|
151
|
+
table: {
|
|
152
|
+
defaultValue: { summary: false },
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
disabled: {
|
|
156
|
+
name: 'Disabled',
|
|
157
|
+
description: 'Disables the slider.',
|
|
158
|
+
control: {
|
|
159
|
+
type: 'boolean',
|
|
160
|
+
},
|
|
161
|
+
table: {
|
|
162
|
+
defaultValue: { summary: false },
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
parameters: {
|
|
167
|
+
notes: readme,
|
|
168
|
+
design: [
|
|
169
|
+
{
|
|
170
|
+
name: 'Figma',
|
|
171
|
+
type: 'figma',
|
|
172
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9649%3A20759&t=Ne6myqwca5m00de7-1',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'Link',
|
|
176
|
+
type: 'link',
|
|
177
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=9649%3A20759&t=Ne6myqwca5m00de7-1',
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
args: {
|
|
182
|
+
min: '0',
|
|
183
|
+
max: '100',
|
|
184
|
+
initialValue: '50',
|
|
185
|
+
showLabel: false,
|
|
186
|
+
labelText: 'Label',
|
|
187
|
+
showTicks: false,
|
|
188
|
+
numTicks: '3',
|
|
189
|
+
showTickNumbers: false,
|
|
190
|
+
snapToTicks: false,
|
|
191
|
+
showTooltip: true,
|
|
192
|
+
showControls: false,
|
|
193
|
+
step: '1',
|
|
194
|
+
showInput: false,
|
|
195
|
+
scrubberSize: 'Large',
|
|
196
|
+
readonly: false,
|
|
197
|
+
disabled: false,
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
const sizeLookUp = {
|
|
201
|
+
Large: 'lg',
|
|
202
|
+
Small: 'sm',
|
|
203
|
+
};
|
|
204
|
+
const Template = ({ min, max, initialValue, showLabel, labelText, showTicks, numTicks, showTickNumbers, snapToTicks, showTooltip, showControls, step, showInput, scrubberSize, readonly, disabled, }) => formatHtmlPreview(`
|
|
205
|
+
<!-- Style code below is just for demo purposes -->
|
|
206
|
+
<style>
|
|
207
|
+
.demo-wrapper {
|
|
208
|
+
width: 500px;
|
|
209
|
+
margin-left: 150px;
|
|
210
|
+
}
|
|
211
|
+
</style>
|
|
212
|
+
|
|
213
|
+
<div class="demo-wrapper">
|
|
214
|
+
<tds-slider
|
|
215
|
+
min="${min}"
|
|
216
|
+
max="${max}"
|
|
217
|
+
${showControls && step ? `step="${step}"` : ''}
|
|
218
|
+
value="${initialValue}"
|
|
219
|
+
${showTicks ? `ticks="${numTicks}"` : ''}
|
|
220
|
+
${showTickNumbers ? 'show-tick-numbers' : ''}
|
|
221
|
+
${snapToTicks ? 'snap' : ''}
|
|
222
|
+
${showLabel ? `label="${labelText}"` : ''}
|
|
223
|
+
${showTooltip ? 'tooltip' : ''}
|
|
224
|
+
${showControls ? 'controls' : ''}
|
|
225
|
+
${showInput ? 'input' : ''}
|
|
226
|
+
${disabled ? 'disabled' : ''}
|
|
227
|
+
scrubber-size="${sizeLookUp[scrubberSize]}"
|
|
228
|
+
${readonly ? 'read-only' : ''}
|
|
229
|
+
>
|
|
230
|
+
</tds-slider>
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<!-- Script tag for demo purposes -->
|
|
234
|
+
<script>
|
|
235
|
+
slider = document.querySelector('tds-slider')
|
|
236
|
+
|
|
237
|
+
slider.removeEventListener('tdsChange', null)
|
|
238
|
+
slider.addEventListener('tdsChange', (event) => {
|
|
239
|
+
console.log(event);
|
|
240
|
+
});
|
|
241
|
+
</script>
|
|
242
|
+
`);
|
|
243
|
+
export const Default = Template.bind({});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
import readme from './readme.md';
|
|
3
|
+
import { ComponentsFolder } from '../../utils/constants';
|
|
4
|
+
export default {
|
|
5
|
+
title: `${ComponentsFolder}/Spinner`,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: 'centered',
|
|
8
|
+
notes: readme,
|
|
9
|
+
design: [
|
|
10
|
+
{
|
|
11
|
+
name: 'Figma',
|
|
12
|
+
type: 'figma',
|
|
13
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10259%3A29263&t=Ne6myqwca5m00de7-1',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Link',
|
|
17
|
+
type: 'link',
|
|
18
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10259%3A29263&t=Ne6myqwca5m00de7-1',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
argTypes: {
|
|
23
|
+
variant: {
|
|
24
|
+
name: 'Variant',
|
|
25
|
+
description: 'Switches the variant of the Spinner.',
|
|
26
|
+
control: {
|
|
27
|
+
type: 'radio',
|
|
28
|
+
},
|
|
29
|
+
options: ['Standard', 'Inverted'],
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: { summary: 'standard' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
name: 'Size',
|
|
36
|
+
description: 'Sets the size of the Spinner.',
|
|
37
|
+
control: {
|
|
38
|
+
type: 'radio',
|
|
39
|
+
},
|
|
40
|
+
options: ['Large', 'Medium', 'Small', 'Extra small'],
|
|
41
|
+
table: {
|
|
42
|
+
defaultValue: { summary: 'lg' },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
args: {
|
|
47
|
+
variant: 'Standard',
|
|
48
|
+
size: 'Large',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
const Template = ({ size, variant }) => {
|
|
52
|
+
const sizeLookup = { 'Large': 'lg', 'Medium': 'md', 'Small': 'sm', 'Extra small': 'xs' };
|
|
53
|
+
const variantLookup = { Standard: 'standard', Inverted: 'inverted' };
|
|
54
|
+
return formatHtmlPreview(`
|
|
55
|
+
<tds-spinner
|
|
56
|
+
size="${sizeLookup[size]}"
|
|
57
|
+
variant="${variantLookup[variant]}">
|
|
58
|
+
</tds-spinner>
|
|
59
|
+
`);
|
|
60
|
+
};
|
|
61
|
+
export const Default = Template.bind({});
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Host, h } from '@stencil/core';
|
|
2
|
+
import { generateUniqueId } from '../../utils/utils';
|
|
2
3
|
export class TdsStepper {
|
|
3
4
|
constructor() {
|
|
4
5
|
this.orientation = 'horizontal';
|
|
5
6
|
this.labelPosition = 'below';
|
|
6
7
|
this.size = 'lg';
|
|
7
8
|
this.hideLabels = false;
|
|
8
|
-
this.stepperId =
|
|
9
|
+
this.stepperId = generateUniqueId();
|
|
9
10
|
}
|
|
10
11
|
componentWillLoad() {
|
|
11
12
|
this.host.children[0].classList.add('first');
|
|
@@ -147,7 +148,7 @@ export class TdsStepper {
|
|
|
147
148
|
},
|
|
148
149
|
"attribute": "stepper-id",
|
|
149
150
|
"reflect": false,
|
|
150
|
-
"defaultValue": "
|
|
151
|
+
"defaultValue": "generateUniqueId()"
|
|
151
152
|
}
|
|
152
153
|
};
|
|
153
154
|
}
|
|
@@ -168,7 +169,7 @@ export class TdsStepper {
|
|
|
168
169
|
"references": {
|
|
169
170
|
"InternalTdsStepperPropChange": {
|
|
170
171
|
"location": "local",
|
|
171
|
-
"path": "/Users/
|
|
172
|
+
"path": "/Users/johnny/dev/scania/tegel/core/src/components/stepper/stepper.tsx"
|
|
172
173
|
}
|
|
173
174
|
}
|
|
174
175
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { formatHtmlPreview } from '../../utils/utils';
|
|
2
|
+
import readmeStepper from './readme.md';
|
|
3
|
+
import readmeStep from './step/readme.md';
|
|
4
|
+
import { ComponentsFolder } from '../../utils/constants';
|
|
5
|
+
export default {
|
|
6
|
+
title: `${ComponentsFolder}/Stepper`,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
design: [
|
|
10
|
+
{
|
|
11
|
+
name: 'Figma',
|
|
12
|
+
type: 'figma',
|
|
13
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10508%3A32221&t=Ne6myqwca5m00de7-1',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Link',
|
|
17
|
+
type: 'link',
|
|
18
|
+
url: 'https://www.figma.com/file/d8bTgEx7h694MSesi2CTLF/Tegel-UI-Library?node-id=10508%3A32221&t=Ne6myqwca5m00de7-1',
|
|
19
|
+
},
|
|
20
|
+
],
|
|
21
|
+
notes: { Stepper: readmeStepper, Step: readmeStep },
|
|
22
|
+
},
|
|
23
|
+
argTypes: {
|
|
24
|
+
size: {
|
|
25
|
+
name: 'Size',
|
|
26
|
+
description: 'Sets the size of the Stepper.',
|
|
27
|
+
control: {
|
|
28
|
+
type: 'radio',
|
|
29
|
+
},
|
|
30
|
+
options: ['Large', 'Small'],
|
|
31
|
+
table: {
|
|
32
|
+
defaultValue: { summary: 'lg' },
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
orientation: {
|
|
36
|
+
name: 'Orientation',
|
|
37
|
+
description: 'Sets the orientation which the Stepper is displayed.',
|
|
38
|
+
control: {
|
|
39
|
+
type: 'radio',
|
|
40
|
+
},
|
|
41
|
+
options: ['Horizontal', 'Vertical'],
|
|
42
|
+
table: {
|
|
43
|
+
defaultValue: { summary: 'horizontal' },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
labelPosition: {
|
|
47
|
+
name: 'Text position',
|
|
48
|
+
description: 'Sets the position of the text, only available when the orientation is horizontal.',
|
|
49
|
+
control: {
|
|
50
|
+
type: 'radio',
|
|
51
|
+
},
|
|
52
|
+
options: ['Below', 'Aside'],
|
|
53
|
+
if: { arg: 'orientation', neq: 'Vertical' },
|
|
54
|
+
table: {
|
|
55
|
+
defaultValue: { summary: 'below' },
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
hideLabels: {
|
|
59
|
+
name: 'Hide labels',
|
|
60
|
+
description: 'Hides the labels for all Stepper Items.',
|
|
61
|
+
control: {
|
|
62
|
+
type: 'boolean',
|
|
63
|
+
},
|
|
64
|
+
table: {
|
|
65
|
+
defaultValue: { summary: false },
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
args: {
|
|
70
|
+
size: 'Large',
|
|
71
|
+
orientation: 'Horizontal',
|
|
72
|
+
labelPosition: 'Below',
|
|
73
|
+
hideLabels: false,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
const sizeLookUp = {
|
|
77
|
+
Large: 'lg',
|
|
78
|
+
Small: 'sm',
|
|
79
|
+
};
|
|
80
|
+
const Template = ({ size, orientation, labelPosition, hideLabels }) => formatHtmlPreview(`<tds-stepper ${hideLabels ? 'hide-labels' : ''} size="${sizeLookUp[size]}" ${orientation === 'Horizontal' ? `label-position="${labelPosition === null || labelPosition === void 0 ? void 0 : labelPosition.toLowerCase()}"` : ''} orientation="${orientation.toLowerCase()}">
|
|
81
|
+
<tds-step state="success" index="1">
|
|
82
|
+
<div slot="label">Success step</div>
|
|
83
|
+
</tds-step>
|
|
84
|
+
<tds-step state="error" index="2">
|
|
85
|
+
<div slot="label">Error step</div>
|
|
86
|
+
</tds-step>
|
|
87
|
+
<tds-step state="current" index="3">
|
|
88
|
+
<div slot="label">Current step</div>
|
|
89
|
+
</tds-step>
|
|
90
|
+
<tds-step index="4">
|
|
91
|
+
<div slot="label">Upcoming step</div>
|
|
92
|
+
</tds-step>
|
|
93
|
+
</tds-stepper>
|
|
94
|
+
`);
|
|
95
|
+
export const Default = Template.bind({});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// https://stackoverflow.com/questions/63051941/how-to-pass-data-as-array-of-object-in-stencil-js
|
|
2
2
|
// https://medium.com/@scottmgerstl/passing-an-object-or-array-to-stencil-dd62b7d92641
|
|
3
3
|
import { h, Host } from '@stencil/core';
|
|
4
|
+
import { generateUniqueId } from '../../../utils/utils';
|
|
4
5
|
export class TdsTable {
|
|
5
6
|
constructor() {
|
|
6
7
|
this.verticalDividers = false;
|
|
@@ -10,7 +11,7 @@ export class TdsTable {
|
|
|
10
11
|
this.enableExpandableRows = false;
|
|
11
12
|
this.enableResponsive = false;
|
|
12
13
|
this.modeVariant = null;
|
|
13
|
-
this.tableId =
|
|
14
|
+
this.tableId = generateUniqueId();
|
|
14
15
|
}
|
|
15
16
|
emitInternalTdsPropChange(changedValueName, changedValue) {
|
|
16
17
|
this.internalTdsTablePropChange.emit({
|
|
@@ -201,7 +202,7 @@ export class TdsTable {
|
|
|
201
202
|
},
|
|
202
203
|
"attribute": "table-id",
|
|
203
204
|
"reflect": false,
|
|
204
|
-
"defaultValue": "
|
|
205
|
+
"defaultValue": "generateUniqueId()"
|
|
205
206
|
}
|
|
206
207
|
};
|
|
207
208
|
}
|
|
@@ -225,7 +226,7 @@ export class TdsTable {
|
|
|
225
226
|
"references": {
|
|
226
227
|
"InternalTdsTablePropChange": {
|
|
227
228
|
"location": "local",
|
|
228
|
-
"path": "/Users/
|
|
229
|
+
"path": "/Users/johnny/dev/scania/tegel/core/src/components/table/table/table.tsx"
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
232
|
}
|
|
@@ -1,52 +1,12 @@
|
|
|
1
1
|
import { h, Host, } from '@stencil/core';
|
|
2
|
-
const jsonData = [
|
|
3
|
-
{
|
|
4
|
-
truck: 'L-series',
|
|
5
|
-
driver: 'Sonya Bruce',
|
|
6
|
-
country: 'Brazil',
|
|
7
|
-
mileage: 123987,
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
truck: 'P-series',
|
|
11
|
-
driver: 'Guerra Bowman',
|
|
12
|
-
country: 'Sweden',
|
|
13
|
-
mileage: 2000852,
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
truck: 'G-series',
|
|
17
|
-
driver: 'Ferrell Wallace',
|
|
18
|
-
country: 'Germany',
|
|
19
|
-
mileage: 564,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
truck: 'R-series',
|
|
23
|
-
driver: 'Cox Burris',
|
|
24
|
-
country: 'Spain',
|
|
25
|
-
mileage: 1789357,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
truck: 'S-series',
|
|
29
|
-
driver: 'Montgomery Cervantes',
|
|
30
|
-
country: 'Croatia',
|
|
31
|
-
mileage: 65,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
truck: 'L-series',
|
|
35
|
-
driver: 'Sheryl Nielsen',
|
|
36
|
-
country: 'Greece',
|
|
37
|
-
mileage: 365784,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
truck: 'G-series',
|
|
41
|
-
driver: 'Benton Gomez',
|
|
42
|
-
country: 'France',
|
|
43
|
-
mileage: 80957,
|
|
44
|
-
},
|
|
45
|
-
];
|
|
46
2
|
const relevantTableProps = [
|
|
47
3
|
'enableMultiselect',
|
|
48
4
|
'enableExpandableRows',
|
|
49
5
|
];
|
|
6
|
+
/**
|
|
7
|
+
* @slot <default> - Default slot for the Table Body, used by <tds-table-body-row>
|
|
8
|
+
* @slot no-result - Slot for no result message when using filtering.
|
|
9
|
+
*/
|
|
50
10
|
export class TdsTableBody {
|
|
51
11
|
constructor() {
|
|
52
12
|
this.uncheckAll = () => {
|
|
@@ -77,8 +37,7 @@ export class TdsTableBody {
|
|
|
77
37
|
this.selectedDataExporter();
|
|
78
38
|
};
|
|
79
39
|
this.bodyData = undefined;
|
|
80
|
-
this.
|
|
81
|
-
this.jsonData = JSON.stringify(jsonData);
|
|
40
|
+
this.noResultMessage = undefined;
|
|
82
41
|
this.rowsPerPage = 1;
|
|
83
42
|
this.enableMultiselect = false;
|
|
84
43
|
this.enablePaginationTableBody = false;
|
|
@@ -205,6 +164,7 @@ export class TdsTableBody {
|
|
|
205
164
|
item.classList.remove('tds-table__row--hidden');
|
|
206
165
|
});
|
|
207
166
|
}
|
|
167
|
+
this.showNoResultsMessage = false;
|
|
208
168
|
this.disableAllSorting = false;
|
|
209
169
|
this.internalTdsSortingChange.emit([this.tableId, this.disableAllSorting]);
|
|
210
170
|
}
|
|
@@ -223,10 +183,7 @@ export class TdsTableBody {
|
|
|
223
183
|
relevantTableProps.forEach((tablePropName) => {
|
|
224
184
|
this[tablePropName] = this.tableEl[tablePropName];
|
|
225
185
|
});
|
|
226
|
-
if (this.
|
|
227
|
-
this.bodyData = this.jsonData;
|
|
228
|
-
}
|
|
229
|
-
else if (this.bodyData) {
|
|
186
|
+
if (this.bodyData) {
|
|
230
187
|
this.arrayDataWatcher(this.bodyData);
|
|
231
188
|
}
|
|
232
189
|
}
|
|
@@ -241,7 +198,7 @@ export class TdsTableBody {
|
|
|
241
198
|
}
|
|
242
199
|
}
|
|
243
200
|
render() {
|
|
244
|
-
return (h(Host, { "data-selected-rows": this.multiselectArrayJSON }, this.bodyDataManipulated.map((row) => (h("tds-table-body-row", null, Object.keys(row).map((cellData) => (h("tds-body-cell", { "cell-key": cellData, "cell-value": row[cellData] })))))),
|
|
201
|
+
return (h(Host, { "data-selected-rows": this.multiselectArrayJSON }, this.bodyDataManipulated.map((row) => (h("tds-table-body-row", null, Object.keys(row).map((cellData) => (h("tds-body-cell", { "cell-key": cellData, "cell-value": row[cellData] })))))), h("tr", { hidden: !this.showNoResultsMessage }, h("td", { class: "tds-table__info-message", colSpan: this.columnsNumber }, h("slot", { name: "no-result" }), this.noResultMessage)), h("slot", null)));
|
|
245
202
|
}
|
|
246
203
|
static get is() { return "tds-table-body"; }
|
|
247
204
|
static get originalStyleUrls() {
|
|
@@ -273,29 +230,27 @@ export class TdsTableBody {
|
|
|
273
230
|
"attribute": "body-data",
|
|
274
231
|
"reflect": false
|
|
275
232
|
},
|
|
276
|
-
"
|
|
277
|
-
"type": "
|
|
233
|
+
"noResultMessage": {
|
|
234
|
+
"type": "string",
|
|
278
235
|
"mutable": false,
|
|
279
236
|
"complexType": {
|
|
280
|
-
"original": "
|
|
281
|
-
"resolved": "
|
|
237
|
+
"original": "string",
|
|
238
|
+
"resolved": "string",
|
|
282
239
|
"references": {}
|
|
283
240
|
},
|
|
284
241
|
"required": false,
|
|
285
242
|
"optional": false,
|
|
286
243
|
"docs": {
|
|
287
244
|
"tags": [],
|
|
288
|
-
"text": "Prop for
|
|
245
|
+
"text": "Prop for no result message when using filtering"
|
|
289
246
|
},
|
|
290
|
-
"attribute": "
|
|
291
|
-
"reflect": false
|
|
292
|
-
"defaultValue": "false"
|
|
247
|
+
"attribute": "no-result-message",
|
|
248
|
+
"reflect": false
|
|
293
249
|
}
|
|
294
250
|
};
|
|
295
251
|
}
|
|
296
252
|
static get states() {
|
|
297
253
|
return {
|
|
298
|
-
"jsonData": {},
|
|
299
254
|
"rowsPerPage": {},
|
|
300
255
|
"enableMultiselect": {},
|
|
301
256
|
"enablePaginationTableBody": {},
|