@scania/tegel 1.6.1 → 1.8.0-ng-form-beta.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/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 +15 -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 +1 -1
- 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 -6
- 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 +1 -1
- 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 +5 -9
- 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 +1 -1
- 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 +41 -19
- 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 +9 -3
- 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 +35 -20
- package/dist/cjs/tds-textarea.cjs.entry.js +2 -2
- 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 +3 -3
- package/dist/cjs/tegel.cjs.js +6 -4
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/dropdown/dropdown.css +22 -0
- package/dist/collection/components/dropdown/dropdown.js +18 -4
- package/dist/collection/components/header/header-launcher/header-launcher.js +4 -8
- package/dist/collection/components/modal/modal.css +6 -21
- package/dist/collection/components/modal/modal.js +73 -17
- package/dist/collection/components/side-menu/side-menu.js +3 -3
- package/dist/collection/components/slider/slider.js +51 -41
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/table/table/table.js +1 -1
- package/dist/collection/components/table/table-body-cell/table-body-cell.js +31 -3
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.css +6 -0
- package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +7 -1
- 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 +36 -21
- package/dist/collection/components/textarea/textarea.js +1 -1
- 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 +2 -2
- package/dist/components/tds-body-cell.js +15 -3
- package/dist/components/tds-dropdown.js +19 -5
- package/dist/components/tds-header-cell.js +8 -12
- package/dist/components/tds-header-launcher.js +4 -8
- package/dist/components/tds-modal.js +43 -19
- package/dist/components/tds-slider.js +33 -37
- package/dist/components/tds-table-body-row-expandable.js +8 -2
- package/dist/components/tds-text-field.js +34 -19
- package/dist/components/tds-textarea.js +1 -1
- package/dist/components/tds-toast.js +6 -6
- package/dist/components/tds-toggle.js +1 -1
- package/dist/components/tds-tooltip.js +2 -2
- 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 +15 -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 +1 -1
- 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 -6
- 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 +1 -1
- 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 +5 -9
- 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 +1 -1
- 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 +41 -19
- 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 +9 -3
- 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 +35 -20
- package/dist/esm/tds-textarea.entry.js +2 -2
- 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 +3 -3
- 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-05704939.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-2598dc8a.entry.js +1 -0
- 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-efff904c.entry.js → p-3b546070.entry.js} +1 -1
- package/dist/tegel/{p-4ca0f396.entry.js → p-3b858820.entry.js} +1 -1
- 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-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-2270b30c.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-540a83e5.entry.js +1 -0
- 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-92b2db31.entry.js → p-6c23bc53.entry.js} +1 -1
- 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-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-7a8d7b95.entry.js +1 -0
- package/dist/tegel/{p-ee537028.entry.js → p-7e0116af.entry.js} +1 -1
- 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-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-5b9e6fa3.entry.js → p-b263f884.entry.js} +1 -1
- package/dist/tegel/{p-9731cc82.entry.js → p-b6f8c65f.entry.js} +1 -1
- package/dist/tegel/p-bb7703ac.entry.js +1 -0
- package/dist/tegel/{p-d8b12e59.entry.js → p-bc7459fb.entry.js} +1 -1
- 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-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-ebbe0131.entry.js +1 -0
- 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/dropdown/dropdown.d.ts +1 -0
- 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.d.ts +40 -7
- package/package.json +4 -2
- 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-9d79f2fe.entry.js +0 -1
- package/dist/tegel/p-9f33108a.entry.js +0 -1
- package/dist/tegel/p-bd056432.entry.js +0 -1
- package/dist/tegel/p-c0ced88a.entry.js +0 -1
- package/dist/tegel/p-e35f0c64.entry.js +0 -1
|
@@ -119,6 +119,12 @@ export class TdsDropdown {
|
|
|
119
119
|
}).length;
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
|
+
this.handleFilterReset = () => {
|
|
123
|
+
this.reset();
|
|
124
|
+
this.inputElement.value = '';
|
|
125
|
+
this.handleFilter({ target: { value: this.inputElement.value } });
|
|
126
|
+
this.inputElement.focus();
|
|
127
|
+
};
|
|
122
128
|
this.handleFocus = (event) => {
|
|
123
129
|
this.tdsFocus.emit(event);
|
|
124
130
|
};
|
|
@@ -329,7 +335,7 @@ export class TdsDropdown {
|
|
|
329
335
|
render() {
|
|
330
336
|
var _a, _b, _c, _d;
|
|
331
337
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
332
|
-
return (h(Host, { key: '
|
|
338
|
+
return (h(Host, { key: '062a04c9b529a7e30ca863ba53f757f288f4da10', 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: '8f5b894804a3be375ba5091b7da004937dbcfe31', class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
333
339
|
filter: true,
|
|
334
340
|
focus: this.filterFocus,
|
|
335
341
|
disabled: this.disabled,
|
|
@@ -352,7 +358,15 @@ export class TdsDropdown {
|
|
|
352
358
|
this.open = false;
|
|
353
359
|
}
|
|
354
360
|
}
|
|
355
|
-
})), h("tds-icon", {
|
|
361
|
+
})), h("tds-icon", { tabIndex: 0, role: "button", "aria-label": "Clear filter", svgTitle: "Clear filter", onClick: this.handleFilterReset, onKeyDown: (event) => {
|
|
362
|
+
if (event.key === 'Enter') {
|
|
363
|
+
this.handleFilterReset();
|
|
364
|
+
}
|
|
365
|
+
}, class: `clear-icon ${this.open && this.inputElement.value !== '' ? '' : 'hide'}`, name: "cross", size: "16px" }), h("tds-icon", { tabIndex: 0, role: "button", "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", onClick: this.handleToggleOpen, onKeyDown: (event) => {
|
|
366
|
+
if (event.key === 'Enter') {
|
|
367
|
+
this.handleToggleOpen();
|
|
368
|
+
}
|
|
369
|
+
}, class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))) : (h("button", { onClick: () => this.handleToggleOpen(), onKeyDown: (event) => {
|
|
356
370
|
if (event.key === 'Escape') {
|
|
357
371
|
this.open = false;
|
|
358
372
|
}
|
|
@@ -364,11 +378,11 @@ export class TdsDropdown {
|
|
|
364
378
|
label-inside-as-placeholder
|
|
365
379
|
${this.size}
|
|
366
380
|
${((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) ? 'selected' : ''}
|
|
367
|
-
` }, 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:
|
|
381
|
+
` }, 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", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'a507589572614ae3ac4c99fb777394b0bc03729c', ref: (element) => (this.dropdownList = element), class: `dropdown-list
|
|
368
382
|
${this.size}
|
|
369
383
|
${this.open ? 'open' : 'closed'}
|
|
370
384
|
${this.getOpenDirection()}
|
|
371
|
-
${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", { key: '
|
|
385
|
+
${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", { key: 'b184e4c940125d51c9531bceadc8544cbd579c1c' }), 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))));
|
|
372
386
|
}
|
|
373
387
|
static get is() { return "tds-dropdown"; }
|
|
374
388
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,12 +19,8 @@ export class TdsHeaderLauncher {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
componentDidLoad() {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
const hasListTypeMenu = slottedElements.some((element) => element.tagName.toLowerCase() === 'tds-header-launcher-list');
|
|
25
|
-
if (hasListTypeMenu) {
|
|
26
|
-
this.hasListTypeMenu = true;
|
|
27
|
-
}
|
|
22
|
+
const hasListTypeMenu = !!this.host.querySelector('tds-header-launcher-list');
|
|
23
|
+
this.hasListTypeMenu = hasListTypeMenu;
|
|
28
24
|
}
|
|
29
25
|
toggleLauncher() {
|
|
30
26
|
this.open = !this.open;
|
|
@@ -36,11 +32,11 @@ export class TdsHeaderLauncher {
|
|
|
36
32
|
}, 'ref': (el) => {
|
|
37
33
|
this.buttonEl = el;
|
|
38
34
|
} });
|
|
39
|
-
return (h(Host, { key: '
|
|
35
|
+
return (h(Host, { key: '337abddb77f5d7b2ce7c1a8bcfe2dd5e60cc934c' }, h("div", { key: '3652f71bd52be2fcbae7bfde3dab0b0c1c0c5d56', class: {
|
|
40
36
|
'wrapper': true,
|
|
41
37
|
'state-open': this.open,
|
|
42
38
|
'state-list-type-menu': this.hasListTypeMenu,
|
|
43
|
-
} }, h("tds-header-launcher-button", Object.assign({ key: '
|
|
39
|
+
} }, h("tds-header-launcher-button", Object.assign({ key: 'ffae6f54b57dcc0c44fae751f9da1025512b8f4b' }, buttonAttributes)), this.buttonEl && (h("tds-popover-canvas", { id: `tds-launcher-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
|
|
44
40
|
{
|
|
45
41
|
name: 'flip',
|
|
46
42
|
options: {
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
margin: auto;
|
|
30
30
|
position: relative;
|
|
31
31
|
border-radius: 4px;
|
|
32
|
-
padding: 16px;
|
|
33
32
|
max-height: 85vh;
|
|
34
33
|
overflow-y: auto;
|
|
35
34
|
pointer-events: auto;
|
|
@@ -56,22 +55,21 @@
|
|
|
56
55
|
}
|
|
57
56
|
.tds-modal__actions-sticky {
|
|
58
57
|
overflow: hidden;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
59
60
|
}
|
|
60
61
|
.tds-modal__actions-sticky .body {
|
|
61
62
|
font: var(--tds-body-01);
|
|
62
63
|
letter-spacing: var(--tds-body-01-ls);
|
|
63
|
-
padding-bottom: 96px;
|
|
64
|
-
margin: 0 -16px 0 0;
|
|
65
64
|
max-height: calc(85vh - 36px);
|
|
66
65
|
overflow-y: auto;
|
|
67
66
|
}
|
|
68
67
|
.tds-modal__actions-sticky slot[name=actions] {
|
|
69
|
-
position: absolute;
|
|
70
68
|
bottom: -1px;
|
|
71
69
|
left: 0;
|
|
72
70
|
right: 0;
|
|
73
71
|
background-color: var(--tds-modal-background);
|
|
74
|
-
padding: var(--tds-spacing-element-16);
|
|
72
|
+
padding: var(--tds-spacing-element-24) var(--tds-spacing-element-16) var(--tds-spacing-element-16);
|
|
75
73
|
display: flex;
|
|
76
74
|
gap: 16px;
|
|
77
75
|
}
|
|
@@ -79,6 +77,7 @@
|
|
|
79
77
|
background-color: var(--tds-modal-background);
|
|
80
78
|
display: flex;
|
|
81
79
|
gap: 16px;
|
|
80
|
+
padding: 24px 16px 16px;
|
|
82
81
|
}
|
|
83
82
|
|
|
84
83
|
@media (min-width: 320px) {
|
|
@@ -166,20 +165,12 @@
|
|
|
166
165
|
/* MODAL SUB ELEMENTS */
|
|
167
166
|
.header {
|
|
168
167
|
display: flex;
|
|
169
|
-
padding
|
|
168
|
+
padding: var(--tds-spacing-element-16);
|
|
170
169
|
position: sticky;
|
|
171
170
|
top: 0;
|
|
172
171
|
background-color: var(--tds-modal-background);
|
|
173
172
|
z-index: 1;
|
|
174
173
|
}
|
|
175
|
-
.header::before {
|
|
176
|
-
content: " ";
|
|
177
|
-
position: absolute;
|
|
178
|
-
height: 16px;
|
|
179
|
-
top: -16px;
|
|
180
|
-
width: 100%;
|
|
181
|
-
background-color: var(--tds-modal-background);
|
|
182
|
-
}
|
|
183
174
|
|
|
184
175
|
.header,
|
|
185
176
|
slot[name=header]::slotted(*) {
|
|
@@ -195,9 +186,8 @@ slot[name=header]::slotted(*) {
|
|
|
195
186
|
color: var(--tds-modal-text);
|
|
196
187
|
font: var(--tds-body-01);
|
|
197
188
|
letter-spacing: var(--tds-body-01-ls);
|
|
198
|
-
padding-bottom: 40px;
|
|
199
189
|
overflow-y: visible;
|
|
200
|
-
padding
|
|
190
|
+
padding: 0 var(--tds-spacing-element-16) var(--tds-spacing-element-16);
|
|
201
191
|
/* SCROLL STUFF */
|
|
202
192
|
/* width */
|
|
203
193
|
/* Track */
|
|
@@ -213,11 +203,6 @@ slot[name=header]::slotted(*) {
|
|
|
213
203
|
.body::-webkit-scrollbar-thumb {
|
|
214
204
|
background-color: var(--tds-grey-500);
|
|
215
205
|
}
|
|
216
|
-
@media (min-width: 1056px) {
|
|
217
|
-
.body {
|
|
218
|
-
padding-right: 64px;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
206
|
|
|
222
207
|
.tds-modal-backdrop {
|
|
223
208
|
box-sizing: border-box;
|
|
@@ -25,17 +25,12 @@ export class TdsModal {
|
|
|
25
25
|
this.handleClose(event);
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this.handleShow();
|
|
37
|
-
}
|
|
38
|
-
});
|
|
28
|
+
this.handleReferenceElementClick = (event) => {
|
|
29
|
+
if (this.isShown) {
|
|
30
|
+
this.handleClose(event);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.handleShow();
|
|
39
34
|
}
|
|
40
35
|
};
|
|
41
36
|
/** Check if there is a referenceElement or selector and adds event listener to them if so. */
|
|
@@ -48,6 +43,12 @@ export class TdsModal {
|
|
|
48
43
|
}
|
|
49
44
|
}
|
|
50
45
|
};
|
|
46
|
+
/** Adds an event listener to the reference element that shows/closes the Modal. */
|
|
47
|
+
this.initializeReferenceElement = (referenceEl) => {
|
|
48
|
+
if (referenceEl) {
|
|
49
|
+
referenceEl.addEventListener('click', this.handleReferenceElementClick);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
51
52
|
this.header = undefined;
|
|
52
53
|
this.prevent = false;
|
|
53
54
|
this.size = 'md';
|
|
@@ -69,24 +70,45 @@ export class TdsModal {
|
|
|
69
70
|
if (this.show !== undefined) {
|
|
70
71
|
this.isShown = this.show;
|
|
71
72
|
}
|
|
72
|
-
this.
|
|
73
|
-
this.setShowButton();
|
|
73
|
+
this.initializeModal();
|
|
74
74
|
if (this.header && hasSlot('header', this.host)) {
|
|
75
75
|
console.warn("Tegel Modal component: Using both header prop and header slot might break modal's design. Please use just one of them. ");
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
componentWillLoad() {
|
|
79
|
+
this.initializeModal();
|
|
80
|
+
}
|
|
81
|
+
disconnectedCallback() {
|
|
82
|
+
this.cleanupModal();
|
|
83
|
+
}
|
|
84
|
+
/** Initializes or re-initializes the modal, setting up event listeners. */
|
|
85
|
+
async initializeModal() {
|
|
86
|
+
this.setDismissButtons();
|
|
87
|
+
this.setShowButton();
|
|
88
|
+
}
|
|
89
|
+
/** Cleans up event listeners and other resources. */
|
|
90
|
+
async cleanupModal() {
|
|
91
|
+
var _a;
|
|
92
|
+
if (this.selector || this.referenceEl) {
|
|
93
|
+
const referenceEl = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
|
|
94
|
+
if (referenceEl) {
|
|
95
|
+
referenceEl.removeEventListener('click', this.handleReferenceElementClick);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
this.host.querySelectorAll('[data-dismiss-modal]').forEach((dismissButton) => {
|
|
99
|
+
dismissButton.removeEventListener('click', this.handleClose);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
78
102
|
/** Adds an event listener to the dismiss buttons that closes the Modal. */
|
|
79
103
|
setDismissButtons() {
|
|
80
104
|
this.host.querySelectorAll('[data-dismiss-modal]').forEach((dismissButton) => {
|
|
81
|
-
dismissButton.addEventListener('click',
|
|
82
|
-
this.handleClose(event);
|
|
83
|
-
});
|
|
105
|
+
dismissButton.addEventListener('click', this.handleClose);
|
|
84
106
|
});
|
|
85
107
|
}
|
|
86
108
|
render() {
|
|
87
109
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
88
110
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
89
|
-
return (h(Host, { key: '
|
|
111
|
+
return (h(Host, { key: '982d982745a2204cc12c497623a581c30a18e7e1', class: `${this.isShown ? 'show' : 'hide'}`, onClick: (event) => this.handleOverlayClick(event) }, h("div", { key: '8d2a5d828f7f6d7301590011b058a24f913445ce', class: "tds-modal-backdrop" }), h("div", { key: 'ff1eaee892f9873d88b51439f8e7bf9063496979', class: `tds-modal tds-modal__actions-${this.actionsPosition} tds-modal-${this.size}` }, h("div", { key: 'e1e1c795404ece5a584b6b8155c66aa1d7fcebb7', class: "header" }, this.header && h("div", { class: "header-text" }, this.header), usesHeaderSlot && h("slot", { name: "header" }), h("button", { key: '19135fcbc6f0d1b38107da6855b012511b8fac24', class: "tds-modal-close", "aria-label": "close", onClick: (event) => this.handleClose(event) }, h("tds-icon", { key: '632591985bfdadcc34e91c5e28dcb3733b1d39ce', name: "cross", size: "20px" }))), h("div", { key: '6e912c0196bef84d93362eb34e71912075c8ff34', class: "body" }, h("slot", { key: 'd8624954c8ef2f419f6a07883c517be59e3acff2', name: "body" })), usesActionsSlot && h("slot", { name: "actions" }))));
|
|
90
112
|
}
|
|
91
113
|
static get is() { return "tds-modal"; }
|
|
92
114
|
static get encapsulation() { return "shadow"; }
|
|
@@ -287,6 +309,40 @@ export class TdsModal {
|
|
|
287
309
|
"text": "Closes the Modal.",
|
|
288
310
|
"tags": []
|
|
289
311
|
}
|
|
312
|
+
},
|
|
313
|
+
"initializeModal": {
|
|
314
|
+
"complexType": {
|
|
315
|
+
"signature": "() => Promise<void>",
|
|
316
|
+
"parameters": [],
|
|
317
|
+
"references": {
|
|
318
|
+
"Promise": {
|
|
319
|
+
"location": "global",
|
|
320
|
+
"id": "global::Promise"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
"return": "Promise<void>"
|
|
324
|
+
},
|
|
325
|
+
"docs": {
|
|
326
|
+
"text": "Initializes or re-initializes the modal, setting up event listeners.",
|
|
327
|
+
"tags": []
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"cleanupModal": {
|
|
331
|
+
"complexType": {
|
|
332
|
+
"signature": "() => Promise<void>",
|
|
333
|
+
"parameters": [],
|
|
334
|
+
"references": {
|
|
335
|
+
"Promise": {
|
|
336
|
+
"location": "global",
|
|
337
|
+
"id": "global::Promise"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"return": "Promise<void>"
|
|
341
|
+
},
|
|
342
|
+
"docs": {
|
|
343
|
+
"text": "Cleans up event listeners and other resources.",
|
|
344
|
+
"tags": []
|
|
345
|
+
}
|
|
290
346
|
}
|
|
291
347
|
};
|
|
292
348
|
}
|
|
@@ -163,7 +163,7 @@ export class TdsSideMenu {
|
|
|
163
163
|
"references": {
|
|
164
164
|
"CollapseEvent": {
|
|
165
165
|
"location": "local",
|
|
166
|
-
"path": "/
|
|
166
|
+
"path": "/Users/johnny/dev/scania/tegel/packages/core/src/components/side-menu/side-menu.tsx",
|
|
167
167
|
"id": "src/components/side-menu/side-menu.tsx::CollapseEvent"
|
|
168
168
|
}
|
|
169
169
|
}
|
|
@@ -187,7 +187,7 @@ export class TdsSideMenu {
|
|
|
187
187
|
"references": {
|
|
188
188
|
"CollapseEvent": {
|
|
189
189
|
"location": "local",
|
|
190
|
-
"path": "/
|
|
190
|
+
"path": "/Users/johnny/dev/scania/tegel/packages/core/src/components/side-menu/side-menu.tsx",
|
|
191
191
|
"id": "src/components/side-menu/side-menu.tsx::CollapseEvent"
|
|
192
192
|
}
|
|
193
193
|
}
|
|
@@ -211,7 +211,7 @@ export class TdsSideMenu {
|
|
|
211
211
|
"references": {
|
|
212
212
|
"InternalTdsSideMenuPropChange": {
|
|
213
213
|
"location": "local",
|
|
214
|
-
"path": "/
|
|
214
|
+
"path": "/Users/johnny/dev/scania/tegel/packages/core/src/components/side-menu/side-menu.tsx",
|
|
215
215
|
"id": "src/components/side-menu/side-menu.tsx::InternalTdsSideMenuPropChange"
|
|
216
216
|
}
|
|
217
217
|
}
|
|
@@ -43,43 +43,30 @@ export class TdsSlider {
|
|
|
43
43
|
case 'ArrowLeft':
|
|
44
44
|
case 'ArrowDown':
|
|
45
45
|
case '-':
|
|
46
|
-
this.stepLeft();
|
|
46
|
+
this.stepLeft(event);
|
|
47
47
|
break;
|
|
48
48
|
case 'ArrowRight':
|
|
49
49
|
case 'ArrowUp':
|
|
50
50
|
case '+':
|
|
51
|
-
this.stepRight();
|
|
51
|
+
this.stepRight(event);
|
|
52
52
|
break;
|
|
53
53
|
default:
|
|
54
54
|
break;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
handleRelease(event) {
|
|
58
58
|
if (!this.thumbGrabbed) {
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
this.thumbGrabbed = false;
|
|
62
62
|
this.thumbInnerElement.classList.remove('pressed');
|
|
63
|
-
this.updateValue();
|
|
63
|
+
this.updateValue(event);
|
|
64
64
|
this.trackElement.focus();
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
if (
|
|
68
|
-
|
|
66
|
+
handleMove(event) {
|
|
67
|
+
if (event.type === 'touchmove') {
|
|
68
|
+
event.preventDefault();
|
|
69
69
|
}
|
|
70
|
-
this.thumbGrabbed = false;
|
|
71
|
-
this.thumbInnerElement.classList.remove('pressed');
|
|
72
|
-
this.updateValue();
|
|
73
|
-
this.trackElement.focus();
|
|
74
|
-
}
|
|
75
|
-
handleMouseMove(event) {
|
|
76
|
-
if (!this.thumbGrabbed) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
this.thumbCore(event);
|
|
80
|
-
}
|
|
81
|
-
handleTouchMove(event) {
|
|
82
|
-
event.preventDefault();
|
|
83
70
|
if (!this.thumbGrabbed) {
|
|
84
71
|
return;
|
|
85
72
|
}
|
|
@@ -126,14 +113,14 @@ export class TdsSlider {
|
|
|
126
113
|
}
|
|
127
114
|
this.thumbLeft = this.constrainThumb(localLeft);
|
|
128
115
|
this.thumbElement.style.left = `${this.thumbLeft}px`;
|
|
129
|
-
this.updateValue();
|
|
116
|
+
this.updateValue(event);
|
|
130
117
|
}
|
|
131
118
|
updateTrack() {
|
|
132
119
|
const trackWidth = this.getTrackWidth();
|
|
133
120
|
const percentageFilled = (this.thumbLeft / trackWidth) * 100;
|
|
134
121
|
this.trackFillElement.style.width = `${percentageFilled}%`;
|
|
135
122
|
}
|
|
136
|
-
updateValue() {
|
|
123
|
+
updateValue(event) {
|
|
137
124
|
const trackWidth = this.getTrackWidth();
|
|
138
125
|
const numTicks = parseInt(this.ticks);
|
|
139
126
|
/* if snapping (supposedValueSlot > 0) is enabled, make sure we display the supposed value (instead of maybe getting a -1/+1 depending on rounding) */
|
|
@@ -147,7 +134,11 @@ export class TdsSlider {
|
|
|
147
134
|
this.value = `${Math.trunc(parseFloat(this.min) + percentage * (parseFloat(this.max) - parseFloat(this.min)))}`;
|
|
148
135
|
}
|
|
149
136
|
this.updateTrack();
|
|
150
|
-
this.
|
|
137
|
+
this.tdsInput.emit({ value: this.value });
|
|
138
|
+
/* Emit event after user has finished dragging the thumb */
|
|
139
|
+
if (event.type === 'touchend' || event.type === 'mouseup') {
|
|
140
|
+
this.tdsChange.emit({ value: this.value });
|
|
141
|
+
}
|
|
151
142
|
}
|
|
152
143
|
forceValueUpdate(newValue) {
|
|
153
144
|
this.calculateThumbLeftFromValue(newValue);
|
|
@@ -183,6 +174,10 @@ export class TdsSlider {
|
|
|
183
174
|
updateSliderValueOnInputChange(event) {
|
|
184
175
|
const inputElement = event.target;
|
|
185
176
|
let newValue = parseInt(inputElement.value);
|
|
177
|
+
// Check if the new value is different from the current value
|
|
178
|
+
if (newValue === parseInt(this.value)) {
|
|
179
|
+
return; // Exit the function if the new value is the same as the current value
|
|
180
|
+
}
|
|
186
181
|
if (newValue < parseFloat(this.min)) {
|
|
187
182
|
newValue = parseFloat(this.min);
|
|
188
183
|
}
|
|
@@ -210,7 +205,7 @@ export class TdsSlider {
|
|
|
210
205
|
calculateInputSizeFromMax() {
|
|
211
206
|
return this.max.length;
|
|
212
207
|
}
|
|
213
|
-
controlsStep(delta) {
|
|
208
|
+
controlsStep(delta, event) {
|
|
214
209
|
if (this.readOnly || this.disabled) {
|
|
215
210
|
return;
|
|
216
211
|
}
|
|
@@ -225,7 +220,7 @@ export class TdsSlider {
|
|
|
225
220
|
else if (this.supposedValueSlot > numTicks + 1) {
|
|
226
221
|
this.supposedValueSlot = numTicks + 1;
|
|
227
222
|
}
|
|
228
|
-
this.updateValue();
|
|
223
|
+
this.updateValue(event);
|
|
229
224
|
}
|
|
230
225
|
else {
|
|
231
226
|
const trackWidth = this.getTrackWidth();
|
|
@@ -243,11 +238,11 @@ export class TdsSlider {
|
|
|
243
238
|
this.forceValueUpdate(this.value);
|
|
244
239
|
}
|
|
245
240
|
}
|
|
246
|
-
stepLeft() {
|
|
247
|
-
this.controlsStep(-parseInt(this.step));
|
|
241
|
+
stepLeft(event) {
|
|
242
|
+
this.controlsStep(-parseInt(this.step), event);
|
|
248
243
|
}
|
|
249
|
-
stepRight() {
|
|
250
|
-
this.controlsStep(parseInt(this.step));
|
|
244
|
+
stepRight(event) {
|
|
245
|
+
this.controlsStep(parseInt(this.step), event);
|
|
251
246
|
}
|
|
252
247
|
componentWillLoad() {
|
|
253
248
|
const numTicks = parseInt(this.ticks);
|
|
@@ -289,24 +284,24 @@ export class TdsSlider {
|
|
|
289
284
|
this.updateTrack();
|
|
290
285
|
}
|
|
291
286
|
render() {
|
|
292
|
-
return (h("div", { key: '
|
|
287
|
+
return (h("div", { key: 'bf3ca081d01c6eac5907fe1ebef8ae5f14fa87da', class: {
|
|
293
288
|
'tds-slider-wrapper': true,
|
|
294
289
|
'read-only': this.readOnly,
|
|
295
|
-
} }, h("input", { key: '
|
|
290
|
+
} }, h("input", { key: '0fb204f882d1905461354f2b75ff4fc374ffa9c9', class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, value: this.value, disabled: this.disabled }), h("div", { key: '6ea9c5efc3a9d590c36b9b9f40bbd2401b9c2dfc', class: {
|
|
296
291
|
'tds-slider': true,
|
|
297
292
|
'disabled': this.disabled,
|
|
298
293
|
'tds-slider-small': this.useSmall,
|
|
299
294
|
}, ref: (el) => {
|
|
300
295
|
this.wrapperElement = el;
|
|
301
|
-
} }, h("label", { key: '
|
|
296
|
+
} }, h("label", { key: '738c0dcf07e3d99a49443f1d501ccaa278653a8d', class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { class: "tds-slider__input-values" }, h("div", { class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { class: "tds-slider__controls" }, h("div", { class: "tds-slider__control tds-slider__control-minus", onClick: (event) => this.stepLeft(event) }, h("tds-icon", { name: "minus", size: "16px" })))), h("div", { key: '999c32a0970e2ec7ab2a601b168ddcf5a0a74bcc', class: "tds-slider-inner" }, this.tickValues.length > 0 && (h("div", { class: "tds-slider__value-dividers-wrapper" }, h("div", { class: "tds-slider__value-dividers" }, this.tickValues.map((value) => (h("div", { class: "tds-slider__value-divider" }, this.showTickNumbers && h("span", null, value))))))), h("div", { key: '57ecf12b107bf4f4b0b23134ad2820a01063e624', class: "tds-slider__track", ref: (el) => {
|
|
302
297
|
this.trackElement = el;
|
|
303
|
-
}, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '
|
|
298
|
+
}, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: 'd12fc549e7e503865fd3a1505c4a51476d769908', class: "tds-slider__track-fill", ref: (el) => {
|
|
304
299
|
this.trackFillElement = el;
|
|
305
|
-
} }), h("div", { key: '
|
|
300
|
+
} }), h("div", { key: 'ecc291e9e4aeb3c813f866e3a58615184ef21c35', class: "tds-slider__thumb", ref: (el) => {
|
|
306
301
|
this.thumbElement = el;
|
|
307
|
-
}, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { class: "tds-slider__value" }, this.value, h("svg", { width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: '
|
|
302
|
+
}, onMouseDown: () => this.grabThumb(), onTouchStart: () => this.grabThumb() }, this.tooltip && (h("div", { class: "tds-slider__value" }, this.value, h("svg", { width: "18", height: "14", viewBox: "0 0 18 14", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M8.15882 12.6915L0.990487 1.54076C0.562658 0.875246 1.0405 0 1.83167 0H16.1683C16.9595 0 17.4373 0.875246 17.0095 1.54076L9.84118 12.6915C9.44754 13.3038 8.55246 13.3038 8.15882 12.6915Z", fill: "currentColor" })))), h("div", { key: '403b0ea3f2ca18469a3e8ef32a2a8468d1a2e82c', class: "tds-slider__thumb-inner", ref: (el) => {
|
|
308
303
|
this.thumbInnerElement = el;
|
|
309
|
-
} })))), this.useInput && (h("div", { class: "tds-slider__input-values" }, h("div", { class: "tds-slider__input-value", onClick: () => this.stepLeft() }, this.max), h("div", { class: "tds-slider__input-field-wrapper" }, h("input", { size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, readOnly: this.readOnly, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event) })))), this.useControls && (h("div", { class: "tds-slider__controls" }, h("div", { class: "tds-slider__control tds-slider__control-plus", onClick: () => this.stepRight() }, h("tds-icon", { name: "plus", size: "16px" })))))));
|
|
304
|
+
} })))), this.useInput && (h("div", { class: "tds-slider__input-values" }, h("div", { class: "tds-slider__input-value", onClick: (event) => this.stepLeft(event) }, this.max), h("div", { class: "tds-slider__input-field-wrapper" }, h("input", { size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, readOnly: this.readOnly, onBlur: (event) => this.updateSliderValueOnInputChange(event), onKeyDown: (event) => this.handleInputFieldEnterPress(event), type: "number", min: this.min, max: this.max })))), this.useControls && (h("div", { class: "tds-slider__controls" }, h("div", { class: "tds-slider__control tds-slider__control-plus", onClick: (event) => this.stepRight(event) }, h("tds-icon", { name: "plus", size: "16px" })))))));
|
|
310
305
|
}
|
|
311
306
|
static get is() { return "tds-slider"; }
|
|
312
307
|
static get originalStyleUrls() {
|
|
@@ -620,7 +615,22 @@ export class TdsSlider {
|
|
|
620
615
|
"composed": true,
|
|
621
616
|
"docs": {
|
|
622
617
|
"tags": [],
|
|
623
|
-
"text": "Sends the value of the slider when changed."
|
|
618
|
+
"text": "Sends the value of the slider when changed. Fires after mouse up and touch end events."
|
|
619
|
+
},
|
|
620
|
+
"complexType": {
|
|
621
|
+
"original": "{\n value: string;\n }",
|
|
622
|
+
"resolved": "{ value: string; }",
|
|
623
|
+
"references": {}
|
|
624
|
+
}
|
|
625
|
+
}, {
|
|
626
|
+
"method": "tdsInput",
|
|
627
|
+
"name": "tdsInput",
|
|
628
|
+
"bubbles": true,
|
|
629
|
+
"cancelable": false,
|
|
630
|
+
"composed": true,
|
|
631
|
+
"docs": {
|
|
632
|
+
"tags": [],
|
|
633
|
+
"text": "Sends the value of the slider while moving the thumb. Fires on mouse move and touch move events."
|
|
624
634
|
},
|
|
625
635
|
"complexType": {
|
|
626
636
|
"original": "{\n value: string;\n }",
|
|
@@ -665,25 +675,25 @@ export class TdsSlider {
|
|
|
665
675
|
"passive": false
|
|
666
676
|
}, {
|
|
667
677
|
"name": "mouseup",
|
|
668
|
-
"method": "
|
|
678
|
+
"method": "handleRelease",
|
|
669
679
|
"target": "window",
|
|
670
680
|
"capture": false,
|
|
671
681
|
"passive": true
|
|
672
682
|
}, {
|
|
673
683
|
"name": "touchend",
|
|
674
|
-
"method": "
|
|
684
|
+
"method": "handleRelease",
|
|
675
685
|
"target": "window",
|
|
676
686
|
"capture": false,
|
|
677
687
|
"passive": true
|
|
678
688
|
}, {
|
|
679
689
|
"name": "mousemove",
|
|
680
|
-
"method": "
|
|
690
|
+
"method": "handleMove",
|
|
681
691
|
"target": "window",
|
|
682
692
|
"capture": false,
|
|
683
693
|
"passive": true
|
|
684
694
|
}, {
|
|
685
695
|
"name": "touchmove",
|
|
686
|
-
"method": "
|
|
696
|
+
"method": "handleMove",
|
|
687
697
|
"target": "window",
|
|
688
698
|
"capture": false,
|
|
689
699
|
"passive": true
|
|
@@ -175,7 +175,7 @@ export class TdsStepper {
|
|
|
175
175
|
"references": {
|
|
176
176
|
"InternalTdsStepperPropChange": {
|
|
177
177
|
"location": "local",
|
|
178
|
-
"path": "/
|
|
178
|
+
"path": "/Users/johnny/dev/scania/tegel/packages/core/src/components/stepper/stepper.tsx",
|
|
179
179
|
"id": "src/components/stepper/stepper.tsx::InternalTdsStepperPropChange"
|
|
180
180
|
}
|
|
181
181
|
}
|
|
@@ -255,7 +255,7 @@ export class TdsTable {
|
|
|
255
255
|
"references": {
|
|
256
256
|
"InternalTdsTablePropChange": {
|
|
257
257
|
"location": "local",
|
|
258
|
-
"path": "/
|
|
258
|
+
"path": "/Users/johnny/dev/scania/tegel/packages/core/src/components/table/table/table.tsx",
|
|
259
259
|
"id": "src/components/table/table/table.tsx::InternalTdsTablePropChange"
|
|
260
260
|
}
|
|
261
261
|
}
|
|
@@ -12,6 +12,7 @@ export class TdsTableBodyCell {
|
|
|
12
12
|
this.cellValue = undefined;
|
|
13
13
|
this.cellKey = undefined;
|
|
14
14
|
this.disablePadding = false;
|
|
15
|
+
this.textAlign = undefined;
|
|
15
16
|
this.textAlignState = undefined;
|
|
16
17
|
this.activeSorting = false;
|
|
17
18
|
this.verticalDividers = false;
|
|
@@ -44,7 +45,14 @@ export class TdsTableBodyCell {
|
|
|
44
45
|
const [receivedID, receivedKey, receivedTextAlign] = event.detail;
|
|
45
46
|
if (this.tableId === receivedID) {
|
|
46
47
|
if (this.cellKey === receivedKey) {
|
|
47
|
-
this.
|
|
48
|
+
if (this.textAlign) {
|
|
49
|
+
this.textAlignState = this.textAlign;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.textAlignState = ['left', 'start', 'center', 'right', 'end'].includes(receivedTextAlign)
|
|
53
|
+
? receivedTextAlign
|
|
54
|
+
: 'left';
|
|
55
|
+
}
|
|
48
56
|
}
|
|
49
57
|
}
|
|
50
58
|
}
|
|
@@ -56,16 +64,19 @@ export class TdsTableBodyCell {
|
|
|
56
64
|
relevantTableProps.forEach((tablePropName) => {
|
|
57
65
|
this[tablePropName] = this.tableEl[tablePropName];
|
|
58
66
|
});
|
|
67
|
+
if (this.textAlign) {
|
|
68
|
+
this.textAlignState = this.textAlign;
|
|
69
|
+
}
|
|
59
70
|
}
|
|
60
71
|
render() {
|
|
61
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: '76284c19457074e04686323e0ae010a0a0511066', class: {
|
|
62
73
|
'tds-table__body-cell': true,
|
|
63
74
|
'tds-table__body-cell--hover': this.activeSorting,
|
|
64
75
|
'tds-table__compact': this.compactDesign,
|
|
65
76
|
'tds-table--divider': this.verticalDividers,
|
|
66
77
|
'tds-table--no-min-width': this.noMinWidth,
|
|
67
78
|
'tds-table__body-cell--no-padding': this.disablePadding,
|
|
68
|
-
}, style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", { key: '
|
|
79
|
+
}, style: { textAlign: this.textAlignState } }, this.cellValue, h("slot", { key: '41cfdbf142362f1dd298ed9f4c622775d543b64b' })));
|
|
69
80
|
}
|
|
70
81
|
static get is() { return "tds-body-cell"; }
|
|
71
82
|
static get encapsulation() { return "shadow"; }
|
|
@@ -132,6 +143,23 @@ export class TdsTableBodyCell {
|
|
|
132
143
|
"attribute": "disable-padding",
|
|
133
144
|
"reflect": true,
|
|
134
145
|
"defaultValue": "false"
|
|
146
|
+
},
|
|
147
|
+
"textAlign": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "'left' | 'start' | 'right' | 'end' | 'center'",
|
|
152
|
+
"resolved": "\"center\" | \"end\" | \"left\" | \"right\" | \"start\"",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": false,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "Setting for text align, default value \"left\". Other accepted values are \"left\", \"start\", \"right\", \"end\" or \"center\"."
|
|
160
|
+
},
|
|
161
|
+
"attribute": "text-align",
|
|
162
|
+
"reflect": true
|
|
135
163
|
}
|
|
136
164
|
};
|
|
137
165
|
}
|