@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
|
@@ -1,101 +1,62 @@
|
|
|
1
|
-
import { h } from '@stencil/core';
|
|
2
|
-
import {
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
|
2
|
+
import { inheritAttributes } from '../../utils/utils';
|
|
3
|
+
/**
|
|
4
|
+
* @slot <default> - <b>Unnamed slot.</b> For the tooltip contents.
|
|
5
|
+
*/
|
|
3
6
|
export class TdsTooltip {
|
|
4
7
|
constructor() {
|
|
5
8
|
this.offsetSkidding = 0;
|
|
6
9
|
this.offsetDistance = 8;
|
|
10
|
+
this.popperjsExtraModifiers = [
|
|
11
|
+
{
|
|
12
|
+
name: 'positionCalc',
|
|
13
|
+
enabled: true,
|
|
14
|
+
phase: 'main',
|
|
15
|
+
fn: ({ state }) => {
|
|
16
|
+
if (state.placement === 'bottom-start' || state.placement === 'right-start') {
|
|
17
|
+
this.border = 'top-left';
|
|
18
|
+
}
|
|
19
|
+
else if (state.placement === 'bottom-end' || state.placement === 'left-start') {
|
|
20
|
+
this.border = 'top-right';
|
|
21
|
+
}
|
|
22
|
+
else if (state.placement === 'top-end' || state.placement === 'left-end') {
|
|
23
|
+
this.border = 'bottom-right';
|
|
24
|
+
}
|
|
25
|
+
else if (state.placement === 'top-start' || state.placement === 'right-end') {
|
|
26
|
+
this.border = 'bottom-left';
|
|
27
|
+
}
|
|
28
|
+
else if (state.placement === 'bottom' || state.placement === 'top') {
|
|
29
|
+
this.border = 'default';
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
this.inheritedAttributes = [];
|
|
7
35
|
this.text = '';
|
|
8
36
|
this.selector = '';
|
|
9
37
|
this.referenceEl = undefined;
|
|
10
38
|
this.mouseOverTooltip = false;
|
|
11
39
|
this.show = false;
|
|
12
40
|
this.placement = 'bottom';
|
|
13
|
-
this.popperInstance = undefined;
|
|
14
|
-
this.target = undefined;
|
|
15
|
-
}
|
|
16
|
-
/** Method to update the Tooltip. Will reevaluate the Tooltips position. */
|
|
17
|
-
async updateTooltip() {
|
|
18
|
-
var _a;
|
|
19
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.update();
|
|
20
|
-
}
|
|
21
|
-
componentDidLoad() {
|
|
22
|
-
var _a;
|
|
23
|
-
this.target = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
|
|
24
|
-
const thisValue = this;
|
|
25
|
-
this.popperInstance = createPopper(this.target, this.tooltip, {
|
|
26
|
-
placement: thisValue.placement,
|
|
27
|
-
modifiers: [
|
|
28
|
-
{
|
|
29
|
-
name: 'positionCalc',
|
|
30
|
-
enabled: true,
|
|
31
|
-
phase: 'main',
|
|
32
|
-
fn({ state }) {
|
|
33
|
-
if (state.placement === 'bottom-start' || state.placement === 'right-start') {
|
|
34
|
-
thisValue.border = 'top-left';
|
|
35
|
-
}
|
|
36
|
-
else if (state.placement === 'bottom-end' || state.placement === 'left-start') {
|
|
37
|
-
thisValue.border = 'top-right';
|
|
38
|
-
}
|
|
39
|
-
else if (state.placement === 'top-end' || state.placement === 'left-end') {
|
|
40
|
-
thisValue.border = 'bottom-right';
|
|
41
|
-
}
|
|
42
|
-
else if (state.placement === 'top-start' || state.placement === 'right-end') {
|
|
43
|
-
thisValue.border = 'bottom-left';
|
|
44
|
-
}
|
|
45
|
-
else if (state.placement === 'bottom' || state.placement === 'top') {
|
|
46
|
-
thisValue.border = 'default';
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: 'offset',
|
|
52
|
-
options: {
|
|
53
|
-
offset: [this.offsetSkidding, this.offsetDistance],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
});
|
|
58
|
-
const showTooltip = () => {
|
|
59
|
-
this.show = true;
|
|
60
|
-
};
|
|
61
|
-
const hideTooltip = () => {
|
|
62
|
-
this.show = false;
|
|
63
|
-
};
|
|
64
|
-
// For tabbing over element
|
|
65
|
-
this.target.addEventListener('focusin', () => {
|
|
66
|
-
showTooltip();
|
|
67
|
-
});
|
|
68
|
-
this.target.addEventListener('focusout', () => {
|
|
69
|
-
hideTooltip();
|
|
70
|
-
});
|
|
71
|
-
// For hovering over element with selector
|
|
72
|
-
this.target.addEventListener('mouseenter', () => {
|
|
73
|
-
showTooltip();
|
|
74
|
-
});
|
|
75
|
-
this.target.addEventListener('mouseleave', () => {
|
|
76
|
-
hideTooltip();
|
|
77
|
-
});
|
|
78
|
-
// For hovering over Tooltip itself:
|
|
79
|
-
if (this.mouseOverTooltip === true) {
|
|
80
|
-
this.tooltip.addEventListener('mouseenter', () => {
|
|
81
|
-
showTooltip();
|
|
82
|
-
});
|
|
83
|
-
this.tooltip.addEventListener('mouseleave', () => {
|
|
84
|
-
hideTooltip();
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
41
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
42
|
+
componentWillLoad() {
|
|
43
|
+
this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
|
|
91
44
|
}
|
|
92
45
|
render() {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
46
|
+
var _a;
|
|
47
|
+
return (h(Host, null, h("tds-popover-core", Object.assign({}, this.inheritedAttributes, { class: {
|
|
48
|
+
'tds-tooltip': true,
|
|
49
|
+
[`tds-tooltip-${this.border}`]: true,
|
|
50
|
+
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
51
|
+
'tds-tooltip-show': this.show,
|
|
52
|
+
}, selector: this.selector, referenceEl: this.referenceEl, trigger: this.mouseOverTooltip ? 'hover-popover' : 'hover', modifiers: this.popperjsExtraModifiers, show: this.show, placement: this.placement, autoHide: false, onInternalTdsShow: () => {
|
|
53
|
+
this.show = true;
|
|
54
|
+
}, onInternalTdsClose: () => {
|
|
55
|
+
this.show = false;
|
|
56
|
+
} }), this.text, h("slot", null))));
|
|
96
57
|
}
|
|
97
58
|
static get is() { return "tds-tooltip"; }
|
|
98
|
-
static get encapsulation() { return "
|
|
59
|
+
static get encapsulation() { return "scoped"; }
|
|
99
60
|
static get originalStyleUrls() {
|
|
100
61
|
return {
|
|
101
62
|
"$": ["tooltip.scss"]
|
|
@@ -224,30 +185,5 @@ export class TdsTooltip {
|
|
|
224
185
|
}
|
|
225
186
|
};
|
|
226
187
|
}
|
|
227
|
-
static get
|
|
228
|
-
return {
|
|
229
|
-
"popperInstance": {},
|
|
230
|
-
"target": {}
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
static get methods() {
|
|
234
|
-
return {
|
|
235
|
-
"updateTooltip": {
|
|
236
|
-
"complexType": {
|
|
237
|
-
"signature": "() => Promise<void>",
|
|
238
|
-
"parameters": [],
|
|
239
|
-
"references": {
|
|
240
|
-
"Promise": {
|
|
241
|
-
"location": "global"
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
|
-
"return": "Promise<void>"
|
|
245
|
-
},
|
|
246
|
-
"docs": {
|
|
247
|
-
"text": "Method to update the Tooltip. Will reevaluate the Tooltips position.",
|
|
248
|
-
"tags": []
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
}
|
|
188
|
+
static get elementRef() { return "host"; }
|
|
253
189
|
}
|
|
@@ -114,8 +114,8 @@ const ComponentTooltip = ({ tooltipPosition, mouseOverTooltip, text, slot }) =>
|
|
|
114
114
|
<!-- The 'referenceEl' prop can be used instead of 'selector',
|
|
115
115
|
which might be preferable in frameworks like React -->
|
|
116
116
|
<tds-tooltip
|
|
117
|
+
id="tooltip-1"
|
|
117
118
|
placement="${positionLookup[tooltipPosition]}"
|
|
118
|
-
selector="#button-1"
|
|
119
119
|
text="${text}"
|
|
120
120
|
mouse-over-tooltip="${mouseOverTooltip}">
|
|
121
121
|
${slot}
|
|
@@ -124,5 +124,13 @@ const ComponentTooltip = ({ tooltipPosition, mouseOverTooltip, text, slot }) =>
|
|
|
124
124
|
<!-- Demo button for presentation purposes -->
|
|
125
125
|
<tds-button size= 'sm' id="button-1" text='Hover me'></tds-button>
|
|
126
126
|
</div>
|
|
127
|
+
<script>
|
|
128
|
+
(() => {
|
|
129
|
+
const tooltip = document.getElementById('tooltip-1');
|
|
130
|
+
const button = document.getElementById('button-1');
|
|
131
|
+
|
|
132
|
+
tooltip.referenceEl = button;
|
|
133
|
+
})();
|
|
134
|
+
</script>
|
|
127
135
|
`);
|
|
128
136
|
export const Default = ComponentTooltip.bind({});
|
|
@@ -165,7 +165,7 @@ const Template = () => formatHtmlPreview(`
|
|
|
165
165
|
|
|
166
166
|
<tds-header-dropdown slot="end" placement="end" no-dropdown-icon class="demo-hide demo-lg-show" selected>
|
|
167
167
|
<img slot="icon" src="https://www.svgrepo.com/show/384676/account-avatar-profile-user-6.svg" alt="User menu."/>
|
|
168
|
-
<tds-header-dropdown-list
|
|
168
|
+
<tds-header-dropdown-list size="lg">
|
|
169
169
|
<tds-header-dropdown-list-user
|
|
170
170
|
header="Name Nameson"
|
|
171
171
|
subheader="Company name">
|
|
@@ -75,7 +75,7 @@ const Template = ({ dummyHtml }) => formatHtmlPreview(`
|
|
|
75
75
|
height: calc(100vh - var(--app-bar-height));
|
|
76
76
|
position: sticky;
|
|
77
77
|
top: var(--app-bar-height);
|
|
78
|
-
left:
|
|
78
|
+
left: 0;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
|
|
@@ -135,7 +135,7 @@ const Template = ({ dummyHtml }) => formatHtmlPreview(`
|
|
|
135
135
|
|
|
136
136
|
<tds-header-dropdown slot="end" placement="end" no-dropdown-icon class="demo-hide demo-xs-show">
|
|
137
137
|
<img slot="icon" src="https://www.svgrepo.com/show/384676/account-avatar-profile-user-6.svg" alt="User menu."/>
|
|
138
|
-
<tds-header-dropdown-list
|
|
138
|
+
<tds-header-dropdown-list size="lg">
|
|
139
139
|
<tds-header-dropdown-list-user
|
|
140
140
|
header="Name Nameson"
|
|
141
141
|
subheader="Company name">
|
|
@@ -159,7 +159,7 @@ const Template = ({ dummyHtml }) => formatHtmlPreview(`
|
|
|
159
159
|
<div class="demo-wrap-side-menu-and-main">
|
|
160
160
|
<!-- Note: the "persistent" property keeps the menu open on desktop -->
|
|
161
161
|
<tds-side-menu id="demo-side-menu" aria-label="Side menu" persistent>
|
|
162
|
-
<tds-side-menu-overlay slot="overlay"
|
|
162
|
+
<tds-side-menu-overlay slot="overlay"></tds-side-menu-overlay>
|
|
163
163
|
|
|
164
164
|
<tds-side-menu-close-button slot="close-button" onclick="demoSideMenu.open = false;demoHamburger.setAttribute('aria-expanded', false);"></tds-side-menu-close-button>
|
|
165
165
|
|
|
@@ -231,6 +231,7 @@ const Template = ({ dummyHtml }) => formatHtmlPreview(`
|
|
|
231
231
|
</tds-side-menu>
|
|
232
232
|
|
|
233
233
|
<main class="tds-u-h-100 tds-u-p3" style="box-sizing: border-box;">
|
|
234
|
+
<button class='tds-u-absolute tds-u-right0' onclick='console.log("Button clicked")'>Test button</button>
|
|
234
235
|
<p>If there are more than a few buttons and/or links in the Header, they might not fit on medium size screens.
|
|
235
236
|
<br/>In that case they should be placed in a persistent side menu — which is always visible on large screens.</p>
|
|
236
237
|
|
|
@@ -84,7 +84,7 @@ const Template = () => formatHtmlPreview(`
|
|
|
84
84
|
|
|
85
85
|
<tds-header-dropdown slot="end" class="demo-hide demo-xs-show" no-dropdown-icon selected>
|
|
86
86
|
<img slot="icon" src="https://www.svgrepo.com/show/384676/account-avatar-profile-user-6.svg" alt="User menu."/>
|
|
87
|
-
<tds-header-dropdown-list
|
|
87
|
+
<tds-header-dropdown-list size="lg">
|
|
88
88
|
<tds-header-dropdown-list-user
|
|
89
89
|
header="Name Nameson"
|
|
90
90
|
subheader="Company name">
|
|
@@ -37,7 +37,7 @@ export const TegelDesignSystem = {
|
|
|
37
37
|
</style>
|
|
38
38
|
|
|
39
39
|
<tds-banner type="information" icon="information" header="We are moving away from the sdds prefix!">
|
|
40
|
-
<tds-link slot="
|
|
40
|
+
<tds-link slot="bottom">
|
|
41
41
|
<a target="_self" href="?path=/story/intro-announcements--prefix-change">
|
|
42
42
|
Read more here!
|
|
43
43
|
</a>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
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([
|
|
3
|
+
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)}";
|
|
4
4
|
|
|
5
5
|
const TdsHeaderDropdownListItem = /*@__PURE__*/ proxyCustomElement(class TdsHeaderDropdownListItem extends HTMLElement {
|
|
6
6
|
constructor() {
|
|
@@ -8,7 +8,7 @@ const TdsHeaderDropdownListItem = /*@__PURE__*/ proxyCustomElement(class TdsHead
|
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
this.__attachShadow();
|
|
10
10
|
this.selected = false;
|
|
11
|
-
this.
|
|
11
|
+
this.size = 'md';
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
14
|
return (h(Host, null, h("div", { class: {
|
|
@@ -20,7 +20,7 @@ const TdsHeaderDropdownListItem = /*@__PURE__*/ proxyCustomElement(class TdsHead
|
|
|
20
20
|
static get style() { return headerDropdownListItemCss; }
|
|
21
21
|
}, [1, "tds-header-dropdown-list-item", {
|
|
22
22
|
"selected": [4],
|
|
23
|
-
"
|
|
23
|
+
"size": [513]
|
|
24
24
|
}]);
|
|
25
25
|
function defineCustomElement() {
|
|
26
26
|
if (typeof customElements === "undefined") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { j as getPreviousNestedChildOfSiblingsMatching, k as isHeadingElement } from './utils.js';
|
|
3
3
|
|
|
4
|
-
const headerDropdownListCss = ":host{display:block;width:190px;padding:0;margin:0;list-style:none;border-radius:
|
|
4
|
+
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}";
|
|
5
5
|
|
|
6
6
|
const TdsHeaderDropdownList = /*@__PURE__*/ proxyCustomElement(class TdsHeaderDropdownList extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -10,16 +10,16 @@ const TdsHeaderDropdownList = /*@__PURE__*/ proxyCustomElement(class TdsHeaderDr
|
|
|
10
10
|
this.__attachShadow();
|
|
11
11
|
// A Map to store the slots and their associated slotchange listeners.
|
|
12
12
|
this.slotListeners = new Map();
|
|
13
|
-
this.
|
|
13
|
+
this.size = 'md';
|
|
14
14
|
this.headingElement = undefined;
|
|
15
15
|
}
|
|
16
16
|
componentWillLoad() {
|
|
17
17
|
const { children } = this.host;
|
|
18
|
-
// Set the
|
|
18
|
+
// Set the size prop for each child, if they have such a property
|
|
19
19
|
for (let i = 0; i < children.length; i++) {
|
|
20
20
|
const child = children[i];
|
|
21
|
-
if ('
|
|
22
|
-
child.
|
|
21
|
+
if ('size' in child) {
|
|
22
|
+
child.size = this.size;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
let listRoot = this.host;
|
|
@@ -79,7 +79,7 @@ const TdsHeaderDropdownList = /*@__PURE__*/ proxyCustomElement(class TdsHeaderDr
|
|
|
79
79
|
get host() { return this; }
|
|
80
80
|
static get style() { return headerDropdownListCss; }
|
|
81
81
|
}, [1, "tds-header-dropdown-list", {
|
|
82
|
-
"
|
|
82
|
+
"size": [513],
|
|
83
83
|
"headingElement": [32]
|
|
84
84
|
}]);
|
|
85
85
|
function defineCustomElement() {
|
|
@@ -1,33 +1,14 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { e as inheritAttributes } from './utils.js';
|
|
3
|
+
import { d as defineCustomElement$1 } from './popover-core.js';
|
|
3
4
|
|
|
4
|
-
const popoverCanvasCss = "
|
|
5
|
+
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}";
|
|
5
6
|
|
|
6
7
|
const TdsPopoverCanvas = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCanvas extends HTMLElement {
|
|
7
8
|
constructor() {
|
|
8
9
|
super();
|
|
9
10
|
this.__registerHost();
|
|
10
|
-
this.
|
|
11
|
-
this.initialize = (referenceEl) => {
|
|
12
|
-
this.popperInstance = createPopper(referenceEl, this.host, {
|
|
13
|
-
placement: this.placement,
|
|
14
|
-
modifiers: [
|
|
15
|
-
{
|
|
16
|
-
name: 'offset',
|
|
17
|
-
options: {
|
|
18
|
-
offset: [this.offsetSkidding, this.offsetDistance],
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
...this.modifiers,
|
|
22
|
-
],
|
|
23
|
-
});
|
|
24
|
-
if (this.show === null) {
|
|
25
|
-
referenceEl.addEventListener('click', (event) => {
|
|
26
|
-
event.stopPropagation();
|
|
27
|
-
this.isShown = !this.isShown;
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
};
|
|
11
|
+
this.inheritedAttributes = [];
|
|
31
12
|
this.selector = '';
|
|
32
13
|
this.referenceEl = undefined;
|
|
33
14
|
this.show = null;
|
|
@@ -35,94 +16,44 @@ const TdsPopoverCanvas = /*@__PURE__*/ proxyCustomElement(class TdsPopoverCanvas
|
|
|
35
16
|
this.offsetSkidding = 0;
|
|
36
17
|
this.offsetDistance = 8;
|
|
37
18
|
this.modifiers = [];
|
|
38
|
-
this.renderedShowValue = false;
|
|
39
|
-
this.popperInstance = undefined;
|
|
40
|
-
this.target = undefined;
|
|
41
|
-
this.isShown = false;
|
|
42
|
-
}
|
|
43
|
-
onShowChange(newValue) {
|
|
44
|
-
this.isShown = newValue;
|
|
45
|
-
}
|
|
46
|
-
onReferenceElChange(newValue, oldValue) {
|
|
47
|
-
var _a;
|
|
48
|
-
if (newValue !== oldValue) {
|
|
49
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
50
|
-
if (newValue) {
|
|
51
|
-
this.initialize(newValue);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
onAnyClick(event) {
|
|
56
|
-
if (this.isShown && this.show === null) {
|
|
57
|
-
// Source: https://lamplightdev.com/blog/2021/04/10/how-to-detect-clicks-outside-of-a-web-component/
|
|
58
|
-
const isClickOutside = !event.composedPath().includes(this.host);
|
|
59
|
-
if (isClickOutside) {
|
|
60
|
-
this.isShown = false;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
connectedCallback() {
|
|
65
|
-
if (this.show !== null) {
|
|
66
|
-
this.isShown = this.show;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
componentDidLoad() {
|
|
70
|
-
var _a;
|
|
71
|
-
if (this.selector || this.referenceEl) {
|
|
72
|
-
const referenceEl = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
|
|
73
|
-
if (referenceEl) {
|
|
74
|
-
this.initialize(referenceEl);
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
console.error(`Could not initialize popover-canvas: element with selector '${this.selector}' not found.`);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
19
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
// Here we update the popper position since its position is wrong
|
|
84
|
-
// before it is rendered.
|
|
85
|
-
this.popperInstance.update();
|
|
86
|
-
}
|
|
87
|
-
this.renderedShowValue = this.isShown;
|
|
88
|
-
}
|
|
89
|
-
disconnectedCallback() {
|
|
90
|
-
var _a;
|
|
91
|
-
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
|
|
92
22
|
}
|
|
93
23
|
render() {
|
|
94
|
-
|
|
24
|
+
var _a;
|
|
25
|
+
return (h(Host, null, h("tds-popover-core", Object.assign({}, this.inheritedAttributes, { class: {
|
|
26
|
+
'tds-popover-canvas': true,
|
|
27
|
+
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
28
|
+
}, selector: this.selector, referenceEl: this.referenceEl, show: this.show, placement: this.placement, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, modifiers: this.modifiers, trigger: 'click' }), h("div", null, h("slot", null)))));
|
|
95
29
|
}
|
|
96
30
|
get host() { return this; }
|
|
97
|
-
static get watchers() { return {
|
|
98
|
-
"show": ["onShowChange"],
|
|
99
|
-
"referenceEl": ["onReferenceElChange"]
|
|
100
|
-
}; }
|
|
101
31
|
static get style() { return popoverCanvasCss; }
|
|
102
|
-
}, [
|
|
32
|
+
}, [6, "tds-popover-canvas", {
|
|
103
33
|
"selector": [1],
|
|
104
34
|
"referenceEl": [16],
|
|
105
35
|
"show": [4],
|
|
106
36
|
"placement": [1],
|
|
107
37
|
"offsetSkidding": [2, "offset-skidding"],
|
|
108
38
|
"offsetDistance": [2, "offset-distance"],
|
|
109
|
-
"modifiers": [16]
|
|
110
|
-
|
|
111
|
-
"popperInstance": [32],
|
|
112
|
-
"target": [32],
|
|
113
|
-
"isShown": [32]
|
|
114
|
-
}, [[8, "click", "onAnyClick"]]]);
|
|
39
|
+
"modifiers": [16]
|
|
40
|
+
}]);
|
|
115
41
|
function defineCustomElement() {
|
|
116
42
|
if (typeof customElements === "undefined") {
|
|
117
43
|
return;
|
|
118
44
|
}
|
|
119
|
-
const components = ["tds-popover-canvas"];
|
|
45
|
+
const components = ["tds-popover-canvas", "tds-popover-core"];
|
|
120
46
|
components.forEach(tagName => { switch (tagName) {
|
|
121
47
|
case "tds-popover-canvas":
|
|
122
48
|
if (!customElements.get(tagName)) {
|
|
123
49
|
customElements.define(tagName, TdsPopoverCanvas);
|
|
124
50
|
}
|
|
125
51
|
break;
|
|
52
|
+
case "tds-popover-core":
|
|
53
|
+
if (!customElements.get(tagName)) {
|
|
54
|
+
defineCustomElement$1();
|
|
55
|
+
}
|
|
56
|
+
break;
|
|
126
57
|
} });
|
|
127
58
|
}
|
|
128
59
|
|