@scania/tegel 1.47.2 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/cjs/index-DGsdvbvx.js +2521 -0
- package/dist/cjs/{inheritAriaAttributes-dedbbc57.js → inheritAriaAttributes-D_xFGssc.js} +1 -1
- package/dist/cjs/{isHeadingElement-4f06b688.js → isHeadingElement-DihKNeqS.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -6
- package/dist/cjs/tds-accordion-item.cjs.entry.js +10 -7
- package/dist/cjs/tds-accordion.cjs.entry.js +5 -6
- package/dist/cjs/tds-badge.cjs.entry.js +13 -8
- package/dist/cjs/tds-banner.cjs.entry.js +19 -15
- package/dist/cjs/tds-block.cjs.entry.js +5 -6
- package/dist/cjs/tds-body-cell.cjs.entry.js +4 -9
- package/dist/cjs/tds-breadcrumb.cjs.entry.js +4 -6
- package/dist/cjs/tds-breadcrumbs.cjs.entry.js +3 -7
- package/dist/cjs/tds-button_2.cjs.entry.js +15 -14
- package/dist/cjs/tds-card.cjs.entry.js +29 -20
- package/dist/cjs/tds-checkbox.cjs.entry.js +17 -17
- package/dist/cjs/tds-chip.cjs.entry.js +19 -16
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +9 -10
- package/dist/cjs/tds-datetime.cjs.entry.js +30 -24
- package/dist/cjs/tds-dropdown_2.cjs.entry.js +67 -62
- package/dist/cjs/tds-folder-tab.cjs.entry.js +4 -7
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +40 -38
- package/dist/cjs/tds-footer-group.cjs.entry.js +8 -11
- package/dist/cjs/tds-footer-item.cjs.entry.js +3 -6
- package/dist/cjs/tds-footer.cjs.entry.js +6 -8
- package/dist/cjs/tds-header-brand-symbol.cjs.entry.js +3 -6
- package/dist/cjs/tds-header-cell.cjs.entry.js +20 -23
- package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +5 -6
- package/dist/cjs/tds-header-dropdown-list-user.cjs.entry.js +3 -10
- package/dist/cjs/tds-header-dropdown-list.cjs.entry.js +6 -9
- package/dist/cjs/tds-header-dropdown.cjs.entry.js +9 -13
- package/dist/cjs/tds-header-hamburger.cjs.entry.js +5 -9
- package/dist/cjs/tds-header-launcher-button.cjs.entry.js +7 -9
- package/dist/cjs/tds-header-launcher-grid-item.cjs.entry.js +3 -6
- package/dist/cjs/tds-header-launcher-grid-title.cjs.entry.js +4 -7
- package/dist/cjs/tds-header-launcher-grid.cjs.entry.js +5 -9
- package/dist/cjs/tds-header-launcher-list-item.cjs.entry.js +3 -6
- package/dist/cjs/tds-header-launcher-list-title.cjs.entry.js +4 -7
- package/dist/cjs/tds-header-launcher-list.cjs.entry.js +2 -4
- package/dist/cjs/tds-header-launcher.cjs.entry.js +7 -12
- package/dist/cjs/tds-header-title.cjs.entry.js +3 -6
- package/dist/cjs/tds-header.cjs.entry.js +5 -8
- package/dist/cjs/tds-icon.cjs.entry.js +14 -17
- package/dist/cjs/tds-inline-tab.cjs.entry.js +4 -6
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +42 -39
- package/dist/cjs/tds-link.cjs.entry.js +6 -6
- package/dist/cjs/tds-message.cjs.entry.js +14 -14
- package/dist/cjs/tds-modal.cjs.entry.js +93 -47
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +4 -6
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +43 -40
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +17 -11
- package/dist/cjs/tds-popover-core.cjs.entry.js +53 -40
- package/dist/cjs/tds-popover-menu-item.cjs.entry.js +4 -6
- package/dist/cjs/tds-popover-menu.cjs.entry.js +16 -11
- package/dist/cjs/tds-radio-button.cjs.entry.js +12 -15
- package/dist/cjs/tds-side-menu-close-button.cjs.entry.js +5 -8
- package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +4 -7
- package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +4 -6
- package/dist/cjs/tds-side-menu-dropdown-list.cjs.entry.js +3 -6
- package/dist/cjs/tds-side-menu-dropdown.cjs.entry.js +6 -7
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +7 -7
- package/dist/cjs/tds-side-menu-overlay.cjs.entry.js +3 -6
- package/dist/cjs/tds-side-menu-user-image_2.cjs.entry.js +5 -13
- package/dist/cjs/tds-side-menu-user.cjs.entry.js +3 -10
- package/dist/cjs/tds-side-menu.cjs.entry.js +22 -15
- package/dist/cjs/tds-slider.cjs.entry.js +43 -26
- package/dist/cjs/tds-spinner.cjs.entry.js +5 -6
- package/dist/cjs/tds-step.cjs.entry.js +4 -12
- package/dist/cjs/tds-stepper.cjs.entry.js +26 -11
- package/dist/cjs/tds-table-body-input-wrapper.cjs.entry.js +4 -6
- package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +15 -9
- package/dist/cjs/tds-table-body-row.cjs.entry.js +6 -6
- package/dist/cjs/tds-table-body.cjs.entry.js +8 -11
- package/dist/cjs/tds-table-footer.cjs.entry.js +23 -18
- package/dist/cjs/tds-table-header-input-wrapper.cjs.entry.js +4 -6
- package/dist/cjs/tds-table-header.cjs.entry.js +6 -7
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +6 -6
- package/dist/cjs/tds-table.cjs.entry.js +46 -16
- package/dist/cjs/tds-tag.cjs.entry.js +6 -8
- package/dist/cjs/tds-text-field.cjs.entry.js +24 -15
- package/dist/cjs/tds-textarea.cjs.entry.js +18 -13
- package/dist/cjs/tds-toast.cjs.entry.js +17 -17
- package/dist/cjs/tds-toggle.cjs.entry.js +14 -15
- package/dist/cjs/tds-tooltip.cjs.entry.js +20 -18
- package/dist/cjs/tegel.cjs.js +7 -8
- package/dist/collection/assets/icons/scania/microphone.svg +4 -0
- package/dist/collection/assets/icons/scania/microphone_inactive.svg +7 -0
- package/dist/collection/assets/icons/scania/notification_snooze.svg +6 -0
- package/dist/collection/assets/icons/scania/paperclip.svg +3 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/accordion/accordion-item/accordion-item.js +24 -6
- package/dist/collection/components/accordion/accordion.js +8 -2
- package/dist/collection/components/badge/badge.js +16 -4
- package/dist/collection/components/banner/banner.js +41 -19
- package/dist/collection/components/block/block.js +8 -2
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.js +4 -1
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +4 -5
- package/dist/collection/components/button/button.js +44 -19
- package/dist/collection/components/card/card.js +64 -28
- package/dist/collection/components/checkbox/checkbox.js +41 -22
- package/dist/collection/components/chip/chip.css +4 -0
- package/dist/collection/components/chip/chip.js +41 -19
- package/dist/collection/components/datetime/datetime.js +78 -37
- package/dist/collection/components/divider/divider.js +8 -2
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +31 -25
- package/dist/collection/components/dropdown/dropdown.js +90 -50
- package/dist/collection/components/footer/footer-group/footer-group.js +12 -8
- package/dist/collection/components/footer/footer.js +5 -2
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +19 -12
- package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.js +4 -2
- package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.js +8 -2
- package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.js +16 -14
- package/dist/collection/components/header/header-hamburger/header-hamburger.js +4 -5
- package/dist/collection/components/header/header-item/header-item.js +9 -2
- package/dist/collection/components/header/header-launcher/header-launcher.js +5 -5
- package/dist/collection/components/header/header-launcher-button/header-launcher-button.js +9 -4
- package/dist/collection/components/header/header-launcher-grid/header-launcher-grid.js +0 -3
- package/dist/collection/components/icon/icon.js +29 -16
- package/dist/collection/components/icon/scaniaIconsArray.js +2 -252
- package/dist/collection/components/icon/tratonIconsArray.js +2 -32
- package/dist/collection/components/link/link.js +12 -3
- package/dist/collection/components/message/message.css +6 -6
- package/dist/collection/components/message/message.js +33 -16
- package/dist/collection/components/modal/modal.js +119 -51
- package/dist/collection/components/popover-canvas/popover-canvas.js +48 -16
- package/dist/collection/components/popover-core/popover-core.js +63 -30
- package/dist/collection/components/popover-menu/popover-menu-item/popover-menu-item.js +4 -1
- package/dist/collection/components/popover-menu/popover-menu.js +45 -16
- package/dist/collection/components/radio-button/radio-button.css +14 -14
- package/dist/collection/components/radio-button/radio-button.js +36 -20
- package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +5 -3
- package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.js +16 -6
- package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.js +4 -1
- package/dist/collection/components/side-menu/side-menu-item/side-menu-item.js +9 -2
- package/dist/collection/components/side-menu/side-menu-user/side-menu-user.js +16 -14
- package/dist/collection/components/side-menu/side-menu-user-image/side-menu-user-image.js +8 -8
- package/dist/collection/components/side-menu/side-menu-user-label/side-menu-user-label.js +8 -8
- package/dist/collection/components/side-menu/side-menu.js +22 -10
- package/dist/collection/components/slider/slider.js +90 -36
- package/dist/collection/components/spinner/spinner.js +8 -2
- package/dist/collection/components/stepper/step/step.css +65 -16
- package/dist/collection/components/stepper/step/step.js +12 -11
- package/dist/collection/components/stepper/stepper.js +28 -6
- package/dist/collection/components/table/table/table.js +49 -12
- package/dist/collection/components/table/table-body/table-body.js +5 -5
- package/dist/collection/components/table/table-body-cell/table-body-cell.js +18 -11
- package/dist/collection/components/table/table-body-input-wrapper/table-body-input-wrapper.js +4 -1
- package/dist/collection/components/table/table-body-row/table-body-row.js +12 -3
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +27 -8
- package/dist/collection/components/table/table-footer/table-footer.js +37 -17
- package/dist/collection/components/table/table-header/table-header.js +16 -6
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +43 -28
- package/dist/collection/components/table/table-header-input-wrapper/table-header-input-wrapper.js +7 -2
- package/dist/collection/components/table/table-toolbar/table-toolbar.js +12 -3
- package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +4 -2
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +50 -37
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +4 -1
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +55 -39
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +4 -1
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +56 -40
- package/dist/collection/components/tag/tag.js +12 -5
- package/dist/collection/components/text-field/text-field.js +94 -36
- package/dist/collection/components/textarea/textarea.js +69 -27
- package/dist/collection/components/toast/toast.js +42 -21
- package/dist/collection/components/toggle/toggle.js +37 -19
- package/dist/collection/components/tooltip/tooltip.js +53 -25
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-9AbeYlK8.js +1 -0
- package/dist/components/p-BFcLEwMn.js +1 -0
- package/dist/components/p-BWqvStj8.js +1 -0
- package/dist/components/p-BfVaBQQ6.js +1 -0
- package/dist/components/p-BrDlXJ4P.js +1 -0
- package/dist/components/p-BuqEW3pN.js +1 -0
- package/dist/components/p-C0fx1H4h.js +1 -0
- package/dist/components/p-CBZ6wC3m.js +1 -0
- package/dist/components/p-CLzENrFV.js +1 -0
- package/dist/components/p-CWEJdWOg.js +1 -0
- package/dist/components/p-Civ53ZSy.js +1 -0
- package/dist/components/p-CuIyaNyT.js +1 -0
- package/dist/components/p-D0Aaqu_c.js +1 -0
- package/dist/components/p-DC6RGvDS.js +1 -0
- package/dist/components/p-Dgt5K9eM.js +1 -0
- package/dist/components/p-Dh34QRlJ.js +1 -0
- package/dist/components/p-MrnWQiwK.js +1 -0
- package/dist/components/p-OdH1OynJ.js +1 -0
- package/dist/{tegel/p-0bd4c19c.js → components/p-Q3W78DlP.js} +1 -1
- package/dist/components/p-Zx1hN-_O.js +1 -0
- package/dist/components/p-dspMBqQE.js +1 -0
- package/dist/components/tds-accordion-item.js +1 -98
- package/dist/components/tds-accordion.js +1 -44
- package/dist/components/tds-badge.js +1 -76
- package/dist/components/tds-banner.js +1 -93
- package/dist/components/tds-block.js +1 -63
- package/dist/components/tds-body-cell.js +1 -131
- package/dist/components/tds-breadcrumb.js +1 -38
- package/dist/components/tds-breadcrumbs.js +1 -41
- package/dist/components/tds-button.js +1 -6
- package/dist/components/tds-card.js +1 -112
- package/dist/components/tds-checkbox.js +1 -6
- package/dist/components/tds-chip.js +1 -120
- package/dist/components/tds-core-header-item.js +1 -6
- package/dist/components/tds-datetime.js +1 -198
- package/dist/components/tds-divider.js +1 -6
- package/dist/components/tds-dropdown-option.js +1 -6
- package/dist/components/tds-dropdown.js +1 -6
- package/dist/components/tds-folder-tab.js +1 -74
- package/dist/components/tds-folder-tabs.js +1 -228
- package/dist/components/tds-footer-group.js +1 -87
- package/dist/components/tds-footer-item.js +1 -44
- package/dist/components/tds-footer.js +1 -47
- package/dist/components/tds-header-brand-symbol.js +1 -52
- package/dist/components/tds-header-cell.js +1 -187
- package/dist/components/tds-header-dropdown-list-item.js +1 -6
- package/dist/components/tds-header-dropdown-list-user.js +1 -45
- package/dist/components/tds-header-dropdown-list.js +1 -6
- package/dist/components/tds-header-dropdown.js +1 -127
- package/dist/components/tds-header-hamburger.js +1 -59
- package/dist/components/tds-header-item.js +1 -6
- package/dist/components/tds-header-launcher-button.js +1 -6
- package/dist/components/tds-header-launcher-grid-item.js +1 -35
- package/dist/components/tds-header-launcher-grid-title.js +1 -36
- package/dist/components/tds-header-launcher-grid.js +1 -58
- package/dist/components/tds-header-launcher-list-item.js +1 -41
- package/dist/components/tds-header-launcher-list-title.js +1 -37
- package/dist/components/tds-header-launcher-list.js +1 -38
- package/dist/components/tds-header-launcher.js +1 -134
- package/dist/components/tds-header-title.js +1 -35
- package/dist/components/tds-header.js +1 -74
- package/dist/components/tds-icon.js +1 -6
- package/dist/components/tds-inline-tab.js +1 -68
- package/dist/components/tds-inline-tabs.js +1 -234
- package/dist/components/tds-link.js +1 -64
- package/dist/components/tds-message.js +1 -84
- package/dist/components/tds-modal.js +1 -262
- package/dist/components/tds-navigation-tab.js +1 -65
- package/dist/components/tds-navigation-tabs.js +1 -240
- package/dist/components/tds-popover-canvas.js +1 -6
- package/dist/components/tds-popover-core.js +1 -6
- package/dist/components/tds-popover-menu-item.js +1 -41
- package/dist/components/tds-popover-menu.js +1 -84
- package/dist/components/tds-radio-button.js +1 -70
- package/dist/components/tds-side-menu-close-button.js +1 -53
- package/dist/components/tds-side-menu-collapse-button.js +1 -74
- package/dist/components/tds-side-menu-dropdown-list-item.js +1 -78
- package/dist/components/tds-side-menu-dropdown-list.js +1 -49
- package/dist/components/tds-side-menu-dropdown.js +1 -113
- package/dist/components/tds-side-menu-item.js +1 -6
- package/dist/components/tds-side-menu-overlay.js +1 -35
- package/dist/components/tds-side-menu-user-image.js +1 -6
- package/dist/components/tds-side-menu-user-label.js +1 -6
- package/dist/components/tds-side-menu-user.js +1 -56
- package/dist/components/tds-side-menu.js +1 -193
- package/dist/components/tds-slider.js +1 -545
- package/dist/components/tds-spinner.js +1 -39
- package/dist/components/tds-step.js +1 -86
- package/dist/components/tds-stepper.js +1 -95
- package/dist/components/tds-table-body-input-wrapper.js +1 -130
- package/dist/components/tds-table-body-row-expandable.js +1 -175
- package/dist/components/tds-table-body-row.js +1 -125
- package/dist/components/tds-table-body.js +1 -108
- package/dist/components/tds-table-footer.js +1 -210
- package/dist/components/tds-table-header-input-wrapper.js +1 -112
- package/dist/components/tds-table-header.js +1 -144
- package/dist/components/tds-table-toolbar.js +1 -119
- package/dist/components/tds-table.js +1 -168
- package/dist/components/tds-tag.js +1 -48
- package/dist/components/tds-text-field.js +1 -6
- package/dist/components/tds-textarea.js +1 -156
- package/dist/components/tds-toast.js +1 -117
- package/dist/components/tds-toggle.js +1 -86
- package/dist/components/tds-tooltip.js +1 -6
- package/dist/esm/index-9xxNGlso.js +2492 -0
- package/dist/{components/p-0bd4c19c.js → esm/inheritAriaAttributes-DyLhgCIg.js} +1 -1
- package/dist/esm/{isHeadingElement-8efea284.js → isHeadingElement-BQco7VNg.js} +1 -1
- package/dist/esm/loader.js +3 -4
- package/dist/esm/tds-accordion-item.entry.js +10 -5
- package/dist/esm/tds-accordion.entry.js +5 -4
- package/dist/esm/tds-badge.entry.js +13 -6
- package/dist/esm/tds-banner.entry.js +19 -13
- package/dist/esm/tds-block.entry.js +5 -4
- package/dist/esm/tds-body-cell.entry.js +4 -7
- package/dist/esm/tds-breadcrumb.entry.js +4 -4
- package/dist/esm/tds-breadcrumbs.entry.js +3 -5
- package/dist/esm/tds-button_2.entry.js +15 -12
- package/dist/esm/tds-card.entry.js +29 -18
- package/dist/esm/tds-checkbox.entry.js +17 -15
- package/dist/esm/tds-chip.entry.js +19 -14
- package/dist/esm/tds-core-header-item_2.entry.js +9 -8
- package/dist/esm/tds-datetime.entry.js +30 -22
- package/dist/esm/tds-dropdown_2.entry.js +67 -60
- package/dist/esm/tds-folder-tab.entry.js +4 -5
- package/dist/esm/tds-folder-tabs.entry.js +40 -36
- package/dist/esm/tds-footer-group.entry.js +8 -9
- package/dist/esm/tds-footer-item.entry.js +3 -4
- package/dist/esm/tds-footer.entry.js +6 -6
- package/dist/esm/tds-header-brand-symbol.entry.js +3 -4
- package/dist/esm/tds-header-cell.entry.js +20 -21
- package/dist/esm/tds-header-dropdown-list-item.entry.js +5 -4
- package/dist/esm/tds-header-dropdown-list-user.entry.js +3 -8
- package/dist/esm/tds-header-dropdown-list.entry.js +6 -7
- package/dist/esm/tds-header-dropdown.entry.js +9 -11
- package/dist/esm/tds-header-hamburger.entry.js +5 -7
- package/dist/esm/tds-header-launcher-button.entry.js +7 -7
- package/dist/esm/tds-header-launcher-grid-item.entry.js +3 -4
- package/dist/esm/tds-header-launcher-grid-title.entry.js +4 -5
- package/dist/esm/tds-header-launcher-grid.entry.js +5 -7
- package/dist/esm/tds-header-launcher-list-item.entry.js +3 -4
- package/dist/esm/tds-header-launcher-list-title.entry.js +4 -5
- package/dist/esm/tds-header-launcher-list.entry.js +2 -2
- package/dist/esm/tds-header-launcher.entry.js +7 -10
- package/dist/esm/tds-header-title.entry.js +3 -4
- package/dist/esm/tds-header.entry.js +5 -6
- package/dist/esm/tds-icon.entry.js +14 -15
- package/dist/esm/tds-inline-tab.entry.js +4 -4
- package/dist/esm/tds-inline-tabs.entry.js +42 -37
- package/dist/esm/tds-link.entry.js +6 -4
- package/dist/esm/tds-message.entry.js +14 -12
- package/dist/esm/tds-modal.entry.js +93 -45
- package/dist/esm/tds-navigation-tab.entry.js +4 -4
- package/dist/esm/tds-navigation-tabs.entry.js +43 -38
- package/dist/esm/tds-popover-canvas.entry.js +17 -9
- package/dist/esm/tds-popover-core.entry.js +53 -38
- package/dist/esm/tds-popover-menu-item.entry.js +4 -4
- package/dist/esm/tds-popover-menu.entry.js +16 -9
- package/dist/esm/tds-radio-button.entry.js +12 -13
- package/dist/esm/tds-side-menu-close-button.entry.js +5 -6
- package/dist/esm/tds-side-menu-collapse-button.entry.js +4 -5
- package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +4 -4
- package/dist/esm/tds-side-menu-dropdown-list.entry.js +3 -4
- package/dist/esm/tds-side-menu-dropdown.entry.js +6 -5
- package/dist/esm/tds-side-menu-item.entry.js +7 -5
- package/dist/esm/tds-side-menu-overlay.entry.js +3 -4
- package/dist/esm/tds-side-menu-user-image_2.entry.js +5 -11
- package/dist/esm/tds-side-menu-user.entry.js +3 -8
- package/dist/esm/tds-side-menu.entry.js +22 -13
- package/dist/esm/tds-slider.entry.js +43 -24
- package/dist/esm/tds-spinner.entry.js +5 -4
- package/dist/esm/tds-step.entry.js +4 -10
- package/dist/esm/tds-stepper.entry.js +26 -9
- package/dist/esm/tds-table-body-input-wrapper.entry.js +4 -4
- package/dist/esm/tds-table-body-row-expandable.entry.js +15 -7
- package/dist/esm/tds-table-body-row.entry.js +6 -4
- package/dist/esm/tds-table-body.entry.js +8 -9
- package/dist/esm/tds-table-footer.entry.js +23 -16
- package/dist/esm/tds-table-header-input-wrapper.entry.js +4 -4
- package/dist/esm/tds-table-header.entry.js +6 -5
- package/dist/esm/tds-table-toolbar.entry.js +6 -4
- package/dist/esm/tds-table.entry.js +46 -14
- package/dist/esm/tds-tag.entry.js +6 -6
- package/dist/esm/tds-text-field.entry.js +24 -13
- package/dist/esm/tds-textarea.entry.js +18 -11
- package/dist/esm/tds-toast.entry.js +17 -15
- package/dist/esm/tds-toggle.entry.js +14 -13
- package/dist/esm/tds-tooltip.entry.js +20 -16
- package/dist/esm/tegel.js +5 -5
- package/dist/tegel/assets/icons/scania/microphone.svg +4 -0
- package/dist/tegel/assets/icons/scania/microphone_inactive.svg +7 -0
- package/dist/tegel/assets/icons/scania/notification_snooze.svg +6 -0
- package/dist/tegel/assets/icons/scania/paperclip.svg +3 -0
- package/dist/tegel/{p-304f5a5c.entry.js → p-103beac4.entry.js} +1 -1
- package/dist/tegel/{p-c66b99a8.entry.js → p-1171b918.entry.js} +1 -1
- package/dist/tegel/p-121afb33.entry.js +1 -0
- package/dist/tegel/{p-fc26fb72.entry.js → p-17500423.entry.js} +1 -1
- package/dist/tegel/{p-8e930da5.entry.js → p-182d7066.entry.js} +1 -1
- package/dist/tegel/p-19103b43.entry.js +1 -0
- package/dist/tegel/p-19e70185.entry.js +1 -0
- package/dist/tegel/p-1b235896.entry.js +1 -0
- package/dist/tegel/p-1d160cef.entry.js +1 -0
- package/dist/tegel/p-1d403667.entry.js +1 -0
- package/dist/tegel/p-1f343c1c.entry.js +1 -0
- package/dist/tegel/p-21da22c7.entry.js +1 -0
- package/dist/tegel/p-21ee8076.entry.js +1 -0
- package/dist/tegel/{p-8a4837ae.entry.js → p-22d1d304.entry.js} +1 -1
- package/dist/tegel/{p-2faeb483.entry.js → p-26d6f766.entry.js} +1 -1
- package/dist/tegel/{p-4a7c213f.entry.js → p-2ab5a886.entry.js} +1 -1
- package/dist/tegel/{p-066e9613.entry.js → p-2e70052a.entry.js} +1 -1
- package/dist/tegel/{p-4a10393b.entry.js → p-37d10816.entry.js} +1 -1
- package/dist/tegel/p-38e72fb9.entry.js +1 -0
- package/dist/tegel/p-3a4c94fa.entry.js +1 -0
- package/dist/tegel/{p-15ae9443.entry.js → p-3a9793ef.entry.js} +1 -1
- package/dist/tegel/p-3c706eea.entry.js +1 -0
- package/dist/tegel/p-3d11fc11.entry.js +1 -0
- package/dist/tegel/{p-26408506.entry.js → p-408ccb20.entry.js} +1 -1
- package/dist/tegel/p-41ce0d20.entry.js +1 -0
- package/dist/tegel/{p-17893043.entry.js → p-4748cad9.entry.js} +1 -1
- package/dist/tegel/{p-25c4e6f6.entry.js → p-52e8c108.entry.js} +1 -1
- package/dist/tegel/{p-79fb0088.entry.js → p-567cbbe3.entry.js} +1 -1
- package/dist/tegel/{p-caadaf33.entry.js → p-5fc5e8b2.entry.js} +1 -1
- package/dist/tegel/{p-d031a7ca.entry.js → p-652d5980.entry.js} +1 -1
- package/dist/tegel/{p-08c993f3.entry.js → p-66404c24.entry.js} +1 -1
- package/dist/tegel/p-6952323d.entry.js +1 -0
- package/dist/tegel/p-722edda3.entry.js +1 -0
- package/dist/tegel/p-7aedca1d.entry.js +1 -0
- package/dist/tegel/p-7d54c68f.entry.js +1 -0
- package/dist/tegel/{p-ce6faf0e.entry.js → p-7f41c308.entry.js} +1 -1
- package/dist/tegel/{p-3ba2e575.entry.js → p-826bfbff.entry.js} +1 -1
- package/dist/tegel/{p-133351b5.entry.js → p-82743378.entry.js} +1 -1
- package/dist/tegel/p-85b3d6a6.entry.js +1 -0
- package/dist/tegel/{p-f1d58cbf.entry.js → p-85e2b8b8.entry.js} +1 -1
- package/dist/tegel/p-873dd581.entry.js +1 -0
- package/dist/tegel/p-88deac25.entry.js +1 -0
- package/dist/tegel/p-892bdb23.entry.js +1 -0
- package/dist/tegel/p-8eaea9b6.entry.js +1 -0
- package/dist/tegel/p-8f271e98.entry.js +1 -0
- package/dist/tegel/{p-508a55c0.entry.js → p-8fdf0d7e.entry.js} +1 -1
- package/dist/tegel/p-92ee76ea.entry.js +1 -0
- package/dist/tegel/p-936a7ca6.entry.js +1 -0
- package/dist/tegel/p-97c3349e.entry.js +1 -0
- package/dist/tegel/p-9a6a1e5a.entry.js +1 -0
- package/dist/tegel/p-9b2663c2.entry.js +1 -0
- package/dist/tegel/p-9xxNGlso.js +2 -0
- package/dist/tegel/{p-9332c225.js → p-Bx66i7RU.js} +1 -1
- package/dist/tegel/p-CF8bH08v.js +1 -0
- package/dist/tegel/p-CLF3diNe.js +1 -0
- package/dist/tegel/p-Cn4f8w1e.js +1 -0
- package/dist/tegel/p-DDX6uFcm.js +1 -0
- package/dist/tegel/p-Q3W78DlP.js +1 -0
- package/dist/tegel/p-a4fc2b2c.entry.js +1 -0
- package/dist/tegel/{p-27369d6a.entry.js → p-a6415b2c.entry.js} +1 -1
- package/dist/tegel/p-a7c5f9e5.entry.js +1 -0
- package/dist/tegel/{p-106dd3e9.entry.js → p-a9a60c38.entry.js} +1 -1
- package/dist/tegel/{p-ab067071.entry.js → p-a9f3bec2.entry.js} +1 -1
- package/dist/tegel/{p-a00ad341.entry.js → p-c2ffb85d.entry.js} +1 -1
- package/dist/tegel/p-c405daa1.entry.js +1 -0
- package/dist/tegel/p-c612b88f.entry.js +1 -0
- package/dist/tegel/{p-10340b85.entry.js → p-c681502a.entry.js} +1 -1
- package/dist/tegel/p-c8a575f1.entry.js +1 -0
- package/dist/tegel/p-c8d602b9.entry.js +1 -0
- package/dist/tegel/{p-2766b46f.entry.js → p-cc482c30.entry.js} +1 -1
- package/dist/tegel/p-d0c0f219.entry.js +1 -0
- package/dist/tegel/p-d79a1010.entry.js +1 -0
- package/dist/tegel/p-daab519f.entry.js +1 -0
- package/dist/tegel/{p-dc93c6e5.entry.js → p-dad64a2f.entry.js} +1 -1
- package/dist/tegel/p-dbfcc2a9.entry.js +1 -0
- package/dist/tegel/p-df943c9e.entry.js +1 -0
- package/dist/tegel/{p-608997fa.entry.js → p-dfa11d82.entry.js} +1 -1
- package/dist/tegel/p-e13d59c1.entry.js +1 -0
- package/dist/tegel/p-e4a3e0f4.entry.js +1 -0
- package/dist/tegel/p-e64bc780.entry.js +1 -0
- package/dist/tegel/{p-300af79f.entry.js → p-e8be1c01.entry.js} +1 -1
- package/dist/tegel/p-ea500860.entry.js +1 -0
- package/dist/tegel/{p-576a60ff.entry.js → p-ee9667d7.entry.js} +1 -1
- package/dist/tegel/p-f25d7602.entry.js +1 -0
- package/dist/tegel/p-f67dd00a.entry.js +1 -0
- package/dist/tegel/{p-f097adce.entry.js → p-f98f7716.entry.js} +1 -1
- package/dist/tegel/p-wEP_nEaO.js +1 -0
- package/dist/tegel/tegel.css +2 -2
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +1 -1
- package/dist/types/components/modal/modal.d.ts +7 -0
- package/dist/types/components/slider/slider-stories-setup.d.ts +1 -1
- package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +2 -2
- package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +2 -2
- package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +2 -2
- package/dist/types/components.d.ts +1206 -150
- package/dist/types/stencil-public-runtime.d.ts +196 -8
- package/dist/types/types/ScaniaIcons.d.ts +1 -1
- package/package.json +9 -4
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/index-ca8040ad.js +0 -2039
- package/dist/components/p-0f9ce30b.js +0 -37
- package/dist/components/p-28ef5186.js +0 -1507
- package/dist/components/p-32351d04.js +0 -37
- package/dist/components/p-381677ec.js +0 -46
- package/dist/components/p-49b20476.js +0 -82
- package/dist/components/p-4c0aa33f.js +0 -117
- package/dist/components/p-4f672d4f.js +0 -112
- package/dist/components/p-542226b2.js +0 -110
- package/dist/components/p-5725d7a2.js +0 -113
- package/dist/components/p-5bb5f233.js +0 -220
- package/dist/components/p-859e3ebf.js +0 -68
- package/dist/components/p-871223b7.js +0 -719
- package/dist/components/p-a1181b1f.js +0 -16
- package/dist/components/p-ae4ca8c3.js +0 -165
- package/dist/components/p-d5461a3c.js +0 -59
- package/dist/components/p-e0997ae2.js +0 -41
- package/dist/components/p-e1622f4a.js +0 -32
- package/dist/components/p-e62ed985.js +0 -2100
- package/dist/components/p-f086ba26.js +0 -84
- package/dist/components/p-f6685f1b.js +0 -93
- package/dist/components/p-f8db4031.js +0 -103
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/dfs-1e574d5f.js +0 -27
- package/dist/esm/generateUniqueId-7934d315.js +0 -26
- package/dist/esm/getAriaInvalid-a9944cb9.js +0 -23
- package/dist/esm/hasSlot-d52114d0.js +0 -9
- package/dist/esm/index-51d04e39.js +0 -2009
- package/dist/esm/inheritAriaAttributes-04f2f252.js +0 -76
- package/dist/esm/inheritAttributes-d21e267b.js +0 -25
- package/dist/tegel/p-0684b6d3.entry.js +0 -1
- package/dist/tegel/p-078217d1.entry.js +0 -1
- package/dist/tegel/p-07d16763.entry.js +0 -1
- package/dist/tegel/p-0e3fcc9f.entry.js +0 -1
- package/dist/tegel/p-1073fb33.entry.js +0 -1
- package/dist/tegel/p-123e6e54.entry.js +0 -1
- package/dist/tegel/p-15b9a73b.entry.js +0 -1
- package/dist/tegel/p-2049fab2.js +0 -2
- package/dist/tegel/p-225c73b6.entry.js +0 -1
- package/dist/tegel/p-38725623.entry.js +0 -1
- package/dist/tegel/p-3c348fcb.entry.js +0 -1
- package/dist/tegel/p-419212b5.entry.js +0 -1
- package/dist/tegel/p-4abe96b6.entry.js +0 -1
- package/dist/tegel/p-51118061.entry.js +0 -1
- package/dist/tegel/p-57a2d4de.entry.js +0 -1
- package/dist/tegel/p-5b80467f.entry.js +0 -1
- package/dist/tegel/p-5bab691f.entry.js +0 -1
- package/dist/tegel/p-63f77d7c.entry.js +0 -1
- package/dist/tegel/p-6bb6425c.entry.js +0 -1
- package/dist/tegel/p-739068bf.entry.js +0 -1
- package/dist/tegel/p-87219f00.entry.js +0 -1
- package/dist/tegel/p-91af9dc5.entry.js +0 -1
- package/dist/tegel/p-947ec2b0.entry.js +0 -1
- package/dist/tegel/p-9772750e.entry.js +0 -1
- package/dist/tegel/p-9f154997.entry.js +0 -1
- package/dist/tegel/p-a15280db.entry.js +0 -1
- package/dist/tegel/p-a2aaf61c.entry.js +0 -1
- package/dist/tegel/p-aa795666.entry.js +0 -1
- package/dist/tegel/p-b7e0917f.entry.js +0 -1
- package/dist/tegel/p-bc697ea7.entry.js +0 -1
- package/dist/tegel/p-bf40233e.entry.js +0 -1
- package/dist/tegel/p-c05f61d6.entry.js +0 -1
- package/dist/tegel/p-c163d44f.entry.js +0 -1
- package/dist/tegel/p-c2ab817d.entry.js +0 -1
- package/dist/tegel/p-c4719b10.entry.js +0 -1
- package/dist/tegel/p-c7be09fc.entry.js +0 -1
- package/dist/tegel/p-c8fd6b3b.entry.js +0 -1
- package/dist/tegel/p-da72f897.entry.js +0 -1
- package/dist/tegel/p-ded1191e.entry.js +0 -1
- package/dist/tegel/p-e1255160.js +0 -1
- package/dist/tegel/p-e2a6c30c.entry.js +0 -1
- package/dist/tegel/p-e2db17a5.entry.js +0 -1
- package/dist/tegel/p-e40d454d.entry.js +0 -1
- package/dist/tegel/p-e53da1e5.entry.js +0 -1
- package/dist/tegel/p-e64c36a3.entry.js +0 -1
- package/dist/tegel/p-ebf13d81.entry.js +0 -1
- package/dist/tegel/p-ede87410.entry.js +0 -1
- package/dist/tegel/p-f3cf4eba.entry.js +0 -1
- package/loader/package.json +0 -11
- /package/dist/cjs/{dfs-84f7f63e.js → dfs-Clg9RCmq.js} +0 -0
- /package/dist/cjs/{generateUniqueId-e3fc9863.js → generateUniqueId-ComXTAM_.js} +0 -0
- /package/dist/cjs/{getAriaInvalid-66a2eade.js → getAriaInvalid-Bdg4qUb_.js} +0 -0
- /package/dist/cjs/{hasSlot-1c90e9ba.js → hasSlot-D-DVNhGg.js} +0 -0
- /package/dist/cjs/{inheritAttributes-ff9ad737.js → inheritAttributes-CGw91JfB.js} +0 -0
- /package/dist/{tegel/p-3fe9cbbf.js → components/p-CF8bH08v.js} +0 -0
- /package/dist/{tegel/p-52bf0fdf.js → components/p-CLF3diNe.js} +0 -0
- /package/dist/{tegel/p-11648030.js → components/p-Cn4f8w1e.js} +0 -0
- /package/dist/{tegel/p-ae110fc2.js → components/p-DDX6uFcm.js} +0 -0
- /package/dist/{tegel/p-bbf9492a.js → components/p-wEP_nEaO.js} +0 -0
- /package/dist/{components/p-52bf0fdf.js → esm/dfs-CLF3diNe.js} +0 -0
- /package/dist/{components/p-11648030.js → esm/generateUniqueId-Cn4f8w1e.js} +0 -0
- /package/dist/{components/p-bbf9492a.js → esm/getAriaInvalid-wEP_nEaO.js} +0 -0
- /package/dist/{components/p-ae110fc2.js → esm/hasSlot-DDX6uFcm.js} +0 -0
- /package/dist/{components/p-3fe9cbbf.js → esm/inheritAttributes-CF8bH08v.js} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host,
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-9xxNGlso.js';
|
|
2
2
|
|
|
3
|
-
const inlineTabCss =
|
|
4
|
-
const TdsInlineTabStyle0 = inlineTabCss;
|
|
3
|
+
const inlineTabCss = () => `:host{box-sizing:border-box;display:block;position:relative}:host *{box-sizing:border-box}:host ::slotted(*){all:unset;font:var(--tds-headline-07) !important;letter-spacing:var(--tds-headline-07-ls) !important;color:var(--tds-inline-tabs-tab-color);text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out 0s;white-space:nowrap;background-color:transparent;border:0;width:100%;padding:20px 0}:host ::slotted(*:focus-visible)::before{content:"";position:absolute;left:0;right:0;top:3px;bottom:3px;outline:2px solid var(--tds-blue-400);outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .inline-tab-item:not(.selected)::after{width:0%;transition:width 0.15s ease-in-out 0s}:host .inline-tab-item{position:relative}:host .inline-tab-item:hover{cursor:pointer}:host .inline-tab-item:hover ::slotted(*){color:var(--tds-inline-tabs-tab-color-hover)}:host .inline-tab-item:hover::after{width:100%}:host .inline-tab-item::after{content:" ";position:absolute;bottom:0;right:0;left:0;margin-left:auto;width:0%;margin-right:auto;height:2px;background-color:var(--tds-inline-tabs-tab-indicator-background-hover);z-index:1}:host .selected ::slotted(*){color:var(--tds-inline-tabs-tab-color-selected)}:host .selected::after{width:100%;background-color:var(--tds-inline-tabs-tab-indicator-background-active)}:host .disabled ::slotted(*){color:var(--tds-inline-tabs-tab-color-disabled)}:host .disabled::after{content:none}:host .disabled ::slotted(*:hover){cursor:not-allowed;color:var(--tds-inline-tabs-tab-color-disabled)}:host .disabled ::slotted(*:focus-visible){outline:none}:host(.last){margin-right:32px}`;
|
|
5
4
|
|
|
6
5
|
const TdsInlineTab = class {
|
|
7
6
|
constructor(hostRef) {
|
|
8
7
|
registerInstance(this, hostRef);
|
|
8
|
+
/** Disables the Tab. */
|
|
9
9
|
this.disabled = false;
|
|
10
10
|
this.selected = false;
|
|
11
11
|
}
|
|
@@ -40,6 +40,6 @@ const TdsInlineTab = class {
|
|
|
40
40
|
}
|
|
41
41
|
get host() { return getElement(this); }
|
|
42
42
|
};
|
|
43
|
-
TdsInlineTab.style =
|
|
43
|
+
TdsInlineTab.style = inlineTabCss();
|
|
44
44
|
|
|
45
45
|
export { TdsInlineTab as tds_inline_tab };
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host,
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-9xxNGlso.js';
|
|
2
2
|
|
|
3
|
-
const inlineTabsCss =
|
|
4
|
-
const TdsInlineTabsStyle0 = inlineTabsCss;
|
|
3
|
+
const inlineTabsCss = () => `:host{box-sizing:border-box;display:flex;background-color:var(--tds-inline-tabs-background);position:relative}:host *{box-sizing:border-box}:host::after{content:" ";display:block;border-bottom:1px solid var(--tds-inline-tabs-horizontal-divider-background);left:0;right:0;bottom:0;position:absolute}:host .wrapper{display:flex;flex-wrap:nowrap;white-space:nowrap;width:100%;overflow-x:scroll;scrollbar-width:none;gap:16px}:host .wrapper::-webkit-scrollbar{display:none}:host .scroll-right-button{right:0;z-index:1}:host .scroll-left-button{left:0;z-index:1}:host .scroll-right-button,:host .scroll-left-button{color:var(--tds-folder-tabs-scroll-btn-color);cursor:pointer;border:0;width:0;background-color:var(--tds-inline-tabs-scroll-btn-background);display:none;justify-content:center;align-items:center;opacity:0;pointer-events:none;position:sticky}:host .scroll-right-button.show,:host .scroll-left-button.show{min-width:48px;display:block;opacity:1;pointer-events:all}:host .scroll-right-button:hover,:host .scroll-left-button:hover{background-color:var(--tds-folder-tabs-scroll-btn-background-hover)}:host .scroll-right-button:active,:host .scroll-left-button:active{background-color:var(--tds-folder-tabs-scroll-btn-background-active)}:host .scroll-right-button:focus-visible::before,:host .scroll-left-button:focus-visible::before{content:"";position:absolute;inset:3px;outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .scroll-right-button:focus-visible,:host .scroll-left-button:focus-visible{outline:0}:host .scroll-right-button svg,:host .scroll-left-button svg{fill:var(--tds-folder-tabs-scroll-btn-color)}`;
|
|
5
4
|
|
|
6
5
|
const TdsInlineTabs = class {
|
|
7
6
|
constructor(hostRef) {
|
|
8
7
|
registerInstance(this, hostRef);
|
|
9
8
|
this.tdsChange = createEvent(this, "tdsChange", 7);
|
|
9
|
+
/** Variant of the Tabs, primary= on white, secondary= on grey50 */
|
|
10
|
+
this.modeVariant = 'primary';
|
|
11
|
+
/** Sets the default selected Tab. */
|
|
12
|
+
this.defaultSelectedIndex = 0;
|
|
13
|
+
/** Defines aria-label on left scroll button */
|
|
14
|
+
this.tdsScrollLeftAriaLabel = 'Scroll left';
|
|
15
|
+
/** Defines aria-label on right scroll button */
|
|
16
|
+
this.tdsScrollRightAriaLabel = 'Scroll right';
|
|
17
|
+
/** Custom left padding value for the wrapper element. */
|
|
18
|
+
this.leftPadding = 32;
|
|
19
|
+
this.showLeftScroll = false;
|
|
20
|
+
this.showRightScroll = false;
|
|
10
21
|
this.navWrapperElement = null; // reference to container with nav buttons
|
|
11
22
|
this.componentWidth = 0; // visible width of this component
|
|
12
23
|
this.buttonsWidth = 0; // total width of all nav items combined
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
24
|
+
this.scrollableWidth = 0; // total amount that is possible to scroll in the nav wrapper
|
|
25
|
+
this.tabElements = [];
|
|
15
26
|
this.clickHandlers = new WeakMap();
|
|
16
27
|
this.addResizeObserver = () => {
|
|
17
28
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -26,7 +37,7 @@ const TdsInlineTabs = class {
|
|
|
26
37
|
});
|
|
27
38
|
this.componentWidth = componentWidth;
|
|
28
39
|
this.buttonsWidth = buttonsWidth;
|
|
29
|
-
this.
|
|
40
|
+
this.scrollableWidth = buttonsWidth - componentWidth;
|
|
30
41
|
this.updateScrollButtons();
|
|
31
42
|
});
|
|
32
43
|
});
|
|
@@ -34,15 +45,15 @@ const TdsInlineTabs = class {
|
|
|
34
45
|
resizeObserver.observe(this.navWrapperElement);
|
|
35
46
|
};
|
|
36
47
|
this.addEventListenerToTabs = () => {
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
48
|
+
this.tabElements = Array.from(this.host.children);
|
|
49
|
+
this.tabElements.map((item, index) => {
|
|
39
50
|
const clickHandler = () => {
|
|
40
51
|
if (!item.disabled) {
|
|
41
52
|
const tdsChangeEvent = this.tdsChange.emit({
|
|
42
|
-
selectedTabIndex: this.
|
|
53
|
+
selectedTabIndex: this.tabElements.indexOf(item),
|
|
43
54
|
});
|
|
44
55
|
if (!tdsChangeEvent.defaultPrevented) {
|
|
45
|
-
this.
|
|
56
|
+
this.tabElements.forEach((element) => element.setSelected(false));
|
|
46
57
|
item.setSelected(true);
|
|
47
58
|
this.selectedIndex = index;
|
|
48
59
|
}
|
|
@@ -54,7 +65,7 @@ const TdsInlineTabs = class {
|
|
|
54
65
|
});
|
|
55
66
|
};
|
|
56
67
|
this.removeEventListenerFromTabs = () => {
|
|
57
|
-
this.
|
|
68
|
+
this.tabElements.forEach((item) => {
|
|
58
69
|
const clickHandler = this.clickHandlers.get(item);
|
|
59
70
|
if (clickHandler) {
|
|
60
71
|
item.removeEventListener('click', clickHandler);
|
|
@@ -62,24 +73,16 @@ const TdsInlineTabs = class {
|
|
|
62
73
|
}
|
|
63
74
|
});
|
|
64
75
|
};
|
|
65
|
-
this.modeVariant = 'primary';
|
|
66
|
-
this.defaultSelectedIndex = 0;
|
|
67
|
-
this.selectedIndex = undefined;
|
|
68
|
-
this.tdsScrollLeftAriaLabel = 'Scroll left';
|
|
69
|
-
this.tdsScrollRightAriaLabel = 'Scroll right';
|
|
70
|
-
this.leftPadding = 32;
|
|
71
|
-
this.showLeftScroll = false;
|
|
72
|
-
this.showRightScroll = false;
|
|
73
76
|
}
|
|
74
77
|
/** Selects a Tab based on tabindex, will not select a disabled Tab. */
|
|
75
78
|
async selectTab(tabIndex) {
|
|
76
|
-
if (tabIndex < 0 || tabIndex >= this.
|
|
79
|
+
if (tabIndex < 0 || tabIndex >= this.tabElements.length) {
|
|
77
80
|
throw new Error('Tab index out of bounds');
|
|
78
81
|
}
|
|
79
|
-
this.
|
|
80
|
-
if (!this.
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
82
|
+
this.tabElements = Array.from(this.host.children);
|
|
83
|
+
if (!this.tabElements[tabIndex].disabled) {
|
|
84
|
+
this.tabElements.forEach((element) => element.setSelected(false));
|
|
85
|
+
this.tabElements = this.tabElements.map((element, index) => {
|
|
83
86
|
if (index === tabIndex) {
|
|
84
87
|
element.setSelected(true);
|
|
85
88
|
this.selectedIndex = tabIndex;
|
|
@@ -94,12 +97,12 @@ const TdsInlineTabs = class {
|
|
|
94
97
|
this.handleSlotChange();
|
|
95
98
|
}
|
|
96
99
|
handleSelectedIndexUpdate() {
|
|
97
|
-
this.
|
|
100
|
+
this.tabElements = Array.from(this.host.children).map((tabElement) => {
|
|
98
101
|
tabElement.setSelected(false);
|
|
99
102
|
return tabElement;
|
|
100
103
|
});
|
|
101
104
|
if (this.selectedIndex) {
|
|
102
|
-
this.
|
|
105
|
+
this.tabElements[this.selectedIndex].setSelected(true);
|
|
103
106
|
}
|
|
104
107
|
}
|
|
105
108
|
scrollRight() {
|
|
@@ -120,27 +123,27 @@ const TdsInlineTabs = class {
|
|
|
120
123
|
if (!this.navWrapperElement)
|
|
121
124
|
return;
|
|
122
125
|
const scroll = this.navWrapperElement.scrollLeft;
|
|
123
|
-
this.showRightScroll = scroll <= this.
|
|
126
|
+
this.showRightScroll = scroll <= this.scrollableWidth;
|
|
124
127
|
this.showLeftScroll = scroll > 0;
|
|
125
128
|
}
|
|
126
129
|
initializeTabs() {
|
|
127
|
-
this.
|
|
130
|
+
this.tabElements = Array.from(this.host.children);
|
|
128
131
|
// remove first and last class from other tabs in case of initialization
|
|
129
|
-
this.
|
|
132
|
+
this.tabElements.forEach((child) => {
|
|
130
133
|
child.classList.remove('last');
|
|
131
134
|
child.classList.remove('first');
|
|
132
135
|
});
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
136
|
+
this.tabElements[0].classList.add('first');
|
|
137
|
+
this.tabElements[this.tabElements.length - 1].classList.add('last');
|
|
135
138
|
}
|
|
136
139
|
initializeSelectedTab() {
|
|
137
140
|
if (this.selectedIndex === undefined) {
|
|
138
141
|
this.addEventListenerToTabs();
|
|
139
|
-
this.
|
|
142
|
+
this.tabElements[this.defaultSelectedIndex].setSelected(true);
|
|
140
143
|
this.selectedIndex = this.defaultSelectedIndex;
|
|
141
144
|
}
|
|
142
145
|
else {
|
|
143
|
-
this.
|
|
146
|
+
this.tabElements[this.selectedIndex].setSelected(true);
|
|
144
147
|
}
|
|
145
148
|
this.tdsChange.emit({
|
|
146
149
|
selectedTabIndex: this.selectedIndex,
|
|
@@ -182,15 +185,17 @@ const TdsInlineTabs = class {
|
|
|
182
185
|
this.removeEventListenerFromTabs();
|
|
183
186
|
}
|
|
184
187
|
render() {
|
|
185
|
-
return (h(Host, { key: '
|
|
188
|
+
return (h(Host, { key: 'b129d796866053ae345a16a84c71bfae11b5b22d', role: "tablist", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("div", { key: 'd01ad71aefcb3ab75b434fc329d0aff2e2e4fa5e', class: "wrapper", ref: (el) => {
|
|
186
189
|
this.navWrapperElement = el;
|
|
187
|
-
}, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: '
|
|
190
|
+
}, style: { paddingLeft: `${this.leftPadding}px` } }, h("button", { key: 'eaffe52b68a4e72dde674d3ddeaaa5b744dc694b', "aria-label": this.tdsScrollLeftAriaLabel, class: `scroll-left-button ${this.showLeftScroll ? 'show' : ''}`, onClick: () => this.scrollLeft(), disabled: !this.showLeftScroll }, h("tds-icon", { key: 'a134e040e2c474aaab21e7b5a27d4d71b9bec455', name: "chevron_left", size: "20px" })), h("slot", { key: '1b3a792581868dd02114c2ab3bf44bec75203782', onSlotchange: () => this.handleSlotChange() }), h("button", { key: '113c97bca3def818011ae091cd6d9b740f43ec67', "aria-label": this.tdsScrollRightAriaLabel, class: `scroll-right-button ${this.showRightScroll ? 'show' : ''}`, onClick: () => this.scrollRight(), disabled: !this.showRightScroll }, h("tds-icon", { key: '9e899fc5c5d3a658f27e7e374878e4814c3f708b', name: "chevron_right", size: "20px" })))));
|
|
188
191
|
}
|
|
189
192
|
get host() { return getElement(this); }
|
|
190
193
|
static get watchers() { return {
|
|
191
|
-
"selectedIndex": [
|
|
194
|
+
"selectedIndex": [{
|
|
195
|
+
"handleSelectedIndexUpdate": 0
|
|
196
|
+
}]
|
|
192
197
|
}; }
|
|
193
198
|
};
|
|
194
|
-
TdsInlineTabs.style =
|
|
199
|
+
TdsInlineTabs.style = inlineTabsCss();
|
|
195
200
|
|
|
196
201
|
export { TdsInlineTabs as tds_inline_tabs };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { r as registerInstance, h,
|
|
1
|
+
import { r as registerInstance, h, a as getElement } from './index-9xxNGlso.js';
|
|
2
2
|
|
|
3
|
-
const linkCss =
|
|
4
|
-
const TdsLinkStyle0 = linkCss;
|
|
3
|
+
const linkCss = () => `:host{display:inline}:host ::slotted(*){all:unset;cursor:pointer;outline:none;color:var(--tds-link);text-decoration:underline}:host ::slotted(*:hover){color:var(--tds-link-hover);text-decoration:none}:host .no-underline ::slotted(*){text-decoration:none}:host .no-underline ::slotted(*:hover){color:var(--tds-link-hover);text-decoration:underline;text-decoration-color:var(--tds-link-hover)}:host ::slotted(*:focus-visible){color:var(--tds-link-focus);text-decoration:none;box-shadow:0 0 0 1px var(--tds-white), 0 0 0 3px var(--tds-link-focus)}:host ::slotted(*:active){color:var(--tds-link);text-decoration:underline;text-decoration-color:var(--tds-link)}:host ::slotted(*:visited){color:var(--tds-link-visited);text-decoration-color:var(--tds-link-visited)}.disabled ::slotted(*),.disabled ::slotted(*:visited){color:var(--tds-link-disabled);text-decoration-color:var(--tds-link-disabled);pointer-events:none}.standalone ::slotted(*){font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls)}`;
|
|
5
4
|
|
|
6
5
|
const TdsLink = class {
|
|
7
6
|
constructor(hostRef) {
|
|
8
7
|
registerInstance(this, hostRef);
|
|
8
|
+
/** Disables the Link */
|
|
9
9
|
this.disabled = false;
|
|
10
|
+
/** Displays the Link with an underline. */
|
|
10
11
|
this.underline = true;
|
|
12
|
+
/** Displays the Link as a standalone component. Not part of a paragraph. */
|
|
11
13
|
this.standalone = false;
|
|
12
14
|
}
|
|
13
15
|
connectedCallback() {
|
|
@@ -36,6 +38,6 @@ const TdsLink = class {
|
|
|
36
38
|
}
|
|
37
39
|
get host() { return getElement(this); }
|
|
38
40
|
};
|
|
39
|
-
TdsLink.style =
|
|
41
|
+
TdsLink.style = linkCss();
|
|
40
42
|
|
|
41
43
|
export { TdsLink as tds_link };
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { g as generateUniqueId } from './generateUniqueId-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-9xxNGlso.js';
|
|
2
|
+
import { g as generateUniqueId } from './generateUniqueId-Cn4f8w1e.js';
|
|
3
3
|
|
|
4
|
-
const messageCss =
|
|
5
|
-
const TdsMessageStyle0 = messageCss;
|
|
4
|
+
const messageCss = () => `:host .wrapper{display:flex;padding:16px;background-color:var(--tds-message-background);border-radius:4px}:host .wrapper.information{border-left:4px solid var(--tds-message-border-info)}:host .wrapper.information tds-icon{color:var(--tds-message-icon-info)}:host .wrapper.success{background-color:var(--tds-message-background-success);border-left:4px solid var(--tds-message-border-success)}:host .wrapper.success tds-icon{color:var(--tds-message-icon-success)}:host .wrapper.error{background-color:var(--tds-message-background-error);border-left:4px solid var(--tds-message-border-error)}:host .wrapper.error tds-icon{color:var(--tds-message-icon-error)}:host .wrapper.warning{background-color:var(--tds-message-background-warning);border-left:4px solid var(--tds-message-border-warning)}:host .wrapper.warning tds-icon{color:var(--tds-message-icon-warning)}:host .wrapper.minimal{border:none;padding:0;background-color:transparent}:host .wrapper.minimal tds-icon{padding-right:8px}:host .wrapper.minimal .header{font-family:var(--detail-02-font-family);font-size:var(--detail-02-font-size);line-height:var(--detail-02-line-height);font-weight:var(--detail-02-font-weight);letter-spacing:var(--detail-02-letter-spacing);text-transform:var(--detail-02-text-transform)}:host .wrapper.minimal.error .header{color:var(--tds-message-minimal-header-error)}:host tds-icon{padding-right:16px}:host .content{display:flex;flex-direction:column;gap:4px;color:var(--foreground-text-strong);padding:2px 24px 2px 0;overflow-wrap:anywhere}:host .content .header{font-family:var(--headline-07-font-family);font-size:var(--headline-07-font-size);line-height:var(--headline-07-line-height);font-weight:var(--headline-07-font-weight);letter-spacing:var(--headline-07-letter-spacing);text-transform:var(--headline-07-text-transform)}:host .content .extended-message{color:var(--foreground-text-strong);font-family:var(--detail-03-font-family);font-size:var(--detail-03-font-size);line-height:var(--detail-03-line-height);font-weight:var(--detail-03-font-weight);letter-spacing:var(--detail-03-letter-spacing);text-transform:var(--detail-03-text-transform)}`;
|
|
6
5
|
|
|
7
6
|
const TdsMessage = class {
|
|
8
7
|
constructor(hostRef) {
|
|
9
8
|
registerInstance(this, hostRef);
|
|
9
|
+
/** Variant of the component, based on current mode. */
|
|
10
|
+
this.modeVariant = null;
|
|
11
|
+
/** Variant of Message. */
|
|
12
|
+
this.variant = 'information';
|
|
13
|
+
/** Removes the icon in the Message. */
|
|
14
|
+
this.noIcon = false;
|
|
15
|
+
/** Minimal Message styling. */
|
|
16
|
+
this.minimal = false;
|
|
17
|
+
/** Role of the message component. Can be either 'alertdialog' for important messages that require immediate attention, or 'dialog' for regular messages. */
|
|
18
|
+
this.tdsAlertDialog = 'dialog';
|
|
10
19
|
this.getIconName = () => {
|
|
11
20
|
switch (this.variant) {
|
|
12
21
|
case 'information':
|
|
@@ -21,13 +30,6 @@ const TdsMessage = class {
|
|
|
21
30
|
return 'info';
|
|
22
31
|
}
|
|
23
32
|
};
|
|
24
|
-
this.header = undefined;
|
|
25
|
-
this.modeVariant = null;
|
|
26
|
-
this.variant = 'information';
|
|
27
|
-
this.noIcon = false;
|
|
28
|
-
this.minimal = false;
|
|
29
|
-
this.tdsAlertDialog = 'dialog';
|
|
30
|
-
this.tdsAriaLabel = undefined;
|
|
31
33
|
}
|
|
32
34
|
getAriaLabel() {
|
|
33
35
|
if (this.header) {
|
|
@@ -46,6 +48,6 @@ const TdsMessage = class {
|
|
|
46
48
|
} }, !this.noIcon && (h("tds-icon", { key: '99bd0439c3b09319b02fad1bd730bc4224394c1e', "aria-hidden": "true", "aria-label": `${this.variant}`, svgTitle: `${this.variant}`, name: this.getIconName(), size: "20px" })), h("div", { key: 'b225e23bb6230c7ed3ecb322c91ded787f1bb8b8', class: `content` }, this.header && (h("div", { key: '2bb19ac506aeb0ec88be8b20f4bf858d17fdb6ee', class: "header", id: headerId }, this.header)), !this.minimal && (h("div", { key: '560661fc2b22196461a8409d09b147591de3f02d', class: "extended-message", id: contentId }, h("slot", { key: '4647d9dd6eab33a41323e82edc2e12d434e5b84f' })))))));
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
|
-
TdsMessage.style =
|
|
51
|
+
TdsMessage.style = messageCss();
|
|
50
52
|
|
|
51
53
|
export { TdsMessage as tds_message };
|
|
@@ -1,29 +1,41 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host,
|
|
2
|
-
import { h as hasSlot } from './hasSlot-
|
|
3
|
-
import { g as generateUniqueId } from './generateUniqueId-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-9xxNGlso.js';
|
|
2
|
+
import { h as hasSlot } from './hasSlot-DDX6uFcm.js';
|
|
3
|
+
import { g as generateUniqueId } from './generateUniqueId-Cn4f8w1e.js';
|
|
4
4
|
|
|
5
|
-
const modalCss =
|
|
6
|
-
const TdsModalStyle0 = modalCss;
|
|
5
|
+
const modalCss = () => `:host,:root{--tds-scrollbar-width-standard:thin;--tds-scrollbar-width:10px;--tds-scrollbar-height:10px;--tds-scrollbar-thumb-border-width:3px;--tds-scrollbar-thumb-border-hover-width:2px}body{scrollbar-width:thin}.tds-modal{box-sizing:border-box;box-shadow:var(--tds-modal-box-shadow);background-color:var(--background-elevation-layer-02);margin:auto;position:relative;border-radius:var(--radius-narrow);max-height:85vh;overflow-y:auto;pointer-events:auto}.tds-modal *{box-sizing:border-box}.tds-modal:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background-clip:padding-box}.tds-modal::-webkit-scrollbar{width:var(--tds-scrollbar-width)}.tds-modal::-webkit-scrollbar-track{background:var(--tds-scrollbar-track-color)}.tds-modal::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}.tds-modal::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){.tds-modal{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}.tds-modal__actions-sticky{overflow:hidden;display:flex;flex-direction:column}.tds-modal__actions-sticky .body{font-family:var(--body-01-font-family);font-size:var(--body-01-font-size);line-height:var(--body-01-line-height);font-weight:var(--body-01-font-weight);letter-spacing:var(--body-01-letter-spacing);text-transform:var(--body-01-text-transform);max-height:calc(85vh - 36px);overflow-y:auto}.tds-modal__actions-sticky slot[name=actions]{bottom:-1px;left:0;right:0;background-color:var(--background-elevation-layer-02);padding:24px 16px 16px;display:flex;gap:16px}.tds-modal__actions-static slot[name=actions]{background-color:var(--background-elevation-layer-02);display:flex;gap:16px;padding:24px 16px 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:50%}.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:16px;position:sticky;top:0;background-color:var(--background-elevation-layer-02);z-index:1}.header,slot[name=header]::slotted(*){font-family:var(--headline-05-font-family);font-size:var(--headline-05-font-size);line-height:var(--headline-05-line-height);font-weight:var(--headline-05-font-weight);letter-spacing:var(--headline-05-letter-spacing);text-transform:var(--headline-05-text-transform);color:var(--foreground-text-strong);margin:0;flex:1}.body{font-family:var(--body-01-font-family);font-size:var(--body-01-font-size);line-height:var(--body-01-line-height);font-weight:var(--body-01-font-weight);letter-spacing:var(--body-01-letter-spacing);text-transform:var(--body-01-text-transform);color:var(--foreground-text-strong);overflow-y:visible;padding:0 16px 16px}.body:hover::-webkit-scrollbar-thumb{border:var(--tds-scrollbar-thumb-border-hover-width) solid transparent;background-clip:padding-box}.body::-webkit-scrollbar{width:var(--tds-scrollbar-width)}.body::-webkit-scrollbar-track{background:var(--tds-scrollbar-track-color)}.body::-webkit-scrollbar-thumb{border-radius:40px;background:var(--tds-scrollbar-thumb-color);border:var(--tds-scrollbar-thumb-border-width) solid transparent;background-clip:padding-box}.body::-webkit-scrollbar-button{height:0;width:0}@supports not selector(::-webkit-scrollbar){.body{scrollbar-color:var(--tds-scrollbar-thumb-color) var(--tds-scrollbar-track-color);scrollbar-width:var(--tds-scrollbar-width-standard)}}.tds-modal-backdrop{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--tds-modal-backdrop-background);pointer-events:auto}.tds-modal-backdrop *{box-sizing:border-box}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(--foreground-text-strong);cursor:pointer}.tds-modal-close:focus{outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}@media (min-width: 320px){.tds-modal-close{margin-left:16px}}@media (min-width: 1056px){.tds-modal-close{margin-left:48px}}.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:16px}}@media (min-width: 1056px){.tds-modal-close-btn{margin-left:48px}}.tds-modal-close-btn svg{fill:var(--foreground-text-strong)}.tds-modal-overflow{overflow:hidden}:host{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;padding:0 16px;z-index:700;pointer-events:none}:host *{box-sizing:border-box}:host .tds-modal-close{border:none;background-color:transparent}:host .tds-modal-close-btn{border:none;background-color:transparent}@media (max-width: 320px){:host{padding:0}}:host.show{display:flex}:host.hide{display:none}:host(.show){display:flex}:host(.hide){display:none}`;
|
|
7
6
|
|
|
8
7
|
const TdsModal = class {
|
|
9
8
|
constructor(hostRef) {
|
|
10
9
|
registerInstance(this, hostRef);
|
|
11
10
|
this.tdsClose = createEvent(this, "tdsClose", 7);
|
|
12
11
|
this.tdsOpen = createEvent(this, "tdsOpen", 7);
|
|
12
|
+
/** Disables closing Modal on clicking on overlay area. */
|
|
13
|
+
this.prevent = false;
|
|
14
|
+
/** Size of Modal */
|
|
15
|
+
this.size = 'md';
|
|
16
|
+
/** Changes the position behaviour of the actions slot. */
|
|
17
|
+
this.actionsPosition = 'static';
|
|
18
|
+
/** Shows or hides the close [X] button. */
|
|
19
|
+
this.closable = true;
|
|
20
|
+
/** Role of the modal component. Can be either 'alertdialog' for important messages that require immediate attention, or 'dialog' for regular messages. */
|
|
21
|
+
this.tdsAlertDialog = 'dialog';
|
|
22
|
+
// State that keeps track of show/closed state for the Modal.
|
|
23
|
+
this.isShown = false;
|
|
24
|
+
// Focus state index in focusable Elements
|
|
25
|
+
this.activeElementIndex = 0;
|
|
13
26
|
this.handleClose = (event) => {
|
|
14
27
|
const closeEvent = this.tdsClose.emit(event);
|
|
15
|
-
|
|
16
|
-
if (closeEvent.defaultPrevented) {
|
|
28
|
+
if (closeEvent.defaultPrevented)
|
|
17
29
|
return;
|
|
18
|
-
}
|
|
19
30
|
this.isShown = false;
|
|
31
|
+
this.returnFocusOnClose();
|
|
20
32
|
};
|
|
21
33
|
this.handleShow = () => {
|
|
22
34
|
const showEvent = this.tdsOpen.emit();
|
|
23
|
-
if (showEvent.defaultPrevented)
|
|
35
|
+
if (showEvent.defaultPrevented)
|
|
24
36
|
return;
|
|
25
|
-
}
|
|
26
37
|
this.isShown = true;
|
|
38
|
+
this.onOpen();
|
|
27
39
|
};
|
|
28
40
|
/** Checks if click on Modal is on overlay, if so it closes the Modal if prevent is not true. */
|
|
29
41
|
this.handleOverlayClick = (event) => {
|
|
@@ -58,29 +70,11 @@ const TdsModal = class {
|
|
|
58
70
|
referenceEl.addEventListener('click', this.handleReferenceElementClick);
|
|
59
71
|
}
|
|
60
72
|
};
|
|
61
|
-
this.header = undefined;
|
|
62
|
-
this.prevent = false;
|
|
63
|
-
this.size = 'md';
|
|
64
|
-
this.actionsPosition = 'static';
|
|
65
|
-
this.selector = undefined;
|
|
66
|
-
this.referenceEl = undefined;
|
|
67
|
-
this.show = undefined;
|
|
68
|
-
this.closable = true;
|
|
69
|
-
this.tdsAlertDialog = 'dialog';
|
|
70
|
-
this.isShown = false;
|
|
71
|
-
this.activeElementIndex = 0;
|
|
72
73
|
}
|
|
73
74
|
/** Shows the Modal. */
|
|
74
75
|
async showModal() {
|
|
75
76
|
this.isShown = true;
|
|
76
|
-
|
|
77
|
-
requestAnimationFrame(() => {
|
|
78
|
-
const focusableElements = this.getFocusableElements();
|
|
79
|
-
if (focusableElements.length > 0) {
|
|
80
|
-
focusableElements[0].focus();
|
|
81
|
-
this.activeElementIndex = 0;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
77
|
+
this.onOpen();
|
|
84
78
|
}
|
|
85
79
|
/** Closes the Modal. */
|
|
86
80
|
async closeModal() {
|
|
@@ -91,6 +85,18 @@ const TdsModal = class {
|
|
|
91
85
|
async isOpen() {
|
|
92
86
|
return this.isShown;
|
|
93
87
|
}
|
|
88
|
+
/** Runs whenever the show prop changes. */
|
|
89
|
+
handleShowPropChange(newValue, oldValue) {
|
|
90
|
+
if (newValue === oldValue || newValue === undefined)
|
|
91
|
+
return;
|
|
92
|
+
this.isShown = newValue;
|
|
93
|
+
if (newValue) {
|
|
94
|
+
this.onOpen();
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.returnFocusOnClose();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
94
100
|
connectedCallback() {
|
|
95
101
|
if (this.closable === undefined) {
|
|
96
102
|
this.closable = true;
|
|
@@ -133,21 +139,17 @@ const TdsModal = class {
|
|
|
133
139
|
returnFocusOnClose() {
|
|
134
140
|
var _a;
|
|
135
141
|
const referenceElement = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : (this.selector ? document.querySelector(this.selector) : null);
|
|
136
|
-
if (!referenceElement)
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
142
|
+
if (!referenceElement)
|
|
143
|
+
return;
|
|
139
144
|
const potentialReferenceElements = ['BUTTON', 'A', 'INPUT'];
|
|
140
145
|
const isNativeFocusable = potentialReferenceElements.includes(referenceElement.tagName);
|
|
141
|
-
|
|
142
|
-
referenceElement
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
interactiveElement.focus();
|
|
149
|
-
}
|
|
150
|
-
}
|
|
146
|
+
const interactiveElement = isNativeFocusable
|
|
147
|
+
? referenceElement
|
|
148
|
+
: referenceElement.querySelector(potentialReferenceElements.join(','));
|
|
149
|
+
if (!interactiveElement)
|
|
150
|
+
return;
|
|
151
|
+
interactiveElement.classList.remove('active');
|
|
152
|
+
interactiveElement.focus();
|
|
151
153
|
}
|
|
152
154
|
getFocusableElements() {
|
|
153
155
|
var _a, _b;
|
|
@@ -164,6 +166,47 @@ const TdsModal = class {
|
|
|
164
166
|
/** Focusable elements */
|
|
165
167
|
return [...focusableInShadowRoot, ...focusableInSlots];
|
|
166
168
|
}
|
|
169
|
+
/** Resets the scroll position to the top. */
|
|
170
|
+
resetScrollPosition() {
|
|
171
|
+
var _a;
|
|
172
|
+
const root = this.host.shadowRoot;
|
|
173
|
+
const scroller = (_a = root === null || root === void 0 ? void 0 : root.querySelector('.tds-modal__actions-sticky .body')) !== null && _a !== void 0 ? _a : root === null || root === void 0 ? void 0 : root.querySelector('.tds-modal');
|
|
174
|
+
scroller === null || scroller === void 0 ? void 0 : scroller.scrollTo(0, 0);
|
|
175
|
+
}
|
|
176
|
+
focusFirstElement() {
|
|
177
|
+
var _a, _b;
|
|
178
|
+
const focusableSelectors = [
|
|
179
|
+
'a[href]',
|
|
180
|
+
'button:not([disabled])',
|
|
181
|
+
'textarea:not([disabled])',
|
|
182
|
+
'input:not([disabled])',
|
|
183
|
+
'select:not([disabled])',
|
|
184
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
185
|
+
].join(',');
|
|
186
|
+
// Prioritize focusable elements in slotted content (actions/body) over shadow DOM elements (like close button)
|
|
187
|
+
const focusableInSlots = Array.from(this.host.querySelectorAll(focusableSelectors));
|
|
188
|
+
if (focusableInSlots.length > 0) {
|
|
189
|
+
focusableInSlots[0].focus();
|
|
190
|
+
this.activeElementIndex = this.getFocusableElements().indexOf(focusableInSlots[0]);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
// Fallback to shadow DOM elements if no slotted content is focusable
|
|
194
|
+
const focusableInShadowRoot = Array.from((_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(focusableSelectors)) !== null && _b !== void 0 ? _b : []);
|
|
195
|
+
if (focusableInShadowRoot.length > 0) {
|
|
196
|
+
focusableInShadowRoot[0].focus();
|
|
197
|
+
this.activeElementIndex = 0;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
/** Runs whenever the modal is opened and updates it. */
|
|
202
|
+
onOpen() {
|
|
203
|
+
// Focus immediately to preserve interaction modality for :focus-visible
|
|
204
|
+
this.focusFirstElement();
|
|
205
|
+
// Defer scroll reset to next frame
|
|
206
|
+
requestAnimationFrame(() => {
|
|
207
|
+
this.resetScrollPosition();
|
|
208
|
+
});
|
|
209
|
+
}
|
|
167
210
|
handleFocusTrap(event) {
|
|
168
211
|
if (event.key === 'Escape' && this.isShown && !this.prevent) {
|
|
169
212
|
this.handleClose(event);
|
|
@@ -208,13 +251,18 @@ const TdsModal = class {
|
|
|
208
251
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
209
252
|
const headerId = this.header ? `tds-modal-header-${generateUniqueId()}` : undefined;
|
|
210
253
|
const bodyId = `tds-modal-body-${generateUniqueId()}`;
|
|
211
|
-
return (h(Host, { key: '
|
|
254
|
+
return (h(Host, { key: '38bd184949cbc0e6d7547bf9bc7cf3b3c82cabee', role: this.tdsAlertDialog, "aria-modal": "true", "aria-describedby": bodyId, "aria-labelledby": headerId, class: {
|
|
212
255
|
show: this.isShown,
|
|
213
256
|
hide: !this.isShown,
|
|
214
|
-
}, onClick: (event) => this.handleOverlayClick(event) }, h("div", { key: '
|
|
257
|
+
}, onClick: (event) => this.handleOverlayClick(event) }, h("div", { key: '40bb9e834a44e0664958ff6ea3dd4ec404b75044', class: "tds-modal-backdrop" }), h("div", { key: 'ef8dfcde8981a5242f552db28eeaf1099c2a5f26', class: `tds-modal tds-modal__actions-${this.actionsPosition} tds-modal-${this.size}`, tabindex: "-1" }, h("div", { key: '4295710b96f997295e5ae5b4f16e7b696b8dd7b6', id: headerId, class: "header" }, this.header && h("div", { key: 'b381c7f0dcdd04220badff60d5b48ecf8d9b57da', class: "header-text" }, this.header), usesHeaderSlot && h("slot", { key: '18f82e6222e91db9e4a2b299b1ee3d3db071a691', name: "header" }), this.closable && (h("button", { key: 'fc729f3da82fe8ec4faa46973399508cca4c1bdd', class: "tds-modal-close", "aria-label": "close", onClick: (event) => this.handleClose(event) }, h("tds-icon", { key: '51b5332510518499e947ac45d62c60be2fffac3a', name: "cross", size: "20px" })))), h("div", { key: '25ad7f69e11fdcb61150103f48be124d9a537167', id: bodyId, class: "body" }, h("slot", { key: 'e7be6f3ac849df52546fc97581b7b23a8e69e1d1', name: "body" })), usesActionsSlot && h("slot", { key: 'ac896cffd413b46d488c9466a5ed7db1a8049ff8', name: "actions" }))));
|
|
215
258
|
}
|
|
216
259
|
get host() { return getElement(this); }
|
|
260
|
+
static get watchers() { return {
|
|
261
|
+
"show": [{
|
|
262
|
+
"handleShowPropChange": 0
|
|
263
|
+
}]
|
|
264
|
+
}; }
|
|
217
265
|
};
|
|
218
|
-
TdsModal.style =
|
|
266
|
+
TdsModal.style = modalCss();
|
|
219
267
|
|
|
220
268
|
export { TdsModal as tds_modal };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host,
|
|
1
|
+
import { r as registerInstance, h, H as Host, a as getElement } from './index-9xxNGlso.js';
|
|
2
2
|
|
|
3
|
-
const navigationTabCss =
|
|
4
|
-
const TdsNavigationTabStyle0 = navigationTabCss;
|
|
3
|
+
const navigationTabCss = () => `:host{box-sizing:border-box;display:block}:host *{box-sizing:border-box}:host ::slotted(*){all:unset;font:var(--tds-headline-07) !important;letter-spacing:var(--tds-headline-07-ls) !important;color:var(--tds-navigation-tabs-tab-color);text-decoration:none;display:block;position:relative;transition:color 0.15s ease-in-out 0s;white-space:nowrap;background-color:transparent;border:0;width:100%;padding:26px 0}:host ::slotted(*:focus-visible)::before{content:"";position:absolute;left:0;right:0;top:3px;bottom:3px;outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .navigation-tab-item:not(.selected)::after{width:0%;transition:width 0.15s ease-in-out 0s}:host .navigation-tab-item{position:relative}:host .navigation-tab-item:hover{cursor:pointer}:host .navigation-tab-item:hover ::slotted(*){color:var(--tds-navigation-tabs-tab-color-hover)}:host .navigation-tab-item:hover::after{width:100%}:host .navigation-tab-item::after{content:" ";position:absolute;bottom:0;right:0;left:0;margin-left:auto;width:0%;margin-right:auto;height:2px;background-color:var(--tds-navigation-tabs-tab-indicator-background-hover);z-index:1}:host .navigation-tab-item:hover:focus-within::after{bottom:3px}:host .selected ::slotted(*){color:var(--tds-navigation-tabs-tab-color-selected)}:host .selected::after{width:100%;background-color:var(--tds-navigation-tabs-tab-indicator-background-active)}:host .disabled ::slotted(*){color:var(--tds-navigation-tabs-tab-color-disabled)}:host .disabled::after{content:none}:host .disabled ::slotted(*:hover){cursor:not-allowed;color:var(--tds-navigation-tabs-tab-color-disabled)}:host .disabled ::slotted(*:focus-visible){outline:none}:host(.last){margin-right:32px}`;
|
|
5
4
|
|
|
6
5
|
const TdsNavigationTab = class {
|
|
7
6
|
constructor(hostRef) {
|
|
8
7
|
registerInstance(this, hostRef);
|
|
8
|
+
/** Disables the Tab. */
|
|
9
9
|
this.disabled = false;
|
|
10
10
|
this.selected = false;
|
|
11
11
|
}
|
|
@@ -37,6 +37,6 @@ const TdsNavigationTab = class {
|
|
|
37
37
|
}
|
|
38
38
|
get host() { return getElement(this); }
|
|
39
39
|
};
|
|
40
|
-
TdsNavigationTab.style =
|
|
40
|
+
TdsNavigationTab.style = navigationTabCss();
|
|
41
41
|
|
|
42
42
|
export { TdsNavigationTab as tds_navigation_tab };
|