@scania/tegel 1.6.0 → 1.7.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 +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/{index-f36d4629.js → index-da55351d.js} +35 -23
- package/dist/cjs/loader.cjs.js +5 -3
- package/dist/cjs/tds-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-accordion.cjs.entry.js +1 -1
- package/dist/cjs/tds-badge.cjs.entry.js +1 -1
- package/dist/cjs/tds-banner.cjs.entry.js +1 -1
- package/dist/cjs/tds-block.cjs.entry.js +1 -1
- package/dist/cjs/tds-body-cell.cjs.entry.js +12 -4
- package/dist/cjs/tds-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/tds-breadcrumbs.cjs.entry.js +1 -1
- package/dist/cjs/tds-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-card.cjs.entry.js +1 -1
- package/dist/cjs/tds-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/tds-chip.cjs.entry.js +1 -1
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-datetime.cjs.entry.js +5 -4
- package/dist/cjs/tds-divider.cjs.entry.js +1 -1
- package/dist/cjs/tds-dropdown-option.cjs.entry.js +1 -1
- package/dist/cjs/tds-dropdown.cjs.entry.js +20 -16
- package/dist/cjs/tds-folder-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer-group.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-brand-symbol.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-cell.cjs.entry.js +9 -13
- package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown-list-user.cjs.entry.js +1 -1
- package/dist/cjs/tds-header-dropdown-list.cjs.entry.js +1 -1
- 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-item.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 +1 -1
- package/dist/cjs/tds-header-launcher.cjs.entry.js +2 -2
- package/dist/cjs/tds-header-title.cjs.entry.js +1 -1
- package/dist/cjs/tds-header.cjs.entry.js +1 -1
- package/dist/cjs/tds-icon.cjs.entry.js +3 -4
- package/dist/cjs/tds-inline-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-link.cjs.entry.js +1 -1
- package/dist/cjs/tds-message.cjs.entry.js +1 -1
- package/dist/cjs/tds-modal.cjs.entry.js +40 -18
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-canvas.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-popover-menu.cjs.entry.js +1 -1
- package/dist/cjs/tds-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-close-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-dropdown-list.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-overlay.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-user-image_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu-user.cjs.entry.js +1 -1
- package/dist/cjs/tds-side-menu.cjs.entry.js +1 -1
- package/dist/cjs/tds-slider.cjs.entry.js +33 -37
- package/dist/cjs/tds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tds-step.cjs.entry.js +1 -1
- package/dist/cjs/tds-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-body-row.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-header.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/tds-table.cjs.entry.js +1 -1
- package/dist/cjs/tds-text-field.cjs.entry.js +34 -19
- package/dist/cjs/tds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tds-toast.cjs.entry.js +6 -7
- package/dist/cjs/tds-toggle.cjs.entry.js +2 -2
- package/dist/cjs/tds-tooltip.cjs.entry.js +6 -6
- package/dist/cjs/tegel.cjs.js +6 -4
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/datetime/datetime.js +23 -3
- package/dist/collection/components/dropdown/dropdown.js +19 -15
- package/dist/collection/components/header/header-dropdown/header-dropdown.js +1 -1
- package/dist/collection/components/header/header-launcher/header-launcher.js +1 -1
- package/dist/collection/components/icon/icon.js +4 -5
- package/dist/collection/components/modal/modal.js +73 -17
- package/dist/collection/components/slider/slider.js +51 -41
- package/dist/collection/components/table/table-body-cell/table-body-cell.js +29 -3
- package/dist/collection/components/table/table-header-cell/table-header-cell.css +0 -6
- package/dist/collection/components/table/table-header-cell/table-header-cell.js +13 -16
- package/dist/collection/components/text-field/text-field.css +2 -1
- package/dist/collection/components/text-field/text-field.js +35 -20
- package/dist/collection/components/toast/toast.css +3 -5
- package/dist/collection/components/toast/toast.js +22 -5
- package/dist/collection/components/toggle/toggle.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +41 -5
- package/dist/components/icon.js +2 -3
- package/dist/components/tds-body-cell.js +12 -3
- package/dist/components/tds-datetime.js +4 -3
- package/dist/components/tds-dropdown.js +19 -15
- package/dist/components/tds-header-cell.js +8 -12
- package/dist/components/tds-header-dropdown.js +1 -1
- package/dist/components/tds-header-launcher.js +1 -1
- package/dist/components/tds-modal.js +42 -18
- package/dist/components/tds-slider.js +33 -37
- package/dist/components/tds-text-field.js +33 -18
- package/dist/components/tds-toast.js +6 -6
- package/dist/components/tds-toggle.js +1 -1
- package/dist/components/tds-tooltip.js +8 -6
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/{index-ab4edc4a.js → index-529974bd.js} +35 -23
- package/dist/esm/loader.js +6 -4
- package/dist/esm/tds-accordion-item.entry.js +1 -1
- package/dist/esm/tds-accordion.entry.js +1 -1
- package/dist/esm/tds-badge.entry.js +1 -1
- package/dist/esm/tds-banner.entry.js +1 -1
- package/dist/esm/tds-block.entry.js +1 -1
- package/dist/esm/tds-body-cell.entry.js +12 -4
- package/dist/esm/tds-breadcrumb.entry.js +1 -1
- package/dist/esm/tds-breadcrumbs.entry.js +1 -1
- package/dist/esm/tds-button.entry.js +1 -1
- package/dist/esm/tds-card.entry.js +1 -1
- package/dist/esm/tds-checkbox.entry.js +1 -1
- package/dist/esm/tds-chip.entry.js +1 -1
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/tds-datetime.entry.js +5 -4
- package/dist/esm/tds-divider.entry.js +1 -1
- package/dist/esm/tds-dropdown-option.entry.js +1 -1
- package/dist/esm/tds-dropdown.entry.js +20 -16
- package/dist/esm/tds-folder-tab.entry.js +1 -1
- package/dist/esm/tds-folder-tabs.entry.js +1 -1
- package/dist/esm/tds-footer-group.entry.js +1 -1
- package/dist/esm/tds-footer-item.entry.js +1 -1
- package/dist/esm/tds-footer.entry.js +1 -1
- package/dist/esm/tds-header-brand-symbol.entry.js +1 -1
- package/dist/esm/tds-header-cell.entry.js +9 -13
- package/dist/esm/tds-header-dropdown-list-item.entry.js +1 -1
- package/dist/esm/tds-header-dropdown-list-user.entry.js +1 -1
- package/dist/esm/tds-header-dropdown-list.entry.js +1 -1
- 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-item.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 +1 -1
- package/dist/esm/tds-header-launcher.entry.js +2 -2
- package/dist/esm/tds-header-title.entry.js +1 -1
- package/dist/esm/tds-header.entry.js +1 -1
- package/dist/esm/tds-icon.entry.js +3 -4
- package/dist/esm/tds-inline-tab.entry.js +1 -1
- package/dist/esm/tds-inline-tabs.entry.js +1 -1
- package/dist/esm/tds-link.entry.js +1 -1
- package/dist/esm/tds-message.entry.js +1 -1
- package/dist/esm/tds-modal.entry.js +40 -18
- package/dist/esm/tds-navigation-tab.entry.js +1 -1
- package/dist/esm/tds-navigation-tabs.entry.js +1 -1
- package/dist/esm/tds-popover-canvas.entry.js +1 -1
- package/dist/esm/tds-popover-core.entry.js +1 -1
- package/dist/esm/tds-popover-menu-item.entry.js +1 -1
- package/dist/esm/tds-popover-menu.entry.js +1 -1
- 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-collapse-button.entry.js +1 -1
- package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +1 -1
- package/dist/esm/tds-side-menu-dropdown-list.entry.js +1 -1
- package/dist/esm/tds-side-menu-dropdown.entry.js +1 -1
- package/dist/esm/tds-side-menu-item.entry.js +1 -1
- package/dist/esm/tds-side-menu-overlay.entry.js +1 -1
- package/dist/esm/tds-side-menu-user-image_2.entry.js +1 -1
- package/dist/esm/tds-side-menu-user.entry.js +1 -1
- package/dist/esm/tds-side-menu.entry.js +1 -1
- package/dist/esm/tds-slider.entry.js +33 -37
- package/dist/esm/tds-spinner.entry.js +1 -1
- package/dist/esm/tds-step.entry.js +1 -1
- package/dist/esm/tds-stepper.entry.js +1 -1
- package/dist/esm/tds-table-body-row-expandable.entry.js +1 -1
- package/dist/esm/tds-table-body-row.entry.js +1 -1
- package/dist/esm/tds-table-body.entry.js +1 -1
- package/dist/esm/tds-table-footer.entry.js +1 -1
- package/dist/esm/tds-table-header.entry.js +1 -1
- package/dist/esm/tds-table-toolbar.entry.js +1 -1
- package/dist/esm/tds-table.entry.js +1 -1
- package/dist/esm/tds-text-field.entry.js +34 -19
- package/dist/esm/tds-textarea.entry.js +1 -1
- package/dist/esm/tds-toast.entry.js +6 -7
- package/dist/esm/tds-toggle.entry.js +2 -2
- package/dist/esm/tds-tooltip.entry.js +6 -6
- package/dist/esm/tegel.js +7 -5
- package/dist/tegel/{p-5b23048d.entry.js → p-0215d53c.entry.js} +1 -1
- package/dist/tegel/{p-8df9b81f.entry.js → p-02417061.entry.js} +1 -1
- package/dist/tegel/{p-391b6b34.entry.js → p-033fbea5.entry.js} +1 -1
- package/dist/tegel/p-052901a5.entry.js +1 -0
- package/dist/tegel/{p-ab76d48c.entry.js → p-0c444c09.entry.js} +1 -1
- package/dist/tegel/p-10610955.entry.js +1 -0
- package/dist/tegel/{p-24466c21.entry.js → p-16f0471f.entry.js} +1 -1
- package/dist/tegel/{p-68821acd.entry.js → p-1ba2c5df.entry.js} +1 -1
- package/dist/tegel/{p-0c564ca1.entry.js → p-1e2ef3d6.entry.js} +1 -1
- package/dist/tegel/{p-72b79121.entry.js → p-1f39c53a.entry.js} +1 -1
- package/dist/tegel/{p-8af4737f.entry.js → p-2c388774.entry.js} +1 -1
- package/dist/tegel/{p-200def59.entry.js → p-2f5db352.entry.js} +1 -1
- package/dist/tegel/{p-6fa16688.entry.js → p-2f692ff0.entry.js} +1 -1
- package/dist/tegel/{p-b13959d0.entry.js → p-2ffae2d1.entry.js} +1 -1
- package/dist/tegel/p-3b546070.entry.js +1 -0
- package/dist/tegel/{p-81cc50f8.entry.js → p-3dd15e1e.entry.js} +1 -1
- package/dist/tegel/{p-30dc9a8b.entry.js → p-3f983f99.entry.js} +1 -1
- package/dist/tegel/{p-a2ad0d53.entry.js → p-412d8fd1.entry.js} +1 -1
- package/dist/tegel/p-450eabc1.entry.js +1 -0
- package/dist/tegel/{p-7bbfa1ea.entry.js → p-453c8af8.entry.js} +1 -1
- package/dist/tegel/{p-825fd938.entry.js → p-4a04433c.entry.js} +1 -1
- package/dist/tegel/{p-013d0bd6.entry.js → p-50b0f2ff.entry.js} +1 -1
- package/dist/tegel/{p-e2f1a7a2.entry.js → p-52b9333c.entry.js} +1 -1
- package/dist/tegel/{p-1590e242.entry.js → p-56bae450.entry.js} +1 -1
- package/dist/tegel/{p-a2934b2a.entry.js → p-5880c2f3.entry.js} +1 -1
- package/dist/tegel/{p-9544a2e7.entry.js → p-5a273781.entry.js} +1 -1
- package/dist/tegel/{p-145808cf.entry.js → p-5b7d9ca4.entry.js} +1 -1
- package/dist/tegel/{p-36db31d4.entry.js → p-5d756b0b.entry.js} +1 -1
- package/dist/tegel/{p-048b8480.entry.js → p-5db63168.entry.js} +1 -1
- package/dist/tegel/{p-eda20d0d.entry.js → p-652eb0ff.entry.js} +1 -1
- package/dist/tegel/{p-447ecb47.entry.js → p-669f7646.entry.js} +1 -1
- package/dist/tegel/p-699829fc.js +2 -0
- package/dist/tegel/p-6c23bc53.entry.js +1 -0
- package/dist/tegel/{p-17b8763f.entry.js → p-7076c719.entry.js} +1 -1
- package/dist/tegel/{p-8e442441.entry.js → p-7172fd77.entry.js} +1 -1
- package/dist/tegel/{p-c95a8a36.entry.js → p-747811d6.entry.js} +1 -1
- package/dist/tegel/p-74a93487.entry.js +1 -0
- package/dist/tegel/{p-5047cf31.entry.js → p-76a00407.entry.js} +1 -1
- package/dist/tegel/{p-cb080d0b.entry.js → p-7a3fbb5b.entry.js} +1 -1
- package/dist/tegel/{p-e35f0c64.entry.js → p-7b31e171.entry.js} +1 -1
- package/dist/tegel/{p-ee537028.entry.js → p-7e0116af.entry.js} +1 -1
- package/dist/tegel/p-8408ef10.entry.js +1 -0
- package/dist/tegel/{p-40519ff4.entry.js → p-864e5bb0.entry.js} +1 -1
- package/dist/tegel/{p-f51101e4.entry.js → p-87bfc032.entry.js} +1 -1
- package/dist/tegel/{p-cd93fb3a.entry.js → p-8a46d308.entry.js} +1 -1
- package/dist/tegel/{p-4aa948cf.entry.js → p-8a90d1ae.entry.js} +1 -1
- package/dist/tegel/{p-61b2e46f.entry.js → p-8bb8d06a.entry.js} +1 -1
- package/dist/tegel/{p-4ca0f396.entry.js → p-8c6aad07.entry.js} +1 -1
- package/dist/tegel/{p-32f13b73.entry.js → p-8ebc7052.entry.js} +1 -1
- package/dist/tegel/{p-2fb7f571.entry.js → p-a0812bb2.entry.js} +1 -1
- package/dist/tegel/{p-ae5db9b9.entry.js → p-a1151348.entry.js} +1 -1
- package/dist/tegel/{p-1b671dbc.entry.js → p-a31282be.entry.js} +1 -1
- package/dist/tegel/{p-30417aac.entry.js → p-acc70f3c.entry.js} +1 -1
- package/dist/tegel/{p-23ed39c5.entry.js → p-af6d2907.entry.js} +1 -1
- package/dist/tegel/{p-9995c9e6.entry.js → p-b03790b1.entry.js} +1 -1
- package/dist/tegel/p-b263f884.entry.js +1 -0
- package/dist/tegel/{p-9731cc82.entry.js → p-b6f8c65f.entry.js} +1 -1
- package/dist/tegel/{p-d8b12e59.entry.js → p-bc7459fb.entry.js} +1 -1
- package/dist/tegel/p-bd618905.entry.js +1 -0
- package/dist/tegel/{p-708a52b1.entry.js → p-c08c8bd8.entry.js} +1 -1
- package/dist/tegel/{p-77a5d874.entry.js → p-c77d9eaf.entry.js} +1 -1
- package/dist/tegel/{p-5ec7c389.entry.js → p-cc16393b.entry.js} +1 -1
- package/dist/tegel/{p-521fd6fe.entry.js → p-d26257ca.entry.js} +1 -1
- package/dist/tegel/{p-c9f701f6.entry.js → p-d2e0442d.entry.js} +1 -1
- package/dist/tegel/{p-6e4cda16.entry.js → p-d41ef4f8.entry.js} +1 -1
- package/dist/tegel/p-d4b6f9bc.entry.js +1 -0
- package/dist/tegel/p-d9fec37c.entry.js +1 -0
- package/dist/tegel/{p-adddb2db.entry.js → p-ddabb9e9.entry.js} +1 -1
- package/dist/tegel/{p-fa3bd57f.entry.js → p-e10b2f73.entry.js} +1 -1
- package/dist/tegel/p-e1255160.js +1 -0
- package/dist/tegel/{p-db20a6e9.entry.js → p-e2443a41.entry.js} +1 -1
- package/dist/tegel/{p-cd406a82.entry.js → p-e38b51a2.entry.js} +1 -1
- package/dist/tegel/{p-dc35de46.entry.js → p-e3e19bd6.entry.js} +1 -1
- package/dist/tegel/{p-632a58e4.entry.js → p-e6a51915.entry.js} +1 -1
- package/dist/tegel/{p-c3ad28ea.entry.js → p-e8957bd2.entry.js} +1 -1
- package/dist/tegel/{p-25616b50.entry.js → p-ed56507b.entry.js} +1 -1
- package/dist/tegel/{p-7b9149c0.entry.js → p-ed8f1e2a.entry.js} +1 -1
- package/dist/tegel/{p-71063a5a.entry.js → p-f226f11e.entry.js} +1 -1
- package/dist/tegel/{p-d604194c.entry.js → p-f93bb760.entry.js} +1 -1
- package/dist/tegel/{p-b8cc0ab0.entry.js → p-fb2968f2.entry.js} +1 -1
- package/dist/tegel/tegel.css +1 -1
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/datetime/datetime.d.ts +5 -3
- package/dist/types/components/dropdown/dropdown.d.ts +2 -0
- package/dist/types/components/icon/icon.d.ts +2 -2
- package/dist/types/components/modal/modal.d.ts +9 -2
- package/dist/types/components/slider/slider.d.ts +7 -5
- package/dist/types/components/table/table-body-cell/table-body-cell.d.ts +2 -0
- package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +2 -2
- package/dist/types/components/text-field/text-field.d.ts +3 -3
- package/dist/types/components/toast/toast.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +3 -1
- package/dist/types/components.d.ts +65 -11
- package/package.json +4 -2
- package/dist/tegel/p-2d534698.entry.js +0 -1
- package/dist/tegel/p-4ac12ddb.entry.js +0 -1
- package/dist/tegel/p-55afd9bb.entry.js +0 -1
- package/dist/tegel/p-5c528867.entry.js +0 -1
- package/dist/tegel/p-68f0f81d.entry.js +0 -1
- package/dist/tegel/p-6bb7fa2c.js +0 -2
- package/dist/tegel/p-6bca93b8.entry.js +0 -1
- package/dist/tegel/p-8e40b046.entry.js +0 -1
- package/dist/tegel/p-9d79f2fe.entry.js +0 -1
- package/dist/tegel/p-a0fba0df.entry.js +0 -1
- package/dist/tegel/p-b91045a2.entry.js +0 -1
- package/dist/tegel/p-c0ced88a.entry.js +0 -1
|
@@ -38,7 +38,7 @@ export class TdsTableHeaderCell {
|
|
|
38
38
|
};
|
|
39
39
|
this.headerCellContent = () => {
|
|
40
40
|
if (this.sortable) {
|
|
41
|
-
return (h("button", { class: "tds-table__header-button", onClick: () => this.sortButtonClick() }, h("span", { class: "tds-table__header-button-text"
|
|
41
|
+
return (h("button", { class: "tds-table__header-button", onClick: () => this.sortButtonClick(), style: { justifyContent: this.textAlignState } }, h("span", { class: "tds-table__header-button-text" }, this.cellValue, h("slot", null)), this.sortingDirection === null && (h("svg", { class: "tds-table__header-button-icon", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 12 15" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M8.45 13.67V4.62a.5.5 0 0 1 1 0v9.05h-1Z" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M6.07 10.28a.5.5 0 0 1 .7.08l2.1 2.66a.1.1 0 0 0 .15 0l2.09-2.66a.5.5 0 1 1 .78.62l-2.08 2.66a1.1 1.1 0 0 1-1.73 0l-2.1-2.66a.5.5 0 0 1 .1-.7ZM3.55.4v9.04a.5.5 0 1 1-1 0V.39h1Z" }), h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M5.93 3.78a.5.5 0 0 1-.7-.08l-2.1-2.66a.1.1 0 0 0-.15 0L.89 3.7a.5.5 0 0 1-.78-.62L2.19.42a1.1 1.1 0 0 1 1.73 0l2.1 2.66a.5.5 0 0 1-.1.7Z" }))), this.sortingDirection && (h("svg", { class: `tds-table__header-button-icon ${this.sortingDirection === 'desc' ? 'tds-table__header-button-icon--rotate' : ''}`, fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M17 2.974a1 1 0 0 0-2 0v24.3l-9.312-9.312a1 1 0 0 0-1.414 1.414l9.887 9.888a2.6 2.6 0 0 0 3.677 0l9.888-9.888a1 1 0 0 0-1.414-1.414L17 27.274v-24.3Z" })))));
|
|
42
42
|
}
|
|
43
43
|
return (h("p", { class: "tds-table__header-text", style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", null)));
|
|
44
44
|
};
|
|
@@ -52,7 +52,7 @@ export class TdsTableHeaderCell {
|
|
|
52
52
|
this.cellValue = undefined;
|
|
53
53
|
this.customWidth = undefined;
|
|
54
54
|
this.sortable = false;
|
|
55
|
-
this.textAlign =
|
|
55
|
+
this.textAlign = 'left';
|
|
56
56
|
this.textAlignState = undefined;
|
|
57
57
|
this.sortingDirection = 'asc';
|
|
58
58
|
this.sortedByMyKey = false;
|
|
@@ -98,25 +98,21 @@ export class TdsTableHeaderCell {
|
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
componentWillRender() {
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
this.
|
|
104
|
-
|
|
105
|
-
else {
|
|
106
|
-
this.textAlignState = 'left';
|
|
107
|
-
}
|
|
101
|
+
// if text alignment matches any of the acceptable values, use it. Otherwise, set "left" as default
|
|
102
|
+
this.textAlignState = ['left', 'start', 'right', 'end', 'center'].includes(this.textAlign)
|
|
103
|
+
? this.textAlign
|
|
104
|
+
: 'left';
|
|
108
105
|
// To enable body cells text align per rules set in head cell
|
|
109
106
|
this.internalTdsTextAlign.emit([this.tableId, this.cellKey, this.textAlignState]);
|
|
110
107
|
this.enableToolbarDesign =
|
|
111
108
|
this.host.closest('tds-table').getElementsByTagName('tds-table-toolbar').length >= 1;
|
|
112
109
|
}
|
|
113
110
|
render() {
|
|
114
|
-
return (h(Host, { key: '
|
|
111
|
+
return (h(Host, { key: '8cda19cdff411db98aecbf8a915853eda026853d', class: {
|
|
115
112
|
'tds-table__header-cell': true,
|
|
116
113
|
'tds-table__header-cell--sortable': this.sortable,
|
|
117
114
|
'tds-table__header-cell--is-sorted': this.sortedByMyKey,
|
|
118
115
|
'tds-table__header-cell--custom-width': this.customWidth !== '',
|
|
119
|
-
'tds-table__header-cell--right-align': this.textAlignState === 'right',
|
|
120
116
|
'tds-table--compact': this.compactDesign,
|
|
121
117
|
'tds-table--divider': this.verticalDividers,
|
|
122
118
|
'tds-table--no-min-width': this.noMinWidth,
|
|
@@ -213,18 +209,19 @@ export class TdsTableHeaderCell {
|
|
|
213
209
|
"type": "string",
|
|
214
210
|
"mutable": false,
|
|
215
211
|
"complexType": {
|
|
216
|
-
"original": "
|
|
217
|
-
"resolved": "
|
|
212
|
+
"original": "'left' | 'start' | 'right' | 'end' | 'center'",
|
|
213
|
+
"resolved": "\"center\" | \"end\" | \"left\" | \"right\" | \"start\"",
|
|
218
214
|
"references": {}
|
|
219
215
|
},
|
|
220
216
|
"required": false,
|
|
221
|
-
"optional":
|
|
217
|
+
"optional": false,
|
|
222
218
|
"docs": {
|
|
223
219
|
"tags": [],
|
|
224
|
-
"text": "Setting for text align, default is left. Other accepted values are \"right\" or \"end\"."
|
|
220
|
+
"text": "Setting for text align, default is \"left\". Other accepted values are \"left\", \"start\", \"right\" or \"end\"."
|
|
225
221
|
},
|
|
226
222
|
"attribute": "text-align",
|
|
227
|
-
"reflect": true
|
|
223
|
+
"reflect": true,
|
|
224
|
+
"defaultValue": "'left'"
|
|
228
225
|
}
|
|
229
226
|
};
|
|
230
227
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import hasSlot from "../../utils/hasSlot";
|
|
3
3
|
/**
|
|
4
|
-
* @slot prefix - Slot for the prefix in the
|
|
5
|
-
* @slot suffix - Slot for the suffix in the
|
|
4
|
+
* @slot prefix - Slot for the prefix in the component.
|
|
5
|
+
* @slot suffix - Slot for the suffix in the component. Suffix is hidden when the input is in readonly state.
|
|
6
6
|
*/
|
|
7
7
|
export class TdsTextField {
|
|
8
8
|
constructor() {
|
|
@@ -48,22 +48,31 @@ export class TdsTextField {
|
|
|
48
48
|
var _a;
|
|
49
49
|
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
50
50
|
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
51
|
-
return (h("div", { key: '
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
: ''
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
51
|
+
return (h("div", { key: '2b312cea422545b69a06408597cc8acdb2e1b571', class: {
|
|
52
|
+
'form-text-field-nomin': this.noMinWidth,
|
|
53
|
+
'form-text-field': !this.focusInput || this.disabled,
|
|
54
|
+
'text-field-focus': this.focusInput && !this.disabled,
|
|
55
|
+
'text-field-data': this.value !== '' && this.value !== null,
|
|
56
|
+
'text-field-container-label-inside': this.labelPosition === 'inside' && this.size !== 'sm',
|
|
57
|
+
'form-text-field-disabled': this.disabled,
|
|
58
|
+
'form-text-field-readonly': this.readOnly,
|
|
59
|
+
'tds-mode-variant-primary': this.modeVariant === 'primary',
|
|
60
|
+
'tds-mode-variant-secondary': this.modeVariant === 'secondary',
|
|
61
|
+
'form-text-field-md': this.size === 'md',
|
|
62
|
+
'form-text-field-sm': this.size === 'sm',
|
|
63
|
+
'form-text-field-error': this.state === 'error',
|
|
64
|
+
'form-text-field-success': this.state === 'success',
|
|
65
|
+
} }, this.labelPosition === 'outside' && (h("div", { class: "text-field-label-outside" }, h("div", null, this.label))), h("div", { key: '23c59920fa3c06b9677e06b1c8413b9938c731eb', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { class: {
|
|
66
|
+
'text-field-slot-wrap-prefix': true,
|
|
67
|
+
'text-field-error': this.state === 'error',
|
|
68
|
+
'text-field-success': this.state === 'success',
|
|
69
|
+
'text-field-default': this.state === 'default',
|
|
70
|
+
} }, h("slot", { name: "prefix" }))), h("div", { key: 'aea27bc666bf486c46b9fe07bf0fb7290addf5ad', class: "text-field-input-container" }, h("input", { key: '6b2cb5c19fdac8280806cf70d0ebbc4aefc80e8a', ref: (inputEl) => (this.textInput = inputEl), class: {
|
|
71
|
+
'text-field-input': true,
|
|
72
|
+
'text-field-input-sm': this.size === 'sm',
|
|
73
|
+
'text-field-input-md': this.size === 'md',
|
|
74
|
+
'text-field-input-lg': this.size === 'lg',
|
|
75
|
+
}, type: this.type, disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, min: this.min, max: this.max, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
|
|
67
76
|
if (!this.readOnly) {
|
|
68
77
|
this.handleFocus(event);
|
|
69
78
|
}
|
|
@@ -71,7 +80,13 @@ export class TdsTextField {
|
|
|
71
80
|
if (!this.readOnly) {
|
|
72
81
|
this.handleBlur(event);
|
|
73
82
|
}
|
|
74
|
-
} }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { class: "text-field-label-inside" }, this.label))), h("div", { key: '
|
|
83
|
+
} }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { class: "text-field-label-inside" }, this.label))), h("div", { key: 'd51f4eb1d1b8afeae3375d8111bcaf5f322e7382', class: "text-field-bar" }), usesSuffixSlot && (h("div", { class: {
|
|
84
|
+
'text-field-slot-wrap-suffix': true,
|
|
85
|
+
'text-field-error': this.state === 'error',
|
|
86
|
+
'text-field-success': this.state === 'success',
|
|
87
|
+
'text-field-default': this.state === 'default',
|
|
88
|
+
'tds-u-display-none': this.readOnly,
|
|
89
|
+
} }, h("slot", { name: "suffix" }))), h("span", { key: 'ebf4dc9b5aba18087491a01d0619eea334dc0b93', class: "text-field-icon__readonly" }, h("tds-icon", { key: '0c346e4bc4835081b3cf85dcf09b641dec1f6127', name: "edit_inactive", size: "20px" })), h("span", { key: '637c5b8941df13c39b0eda219c775f552253b15e', class: "text-field-icon__readonly-label" }, "This field is non-editable")), (this.helper || this.maxLength > 0) && (h("div", { class: "text-field-helper" }, this.state === 'error' && (h("div", { class: "text-field-helper-error-state" }, h("tds-icon", { name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, this.maxLength > 0 && (h("div", { class: "text-field-textcounter" }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { class: "text-field-textcounter-divider" }, " / "), this.maxLength))))));
|
|
75
90
|
}
|
|
76
91
|
static get is() { return "tds-text-field"; }
|
|
77
92
|
static get encapsulation() { return "scoped"; }
|
|
@@ -258,7 +273,7 @@ export class TdsTextField {
|
|
|
258
273
|
"optional": false,
|
|
259
274
|
"docs": {
|
|
260
275
|
"tags": [],
|
|
261
|
-
"text": "Set input in readonly state"
|
|
276
|
+
"text": "Set input in readonly state. Hides the suffix slot if true."
|
|
262
277
|
},
|
|
263
278
|
"attribute": "read-only",
|
|
264
279
|
"reflect": false,
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
display: flex;
|
|
43
43
|
align-items: center;
|
|
44
44
|
justify-content: center;
|
|
45
|
-
margin: 14px 14px 0
|
|
45
|
+
margin: 14px 14px 0 22px;
|
|
46
46
|
border: none;
|
|
47
47
|
background: transparent;
|
|
48
48
|
}
|
|
@@ -65,6 +65,8 @@
|
|
|
65
65
|
display: flex;
|
|
66
66
|
flex-direction: column;
|
|
67
67
|
flex: 1;
|
|
68
|
+
max-width: 250px;
|
|
69
|
+
word-break: break-word;
|
|
68
70
|
}
|
|
69
71
|
:host .content .header-subheader {
|
|
70
72
|
display: flex;
|
|
@@ -84,10 +86,6 @@
|
|
|
84
86
|
color: var(--tds-toast-subheadline-color);
|
|
85
87
|
font: var(--tds-detail-02) !important;
|
|
86
88
|
letter-spacing: var(--tds-detail-02-ls) !important;
|
|
87
|
-
max-width: 252px;
|
|
88
|
-
white-space: nowrap;
|
|
89
|
-
overflow: hidden;
|
|
90
|
-
text-overflow: ellipsis;
|
|
91
89
|
}
|
|
92
90
|
:host .content .subheader.no-link slot::slotted(*),
|
|
93
91
|
:host .content slot[name=subheader]::slotted(*).no-link slot::slotted(*) {
|
|
@@ -43,6 +43,7 @@ export class TdsToast {
|
|
|
43
43
|
this.subheader = undefined;
|
|
44
44
|
this.variant = 'information';
|
|
45
45
|
this.hidden = false;
|
|
46
|
+
this.closable = true;
|
|
46
47
|
this.toastRole = 'alert';
|
|
47
48
|
}
|
|
48
49
|
/** Hides the Toast. */
|
|
@@ -57,14 +58,12 @@ export class TdsToast {
|
|
|
57
58
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
58
59
|
const usesSubheaderSlot = hasSlot('subheader', this.host);
|
|
59
60
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
60
|
-
return (h(Host, { key: '
|
|
61
|
+
return (h(Host, { key: 'b4a35bad02fc58bae1ec849e9018b47da0471efa', toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
|
|
61
62
|
hide: this.hidden,
|
|
62
63
|
show: !this.hidden,
|
|
63
|
-
} }, h("div", { key: '
|
|
64
|
+
} }, h("div", { key: '302b734e22d80b84ec04378d019476b360913b7a', class: `
|
|
64
65
|
wrapper
|
|
65
|
-
${this.variant}` }, h("tds-icon", { key: '
|
|
66
|
-
this.handleClose();
|
|
67
|
-
}, class: `close` }, h("tds-icon", { key: 'e1ce21f0ef7fb6862f560f153c515296c83d4f57', name: "cross", size: "20px" })))));
|
|
66
|
+
${this.variant}` }, h("tds-icon", { key: 'abf3ed7b8c3116ddd180f5b05486f90f85e0ab35', name: this.getIconName(), size: "20px" }), h("div", { key: 'd0ed5fb347cfaf7614961d8a70ddfe517713af70', class: `content` }, h("div", { key: 'f12ef9ddf3005ce3b6397665f7dfbbc18050d88b', class: "header-subheader" }, this.header && h("div", { class: "header" }, this.header), usesHeaderSlot && h("slot", { name: "header" }), this.subheader && h("div", { class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { name: "subheader" })), usesActionsSlot && (h("div", { class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { name: "actions" })))), this.closable && (h("button", { onClick: this.handleClose, class: "close" }, h("tds-icon", { name: "cross", size: "20px" }))))));
|
|
68
67
|
}
|
|
69
68
|
static get is() { return "tds-toast"; }
|
|
70
69
|
static get encapsulation() { return "shadow"; }
|
|
@@ -168,6 +167,24 @@ export class TdsToast {
|
|
|
168
167
|
"reflect": true,
|
|
169
168
|
"defaultValue": "false"
|
|
170
169
|
},
|
|
170
|
+
"closable": {
|
|
171
|
+
"type": "boolean",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "boolean",
|
|
175
|
+
"resolved": "boolean",
|
|
176
|
+
"references": {}
|
|
177
|
+
},
|
|
178
|
+
"required": false,
|
|
179
|
+
"optional": false,
|
|
180
|
+
"docs": {
|
|
181
|
+
"tags": [],
|
|
182
|
+
"text": "Enables the close button."
|
|
183
|
+
},
|
|
184
|
+
"attribute": "closable",
|
|
185
|
+
"reflect": false,
|
|
186
|
+
"defaultValue": "true"
|
|
187
|
+
},
|
|
171
188
|
"toastRole": {
|
|
172
189
|
"type": "string",
|
|
173
190
|
"mutable": false,
|
|
@@ -29,7 +29,7 @@ export class TdsToggle {
|
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
|
-
return (h("div", { key: '
|
|
32
|
+
return (h("div", { key: '726adc73f704e7f2b303983c7fb02a4656b0d84d', class: "tds-toggle" }, this.headline && (h("div", { class: `toggle-headline ${this.disabled ? 'disabled' : ''}` }, this.headline)), h("input", { key: '22628dcc2b941c27faf09eb10e9f6d7d50c03e3c', "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), h("label", { key: '235750e453463cf087d6683d5f1c1b02056f1536', class: `${this.disabled ? 'disabled' : ''}`, htmlFor: this.toggleId }, h("slot", { key: '8d51817c8fa188f75e680f42d6cbad2ed6891ba3', name: "label" }))));
|
|
33
33
|
}
|
|
34
34
|
static get is() { return "tds-toggle"; }
|
|
35
35
|
static get encapsulation() { return "scoped"; }
|
|
@@ -5,8 +5,6 @@ import inheritAttributes from "../../utils/inheritAttributes";
|
|
|
5
5
|
*/
|
|
6
6
|
export class TdsTooltip {
|
|
7
7
|
constructor() {
|
|
8
|
-
this.offsetSkidding = 0;
|
|
9
|
-
this.offsetDistance = 8;
|
|
10
8
|
this.popperjsExtraModifiers = [
|
|
11
9
|
{
|
|
12
10
|
name: 'positionCalc',
|
|
@@ -38,22 +36,24 @@ export class TdsTooltip {
|
|
|
38
36
|
this.mouseOverTooltip = false;
|
|
39
37
|
this.show = false;
|
|
40
38
|
this.placement = 'bottom';
|
|
39
|
+
this.offsetSkidding = 0;
|
|
40
|
+
this.offsetDistance = 8;
|
|
41
41
|
}
|
|
42
42
|
componentWillLoad() {
|
|
43
43
|
this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
var _a;
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: '0cf105738ffdc5463fb22a310e95e119b4e76cdd' }, h("tds-popover-core", Object.assign({ key: '3ff8ccc3d104969b5c7f7f8ededf054f305f2df0' }, this.inheritedAttributes, { class: {
|
|
48
48
|
'tds-tooltip': true,
|
|
49
49
|
[`tds-tooltip-${this.border}`]: true,
|
|
50
50
|
[(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
|
|
51
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: () => {
|
|
52
|
+
}, selector: this.selector, referenceEl: this.referenceEl, trigger: this.mouseOverTooltip ? 'hover-popover' : 'hover', modifiers: this.popperjsExtraModifiers, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, show: this.show, placement: this.placement, autoHide: false, onInternalTdsShow: () => {
|
|
53
53
|
this.show = true;
|
|
54
54
|
}, onInternalTdsClose: () => {
|
|
55
55
|
this.show = false;
|
|
56
|
-
} }), this.text, h("slot", { key: '
|
|
56
|
+
} }), this.text, h("slot", { key: 'b7a06b9f4875788c815f33a75d45dbb8a72f6393' }))));
|
|
57
57
|
}
|
|
58
58
|
static get is() { return "tds-tooltip"; }
|
|
59
59
|
static get encapsulation() { return "scoped"; }
|
|
@@ -184,6 +184,42 @@ export class TdsTooltip {
|
|
|
184
184
|
"attribute": "placement",
|
|
185
185
|
"reflect": false,
|
|
186
186
|
"defaultValue": "'bottom'"
|
|
187
|
+
},
|
|
188
|
+
"offsetSkidding": {
|
|
189
|
+
"type": "number",
|
|
190
|
+
"mutable": false,
|
|
191
|
+
"complexType": {
|
|
192
|
+
"original": "number",
|
|
193
|
+
"resolved": "number",
|
|
194
|
+
"references": {}
|
|
195
|
+
},
|
|
196
|
+
"required": false,
|
|
197
|
+
"optional": false,
|
|
198
|
+
"docs": {
|
|
199
|
+
"tags": [],
|
|
200
|
+
"text": "Sets the offset skidding"
|
|
201
|
+
},
|
|
202
|
+
"attribute": "offset-skidding",
|
|
203
|
+
"reflect": false,
|
|
204
|
+
"defaultValue": "0"
|
|
205
|
+
},
|
|
206
|
+
"offsetDistance": {
|
|
207
|
+
"type": "number",
|
|
208
|
+
"mutable": false,
|
|
209
|
+
"complexType": {
|
|
210
|
+
"original": "number",
|
|
211
|
+
"resolved": "number",
|
|
212
|
+
"references": {}
|
|
213
|
+
},
|
|
214
|
+
"required": false,
|
|
215
|
+
"optional": false,
|
|
216
|
+
"docs": {
|
|
217
|
+
"tags": [],
|
|
218
|
+
"text": "Sets the offset distance"
|
|
219
|
+
},
|
|
220
|
+
"attribute": "offset-distance",
|
|
221
|
+
"reflect": false,
|
|
222
|
+
"defaultValue": "8"
|
|
187
223
|
}
|
|
188
224
|
};
|
|
189
225
|
}
|
package/dist/components/icon.js
CHANGED
|
@@ -12,9 +12,8 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
|
|
|
12
12
|
this.__registerHost();
|
|
13
13
|
this.__attachShadow();
|
|
14
14
|
this.setIcons = () => this.arrayOfIcons.map((element) => {
|
|
15
|
-
var _a, _b;
|
|
16
15
|
if (element.name === this.name) {
|
|
17
|
-
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", "aria-labelledby":
|
|
16
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", "aria-labelledby": this.svgTitle ? `title-${this.name}` : undefined, "aria-describedby": this.svgDescription ? `desc-${this.name}` : undefined, role: "img", style: { fontSize: this.size }, height: this.size, width: this.size }, this.svgTitle && h("title", { id: `title-${this.name}` }, this.svgTitle), this.svgDescription && h("desc", { id: `desc-${this.name}` }, this.svgDescription), h("path", { fill: "currentColor", d: element.definition })));
|
|
18
17
|
}
|
|
19
18
|
});
|
|
20
19
|
this.name = 'truck';
|
|
@@ -37,7 +36,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
|
|
|
37
36
|
this.arrayOfIcons = [...this.arrayOfIcons];
|
|
38
37
|
}
|
|
39
38
|
render() {
|
|
40
|
-
return h(Host, { key: '
|
|
39
|
+
return h(Host, { key: 'e5effec50e55df5bb415904f201919545c5ca98c' }, this.setIcons());
|
|
41
40
|
}
|
|
42
41
|
static get style() { return TdsIconStyle0; }
|
|
43
42
|
}, [1, "tds-icon", {
|
|
@@ -16,6 +16,7 @@ const TdsTableBodyCell = /*@__PURE__*/ proxyCustomElement(class TdsTableBodyCell
|
|
|
16
16
|
this.cellValue = undefined;
|
|
17
17
|
this.cellKey = undefined;
|
|
18
18
|
this.disablePadding = false;
|
|
19
|
+
this.textAlign = 'left';
|
|
19
20
|
this.textAlignState = undefined;
|
|
20
21
|
this.activeSorting = false;
|
|
21
22
|
this.verticalDividers = false;
|
|
@@ -48,7 +49,14 @@ const TdsTableBodyCell = /*@__PURE__*/ proxyCustomElement(class TdsTableBodyCell
|
|
|
48
49
|
const [receivedID, receivedKey, receivedTextAlign] = event.detail;
|
|
49
50
|
if (this.tableId === receivedID) {
|
|
50
51
|
if (this.cellKey === receivedKey) {
|
|
51
|
-
this.
|
|
52
|
+
if (this.textAlign) {
|
|
53
|
+
this.textAlignState = this.textAlign;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.textAlignState = ['left', 'start', 'center', 'right', 'end'].includes(receivedTextAlign)
|
|
57
|
+
? receivedTextAlign
|
|
58
|
+
: 'left';
|
|
59
|
+
}
|
|
52
60
|
}
|
|
53
61
|
}
|
|
54
62
|
}
|
|
@@ -62,14 +70,14 @@ const TdsTableBodyCell = /*@__PURE__*/ proxyCustomElement(class TdsTableBodyCell
|
|
|
62
70
|
});
|
|
63
71
|
}
|
|
64
72
|
render() {
|
|
65
|
-
return (h(Host, { key: '
|
|
73
|
+
return (h(Host, { key: 'f401d3aea3ccc3bfa976861a9261232e82386fb1', class: {
|
|
66
74
|
'tds-table__body-cell': true,
|
|
67
75
|
'tds-table__body-cell--hover': this.activeSorting,
|
|
68
76
|
'tds-table__compact': this.compactDesign,
|
|
69
77
|
'tds-table--divider': this.verticalDividers,
|
|
70
78
|
'tds-table--no-min-width': this.noMinWidth,
|
|
71
79
|
'tds-table__body-cell--no-padding': this.disablePadding,
|
|
72
|
-
}, style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", { key: '
|
|
80
|
+
}, style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", { key: '7cb32ae0e1eb6e60f010edaebe11df7cab389825' })));
|
|
73
81
|
}
|
|
74
82
|
get host() { return this; }
|
|
75
83
|
static get style() { return TdsBodyCellStyle0; }
|
|
@@ -77,6 +85,7 @@ const TdsTableBodyCell = /*@__PURE__*/ proxyCustomElement(class TdsTableBodyCell
|
|
|
77
85
|
"cellValue": [520, "cell-value"],
|
|
78
86
|
"cellKey": [520, "cell-key"],
|
|
79
87
|
"disablePadding": [516, "disable-padding"],
|
|
88
|
+
"textAlign": [513, "text-align"],
|
|
80
89
|
"textAlignState": [32],
|
|
81
90
|
"activeSorting": [32],
|
|
82
91
|
"verticalDividers": [32],
|
|
@@ -11,6 +11,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
11
11
|
this.tdsChange = createEvent(this, "tdsChange", 6);
|
|
12
12
|
this.tdsBlur = createEvent(this, "tdsBlur", 6);
|
|
13
13
|
this.tdsFocus = createEvent(this, "tdsFocus", 6);
|
|
14
|
+
this.tdsInput = createEvent(this, "tdsInput", 6);
|
|
14
15
|
this.getDefaultValue = () => {
|
|
15
16
|
const dateTimeObj = {
|
|
16
17
|
year: this.defaultValue.slice(0, 4),
|
|
@@ -66,7 +67,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
66
67
|
// Data input event in value prop
|
|
67
68
|
handleInput(e) {
|
|
68
69
|
this.value = e.target.value;
|
|
69
|
-
this.
|
|
70
|
+
this.tdsInput.emit(e);
|
|
70
71
|
}
|
|
71
72
|
// Change event isn't a composed:true by default in for input
|
|
72
73
|
handleChange(e) {
|
|
@@ -90,7 +91,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
90
91
|
if (this.size === 'sm') {
|
|
91
92
|
className += `${className}-sm`;
|
|
92
93
|
}
|
|
93
|
-
return (h("div", { key: '
|
|
94
|
+
return (h("div", { key: '9b718024979e3b9832c8ca0ff06d7323f843aeea', class: `
|
|
94
95
|
${this.noMinWidth ? 'tds-form-datetime-nomin' : ''}
|
|
95
96
|
${this.focusInput ? 'tds-form-datetime tds-datetime-focus' : ' tds-form-datetime'}
|
|
96
97
|
${this.value.length > 0 ? 'tds-datetime-data' : ''}
|
|
@@ -100,7 +101,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
|
|
|
100
101
|
${this.state === 'error' || this.state === 'success'
|
|
101
102
|
? `tds-form-datetime-${this.state}`
|
|
102
103
|
: ''}
|
|
103
|
-
${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && (h("label", { htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: '
|
|
104
|
+
${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && (h("label", { htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'dcee80da3ff4538aa1a0437643ce91b07c46d968', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: '61ccbe13370a32ff54380ba8704d0044f1b2c904', class: "tds-datetime-input-container" }, h("input", { key: '78268cb880af401218303b65bce2d0c761de640f', ref: (inputEl) => (this.textInput = inputEl), class: className, type: this.type, disabled: this.disabled, value: this.value, min: this.min, max: this.max, autofocus: this.autofocus, name: this.name, onInput: (e) => this.handleInput(e), onBlur: (e) => this.handleBlur(e), onChange: (e) => this.handleChange(e) }), h("div", { key: 'e161409fd2ea7f3f1da695b87062580275d94afb', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: 'bb439960caf01ce31eba02f78669965392f65c19', size: "20px", name: "calendar" })), h("div", { key: 'c8967bc660ac4d1cf724cf6bf6651d2756041756', class: "datetime-icon icon-time" }, h("tds-icon", { key: '27cbb876130856fbada4602c4c783580aa7d95b9', size: "20px", name: "clock" }))), h("div", { key: '0309a22195d629a5e1b551f4e848dbc37596b647', class: "tds-datetime-bar" })), this.helper && (h("div", { class: "tds-datetime-helper" }, h("div", { class: "tds-helper" }, this.state === 'error' && h("tds-icon", { name: "error", size: "16px" }), this.helper)))));
|
|
104
105
|
}
|
|
105
106
|
static get style() { return TdsDatetimeStyle0; }
|
|
106
107
|
}, [2, "tds-datetime", {
|
|
@@ -118,6 +118,20 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
118
118
|
}
|
|
119
119
|
return this.openDirection;
|
|
120
120
|
};
|
|
121
|
+
/* Toggles the open state of the Dropdown and sets focus to the input element */
|
|
122
|
+
this.handleToggleOpen = () => {
|
|
123
|
+
if (!this.disabled) {
|
|
124
|
+
this.open = !this.open;
|
|
125
|
+
if (this.open) {
|
|
126
|
+
this.focusInputElement();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
/* Focuses the input element in the Dropdown, if the reference is present. */
|
|
131
|
+
this.focusInputElement = () => {
|
|
132
|
+
if (this.inputElement)
|
|
133
|
+
this.inputElement.focus();
|
|
134
|
+
};
|
|
121
135
|
this.getSelectedChildren = () => {
|
|
122
136
|
var _a;
|
|
123
137
|
return (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((stringValue) => {
|
|
@@ -255,9 +269,6 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
255
269
|
if (this.filter) {
|
|
256
270
|
this.inputElement.value = this.getValue();
|
|
257
271
|
}
|
|
258
|
-
else {
|
|
259
|
-
this.inputElement.value = selection.length > 0 ? selection[0].label : '';
|
|
260
|
-
}
|
|
261
272
|
return selection;
|
|
262
273
|
}
|
|
263
274
|
/**
|
|
@@ -382,7 +393,7 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
382
393
|
render() {
|
|
383
394
|
var _a, _b, _c, _d;
|
|
384
395
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
385
|
-
return (h(Host, { key: '
|
|
396
|
+
return (h(Host, { key: '75d4f203d87f8ecd1b79c859f72f7377888254af', role: "select", class: `${this.modeVariant ? `tds-mode-variant-${this.modeVariant}` : ''}` }, this.label && this.labelPosition === 'outside' && (h("div", { class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '4595633d41ca7a108e345370b8e53bbf4a81380a', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
386
397
|
filter: true,
|
|
387
398
|
focus: this.filterFocus,
|
|
388
399
|
disabled: this.disabled,
|
|
@@ -393,7 +404,7 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
393
404
|
${((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) ? 'selected' : ''}
|
|
394
405
|
` }, this.label)), h("input", {
|
|
395
406
|
// eslint-disable-next-line no-return-assign
|
|
396
|
-
ref: (
|
|
407
|
+
ref: (inputEl) => (this.inputElement = inputEl), class: `${this.labelPosition === 'inside' ? 'placeholder' : ''}`, type: "text", placeholder: this.placeholder, value: this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onBlur: (event) => {
|
|
397
408
|
this.filterFocus = false;
|
|
398
409
|
this.handleBlur(event);
|
|
399
410
|
}, onFocus: (event) => {
|
|
@@ -405,14 +416,7 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
405
416
|
this.open = false;
|
|
406
417
|
}
|
|
407
418
|
}
|
|
408
|
-
})), h("tds-icon", { onClick: () => {
|
|
409
|
-
this.open = !this.open;
|
|
410
|
-
if (this.open) {
|
|
411
|
-
this.inputElement.focus();
|
|
412
|
-
}
|
|
413
|
-
}, class: `${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))) : (h("button", { onClick: () => {
|
|
414
|
-
this.open = !this.open;
|
|
415
|
-
}, onKeyDown: (event) => {
|
|
419
|
+
})), h("tds-icon", { onClick: this.handleToggleOpen, class: `${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))) : (h("button", { onClick: () => this.handleToggleOpen(), onKeyDown: (event) => {
|
|
416
420
|
if (event.key === 'Escape') {
|
|
417
421
|
this.open = false;
|
|
418
422
|
}
|
|
@@ -424,11 +428,11 @@ const TdsDropdown$1 = /*@__PURE__*/ proxyCustomElement(class TdsDropdown extends
|
|
|
424
428
|
label-inside-as-placeholder
|
|
425
429
|
${this.size}
|
|
426
430
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
427
|
-
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.length) ? this.getValue() : this.placeholder), h("tds-icon", { class: `${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: '
|
|
431
|
+
` }, this.label)), h("div", { class: `placeholder ${this.size}` }, ((_d = this.value) === null || _d === void 0 ? void 0 : _d.length) ? this.getValue() : this.placeholder), h("tds-icon", { class: `${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'dea4c89cf74b5a264e080d94332dccbc7cbd8c98', ref: (element) => (this.dropdownList = element), class: `dropdown-list
|
|
428
432
|
${this.size}
|
|
429
433
|
${this.open ? 'open' : 'closed'}
|
|
430
434
|
${this.getOpenDirection()}
|
|
431
|
-
${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", { key: '
|
|
435
|
+
${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", { key: '4fd5b25fe610dd65fd2ca3e74b50afc5cb8131d9' }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { name: "error", size: "16px" }), this.helper))));
|
|
432
436
|
}
|
|
433
437
|
get host() { return this; }
|
|
434
438
|
static get watchers() { return {
|