@scania/tegel 0.0.10 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-ee36ffa1.js +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/tds-banner.cjs.entry.js +6 -6
- package/dist/cjs/tds-body-cell_2.cjs.entry.js +4 -8
- package/dist/cjs/tds-button.cjs.entry.js +22 -16
- package/dist/cjs/tds-card.cjs.entry.js +3 -3
- package/dist/cjs/tds-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/tds-chip.cjs.entry.js +2 -2
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-datetime.cjs.entry.js +3 -1
- package/dist/cjs/tds-dropdown-option.cjs.entry.js +1 -1
- package/dist/cjs/tds-dropdown.cjs.entry.js +36 -14
- package/dist/cjs/tds-footer.cjs.entry.js +2 -2
- package/dist/cjs/tds-header-cell.cjs.entry.js +5 -5
- package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +2 -2
- package/dist/cjs/tds-header-dropdown-list.cjs.entry.js +6 -6
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/tds-header-launcher-grid.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-list-title.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-launcher-list.cjs.entry.js +2 -2
- 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-link.cjs.entry.js +1 -1
- package/dist/cjs/tds-message.cjs.entry.js +3 -3
- package/dist/cjs/tds-modal.cjs.entry.js +2 -2
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +10 -80
- package/dist/{components/popper.js → cjs/tds-popover-core.cjs.entry.js} +160 -1
- package/dist/cjs/tds-popover-menu.cjs.entry.js +12 -62
- package/dist/cjs/tds-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-close-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-overlay.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu.cjs.entry.js +7 -3
- package/dist/cjs/tds-slider.cjs.entry.js +6 -2
- package/dist/cjs/tds-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +1 -3
- package/dist/cjs/tds-table-body.cjs.entry.js +6 -9
- package/dist/cjs/tds-table-header.cjs.entry.js +5 -5
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/tds-table.cjs.entry.js +14 -10
- package/dist/cjs/tds-text-field.cjs.entry.js +2 -2
- package/dist/cjs/tds-toast.cjs.entry.js +5 -5
- package/dist/cjs/tds-toggle.cjs.entry.js +1 -1
- package/dist/cjs/tds-tooltip.cjs.entry.js +41 -82
- package/dist/cjs/tegel.cjs.js +1 -1
- package/dist/cjs/{utils-41de5fb2.js → utils-a908536d.js} +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +1 -0
- package/dist/collection/components/accordion/accordion.js +3 -0
- package/dist/collection/components/banner/banner.css +1 -1
- package/dist/collection/components/banner/banner.js +11 -11
- package/dist/collection/components/banner/banner.stories.js +8 -8
- package/dist/collection/components/block/block.js +3 -0
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.js +3 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +3 -0
- package/dist/collection/components/button/button.css +35 -16
- package/dist/collection/components/button/button.js +43 -18
- package/dist/collection/components/button/button.stories.js +26 -8
- package/dist/collection/components/card/card.css +3 -0
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/card/card.stories.js +2 -1
- package/dist/collection/components/chip/chip.js +2 -2
- package/dist/collection/components/datetime/datetime.js +38 -2
- package/dist/collection/components/datetime/datetime.stories.js +27 -3
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +4 -1
- package/dist/collection/components/dropdown/dropdown.js +45 -14
- package/dist/collection/components/footer/footer-group/footer-group.js +3 -0
- package/dist/collection/components/footer/footer-item/footer-item.js +3 -0
- package/dist/collection/components/footer/footer.css +1 -0
- package/dist/collection/components/header/core-header-item/core-header-item.js +3 -0
- package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.js +3 -0
- package/dist/collection/components/header/header-dropdown/header-dropdown.css +1 -1
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +1 -0
- package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.css +2 -2
- package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.js +10 -7
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.css +3 -3
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.js +7 -4
- package/dist/collection/components/header/header-item/header-item.js +3 -0
- package/dist/collection/components/header/header-launcher/header-launcher.css +1 -1
- package/dist/collection/components/header/header-launcher/header-launcher.js +3 -0
- package/dist/collection/components/header/header-launcher-grid/header-launcher-grid.js +3 -0
- package/dist/collection/components/header/header-launcher-grid-item/header-launcher-grid-item.js +3 -0
- package/dist/collection/components/header/header-launcher-grid-title/header-launcher-grid-title.js +3 -0
- package/dist/collection/components/header/header-launcher-list/header-launcher-list.js +4 -1
- package/dist/collection/components/header/header-launcher-list-item/header-launcher-list-item.js +4 -1
- package/dist/collection/components/header/header-launcher-list-title/header-launcher-list-title.js +3 -0
- package/dist/collection/components/header/header-title/header-title.js +3 -0
- package/dist/collection/components/header/header.js +1 -0
- package/dist/collection/components/header/header.stories.js +2 -0
- package/dist/collection/components/link/link.js +4 -1
- package/dist/collection/components/link/link.stories.js +5 -3
- package/dist/collection/components/message/message.js +7 -7
- package/dist/collection/components/message/message.stories.js +6 -6
- package/dist/collection/components/modal/modal.css +2 -2
- package/dist/collection/components/popover-canvas/popover-canvas.css +4 -8
- package/dist/collection/components/popover-canvas/popover-canvas.js +13 -102
- package/dist/collection/components/popover-canvas/popover-canvas.stories.js +8 -8
- package/dist/collection/components/popover-core/popover-core.js +390 -0
- package/dist/collection/components/popover-menu/popover-menu.css +3 -9
- package/dist/collection/components/popover-menu/popover-menu.js +17 -80
- package/dist/collection/components/popover-menu/popover-menu.stories.js +3 -3
- package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +1 -1
- package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.js +1 -1
- package/dist/collection/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.js +1 -1
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.js +1 -1
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.js +1 -1
- package/dist/collection/components/side-menu/side-menu-overlay/side-menu-overlay.css +8 -1
- package/dist/collection/components/side-menu/side-menu.css +12 -11
- package/dist/collection/components/side-menu/side-menu.js +9 -5
- package/dist/collection/components/slider/slider.js +5 -1
- package/dist/collection/components/stepper/stepper.js +3 -0
- package/dist/collection/components/table/table/table.js +22 -15
- package/dist/collection/components/table/table-body/table-body.js +10 -13
- package/dist/collection/components/table/table-body-cell/table-body-cell.js +3 -0
- package/dist/collection/components/table/table-body-row/table-body-row.css +2 -2
- package/dist/collection/components/table/table-body-row/table-body-row.js +7 -9
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.css +4 -0
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +1 -2
- package/dist/collection/components/table/table-component-basic.stories.js +1 -1
- package/dist/collection/components/table/table-component-batch-actions.stories.js +2 -2
- package/dist/collection/components/table/table-component-bodydata.stories.js +1 -1
- package/dist/collection/components/table/table-component-custom-width.stories.js +1 -1
- package/dist/collection/components/table/table-component-event-listeners.stories.js +1 -1
- package/dist/collection/components/table/table-component-expandable-rows.stories.js +2 -2
- package/dist/collection/components/table/table-component-filtering.stories.js +6 -4
- package/dist/collection/components/table/table-component-multiselect.stories.js +5 -5
- package/dist/collection/components/table/table-component-pagination.stories.js +1 -1
- package/dist/collection/components/table/table-component-sorting.stories.js +1 -1
- package/dist/collection/components/table/table-header/table-header.js +10 -7
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +7 -7
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +4 -4
- package/dist/collection/components/table/table.filtering.spec.js +1 -1
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +3 -0
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +3 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +3 -0
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +3 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +3 -0
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +3 -0
- package/dist/collection/components/text-field/text-field.css +8 -6
- package/dist/collection/components/toast/toast.css +1 -1
- package/dist/collection/components/toast/toast.js +5 -5
- package/dist/collection/components/toast/toast.stories.js +6 -6
- package/dist/collection/components/tooltip/tooltip.css +1 -1
- package/dist/collection/components/tooltip/tooltip.js +45 -109
- package/dist/collection/components/tooltip/tooltip.stories.js +9 -1
- package/dist/collection/stories/patterns/navigation/navigation-fewitems.stories.js +1 -1
- package/dist/collection/stories/patterns/navigation/navigation-manyitems.stories.js +4 -3
- package/dist/collection/stories/patterns/navigation/navigation-user-menu.stories.js +1 -1
- package/dist/collection/stories/tegel.stories.js +1 -1
- package/dist/components/header-dropdown-list-item.js +3 -3
- package/dist/components/header-dropdown-list.js +7 -7
- package/dist/components/popover-canvas.js +20 -89
- package/dist/{esm/popper-15e448b4.js → components/popover-core.js} +184 -1
- package/dist/components/table-body-row.js +5 -10
- package/dist/components/tds-banner.js +6 -6
- package/dist/components/tds-button.js +23 -17
- package/dist/components/tds-card.js +2 -2
- package/dist/components/tds-chip.js +1 -1
- package/dist/components/tds-datetime.js +5 -1
- package/dist/components/tds-dropdown-option.js +1 -1
- package/dist/components/tds-dropdown.js +35 -13
- package/dist/components/tds-footer.js +1 -1
- package/dist/components/tds-header-cell.js +7 -7
- package/dist/components/tds-header-dropdown.js +15 -9
- package/dist/components/tds-header-launcher-grid.js +1 -1
- package/dist/components/tds-header-launcher-list-item.js +1 -1
- package/dist/components/tds-header-launcher-list.js +1 -1
- package/dist/components/tds-header-launcher.js +17 -11
- package/dist/components/tds-link.js +1 -1
- package/dist/components/tds-message.js +4 -4
- package/dist/components/tds-modal.js +1 -1
- package/dist/components/tds-popover-core.d.ts +11 -0
- package/dist/components/tds-popover-core.js +6 -0
- package/dist/components/tds-popover-menu.js +22 -70
- package/dist/components/tds-side-menu-overlay.js +1 -1
- package/dist/components/tds-side-menu.js +10 -6
- package/dist/components/tds-slider.js +5 -1
- package/dist/components/tds-table-body-row-expandable.js +1 -3
- package/dist/components/tds-table-body.js +8 -11
- package/dist/components/tds-table-header.js +7 -7
- package/dist/components/tds-table-toolbar.js +3 -3
- package/dist/components/tds-table.js +16 -12
- package/dist/components/tds-text-field.js +1 -1
- package/dist/components/tds-toast.js +5 -5
- package/dist/components/tds-tooltip.js +51 -90
- package/dist/components/utils.js +1 -1
- package/dist/esm/index-23ee700b.js +4 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/tds-banner.entry.js +6 -6
- package/dist/esm/tds-body-cell_2.entry.js +4 -8
- package/dist/esm/tds-button.entry.js +22 -16
- package/dist/esm/tds-card.entry.js +3 -3
- package/dist/esm/tds-checkbox.entry.js +1 -1
- package/dist/esm/tds-chip.entry.js +2 -2
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/tds-datetime.entry.js +3 -1
- package/dist/esm/tds-dropdown-option.entry.js +1 -1
- package/dist/esm/tds-dropdown.entry.js +36 -14
- package/dist/esm/tds-footer.entry.js +2 -2
- package/dist/esm/tds-header-cell.entry.js +5 -5
- package/dist/esm/tds-header-dropdown-list-item.entry.js +2 -2
- package/dist/esm/tds-header-dropdown-list.entry.js +6 -6
- package/dist/esm/tds-header-dropdown.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/tds-header-launcher-grid.entry.js +1 -1
- package/dist/esm/tds-header-launcher-list-item.entry.js +1 -1
- package/dist/esm/tds-header-launcher-list-title.entry.js +1 -1
- package/dist/esm/tds-header-launcher-list.entry.js +2 -2
- package/dist/esm/tds-header-launcher.entry.js +2 -2
- package/dist/esm/tds-header.entry.js +1 -1
- package/dist/esm/tds-link.entry.js +1 -1
- package/dist/esm/tds-message.entry.js +3 -3
- package/dist/esm/tds-modal.entry.js +2 -2
- package/dist/esm/tds-popover-canvas.entry.js +10 -80
- package/dist/{cjs/popper-d7adcfc6.js → esm/tds-popover-core.entry.js} +155 -2
- package/dist/esm/tds-popover-menu.entry.js +12 -62
- package/dist/esm/tds-radio-button.entry.js +1 -1
- package/dist/esm/tds-side-menu-close-button.entry.js +1 -1
- package/dist/esm/tds-side-menu-item.entry.js +1 -1
- package/dist/esm/tds-side-menu-overlay.entry.js +1 -1
- package/dist/esm/tds-side-menu.entry.js +7 -3
- package/dist/esm/tds-slider.entry.js +6 -2
- package/dist/esm/tds-stepper.entry.js +1 -1
- package/dist/esm/tds-table-body-row-expandable.entry.js +1 -3
- package/dist/esm/tds-table-body.entry.js +6 -9
- package/dist/esm/tds-table-header.entry.js +5 -5
- package/dist/esm/tds-table-toolbar.entry.js +2 -2
- package/dist/esm/tds-table.entry.js +14 -10
- package/dist/esm/tds-text-field.entry.js +2 -2
- package/dist/esm/tds-toast.entry.js +5 -5
- package/dist/esm/tds-toggle.entry.js +1 -1
- package/dist/esm/tds-tooltip.entry.js +42 -83
- package/dist/esm/tegel.js +1 -1
- package/dist/esm/{utils-74fb1bed.js → utils-8544b156.js} +1 -1
- package/dist/tegel/{p-347414ad.entry.js → p-0ae649c3.entry.js} +1 -1
- package/dist/tegel/p-129ad2a4.entry.js +1 -0
- package/dist/tegel/{p-a4e3eb95.entry.js → p-13db5228.entry.js} +1 -1
- package/dist/tegel/{p-1acb8407.entry.js → p-1f43d4f0.entry.js} +1 -1
- package/dist/tegel/p-24488e72.entry.js +1 -0
- package/dist/tegel/{p-9f1e1cc0.entry.js → p-284d950d.entry.js} +1 -1
- package/dist/tegel/p-28a07d46.entry.js +1 -0
- package/dist/tegel/{p-e4dc07bb.entry.js → p-31848a92.entry.js} +1 -1
- package/dist/tegel/p-39e17b32.entry.js +1 -0
- package/dist/tegel/{p-aa443b06.entry.js → p-3d28689e.entry.js} +1 -1
- package/dist/tegel/{p-99837611.entry.js → p-400282e5.entry.js} +1 -1
- package/dist/tegel/{p-9b29bf68.entry.js → p-42990ec0.entry.js} +1 -1
- package/dist/tegel/p-5e0a3931.entry.js +1 -0
- package/dist/tegel/p-5e4b20ea.entry.js +1 -0
- package/dist/tegel/p-5ed7d376.entry.js +1 -0
- package/dist/tegel/{p-c5ab3a3b.entry.js → p-656add37.entry.js} +1 -1
- package/dist/tegel/{p-54e56257.entry.js → p-6654e59d.entry.js} +1 -1
- package/dist/tegel/p-6caac101.entry.js +1 -0
- package/dist/tegel/{p-9dc14c21.js → p-72fced16.js} +1 -1
- package/dist/tegel/p-76c000e3.entry.js +1 -0
- package/dist/tegel/p-7a03d28c.entry.js +1 -0
- package/dist/tegel/p-7c35af1b.entry.js +1 -0
- package/dist/tegel/p-7ccff0a5.entry.js +1 -0
- package/dist/tegel/p-81915088.entry.js +1 -0
- package/dist/tegel/{p-9fe0d654.entry.js → p-823399ef.entry.js} +1 -1
- package/dist/tegel/{p-8ba77ea3.entry.js → p-84d231a5.entry.js} +1 -1
- package/dist/tegel/{p-fc6da19c.entry.js → p-86028bac.entry.js} +1 -1
- package/dist/tegel/{p-b5424456.entry.js → p-88807dac.entry.js} +1 -1
- package/dist/tegel/p-88d7c4c1.entry.js +1 -0
- package/dist/tegel/p-8e82be94.entry.js +1 -0
- package/dist/tegel/p-9f8aac62.entry.js +1 -0
- package/dist/tegel/p-a8cc3901.entry.js +1 -0
- package/dist/tegel/{p-f9d04ff2.entry.js → p-aa7e2f79.entry.js} +1 -1
- package/dist/tegel/p-afde572b.entry.js +1 -0
- package/dist/tegel/p-b63b9baa.entry.js +1 -0
- package/dist/tegel/p-c0ac4d0a.entry.js +1 -0
- package/dist/tegel/p-c2566d65.entry.js +1 -0
- package/dist/tegel/p-d0f15f73.entry.js +1 -0
- package/dist/tegel/{p-10337d3f.entry.js → p-d2ca7f58.entry.js} +1 -1
- package/dist/tegel/p-d3c3633b.entry.js +1 -0
- package/dist/tegel/p-d4c25eb6.entry.js +1 -0
- package/dist/tegel/{p-e24835ba.entry.js → p-d60cb9e5.entry.js} +1 -1
- package/dist/tegel/p-d735c39f.entry.js +1 -0
- package/dist/tegel/{p-e3f8fc68.entry.js → p-df318a85.entry.js} +1 -1
- package/dist/tegel/p-e36ceefe.entry.js +1 -0
- package/dist/tegel/{p-c15bbe0b.entry.js → p-f682dd0b.entry.js} +1 -1
- package/dist/tegel/p-fe4ac74c.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 +1 -0
- package/dist/types/components/accordion/accordion.d.ts +3 -0
- package/dist/types/components/banner/banner.d.ts +3 -3
- package/dist/types/components/banner/banner.stories.d.ts +2 -2
- package/dist/types/components/block/block.d.ts +3 -0
- package/dist/types/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +3 -0
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +3 -0
- package/dist/types/components/button/button.d.ts +6 -3
- package/dist/types/components/button/button.stories.d.ts +16 -2
- package/dist/types/components/chip/chip.d.ts +1 -1
- package/dist/types/components/datetime/datetime.d.ts +5 -1
- package/dist/types/components/datetime/datetime.stories.d.ts +26 -0
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +4 -1
- package/dist/types/components/dropdown/dropdown.d.ts +5 -1
- package/dist/types/components/footer/footer-group/footer-group.d.ts +3 -0
- package/dist/types/components/footer/footer-item/footer-item.d.ts +3 -0
- package/dist/types/components/header/core-header-item/core-header-item.d.ts +3 -0
- package/dist/types/components/header/header-brand-symbol/header-brand-symbol.d.ts +3 -0
- package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +1 -0
- package/dist/types/components/header/header-dropdown-list/header-dropdown-list.d.ts +5 -1
- package/dist/types/components/header/header-dropdown-list-item/header-dropdown-list-item.d.ts +5 -2
- package/dist/types/components/header/header-item/header-item.d.ts +3 -0
- package/dist/types/components/header/header-launcher/header-launcher.d.ts +3 -0
- package/dist/types/components/header/header-launcher-grid/header-launcher-grid.d.ts +3 -0
- package/dist/types/components/header/header-launcher-grid-item/header-launcher-grid-item.d.ts +3 -0
- package/dist/types/components/header/header-launcher-grid-title/header-launcher-grid-title.d.ts +3 -0
- package/dist/types/components/header/header-launcher-list/header-launcher-list.d.ts +3 -0
- package/dist/types/components/header/header-launcher-list-item/header-launcher-list-item.d.ts +3 -0
- package/dist/types/components/header/header-launcher-list-title/header-launcher-list-title.d.ts +3 -0
- package/dist/types/components/header/header-title/header-title.d.ts +3 -0
- package/dist/types/components/header/header.d.ts +1 -0
- package/dist/types/components/header/header.stories.d.ts +1 -0
- package/dist/types/components/link/link.d.ts +3 -0
- package/dist/types/components/message/message.d.ts +3 -3
- package/dist/types/components/message/message.stories.d.ts +2 -2
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +7 -13
- package/dist/types/components/popover-core/popover-core.d.ts +46 -0
- package/dist/types/components/popover-menu/popover-menu.d.ts +12 -10
- package/dist/types/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.d.ts +1 -1
- package/dist/types/components/side-menu/side-menu-dropdown/side-menu-dropdown.d.ts +1 -1
- package/dist/types/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.d.ts +1 -1
- package/dist/types/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.d.ts +1 -1
- package/dist/types/components/side-menu/side-menu-item/side-menu-item.d.ts +1 -1
- package/dist/types/components/side-menu/side-menu.d.ts +1 -1
- package/dist/types/components/stepper/stepper.d.ts +3 -0
- package/dist/types/components/table/table/table.d.ts +9 -6
- package/dist/types/components/table/table-body/table-body.d.ts +4 -4
- package/dist/types/components/table/table-body-cell/table-body-cell.d.ts +3 -0
- package/dist/types/components/table/table-body-row/table-body-row.d.ts +4 -2
- package/dist/types/components/table/table-body-row-expandable/table-body-row-expandable.d.ts +1 -0
- package/dist/types/components/table/table-component-multiselect.stories.d.ts +2 -2
- package/dist/types/components/table/table-header/table-header.d.ts +5 -2
- package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +2 -2
- package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +1 -1
- package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +3 -0
- package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +3 -0
- package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +3 -0
- package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +3 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +3 -0
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +3 -0
- package/dist/types/components/toast/toast.d.ts +1 -1
- package/dist/types/components/toast/toast.stories.d.ts +2 -2
- package/dist/types/components/tooltip/tooltip.d.ts +16 -8
- package/dist/types/components.d.ts +172 -51
- package/package.json +4 -3
- package/dist/tegel/p-06093e3e.entry.js +0 -1
- package/dist/tegel/p-0995ca77.entry.js +0 -1
- package/dist/tegel/p-19fb9ad5.entry.js +0 -1
- package/dist/tegel/p-1bac7d2e.entry.js +0 -1
- package/dist/tegel/p-22b2c81a.entry.js +0 -1
- package/dist/tegel/p-2707da38.entry.js +0 -1
- package/dist/tegel/p-34a06d2f.entry.js +0 -1
- package/dist/tegel/p-3c9865c3.entry.js +0 -1
- package/dist/tegel/p-40142a58.entry.js +0 -1
- package/dist/tegel/p-44a2664d.entry.js +0 -1
- package/dist/tegel/p-48136431.entry.js +0 -1
- package/dist/tegel/p-49a084db.entry.js +0 -1
- package/dist/tegel/p-4c809685.entry.js +0 -1
- package/dist/tegel/p-6200fc54.entry.js +0 -1
- package/dist/tegel/p-674009bd.entry.js +0 -1
- package/dist/tegel/p-6bee84a2.entry.js +0 -1
- package/dist/tegel/p-73a8f43e.entry.js +0 -1
- package/dist/tegel/p-7c0dcd00.js +0 -1
- package/dist/tegel/p-8c194dd8.entry.js +0 -1
- package/dist/tegel/p-95e170f3.entry.js +0 -1
- package/dist/tegel/p-a34bb501.entry.js +0 -1
- package/dist/tegel/p-afe13096.entry.js +0 -1
- package/dist/tegel/p-c5588508.entry.js +0 -1
- package/dist/tegel/p-d5bd9b2e.entry.js +0 -1
- package/dist/tegel/p-e95059e9.entry.js +0 -1
- package/dist/tegel/p-f36ec03b.entry.js +0 -1
- package/dist/tegel/p-f795bc11.entry.js +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const dropdownCss = ":host button{all:unset;height:100%;width:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);border-radius:4px 4px 0 0}:host button:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host button .value-wrapper{padding:0 16px;display:flex;align-items:center;justify-content:space-between}:host button.placeholder{color:var(--tds-dropdown-placeholder-color)}:host button.value{color:var(--tds-dropdown-value-color)}:host button:focus{border-bottom-color:transparent}:host button:focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host button.error{border-bottom:1px solid var(--tds-negative)}:host button:disabled{color:var(--tds-dropdown-disabled-color);border-bottom:1px solid transparent}:host .filter{display:flex;align-items:center;justify-content:space-between;height:100%;background-color:var(--tds-dropdown-bg);border-bottom:1px solid var(--tds-dropdown-border-bottom);padding-left:16px;border-radius:4px 4px 0 0}:host .filter:hover{border-bottom:1px solid var(--tds-dropdown-border-bottom-hover)}:host .filter.disabled{color:var(--tds-dropdown-disabled-color)}:host .filter .value-wrapper{display:flex;width:100%;height:100%}:host .filter .label-inside-as-placeholder{position:absolute;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-dropdown-placeholder-color)}:host .filter .label-inside-as-placeholder.lg{top:20px}:host .filter .label-inside-as-placeholder.md{top:16px}:host .filter .label-inside-as-placeholder.sm{display:none}:host .filter .label-inside-as-placeholder.selected{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .filter .label-inside-as-placeholder.selected.lg{top:12px}:host .filter .label-inside-as-placeholder.selected.md{top:8px}:host .filter .label-inside-as-placeholder.selected.sm{display:none}:host .filter .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .filter.focus{border-bottom-color:transparent}:host .filter.focus::before{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:2px;background:var(--tds-dropdown-border-bottom-open)}:host .filter input{flex:1;all:unset;width:100%}:host .filter input::placeholder{color:var(--tds-dropdown-placeholder-color)}:host .filter input:disabled::placeholder{color:var(--tds-dropdown-disabled-color)}:host .filter tds-icon{margin-right:16px;z-index:101}:host{display:block;position:relative;z-index:100;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}:host .label-outside{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-dropdown-label-color);margin-bottom:8px}:host .label-outside.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select{position:relative}:host .dropdown-select.disabled .label-inside,:host .dropdown-select.disabled .placeholder,:host .dropdown-select.disabled .label-inside-as-placeholder,:host .dropdown-select.disabled .value-wrapper{color:var(--tds-dropdown-disabled-color)}:host .dropdown-select .label-inside{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);color:var(--tds-dropdown-label-inside-color)}:host .dropdown-select .label-inside.lg{top:12px;left:16px}:host .dropdown-select .label-inside.md{top:8px;left:16px}:host .dropdown-select .label-inside.sm{display:none}:host .dropdown-select .label-inside+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select .placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .dropdown-select .label-inside-as-placeholder{color:var(--tds-dropdown-placeholder-color)}:host .dropdown-select .label-inside-as-placeholder.selected{position:absolute;font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:all 0.2s ease-in-out}:host .dropdown-select .label-inside-as-placeholder.selected.lg{top:12px}:host .dropdown-select .label-inside-as-placeholder.selected.md{top:8px}:host .dropdown-select .label-inside-as-placeholder.selected.sm{display:none}:host .dropdown-select .label-inside-as-placeholder.selected+.placeholder:not(.sm){margin-top:8px}:host .dropdown-select.lg{height:55px}:host .dropdown-select.md{height:47px}:host .dropdown-select.sm{height:39px}:host .helper{margin-top:4px;color:var(--tds-dropdown-helper-color);font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;align-items:center;gap:8px}:host .helper.error{color:var(--tds-negative)}:host .helper.disabled{color:var(--tds-dropdown-disabled-color)}:host .dropdown-list{position:absolute;margin-top:1px;width:100%;transform-origin:top;transition:transform 0.2s ease-in-out;box-shadow:rgba(0, 0, 0, 0.1) 0 2px 3px 0;border-radius:0 0 4px 4px;overflow-y:auto}:host .dropdown-list::-webkit-scrollbar{width:4px;background-color:inherit}:host .dropdown-list::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .dropdown-list ::-webkit-scrollbar-button{height:0;width:0}:host .dropdown-list.lg{max-height:312px}:host .dropdown-list.md{max-height:312px}:host .dropdown-list.sm{max-height:260px}:host .dropdown-list.up{bottom:100%;margin-top:0;margin-bottom:1px;transform-origin:bottom;display:flex;flex-direction:column-reverse;box-shadow:rgba(0, 0, 0, 0.1) 0 -1px 3px 0;border-radius:4px 4px 0 0}:host .dropdown-list.up.label-outside{bottom:calc(100% - 24px)}:host .dropdown-list.closed{transform:scaleY(0);visibility:hidden}:host .dropdown-list.open{transform:scaleY(1)}:host .dropdown-list .no-result{display:flex;align-items:center;padding:0 16px;background-color:var(--tds-dropdown-bg)}:host .dropdown-list .no-result.lg{height:56px}:host .dropdown-list .no-result.md{height:48px}:host .dropdown-list .no-result.sm{height:40px}:host tds-icon{transition:transform 0.2s ease-in-out}:host tds-icon.open{transform:rotateZ(180deg)}";
|
|
9
9
|
|
|
@@ -19,28 +19,37 @@ const TdsDropdown = class {
|
|
|
19
19
|
this.children = Array.from(this.host.children);
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
+
this.componentWillRender = () => {
|
|
23
|
+
if (!this.options) {
|
|
24
|
+
this.children = Array.from(this.host.children);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
22
27
|
this.setDefaultOption = () => {
|
|
23
28
|
this.children = this.children.map((element) => {
|
|
24
29
|
if (this.multiselect) {
|
|
25
|
-
this.defaultValue.split(',').forEach((
|
|
26
|
-
if (
|
|
30
|
+
this.defaultValue.split(',').forEach((value) => {
|
|
31
|
+
if (value === element.value) {
|
|
27
32
|
element.setSelected(true);
|
|
28
33
|
this.selection = this.selection
|
|
29
34
|
? [...this.selection, { value: element.value, label: element.textContent }]
|
|
30
35
|
: [{ value: element.value, label: element.textContent }];
|
|
31
36
|
}
|
|
37
|
+
else {
|
|
38
|
+
element.setSelected(false);
|
|
39
|
+
}
|
|
32
40
|
});
|
|
33
41
|
}
|
|
34
42
|
else {
|
|
35
43
|
if (this.defaultValue === element.value) {
|
|
36
|
-
this.reset();
|
|
37
44
|
element.setSelected(true);
|
|
38
45
|
this.selection = [{ value: element.value, label: element.textContent }];
|
|
39
46
|
}
|
|
47
|
+
else {
|
|
48
|
+
element.setSelected(false);
|
|
49
|
+
}
|
|
40
50
|
}
|
|
41
51
|
return element;
|
|
42
52
|
});
|
|
43
|
-
this.handleChange();
|
|
44
53
|
};
|
|
45
54
|
this.getOpenDirection = () => {
|
|
46
55
|
var _a, _b, _c, _d, _e;
|
|
@@ -65,14 +74,14 @@ const TdsDropdown = class {
|
|
|
65
74
|
this.handleFilter = (event) => {
|
|
66
75
|
this.tdsInput.emit(event);
|
|
67
76
|
const query = event.target.value.toLowerCase();
|
|
68
|
-
/* Check if the query is empty, and if so show all options */
|
|
77
|
+
/* Check if the query is empty, and if so, show all options */
|
|
69
78
|
if (query === '') {
|
|
70
79
|
this.children = this.children.map((element) => {
|
|
71
80
|
element.removeAttribute('hidden');
|
|
72
81
|
return element;
|
|
73
82
|
});
|
|
74
83
|
this.filterResult = null;
|
|
75
|
-
/* Hide the options that
|
|
84
|
+
/* Hide the options that do not match the query */
|
|
76
85
|
}
|
|
77
86
|
else {
|
|
78
87
|
this.filterResult = this.children.filter((element) => {
|
|
@@ -119,10 +128,16 @@ const TdsDropdown = class {
|
|
|
119
128
|
this.filterResult = undefined;
|
|
120
129
|
this.filterFocus = undefined;
|
|
121
130
|
}
|
|
122
|
-
/** Method that resets the Dropdown. */
|
|
131
|
+
/** Method that resets the Dropdown, marks all children as non-selected and resets the value to null. */
|
|
123
132
|
async reset() {
|
|
124
|
-
this.children
|
|
133
|
+
this.children = Array.from(this.host.children)
|
|
134
|
+
.filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION')
|
|
135
|
+
.map((element) => {
|
|
136
|
+
element.setSelected(false);
|
|
137
|
+
return element;
|
|
138
|
+
});
|
|
125
139
|
this.selection = null;
|
|
140
|
+
this.host.setAttribute('value', null);
|
|
126
141
|
this.handleChange();
|
|
127
142
|
}
|
|
128
143
|
/** Method for setting the value of the Dropdown. */
|
|
@@ -134,7 +149,9 @@ const TdsDropdown = class {
|
|
|
134
149
|
}
|
|
135
150
|
else {
|
|
136
151
|
this.selection = [{ value: newValue, label: newValueLabel }];
|
|
137
|
-
this.children = this.children
|
|
152
|
+
this.children = Array.from(this.host.children)
|
|
153
|
+
.filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION')
|
|
154
|
+
.map((element) => {
|
|
138
155
|
if (element.value !== newValue) {
|
|
139
156
|
element.setSelected(false);
|
|
140
157
|
}
|
|
@@ -142,16 +159,20 @@ const TdsDropdown = class {
|
|
|
142
159
|
});
|
|
143
160
|
}
|
|
144
161
|
this.handleChange();
|
|
162
|
+
this.host.setAttribute('value', this.selection.map((selection) => selection.value).toString());
|
|
145
163
|
return this.selection;
|
|
146
164
|
}
|
|
147
165
|
/** Method for removing a selected value in the Dropdown. */
|
|
148
166
|
async removeValue(oldValue) {
|
|
149
167
|
if (this.multiselect) {
|
|
150
|
-
this.children.
|
|
168
|
+
this.children = Array.from(this.host.children)
|
|
169
|
+
.filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION')
|
|
170
|
+
.map((element) => {
|
|
151
171
|
if (element.value === oldValue) {
|
|
152
172
|
this.selection = this.selection.filter((item) => item.value !== element.value);
|
|
153
173
|
element.setSelected(false);
|
|
154
174
|
}
|
|
175
|
+
return element;
|
|
155
176
|
});
|
|
156
177
|
}
|
|
157
178
|
else {
|
|
@@ -180,7 +201,7 @@ const TdsDropdown = class {
|
|
|
180
201
|
return;
|
|
181
202
|
}
|
|
182
203
|
if (event.key === 'ArrowDown') {
|
|
183
|
-
/* Get the index of the
|
|
204
|
+
/* Get the index of the current focus index, if there is no
|
|
184
205
|
nextElementSibling return the index for the first child in our Dropdown. */
|
|
185
206
|
const startingIndex = activeElement.nextElementSibling
|
|
186
207
|
? this.children.findIndex((element) => element === activeElement.nextElementSibling)
|
|
@@ -189,7 +210,7 @@ const TdsDropdown = class {
|
|
|
189
210
|
this.children[elementIndex].focus();
|
|
190
211
|
}
|
|
191
212
|
else if (event.key === 'ArrowUp') {
|
|
192
|
-
/* Get the index of the
|
|
213
|
+
/* Get the index of the current focus index, if there is no
|
|
193
214
|
previousElementSibling return the index for the first last in our Dropdown. */
|
|
194
215
|
const startingIndex = activeElement.nextElementSibling
|
|
195
216
|
? this.children.findIndex((element) => element === activeElement.previousElementSibling)
|
|
@@ -201,7 +222,8 @@ const TdsDropdown = class {
|
|
|
201
222
|
this.open = false;
|
|
202
223
|
}
|
|
203
224
|
}
|
|
204
|
-
// If the Dropdown gets closed
|
|
225
|
+
// If the Dropdown gets closed,
|
|
226
|
+
// this sets the value of the dropdown to the current selection labels or null if no selection is made.
|
|
205
227
|
handleOpenState() {
|
|
206
228
|
var _a, _b;
|
|
207
229
|
if (this.filter && this.multiselect) {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
|
-
const footerCss = ":host{display:block}:host slot[name=top]::slotted(*){background-color:var(--tds-footer-top-background);padding:40px;display:grid;grid-template-columns:repeat(4, 1fr);row-gap:40px;width:100%}:host .footer-main{background-color:var(--tds-footer-main-background);padding:0 40px}:host .footer-main-top{padding:40px 0;display:flex;justify-content:space-between}:host slot[name=start]::slotted(*),:host slot[name=end]::slotted(*){display:flex;column-gap:24px}:host .footer-main-bottom{padding:40px 0;display:flex;justify-content:space-between;border-top:1px solid var(--tds-footer-main-divider)}:host .footer-main-bottom small.copyright{margin:0;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-footer-main-copyright)}:host .footer-main-bottom .brand{background-image:var(--tds-background-image-scania-wordmark-white-svg);background-repeat:no-repeat;background-size:117px;background-position:right;width:117px;height:20px}:host .footer-main-bottom .brand p{color:transparent;padding:0;margin:0;height:100%;visibility:hidden}@media all and (max-width: 992px){:host slot[name=top]::slotted(*){display:block;width:100%;padding:0}:host .footer-main{padding:0 24px}:host .footer-main-top{flex-direction:column;row-gap:48px;padding:24px 0}:host slot[name=end]::slotted(*){flex-direction:row;gap:8px}:host .footer-main-bottom{flex-direction:column;padding-bottom:32px}:host .footer-main-bottom p.copyright{padding-bottom:96px}:host .footer-main-bottom .brand{width:100%}}";
|
|
8
|
+
const footerCss = ":host{display:block}:host slot[name=top]::slotted(*){box-sizing:border-box;background-color:var(--tds-footer-top-background);padding:40px;display:grid;grid-template-columns:repeat(4, 1fr);row-gap:40px;width:100%}:host .footer-main{background-color:var(--tds-footer-main-background);padding:0 40px}:host .footer-main-top{padding:40px 0;display:flex;justify-content:space-between}:host slot[name=start]::slotted(*),:host slot[name=end]::slotted(*){display:flex;column-gap:24px}:host .footer-main-bottom{padding:40px 0;display:flex;justify-content:space-between;border-top:1px solid var(--tds-footer-main-divider)}:host .footer-main-bottom small.copyright{margin:0;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-footer-main-copyright)}:host .footer-main-bottom .brand{background-image:var(--tds-background-image-scania-wordmark-white-svg);background-repeat:no-repeat;background-size:117px;background-position:right;width:117px;height:20px}:host .footer-main-bottom .brand p{color:transparent;padding:0;margin:0;height:100%;visibility:hidden}@media all and (max-width: 992px){:host slot[name=top]::slotted(*){display:block;width:100%;padding:0}:host .footer-main{padding:0 24px}:host .footer-main-top{flex-direction:column;row-gap:48px;padding:24px 0}:host slot[name=end]::slotted(*){flex-direction:row;gap:8px}:host .footer-main-bottom{flex-direction:column;padding-bottom:32px}:host .footer-main-bottom p.copyright{padding-bottom:96px}:host .footer-main-bottom .brand{width:100%}}";
|
|
9
9
|
|
|
10
10
|
const TdsFooter = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -7,8 +7,8 @@ const index = require('./index-ee36ffa1.js');
|
|
|
7
7
|
const tableHeaderCellCss = ":host(.tds-table__header-cell){box-sizing:border-box;font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);display:table-cell;text-align:left;color:var(--tds-table-color);background-color:var(--tds-table-header-background);border-bottom:1px solid var(--tds-table-header-background-hover);padding:0;height:48px;min-width:192px;box-sizing:border-box;vertical-align:middle;overflow:hidden;transition:background-color 200ms ease}:host(.tds-table__header-cell) *{box-sizing:border-box}:host(.tds-table__header-cell) .tds-table__header-text{padding:0 16px;margin:0}:host(.tds-table__header-cell--sortable) .tds-table__header-button{display:flex;align-items:center;gap:8px;justify-content:start;flex-direction:row;width:100%;height:100%;padding:0 16px;background-color:transparent;border:none;cursor:pointer;transition:background-color 200ms ease}:host(.tds-table__header-cell--sortable) .tds-table__header-button:focus{outline:2px solid var(--tds-table-header-btn-focus);outline-offset:-2px}:host(.tds-table__header-cell--sortable) .tds-table__header-button:focus .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--sortable) .tds-table__header-button .tds-table__header-button-text{font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);text-align:left;color:var(--tds-table-header-btn-color)}:host(.tds-table__header-cell--sortable) .tds-table__header-button .tds-table__header-button-icon{flex:0 0 16px;height:16px;width:16px;opacity:0;transform-origin:center;transition:opacity 200ms ease-in, transform 200ms ease;fill:var(--tds-table-color)}:host(.tds-table__header-cell--sortable) .tds-table__header-button:hover .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--right-align) .tds-table__header-button{text-align:right;justify-content:end;flex-direction:row-reverse}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button{background-color:var(--tds-table-header-btn-background)}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button:hover{background-color:var(--tds-table-header-btn-background-hover)}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button .tds-table__header-button-icon{opacity:1}:host(.tds-table__header-cell--is-sorted) .tds-table__header-button .tds-table__header-button-icon--rotate{transform:rotate(180deg)}:host(.tds-table--compact){height:33px}:host(.tds-table--divider){border-right:1px solid var(--tds-table-divider)}:host(.tds-table--divider:last-of-type){border-right:none}:host(.tds-table--no-min-width){min-width:unset}:host(.tds-table__header-cell:first-of-type){border-top-left-radius:4px}:host(.tds-table__header-cell:last-of-type){border-top-right-radius:4px}:host(.tds-table--extra-column:first-of-type){border-top-left-radius:0}:host(.tds-table--toolbar-available){border-radius:0}:host(.tds-table--extra-column.tds-table--toolbar-available){border-radius:0}:host(.tds-table__header-cell.tds-table--toolbar-available:first-of-type){border-top-left-radius:0}:host(.tds-table__header-cell.tds-table--toolbar-available:last-of-type){border-top-right-radius:0}";
|
|
8
8
|
|
|
9
9
|
const relevantTableProps = [
|
|
10
|
-
'
|
|
11
|
-
'
|
|
10
|
+
'multiselect',
|
|
11
|
+
'expandableRows',
|
|
12
12
|
'compactDesign',
|
|
13
13
|
'noMinWidth',
|
|
14
14
|
'verticalDividers',
|
|
@@ -79,10 +79,10 @@ const TdsTableHeaderCell = class {
|
|
|
79
79
|
this.verticalDividers = false;
|
|
80
80
|
this.compactDesign = false;
|
|
81
81
|
this.noMinWidth = false;
|
|
82
|
-
this.
|
|
82
|
+
this.multiselect = false;
|
|
83
83
|
this.enableToolbarDesign = false;
|
|
84
84
|
this.tableId = '';
|
|
85
|
-
this.
|
|
85
|
+
this.expandableRows = false;
|
|
86
86
|
}
|
|
87
87
|
internalTdsPropChangeListener(event) {
|
|
88
88
|
if (this.tableId === event.detail.tableId) {
|
|
@@ -147,7 +147,7 @@ const TdsTableHeaderCell = class {
|
|
|
147
147
|
'tds-table--compact': this.compactDesign,
|
|
148
148
|
'tds-table--divider': this.verticalDividers,
|
|
149
149
|
'tds-table--no-min-width': this.noMinWidth,
|
|
150
|
-
'tds-table--extra-column': this.
|
|
150
|
+
'tds-table--extra-column': this.multiselect || this.expandableRows,
|
|
151
151
|
'tds-table--toolbar-available': this.enableToolbarDesign,
|
|
152
152
|
}, style: { width: this.customWidth },
|
|
153
153
|
// Calling actions from here to enable hover functionality for both sortable and un-sortable Tables
|
|
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
6
|
|
|
7
|
-
const headerDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:var(--tds-header-list-item-md-height);width:100%}:host .component{height:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border:none;display:flex;align-items:center;height:100%;padding:0 24px;width:100%;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-nav-dropdown-item-background);color:var(--tds-header-nav-item-dropdown-opened-color)}:host .component ::slotted(a:hover){background-color:var(--tds-nav-item-background-hover);cursor:pointer}:host .component ::slotted(a:focus-visible){outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .component-selected{background-color:var(--tds-nav-item-background-selected);padding-right:4px;border-left-width:4px;border-left-style:solid;border-left-color:var(--tds-nav-item-border-color-active)}:host .component-selected ::slotted(a),:host .component-selected ::slotted(button){background-color:var(--tds-nav-item-background-selected)}:host(:not(:last-child)){border-bottom:1px solid var(--tds-nav-dropdown-item-border-color)}:host([
|
|
7
|
+
const headerDropdownListItemCss = ":host{display:block;box-sizing:border-box;height:var(--tds-header-list-item-md-height);width:100%}:host .component{height:100%}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;border:none;display:flex;align-items:center;height:100%;padding:0 24px;width:100%;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-nav-dropdown-item-background);color:var(--tds-header-nav-item-dropdown-opened-color)}:host .component ::slotted(a:hover){background-color:var(--tds-nav-item-background-hover);cursor:pointer}:host .component ::slotted(a:focus-visible){outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .component-selected{background-color:var(--tds-nav-item-background-selected);padding-right:4px;border-left-width:4px;border-left-style:solid;border-left-color:var(--tds-nav-item-border-color-active)}:host .component-selected ::slotted(a),:host .component-selected ::slotted(button){background-color:var(--tds-nav-item-background-selected)}:host(:not(:last-child)){border-bottom:1px solid var(--tds-nav-dropdown-item-border-color)}:host([size=lg]){height:var(--tds-header-height)}:host([size=lg]) ::slotted(a),:host([size=lg]) ::slotted(button){padding:0 16px;color:var(--tds-header-app-launcher-item-color)}";
|
|
8
8
|
|
|
9
9
|
const TdsHeaderDropdownListItem = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
this.selected = false;
|
|
13
|
-
this.
|
|
13
|
+
this.size = 'md';
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
16
|
return (index.h(index.Host, null, index.h("div", { class: {
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
|
-
const headerDropdownListCss = ":host{display:block;width:190px;padding:0;margin:0;list-style:none;border-radius:
|
|
8
|
+
const headerDropdownListCss = ":host{display:block;width:190px;padding:0;margin:0;list-style:none;border-radius:unset;background-color:var(--tds-header-app-launcher-menu-bg)}@media all and (max-width: 384px){:host{width:100vw}}:host([size=lg]){width:320px}";
|
|
9
9
|
|
|
10
10
|
const TdsHeaderDropdownList = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
// A Map to store the slots and their associated slotchange listeners.
|
|
14
14
|
this.slotListeners = new Map();
|
|
15
|
-
this.
|
|
15
|
+
this.size = 'md';
|
|
16
16
|
this.headingElement = undefined;
|
|
17
17
|
}
|
|
18
18
|
componentWillLoad() {
|
|
19
19
|
const { children } = this.host;
|
|
20
|
-
// Set the
|
|
20
|
+
// Set the size prop for each child, if they have such a property
|
|
21
21
|
for (let i = 0; i < children.length; i++) {
|
|
22
22
|
const child = children[i];
|
|
23
|
-
if ('
|
|
24
|
-
child.
|
|
23
|
+
if ('size' in child) {
|
|
24
|
+
child.size = this.size;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
let listRoot = this.host;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
|
-
const headerDropdownCss = ":host{height:var(--tds-header-height);position:relative}:host .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-top-right-radius:0;border-top-left-radius:0}:host .menu::-webkit-scrollbar{width:4px;background-color:inherit}:host .menu::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .menu ::-webkit-scrollbar-button{height:0;width:0}:host .state-open .dropdown-icon{transform:rotatetds-z-index(180deg)}:host .state-open .button{position:relative;z-index:
|
|
8
|
+
const headerDropdownCss = ":host{height:var(--tds-header-height);position:relative}:host .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-top-right-radius:0;border-top-left-radius:0}:host .menu::-webkit-scrollbar{width:4px;background-color:inherit}:host .menu::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .menu ::-webkit-scrollbar-button{height:0;width:0}:host .state-open .dropdown-icon{transform:rotatetds-z-index(180deg)}:host .state-open .button{position:relative;z-index:901}";
|
|
9
9
|
|
|
10
10
|
const TdsHeaderDropdown = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const headerHamburgerCss = ":host{color:var(--tds-white)}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:background 0.2s ease-in-out, color 0.2s ease-in-out}@media screen and (min-width: 992px){:host tds-header-item{display:none}:host([persistent]) tds-header-item{display:block}}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const headerLauncherButtonCss = ":host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const headerLauncherGridTitleCss = ".tds-header-launcher-grid-title{all:unset;box-sizing:border-box;font:var(--tds-detail-04);letter-spacing:var(--tds-detail-04-ls);color:var(--tds-header-app-launcher-grid-category-title-color);text-transform:uppercase;height:48px;padding:0 16px;display:flex;align-items:center;border-bottom:1px solid var(--tds-nav-dropdown-item-border-color);margin:0}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const headerLauncherGridCss = ".tds-header-launcher-grid{box-sizing:border-box;padding:12px;margin:0;list-style:none;width:100%;display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;border-radius:none}";
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ const TdsHeaderLauncherListItem = class {
|
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, null, index.h("tds-header-dropdown-list-item", {
|
|
14
|
+
return (index.h(index.Host, null, index.h("tds-header-dropdown-list-item", { size: "lg" }, index.h("slot", null))));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
TdsHeaderLauncherListItem.style = headerLauncherListItemCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const headerLauncherListTitleCss = ".tds-header-launcher-list-title{all:unset;box-sizing:border-box;font:var(--tds-detail-06);letter-spacing:var(--tds-detail-06-ls);color:var(--tds-header-app-launcher-category-title-color);text-transform:uppercase;height:48px;padding:0 16px;display:flex;align-items:center;border-bottom:1px solid var(--tds-nav-dropdown-item-border-color);margin:0}";
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const TdsHeaderLauncherList = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -11,7 +11,7 @@ const TdsHeaderLauncherList = class {
|
|
|
11
11
|
this.uuid = utils.generateUniqueId();
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (index.h(index.Host, null, index.h("tds-header-dropdown-list", {
|
|
14
|
+
return (index.h(index.Host, null, index.h("tds-header-dropdown-list", { size: "lg" }, index.h("slot", null))));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
|
-
const headerLauncherCss = ":host .wrapper{height:var(--tds-header-height);position:relative}:host .wrapper .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-radius:0}:host .wrapper .menu::-webkit-scrollbar{width:4px;background-color:inherit}:host .wrapper .menu::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .wrapper .menu ::-webkit-scrollbar-button{height:0;width:0}@media all and (max-width: 384px){:host .wrapper .menu{width:100vw}}:host .wrapper.state-list-type-menu .menu{height:calc(100vh - var(--tds-header-height))}:host .wrapper.state-open .button{position:relative;z-index:
|
|
8
|
+
const headerLauncherCss = ":host .wrapper{height:var(--tds-header-height);position:relative}:host .wrapper .menu{flex-direction:column;overflow-y:auto;max-height:calc(100vh - var(--tds-header-height));box-shadow:var(--tds-nav-dropdown-menu-box);background-color:var(--tds-header-app-launcher-menu-background);border-radius:0}:host .wrapper .menu::-webkit-scrollbar{width:4px;background-color:inherit}:host .wrapper .menu::-webkit-scrollbar-thumb{background-color:var(--tds-grey-300)}:host .wrapper .menu ::-webkit-scrollbar-button{height:0;width:0}@media all and (max-width: 384px){:host .wrapper .menu{width:100vw}}:host .wrapper.state-list-type-menu .menu{height:calc(100vh - var(--tds-header-height))}:host .wrapper.state-open .button{position:relative;z-index:901}";
|
|
9
9
|
|
|
10
10
|
const TdsHeaderLauncher = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
8
|
const headerCss = "html,:root{--tds-nav-dropdown-menu-box:0 3px 3px rgb(0 0 0 / 15%), 0 -1px 1px rgb(0 0 0 / 1%);--tds-nav-dropdown-item-border-radius:0 0 4px 4px;--tds-font-family-headline:\"Scania Sans Headline\", arial, helvetica, sans-serif}tds-header{display:block;height:var(--tds-header-height);background-color:var(--tds-header-background);width:100%;z-index:300}nav{box-sizing:border-box;background-color:var(--tds-header-background);width:100%;display:block}nav *{box-sizing:border-box}nav .tds-header-component-list{height:var(--tds-header-height);all:unset;display:flex;justify-content:start;align-items:center}nav tds-header-dropdown,nav tds-header-item{display:none}nav .tds-header-middle-spacer{all:unset;display:block;flex-grow:1;height:var(--tds-header-height);border-right:1px solid var(--tds-header--basic-element-border)}@media screen and (min-width: 992px){nav tds-header-dropdown,nav tds-header-item{display:block}}nav tds-header-item:nth-child(3),nav tds-header-dropdown:nth-child(3){border-left:1px solid var(--tds-header--basic-element-border)}";
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@ const TdsLink = class {
|
|
|
16
16
|
this.host.children[0].classList.add('tds-link-component');
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (index.h("
|
|
19
|
+
return (index.h("span", { class: `
|
|
20
20
|
${this.disabled ? 'disabled' : ''}
|
|
21
21
|
${!this.underline ? 'no-underline' : ''}
|
|
22
22
|
` }, index.h("slot", null)));
|
|
@@ -10,7 +10,7 @@ const TdsMessage = class {
|
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
12
|
this.getIconName = () => {
|
|
13
|
-
switch (this.
|
|
13
|
+
switch (this.variant) {
|
|
14
14
|
case 'information':
|
|
15
15
|
return 'info';
|
|
16
16
|
case 'error':
|
|
@@ -25,13 +25,13 @@ const TdsMessage = class {
|
|
|
25
25
|
};
|
|
26
26
|
this.header = undefined;
|
|
27
27
|
this.modeVariant = null;
|
|
28
|
-
this.
|
|
28
|
+
this.variant = 'information';
|
|
29
29
|
this.noIcon = false;
|
|
30
30
|
this.minimal = false;
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
return (index.h(index.Host, null, index.h("div", { class: `
|
|
34
|
-
wrapper ${this.
|
|
34
|
+
wrapper ${this.variant}
|
|
35
35
|
${this.minimal ? 'minimal' : ''}
|
|
36
36
|
${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}` }, !this.noIcon && index.h("tds-icon", { name: this.getIconName(), size: "20px" }), index.h("div", { class: `content` }, this.header && index.h("div", { class: "header" }, this.header), !this.minimal && (index.h("div", { class: "extended-message" }, index.h("slot", null)))))));
|
|
37
37
|
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
|
-
const modalCss = ":root,.tds-mode-light{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-white);--tds-modal-text:var(--tds-grey-958);--tds-modal-icon:var(--tds-black);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='black'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-mode-dark{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-grey-900);--tds-modal-text:var(--tds-grey-50);--tds-modal-icon:var(--tds-white);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='white'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-modal{box-sizing:border-box;background-color:var(--tds-modal-background);margin:auto;position:relative;border-radius:4px;padding:16px;max-height:85vh;overflow-y:auto;}.tds-modal *{box-sizing:border-box}.tds-modal::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-track{background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500);border-radius:0 1em 1em 0}.tds-modal__actions-sticky{overflow:hidden}.tds-modal__actions-sticky .body{font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);padding-bottom:96px;margin:0 -16px 0 0;max-height:calc(85vh - 36px);overflow-y:auto}.tds-modal__actions-sticky slot[name=actions]{position:absolute;bottom:-1px;left:0;right:0;background-color:var(--tds-modal-background);padding:var(--tds-spacing-element-16);display:flex;gap:16px}.tds-modal__actions-static slot[name=actions]{background-color:var(--tds-modal-background);display:flex;gap:16px}@media (min-width: 320px){.tds-modal-xs{width:100%}.tds-modal-sm{width:100%}.tds-modal-md{width:100%}.tds-modal-lg{width:100%}}@media (min-width: 672px){.tds-modal-xs{width:75%}.tds-modal-sm{width:62.5%}.tds-modal-md{width:75%}.tds-modal-lg{width:100%}}@media (min-width: 1056px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:43.75%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1312px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1584px){.tds-modal-xs{width:25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:50%}.tds-modal-lg{width:75%}}@media (max-width: 320px){.tds-modal-md,.tds-modal-lg,.tds-modal-sm{height:100%}.tds-modal-md slot[name=actions]::slotted(*),.tds-modal-lg slot[name=actions]::slotted(*),.tds-modal-sm slot[name=actions]::slotted(*){display:flex}}.header{display:flex;padding-bottom:var(--tds-spacing-element-8);position:sticky;top:0;background-color:var(--tds-modal-background);z-index:1}.header::before{content:\" \";position:absolute;height:16px;top:-16px;width:100%;background-color:var(--tds-modal-background)}.header,slot[name=header]::slotted(*){color:var(--tds-modal-text);font:var(--tds-headline-05);letter-spacing:var(--tds-headline-05-ls);margin:0;flex:1}.body{color:var(--tds-modal-text);font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);padding-bottom:40px;overflow-y:visible;padding-right:16px;}.body::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-track{background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500)}@media (min-width: 1056px){.body{padding-right:64px}}.tds-modal-backdrop{box-sizing:border-box;left:0;top:0;position:fixed;height:100%;width:100%;z-index:
|
|
8
|
+
const modalCss = ":root,.tds-mode-light{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-white);--tds-modal-text:var(--tds-grey-958);--tds-modal-icon:var(--tds-black);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='black'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-mode-dark{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-grey-900);--tds-modal-text:var(--tds-grey-50);--tds-modal-icon:var(--tds-white);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='white'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-modal{box-sizing:border-box;background-color:var(--tds-modal-background);margin:auto;position:relative;border-radius:4px;padding:16px;max-height:85vh;overflow-y:auto;}.tds-modal *{box-sizing:border-box}.tds-modal::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-track{background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500);border-radius:0 1em 1em 0}.tds-modal__actions-sticky{overflow:hidden}.tds-modal__actions-sticky .body{font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);padding-bottom:96px;margin:0 -16px 0 0;max-height:calc(85vh - 36px);overflow-y:auto}.tds-modal__actions-sticky slot[name=actions]{position:absolute;bottom:-1px;left:0;right:0;background-color:var(--tds-modal-background);padding:var(--tds-spacing-element-16);display:flex;gap:16px}.tds-modal__actions-static slot[name=actions]{background-color:var(--tds-modal-background);display:flex;gap:16px}@media (min-width: 320px){.tds-modal-xs{width:100%}.tds-modal-sm{width:100%}.tds-modal-md{width:100%}.tds-modal-lg{width:100%}}@media (min-width: 672px){.tds-modal-xs{width:75%}.tds-modal-sm{width:62.5%}.tds-modal-md{width:75%}.tds-modal-lg{width:100%}}@media (min-width: 1056px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:43.75%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1312px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1584px){.tds-modal-xs{width:25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:50%}.tds-modal-lg{width:75%}}@media (max-width: 320px){.tds-modal-md,.tds-modal-lg,.tds-modal-sm{height:100%}.tds-modal-md slot[name=actions]::slotted(*),.tds-modal-lg slot[name=actions]::slotted(*),.tds-modal-sm slot[name=actions]::slotted(*){display:flex}}.header{display:flex;padding-bottom:var(--tds-spacing-element-8);position:sticky;top:0;background-color:var(--tds-modal-background);z-index:1}.header::before{content:\" \";position:absolute;height:16px;top:-16px;width:100%;background-color:var(--tds-modal-background)}.header,slot[name=header]::slotted(*){color:var(--tds-modal-text);font:var(--tds-headline-05);letter-spacing:var(--tds-headline-05-ls);margin:0;flex:1}.body{color:var(--tds-modal-text);font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);padding-bottom:40px;overflow-y:visible;padding-right:16px;}.body::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-track{background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500)}@media (min-width: 1056px){.body{padding-right:64px}}.tds-modal-backdrop{box-sizing:border-box;left:0;top:0;position:fixed;height:100%;width:100%;z-index:700;background-color:var(--tds-modal-backdrop);padding:0 16px}.tds-modal-backdrop *{box-sizing:border-box}@media (max-width: 320px){.tds-modal-backdrop{padding:0}}.tds-modal-backdrop.show{display:flex}.tds-modal-backdrop.hide{display:none}button.tds-modal-close{margin:0 0 auto auto;background-color:transparent;border:0;padding:0;appearance:unset}.tds-modal-close{display:inline-block;height:auto;color:var(--tds-modal-icon);cursor:pointer}.tds-modal-close:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}@media (min-width: 320px){.tds-modal-close{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn{display:inline-block;height:auto;background-repeat:no-repeat;cursor:pointer}@media (min-width: 320px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn svg{fill:var(--tds-modal-icon)}.tds-modal-overflow{overflow:hidden}:host{left:0;top:0;position:fixed;height:100%;width:100%;z-index:700;background-color:var(--tds-modal-backdrop);padding:0 16px}@media (max-width: 320px){:host{padding:0}}:host.show{display:flex}:host.hide{display:none}:host .tds-modal-close{border:none;background-color:transparent}:host .tds-modal-close-btn{border:none;background-color:transparent}:host(.show){display:flex}:host(.hide){display:none}";
|
|
9
9
|
|
|
10
10
|
const TdsModal = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -3,33 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-ee36ffa1.js');
|
|
6
|
-
const
|
|
6
|
+
const utils = require('./utils-a908536d.js');
|
|
7
7
|
|
|
8
|
-
const popoverCanvasCss = "
|
|
8
|
+
const popoverCanvasCss = ".tds-popover-canvas.sc-tds-popover-canvas{box-sizing:border-box;display:inline-block;color:var(--tds-popover-canvas-color);background-color:var(--tds-popover-canvas-background);box-shadow:0 3px 3px rgba(0, 0, 0, 0.15), 0 -1px 1px rgba(0, 0, 0, 0.1);border-radius:4px;z-index:900}.tds-popover-canvas.sc-tds-popover-canvas *.sc-tds-popover-canvas{box-sizing:border-box}";
|
|
9
9
|
|
|
10
10
|
const TdsPopoverCanvas = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
-
this.
|
|
14
|
-
this.popperInstance = popper.createPopper(referenceEl, this.host, {
|
|
15
|
-
placement: this.placement,
|
|
16
|
-
modifiers: [
|
|
17
|
-
{
|
|
18
|
-
name: 'offset',
|
|
19
|
-
options: {
|
|
20
|
-
offset: [this.offsetSkidding, this.offsetDistance],
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
...this.modifiers,
|
|
24
|
-
],
|
|
25
|
-
});
|
|
26
|
-
if (this.show === null) {
|
|
27
|
-
referenceEl.addEventListener('click', (event) => {
|
|
28
|
-
event.stopPropagation();
|
|
29
|
-
this.isShown = !this.isShown;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
};
|
|
13
|
+
this.inheritedAttributes = [];
|
|
33
14
|
this.selector = '';
|
|
34
15
|
this.referenceEl = undefined;
|
|
35
16
|
this.show = null;
|
|
@@ -37,69 +18,18 @@ const TdsPopoverCanvas = class {
|
|
|
37
18
|
this.offsetSkidding = 0;
|
|
38
19
|
this.offsetDistance = 8;
|
|
39
20
|
this.modifiers = [];
|
|
40
|
-
this.renderedShowValue = false;
|
|
41
|
-
this.popperInstance = undefined;
|
|
42
|
-
this.target = undefined;
|
|
43
|
-
this.isShown = false;
|
|
44
21
|
}
|
|
45
|
-
|
|
46
|
-
this.
|
|
47
|
-
}
|
|
48
|
-
onReferenceElChange(newValue, oldValue) {
|
|
49
|
-
var _a;
|
|
50
|
-
if (newValue !== oldValue) {
|
|
51
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
52
|
-
if (newValue) {
|
|
53
|
-
this.initialize(newValue);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
onAnyClick(event) {
|
|
58
|
-
if (this.isShown && this.show === null) {
|
|
59
|
-
// Source: https://lamplightdev.com/blog/2021/04/10/how-to-detect-clicks-outside-of-a-web-component/
|
|
60
|
-
const isClickOutside = !event.composedPath().includes(this.host);
|
|
61
|
-
if (isClickOutside) {
|
|
62
|
-
this.isShown = false;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
connectedCallback() {
|
|
67
|
-
if (this.show !== null) {
|
|
68
|
-
this.isShown = this.show;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
componentDidLoad() {
|
|
72
|
-
var _a;
|
|
73
|
-
if (this.selector || this.referenceEl) {
|
|
74
|
-
const referenceEl = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
|
|
75
|
-
if (referenceEl) {
|
|
76
|
-
this.initialize(referenceEl);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
console.error(`Could not initialize popover-canvas: element with selector '${this.selector}' not found.`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
componentDidRender() {
|
|
84
|
-
if (this.isShown && !this.renderedShowValue) {
|
|
85
|
-
// Here we update the popper position since its position is wrong
|
|
86
|
-
// before it is rendered.
|
|
87
|
-
this.popperInstance.update();
|
|
88
|
-
}
|
|
89
|
-
this.renderedShowValue = this.isShown;
|
|
90
|
-
}
|
|
91
|
-
disconnectedCallback() {
|
|
92
|
-
var _a;
|
|
93
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
22
|
+
componentWillLoad() {
|
|
23
|
+
this.inheritedAttributes = utils.inheritAttributes(this.host, ['style', 'class']);
|
|
94
24
|
}
|
|
95
25
|
render() {
|
|
96
|
-
|
|
26
|
+
var _a;
|
|
27
|
+
return (index.h(index.Host, null, index.h("tds-popover-core", Object.assign({}, this.inheritedAttributes, { class: {
|
|
28
|
+
'tds-popover-canvas': true,
|
|
29
|
+
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
30
|
+
}, selector: this.selector, referenceEl: this.referenceEl, show: this.show, placement: this.placement, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, modifiers: this.modifiers, trigger: 'click' }), index.h("div", null, index.h("slot", null)))));
|
|
97
31
|
}
|
|
98
32
|
get host() { return index.getElement(this); }
|
|
99
|
-
static get watchers() { return {
|
|
100
|
-
"show": ["onShowChange"],
|
|
101
|
-
"referenceEl": ["onReferenceElChange"]
|
|
102
|
-
}; }
|
|
103
33
|
};
|
|
104
34
|
TdsPopoverCanvas.style = popoverCanvasCss;
|
|
105
35
|
|