@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
|
@@ -29,12 +29,8 @@ const TdsHeaderLauncher$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLaun
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
componentDidLoad() {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const hasListTypeMenu = slottedElements.some((element) => element.tagName.toLowerCase() === 'tds-header-launcher-list');
|
|
35
|
-
if (hasListTypeMenu) {
|
|
36
|
-
this.hasListTypeMenu = true;
|
|
37
|
-
}
|
|
32
|
+
const hasListTypeMenu = !!this.host.querySelector('tds-header-launcher-list');
|
|
33
|
+
this.hasListTypeMenu = hasListTypeMenu;
|
|
38
34
|
}
|
|
39
35
|
toggleLauncher() {
|
|
40
36
|
this.open = !this.open;
|
|
@@ -46,11 +42,11 @@ const TdsHeaderLauncher$1 = /*@__PURE__*/ proxyCustomElement(class TdsHeaderLaun
|
|
|
46
42
|
}, 'ref': (el) => {
|
|
47
43
|
this.buttonEl = el;
|
|
48
44
|
} });
|
|
49
|
-
return (h(Host, { key: '
|
|
45
|
+
return (h(Host, { key: '337abddb77f5d7b2ce7c1a8bcfe2dd5e60cc934c' }, h("div", { key: '3652f71bd52be2fcbae7bfde3dab0b0c1c0c5d56', class: {
|
|
50
46
|
'wrapper': true,
|
|
51
47
|
'state-open': this.open,
|
|
52
48
|
'state-list-type-menu': this.hasListTypeMenu,
|
|
53
|
-
} }, h("tds-header-launcher-button", Object.assign({ key: '
|
|
49
|
+
} }, 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: [
|
|
54
50
|
{
|
|
55
51
|
name: 'flip',
|
|
56
52
|
options: {
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { h as hasSlot } from './hasSlot.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
4
|
|
|
5
|
-
const modalCss = ":root,.tds-mode-light{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-white);--tds-modal-text:var(--tds-grey-958);--tds-modal-icon:var(--tds-black);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='black'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-mode-dark{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-grey-900);--tds-modal-text:var(--tds-grey-50);--tds-modal-icon:var(--tds-white);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='white'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-modal{box-sizing:border-box;background-color:var(--tds-modal-background);margin:auto;position:relative;border-radius:4px;
|
|
5
|
+
const modalCss = ":root,.tds-mode-light{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-white);--tds-modal-text:var(--tds-grey-958);--tds-modal-icon:var(--tds-black);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='black'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-mode-dark{--tds-modal-backdrop:rgba(0 0 0 / 40%);--tds-modal-background:var(--tds-grey-900);--tds-modal-text:var(--tds-grey-50);--tds-modal-icon:var(--tds-white);--tds-modal-icon-native:url(\"data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.40338 2.34308C3.11048 2.05019 2.63561 2.05019 2.34272 2.34308C2.04982 2.63598 2.04982 3.11085 2.34272 3.40374L6.93897 8L2.34283 12.5961C2.04994 12.889 2.04994 13.3639 2.34283 13.6568C2.63572 13.9497 3.1106 13.9497 3.40349 13.6568L7.99963 9.06066L12.5958 13.6568C12.8887 13.9497 13.3635 13.9497 13.6564 13.6568C13.9493 13.3639 13.9493 12.889 13.6564 12.5961L9.06029 8L13.6565 3.40376C13.9494 3.11086 13.9494 2.63599 13.6565 2.3431C13.3636 2.0502 12.8888 2.0502 12.5959 2.3431L7.99963 6.93934L3.40338 2.34308Z' fill='white'/%3E%3C/svg%3E%0A\");--tds-modal-scrollbar:var(--tds-grey-300);--tds-modal-scrollbar-track:var(--tds-grey-300);--tds-modal-scrollbar-thumb:var(--tds-grey-500)}.tds-modal{box-sizing:border-box;background-color:var(--tds-modal-background);margin:auto;position:relative;border-radius:4px;max-height:85vh;overflow-y:auto;pointer-events:auto;}.tds-modal *{box-sizing:border-box}.tds-modal::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-track{background-color:var(--tds-grey-300);border-radius:0 1em 1em 0}.tds-modal::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500);border-radius:0 1em 1em 0}.tds-modal__actions-sticky{overflow:hidden;display:flex;flex-direction:column}.tds-modal__actions-sticky .body{font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);max-height:calc(85vh - 36px);overflow-y:auto}.tds-modal__actions-sticky slot[name=actions]{bottom:-1px;left:0;right:0;background-color:var(--tds-modal-background);padding:var(--tds-spacing-element-24) var(--tds-spacing-element-16) var(--tds-spacing-element-16);display:flex;gap:16px}.tds-modal__actions-static slot[name=actions]{background-color:var(--tds-modal-background);display:flex;gap:16px;padding:24px 16px 16px}@media (min-width: 320px){.tds-modal-xs{width:100%}.tds-modal-sm{width:100%}.tds-modal-md{width:100%}.tds-modal-lg{width:100%}}@media (min-width: 672px){.tds-modal-xs{width:50%}.tds-modal-sm{width:62.5%}.tds-modal-md{width:75%}.tds-modal-lg{width:100%}}@media (min-width: 1056px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:43.75%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1312px){.tds-modal-xs{width:31.25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:62.5%}.tds-modal-lg{width:75%}}@media (min-width: 1584px){.tds-modal-xs{width:25%}.tds-modal-sm{width:37.5%}.tds-modal-md{width:50%}.tds-modal-lg{width:75%}}@media (max-width: 320px){.tds-modal-md,.tds-modal-lg,.tds-modal-sm{height:100%}.tds-modal-md slot[name=actions]::slotted(*),.tds-modal-lg slot[name=actions]::slotted(*),.tds-modal-sm slot[name=actions]::slotted(*){display:flex}}.header{display:flex;padding:var(--tds-spacing-element-16);position:sticky;top:0;background-color:var(--tds-modal-background);z-index:1}.header,slot[name=header]::slotted(*){color:var(--tds-modal-text);font:var(--tds-headline-05) !important;letter-spacing:var(--tds-headline-05-ls) !important;margin:0;flex:1}.body{color:var(--tds-modal-text);font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls);overflow-y:visible;padding:0 var(--tds-spacing-element-16) var(--tds-spacing-element-16);}.body::-webkit-scrollbar{width:5px;background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-track{background-color:var(--tds-grey-300)}.body::-webkit-scrollbar-thumb{background-color:var(--tds-grey-500)}.tds-modal-backdrop{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--tds-modal-backdrop);pointer-events:auto}.tds-modal-backdrop *{box-sizing:border-box}button.tds-modal-close{margin:0 0 auto auto;background-color:transparent;border:0;padding:0;appearance:unset}.tds-modal-close{display:inline-block;height:auto;color:var(--tds-modal-icon);cursor:pointer}.tds-modal-close:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}@media (min-width: 320px){.tds-modal-close{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn{display:inline-block;height:auto;background-repeat:no-repeat;cursor:pointer}@media (min-width: 320px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-16)}}@media (min-width: 1056px){.tds-modal-close-btn{margin-left:var(--tds-spacing-element-48)}}.tds-modal-close-btn svg{fill:var(--tds-modal-icon)}.tds-modal-overflow{overflow:hidden}:host{box-sizing:border-box;position:fixed;top:0;right:0;bottom:0;left:0;padding:0 16px;z-index:700;pointer-events:none}:host *{box-sizing:border-box}:host .tds-modal-close{border:none;background-color:transparent}:host .tds-modal-close-btn{border:none;background-color:transparent}@media (max-width: 320px){:host{padding:0}}:host.show{display:flex}:host.hide{display:none}:host(.show){display:flex}:host(.hide){display:none}";
|
|
6
6
|
const TdsModalStyle0 = modalCss;
|
|
7
7
|
|
|
8
8
|
const TdsModal$1 = /*@__PURE__*/ proxyCustomElement(class TdsModal extends HTMLElement {
|
|
@@ -29,17 +29,12 @@ const TdsModal$1 = /*@__PURE__*/ proxyCustomElement(class TdsModal extends HTMLE
|
|
|
29
29
|
this.handleClose(event);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
this.handleShow();
|
|
41
|
-
}
|
|
42
|
-
});
|
|
32
|
+
this.handleReferenceElementClick = (event) => {
|
|
33
|
+
if (this.isShown) {
|
|
34
|
+
this.handleClose(event);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
this.handleShow();
|
|
43
38
|
}
|
|
44
39
|
};
|
|
45
40
|
/** Check if there is a referenceElement or selector and adds event listener to them if so. */
|
|
@@ -52,6 +47,12 @@ const TdsModal$1 = /*@__PURE__*/ proxyCustomElement(class TdsModal extends HTMLE
|
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
49
|
};
|
|
50
|
+
/** Adds an event listener to the reference element that shows/closes the Modal. */
|
|
51
|
+
this.initializeReferenceElement = (referenceEl) => {
|
|
52
|
+
if (referenceEl) {
|
|
53
|
+
referenceEl.addEventListener('click', this.handleReferenceElementClick);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
55
56
|
this.header = undefined;
|
|
56
57
|
this.prevent = false;
|
|
57
58
|
this.size = 'md';
|
|
@@ -73,24 +74,45 @@ const TdsModal$1 = /*@__PURE__*/ proxyCustomElement(class TdsModal extends HTMLE
|
|
|
73
74
|
if (this.show !== undefined) {
|
|
74
75
|
this.isShown = this.show;
|
|
75
76
|
}
|
|
76
|
-
this.
|
|
77
|
-
this.setShowButton();
|
|
77
|
+
this.initializeModal();
|
|
78
78
|
if (this.header && hasSlot('header', this.host)) {
|
|
79
79
|
console.warn("Tegel Modal component: Using both header prop and header slot might break modal's design. Please use just one of them. ");
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
componentWillLoad() {
|
|
83
|
+
this.initializeModal();
|
|
84
|
+
}
|
|
85
|
+
disconnectedCallback() {
|
|
86
|
+
this.cleanupModal();
|
|
87
|
+
}
|
|
88
|
+
/** Initializes or re-initializes the modal, setting up event listeners. */
|
|
89
|
+
async initializeModal() {
|
|
90
|
+
this.setDismissButtons();
|
|
91
|
+
this.setShowButton();
|
|
92
|
+
}
|
|
93
|
+
/** Cleans up event listeners and other resources. */
|
|
94
|
+
async cleanupModal() {
|
|
95
|
+
var _a;
|
|
96
|
+
if (this.selector || this.referenceEl) {
|
|
97
|
+
const referenceEl = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
|
|
98
|
+
if (referenceEl) {
|
|
99
|
+
referenceEl.removeEventListener('click', this.handleReferenceElementClick);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
this.host.querySelectorAll('[data-dismiss-modal]').forEach((dismissButton) => {
|
|
103
|
+
dismissButton.removeEventListener('click', this.handleClose);
|
|
104
|
+
});
|
|
105
|
+
}
|
|
82
106
|
/** Adds an event listener to the dismiss buttons that closes the Modal. */
|
|
83
107
|
setDismissButtons() {
|
|
84
108
|
this.host.querySelectorAll('[data-dismiss-modal]').forEach((dismissButton) => {
|
|
85
|
-
dismissButton.addEventListener('click',
|
|
86
|
-
this.handleClose(event);
|
|
87
|
-
});
|
|
109
|
+
dismissButton.addEventListener('click', this.handleClose);
|
|
88
110
|
});
|
|
89
111
|
}
|
|
90
112
|
render() {
|
|
91
113
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
92
114
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
93
|
-
return (h(Host, { key: '
|
|
115
|
+
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" }))));
|
|
94
116
|
}
|
|
95
117
|
get host() { return this; }
|
|
96
118
|
static get style() { return TdsModalStyle0; }
|
|
@@ -104,7 +126,9 @@ const TdsModal$1 = /*@__PURE__*/ proxyCustomElement(class TdsModal extends HTMLE
|
|
|
104
126
|
"show": [4],
|
|
105
127
|
"isShown": [32],
|
|
106
128
|
"showModal": [64],
|
|
107
|
-
"closeModal": [64]
|
|
129
|
+
"closeModal": [64],
|
|
130
|
+
"initializeModal": [64],
|
|
131
|
+
"cleanupModal": [64]
|
|
108
132
|
}]);
|
|
109
133
|
function defineCustomElement$1() {
|
|
110
134
|
if (typeof customElements === "undefined") {
|
|
@@ -10,6 +10,7 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
10
10
|
super();
|
|
11
11
|
this.__registerHost();
|
|
12
12
|
this.tdsChange = createEvent(this, "tdsChange", 6);
|
|
13
|
+
this.tdsInput = createEvent(this, "tdsInput", 6);
|
|
13
14
|
this.wrapperElement = null;
|
|
14
15
|
this.thumbElement = null;
|
|
15
16
|
this.thumbInnerElement = null;
|
|
@@ -51,41 +52,28 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
51
52
|
case 'ArrowLeft':
|
|
52
53
|
case 'ArrowDown':
|
|
53
54
|
case '-':
|
|
54
|
-
this.stepLeft();
|
|
55
|
+
this.stepLeft(event);
|
|
55
56
|
break;
|
|
56
57
|
case 'ArrowRight':
|
|
57
58
|
case 'ArrowUp':
|
|
58
59
|
case '+':
|
|
59
|
-
this.stepRight();
|
|
60
|
+
this.stepRight(event);
|
|
60
61
|
break;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
handleRelease(event) {
|
|
64
65
|
if (!this.thumbGrabbed) {
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
68
|
this.thumbGrabbed = false;
|
|
68
69
|
this.thumbInnerElement.classList.remove('pressed');
|
|
69
|
-
this.updateValue();
|
|
70
|
+
this.updateValue(event);
|
|
70
71
|
this.trackElement.focus();
|
|
71
72
|
}
|
|
72
|
-
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
this.thumbGrabbed = false;
|
|
77
|
-
this.thumbInnerElement.classList.remove('pressed');
|
|
78
|
-
this.updateValue();
|
|
79
|
-
this.trackElement.focus();
|
|
80
|
-
}
|
|
81
|
-
handleMouseMove(event) {
|
|
82
|
-
if (!this.thumbGrabbed) {
|
|
83
|
-
return;
|
|
73
|
+
handleMove(event) {
|
|
74
|
+
if (event.type === 'touchmove') {
|
|
75
|
+
event.preventDefault();
|
|
84
76
|
}
|
|
85
|
-
this.thumbCore(event);
|
|
86
|
-
}
|
|
87
|
-
handleTouchMove(event) {
|
|
88
|
-
event.preventDefault();
|
|
89
77
|
if (!this.thumbGrabbed) {
|
|
90
78
|
return;
|
|
91
79
|
}
|
|
@@ -132,14 +120,14 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
132
120
|
}
|
|
133
121
|
this.thumbLeft = this.constrainThumb(localLeft);
|
|
134
122
|
this.thumbElement.style.left = `${this.thumbLeft}px`;
|
|
135
|
-
this.updateValue();
|
|
123
|
+
this.updateValue(event);
|
|
136
124
|
}
|
|
137
125
|
updateTrack() {
|
|
138
126
|
const trackWidth = this.getTrackWidth();
|
|
139
127
|
const percentageFilled = (this.thumbLeft / trackWidth) * 100;
|
|
140
128
|
this.trackFillElement.style.width = `${percentageFilled}%`;
|
|
141
129
|
}
|
|
142
|
-
updateValue() {
|
|
130
|
+
updateValue(event) {
|
|
143
131
|
const trackWidth = this.getTrackWidth();
|
|
144
132
|
const numTicks = parseInt(this.ticks);
|
|
145
133
|
/* if snapping (supposedValueSlot > 0) is enabled, make sure we display the supposed value (instead of maybe getting a -1/+1 depending on rounding) */
|
|
@@ -153,7 +141,11 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
153
141
|
this.value = `${Math.trunc(parseFloat(this.min) + percentage * (parseFloat(this.max) - parseFloat(this.min)))}`;
|
|
154
142
|
}
|
|
155
143
|
this.updateTrack();
|
|
156
|
-
this.
|
|
144
|
+
this.tdsInput.emit({ value: this.value });
|
|
145
|
+
/* Emit event after user has finished dragging the thumb */
|
|
146
|
+
if (event.type === 'touchend' || event.type === 'mouseup') {
|
|
147
|
+
this.tdsChange.emit({ value: this.value });
|
|
148
|
+
}
|
|
157
149
|
}
|
|
158
150
|
forceValueUpdate(newValue) {
|
|
159
151
|
this.calculateThumbLeftFromValue(newValue);
|
|
@@ -189,6 +181,10 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
189
181
|
updateSliderValueOnInputChange(event) {
|
|
190
182
|
const inputElement = event.target;
|
|
191
183
|
let newValue = parseInt(inputElement.value);
|
|
184
|
+
// Check if the new value is different from the current value
|
|
185
|
+
if (newValue === parseInt(this.value)) {
|
|
186
|
+
return; // Exit the function if the new value is the same as the current value
|
|
187
|
+
}
|
|
192
188
|
if (newValue < parseFloat(this.min)) {
|
|
193
189
|
newValue = parseFloat(this.min);
|
|
194
190
|
}
|
|
@@ -216,7 +212,7 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
216
212
|
calculateInputSizeFromMax() {
|
|
217
213
|
return this.max.length;
|
|
218
214
|
}
|
|
219
|
-
controlsStep(delta) {
|
|
215
|
+
controlsStep(delta, event) {
|
|
220
216
|
if (this.readOnly || this.disabled) {
|
|
221
217
|
return;
|
|
222
218
|
}
|
|
@@ -231,7 +227,7 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
231
227
|
else if (this.supposedValueSlot > numTicks + 1) {
|
|
232
228
|
this.supposedValueSlot = numTicks + 1;
|
|
233
229
|
}
|
|
234
|
-
this.updateValue();
|
|
230
|
+
this.updateValue(event);
|
|
235
231
|
}
|
|
236
232
|
else {
|
|
237
233
|
const trackWidth = this.getTrackWidth();
|
|
@@ -249,11 +245,11 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
249
245
|
this.forceValueUpdate(this.value);
|
|
250
246
|
}
|
|
251
247
|
}
|
|
252
|
-
stepLeft() {
|
|
253
|
-
this.controlsStep(-parseInt(this.step));
|
|
248
|
+
stepLeft(event) {
|
|
249
|
+
this.controlsStep(-parseInt(this.step), event);
|
|
254
250
|
}
|
|
255
|
-
stepRight() {
|
|
256
|
-
this.controlsStep(parseInt(this.step));
|
|
251
|
+
stepRight(event) {
|
|
252
|
+
this.controlsStep(parseInt(this.step), event);
|
|
257
253
|
}
|
|
258
254
|
componentWillLoad() {
|
|
259
255
|
const numTicks = parseInt(this.ticks);
|
|
@@ -295,24 +291,24 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
295
291
|
this.updateTrack();
|
|
296
292
|
}
|
|
297
293
|
render() {
|
|
298
|
-
return (h("div", { key: '
|
|
294
|
+
return (h("div", { key: 'bf3ca081d01c6eac5907fe1ebef8ae5f14fa87da', class: {
|
|
299
295
|
'tds-slider-wrapper': true,
|
|
300
296
|
'read-only': this.readOnly,
|
|
301
|
-
} }, h("input", { key: '
|
|
297
|
+
} }, 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: {
|
|
302
298
|
'tds-slider': true,
|
|
303
299
|
'disabled': this.disabled,
|
|
304
300
|
'tds-slider-small': this.useSmall,
|
|
305
301
|
}, ref: (el) => {
|
|
306
302
|
this.wrapperElement = el;
|
|
307
|
-
} }, h("label", { key: '
|
|
303
|
+
} }, 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) => {
|
|
308
304
|
this.trackElement = el;
|
|
309
|
-
}, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: '
|
|
305
|
+
}, tabindex: this.disabled ? '-1' : '0' }, h("div", { key: 'd12fc549e7e503865fd3a1505c4a51476d769908', class: "tds-slider__track-fill", ref: (el) => {
|
|
310
306
|
this.trackFillElement = el;
|
|
311
|
-
} }), h("div", { key: '
|
|
307
|
+
} }), h("div", { key: 'ecc291e9e4aeb3c813f866e3a58615184ef21c35', class: "tds-slider__thumb", ref: (el) => {
|
|
312
308
|
this.thumbElement = el;
|
|
313
|
-
}, 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: '
|
|
309
|
+
}, 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) => {
|
|
314
310
|
this.thumbInnerElement = el;
|
|
315
|
-
} })))), 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" })))))));
|
|
311
|
+
} })))), 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" })))))));
|
|
316
312
|
}
|
|
317
313
|
static get watchers() { return {
|
|
318
314
|
"value": ["handleValueUpdate"]
|
|
@@ -336,7 +332,7 @@ const TdsSlider$1 = /*@__PURE__*/ proxyCustomElement(class TdsSlider extends HTM
|
|
|
336
332
|
"snap": [4],
|
|
337
333
|
"sliderId": [1, "slider-id"],
|
|
338
334
|
"reset": [64]
|
|
339
|
-
}, [[0, "keydown", "handleKeydown"], [9, "mouseup", "
|
|
335
|
+
}, [[0, "keydown", "handleKeydown"], [9, "mouseup", "handleRelease"], [9, "touchend", "handleRelease"], [9, "mousemove", "handleMove"], [9, "touchmove", "handleMove"]], {
|
|
340
336
|
"value": ["handleValueUpdate"]
|
|
341
337
|
}]);
|
|
342
338
|
function defineCustomElement$1() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
-
const tableBodyRowExpandableCss = ":host{box-sizing:border-box;display:contents}:host *{box-sizing:border-box}:host .tds-table__row,:host .tds-table__row-extend{display:table-row;border-bottom:1px solid var(--tds-table-divider);background-color:var(--tds-table-body-row-background);transition:background-color 200ms ease;color:var(--tds-table-color)}:host .tds-table__row:hover,:host .tds-table__row-extend:hover{background-color:var(--tds-table-body-row-background-hover)}:host .tds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:46px;cursor:pointer;padding:0 16px;position:relative}:host .tds-table__expand-control-container .tds-table__expand-input{all:unset;top:0;left:0;width:100%;height:100%;position:absolute;cursor:pointer}:host .tds-table__expand-control-container .tds-table__expand-input:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .tds-table__expand-control-container .tds-expendable-row-icon{height:16px;width:16px;transition:transform 200ms ease;transform:rotate(0)}:host .tds-table__row-expand{display:none;transition:background-color 200ms ease}:host .tds-table__row-expand .tds-table__cell-expand{padding:16px 16px 16px 66px;color:var(--tds-table-color)}:host(.tds-table__row-expand--active) .tds-table__row{background-color:var(--tds-table-body-row-background-selected)}:host(.tds-table__row-expand--active) .tds-table__expand-control-container .tds-expendable-row-icon{transform:rotate(180deg)}:host(.tds-table__row-expand--active) .tds-table__row-expand{background-color:var(--tds-table-body-row-background-selected);display:table-row}:host(.tds-table__compact) .tds-table__expand-control-container{height:30px}:host(.tds-table__compact) .tds-table__row-expand .tds-table__cell-expand{padding:8px 16px 8px 66px}:host(.tds-table__row--hidden){display:none}:host(.tds-table--divider) .tds-table__cell--expand{border-right:1px solid var(--tds-table-divider)}";
|
|
3
|
+
const tableBodyRowExpandableCss = ":host{box-sizing:border-box;display:contents}:host *{box-sizing:border-box}:host .tds-table__row,:host .tds-table__row-extend{display:table-row;border-bottom:1px solid var(--tds-table-divider);background-color:var(--tds-table-body-row-background);transition:background-color 200ms ease;color:var(--tds-table-color)}:host .tds-table__row--expanded{border-bottom:none}:host .tds-table__row:hover,:host .tds-table__row-extend:hover{background-color:var(--tds-table-body-row-background-hover)}:host .tds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:46px;cursor:pointer;padding:0 16px;position:relative}:host .tds-table__expand-control-container .tds-table__expand-input{all:unset;top:0;left:0;width:100%;height:100%;position:absolute;cursor:pointer}:host .tds-table__expand-control-container .tds-table__expand-input:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .tds-table__expand-control-container .tds-expendable-row-icon{height:16px;width:16px;transition:transform 200ms ease;transform:rotate(0)}:host .tds-table__row-expand{display:none;transition:background-color 200ms ease}:host .tds-table__row-expand--expanded{border-bottom:1px solid var(--tds-table-divider)}:host .tds-table__row-expand .tds-table__cell-expand{padding:16px 16px 16px 66px;color:var(--tds-table-color)}:host(.tds-table__row-expand--active) .tds-table__row{background-color:var(--tds-table-body-row-background-selected)}:host(.tds-table__row-expand--active) .tds-table__expand-control-container .tds-expendable-row-icon{transform:rotate(180deg)}:host(.tds-table__row-expand--active) .tds-table__row-expand{background-color:var(--tds-table-body-row-background-selected);display:table-row}:host(.tds-table__compact) .tds-table__expand-control-container{height:30px}:host(.tds-table__compact) .tds-table__row-expand .tds-table__cell-expand{padding:8px 16px 8px 66px}:host(.tds-table__row--hidden){display:none}:host(.tds-table--divider) .tds-table__cell--expand{border-right:1px solid var(--tds-table-divider)}";
|
|
4
4
|
const TdsTableBodyRowExpandableStyle0 = tableBodyRowExpandableCss;
|
|
5
5
|
|
|
6
6
|
const relevantTableProps = [
|
|
@@ -66,7 +66,13 @@ const TdsTableBodyRowExpandable$1 = /*@__PURE__*/ proxyCustomElement(class TdsTa
|
|
|
66
66
|
'tds-table__row-expand--active': this.isExpanded,
|
|
67
67
|
'tds-table__compact': this.compactDesign,
|
|
68
68
|
'tds-table--divider': this.verticalDividers,
|
|
69
|
-
} }, h("tr", { key: '
|
|
69
|
+
} }, h("tr", { key: 'c9cf04c118f2b673a09959dece24b06d21cdf640', class: {
|
|
70
|
+
'tds-table__row': true,
|
|
71
|
+
'tds-table__row--expanded': this.isExpanded,
|
|
72
|
+
} }, h("td", { key: '6b16a052a399b5d2ea7a4453552eb1e71f7a2041', class: "tds-table__cell tds-table__cell--expand" }, h("label", { key: 'd9cc4607a1444127cefe58c6fbe433a410d51e91', class: "tds-table__expand-control-container" }, h("input", { key: 'dcf0a28c1cea3003cdf22d2c183c604a944e5e61', class: "tds-table__expand-input", type: "checkbox", onChange: (event) => this.onChangeHandler(event), checked: this.isExpanded }), h("span", { key: 'a28d1acd69d6c760790c7cd30325053711d27bc9', class: "tds-expendable-row-icon" }, h("svg", { key: '856b07328c10897097aba2fae76b659015be91dd', fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { key: '3dcbb08f11f7e83d5717364cc72d90f1fa973404', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M4.273 9.783a1 1 0 0 1 1.415 0l9.888 9.888a.6.6 0 0 0 .848 0l9.888-9.888a1 1 0 1 1 1.415 1.414l-9.889 9.889a2.6 2.6 0 0 1-3.677 0l-9.888-9.889a1 1 0 0 1 0-1.414Z", fill: "currentColor" }))))), h("slot", { key: '4121dfa2d04cc947261c14cb5745423eea6f042d' })), h("tr", { key: '6665c1c224fcf276afa56ff8b5433054c99bae84', class: {
|
|
73
|
+
'tds-table__row-expand': true,
|
|
74
|
+
'tds-table__row-expand--expanded': this.isExpanded,
|
|
75
|
+
} }, h("td", { key: '359babd8f869aa9f98c88968f0b7f69952910129', class: "tds-table__cell-expand", colSpan: this.columnsNumber }, h("slot", { key: 'bf5c3571bb6bc09afae0a01872e4c2922827da48', name: "expand-row" })))));
|
|
70
76
|
}
|
|
71
77
|
get host() { return this; }
|
|
72
78
|
static get style() { return TdsTableBodyRowExpandableStyle0; }
|
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/i
|
|
|
2
2
|
import { h as hasSlot } from './hasSlot.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
4
4
|
|
|
5
|
-
const textFieldCss = ".text-field-input-lg.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-20) var(--tds-spacing-element-16)}.text-field-input-lg.sc-tds-text-field::placeholder{color:var(--tds-text-field-color)}.text-field-input-lg.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-lg.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-lg.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-lg.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-md.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-md.sc-tds-text-field::placeholder{color:var(--tds-text-field-color)}.text-field-input-md.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-md.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-md.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-md.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-sm.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-sm.sc-tds-text-field::placeholder{color:var(--tds-text-field-color)}.text-field-input-sm.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-sm.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-sm.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-sm.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-container.sc-tds-text-field{border-radius:4px 4px 0 0;display:flex;position:relative;height:56px;box-sizing:border-box;background-color:var(--tds-text-field-background);border-bottom:1px solid var(--tds-text-field-border-bottom);transition:border-bottom-color 200ms ease}.text-field-container.sc-tds-text-field:hover{border-bottom-color:var(--tds-text-field-border-bottom-hover)}.form-text-field-md.sc-tds-text-field .text-field-container.sc-tds-text-field{height:48px}.form-text-field-sm.sc-tds-text-field .text-field-container.sc-tds-text-field{height:40px}.text-field-input-container.sc-tds-text-field{position:relative;width:100%}.text-field-data.sc-tds-text-field,.text-field-input.sc-tds-text-field{color:var(--tds-text-field-data-color)}.text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:block;margin-bottom:var(--tds-spacing-element-8);color:var(--tds-text-field-label-color)}.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);position:absolute;pointer-events:none;color:var(--tds-text-field-label-inside-color);left:16px}.form-text-field.sc-tds-text-field{display:block;min-width:208px}.form-text-field-nomin.sc-tds-text-field{min-width:auto}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field{padding-top:var(--tds-spacing-element-24);padding-bottom:15px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:20px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:12px}.text-field-bar.sc-tds-text-field{position:absolute;width:100%}.text-field-bar.sc-tds-text-field::before,.text-field-bar.sc-tds-text-field::after{content:\"\";height:2px;top:54px;width:0;position:absolute;background:var(--tds-text-field-bar);transition:0.35s ease all}.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:46px}.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:40px}.text-field-bar.sc-tds-text-field::before{left:50%}.text-field-bar.sc-tds-text-field::after{right:50%}.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{width:50%}.text-field-helper.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;gap:8px;justify-content:space-between;flex-basis:100%;padding-top:var(--tds-spacing-element-4);color:var(--tds-text-field-helper)}.text-field-helper.sc-tds-text-field .text-field-textcounter.sc-tds-text-field{margin-left:auto}.form-text-field-disabled.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:transparent}.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-prefix.sc-tds-text-field>*.sc-tds-text-field,.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-suffix.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-ps-color-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-icon__readonly.sc-tds-text-field{display:none;position:absolute;right:18px;top:18px;color:var(--tds-text-field-icon-read-only-label-color)}.text-field-icon__readonly-label.sc-tds-text-field{display:none;position:absolute;right:18px;top:48px;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);padding:8px;white-space:nowrap;border-radius:4px 0 4px 4px;background-color:var(--tds-text-field-icon-read-only-label-background)}.form-text-field-readonly.sc-tds-text-field{pointer-events:none}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field:hover~.text-field-icon__readonly-label.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-input.sc-tds-text-field{padding-right:54px;background-color:transparent}.form-text-field-success.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-success)}.form-text-field-error.sc-tds-text-field .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-error)}.form-text-field-error.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-error)}.form-text-field-error.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-error.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{background:var(--tds-text-field-bar-error)}.text-field-helper-error-state.sc-tds-text-field{display:flex;gap:8px;flex-wrap:nowrap}.text-field-textcounter.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-text-field-textcounter);float:right}.text-field-textcounter.sc-tds-text-field .text-field-textcounter-divider.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider)}.text-field-slot-wrap-prefix.sc-tds-text-field,.text-field-slot-wrap-suffix.sc-tds-text-field{align-self:center;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);margin:0 0 0 14px;color:var(--tds-text-field-ps-color)}.text-field-slot-wrap-prefix.sc-tds-text-field-s>:not(tds-icon),.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 0 0 2px}.text-field-slot-wrap-prefix.text-field-error.sc-tds-text-field,.text-field-slot-wrap-suffix.text-field-error.sc-tds-text-field{color:var(--tds-text-field-ps-color-error)}.text-field-slot-wrap-suffix.sc-tds-text-field{margin:0 14px 0 0}.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 2px 0 0}";
|
|
5
|
+
const textFieldCss = ".text-field-input-lg.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-20) var(--tds-spacing-element-16)}.text-field-input-lg.sc-tds-text-field::placeholder{color:var(--tds-text-field-color)}.text-field-input-lg.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-lg.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-lg.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-lg.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-md.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-md.sc-tds-text-field::placeholder{color:var(--tds-text-field-color)}.text-field-input-md.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-md.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-md.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-md.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-sm.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-sm.sc-tds-text-field::placeholder{color:var(--tds-text-field-color)}.text-field-input-sm.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-sm.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-sm.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-sm.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-container.sc-tds-text-field{border-radius:4px 4px 0 0;display:flex;position:relative;height:56px;box-sizing:border-box;background-color:var(--tds-text-field-background);border-bottom:1px solid var(--tds-text-field-border-bottom);transition:border-bottom-color 200ms ease}.text-field-container.sc-tds-text-field:hover{border-bottom-color:var(--tds-text-field-border-bottom-hover)}.form-text-field-md.sc-tds-text-field .text-field-container.sc-tds-text-field{height:48px}.form-text-field-sm.sc-tds-text-field .text-field-container.sc-tds-text-field{height:40px}.text-field-input-container.sc-tds-text-field{position:relative;width:100%}.text-field-data.sc-tds-text-field,.text-field-input.sc-tds-text-field{color:var(--tds-text-field-data-color)}.text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:block;margin-bottom:var(--tds-spacing-element-8);color:var(--tds-text-field-label-color)}.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);position:absolute;pointer-events:none;color:var(--tds-text-field-label-inside-color);left:16px}.form-text-field.sc-tds-text-field{display:block;min-width:208px}.form-text-field-nomin.sc-tds-text-field{min-width:auto}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field{padding-top:var(--tds-spacing-element-24);padding-bottom:15px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:20px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:12px}.text-field-bar.sc-tds-text-field{position:absolute;width:100%}.text-field-bar.sc-tds-text-field::before,.text-field-bar.sc-tds-text-field::after{content:\"\";height:2px;top:54px;width:0;position:absolute;background:var(--tds-text-field-bar);transition:0.35s ease all}.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:46px}.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:40px}.text-field-bar.sc-tds-text-field::before{left:50%}.text-field-bar.sc-tds-text-field::after{right:50%}.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{width:50%}.text-field-helper.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;gap:8px;justify-content:space-between;flex-basis:100%;padding-top:var(--tds-spacing-element-4);color:var(--tds-text-field-helper)}.text-field-helper.sc-tds-text-field .text-field-textcounter.sc-tds-text-field{margin-left:auto}.form-text-field-disabled.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:transparent}.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-prefix.sc-tds-text-field>*.sc-tds-text-field,.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-suffix.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-ps-color-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-icon__readonly.sc-tds-text-field{display:none;position:absolute;right:18px;top:50%;transform:translateY(-50%);color:var(--tds-text-field-icon-read-only-label-color)}.text-field-icon__readonly-label.sc-tds-text-field{display:none;position:absolute;right:18px;top:48px;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);padding:8px;white-space:nowrap;border-radius:4px 0 4px 4px;background-color:var(--tds-text-field-icon-read-only-label-background)}.form-text-field-readonly.sc-tds-text-field{pointer-events:none}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field:hover~.text-field-icon__readonly-label.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-input.sc-tds-text-field{padding-right:54px;background-color:transparent}.form-text-field-success.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-success)}.form-text-field-error.sc-tds-text-field .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-error)}.form-text-field-error.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-error)}.form-text-field-error.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-error.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{background:var(--tds-text-field-bar-error)}.text-field-helper-error-state.sc-tds-text-field{display:flex;gap:8px;flex-wrap:nowrap}.text-field-textcounter.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-text-field-textcounter);float:right}.text-field-textcounter.sc-tds-text-field .text-field-textcounter-divider.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider)}.text-field-slot-wrap-prefix.sc-tds-text-field,.text-field-slot-wrap-suffix.sc-tds-text-field{align-self:center;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);margin:0 0 0 14px;color:var(--tds-text-field-ps-color)}.text-field-slot-wrap-prefix.sc-tds-text-field-s>:not(tds-icon),.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 0 0 2px}.text-field-slot-wrap-prefix.text-field-error.sc-tds-text-field,.text-field-slot-wrap-suffix.text-field-error.sc-tds-text-field{color:var(--tds-text-field-ps-color-error)}.text-field-slot-wrap-suffix.sc-tds-text-field{margin:0 14px 0 0}.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 2px 0 0}";
|
|
6
6
|
const TdsTextFieldStyle0 = textFieldCss;
|
|
7
7
|
|
|
8
8
|
const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField extends HTMLElement {
|
|
@@ -37,8 +37,8 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
|
|
|
37
37
|
}
|
|
38
38
|
// Data input event in value prop
|
|
39
39
|
handleInput(event) {
|
|
40
|
-
this.tdsInput.emit(event);
|
|
41
40
|
this.value = event.target.value;
|
|
41
|
+
this.tdsInput.emit(event);
|
|
42
42
|
}
|
|
43
43
|
/** Set the input as focus when clicking the whole Text Field with suffix/prefix */
|
|
44
44
|
handleFocus(event) {
|
|
@@ -55,22 +55,31 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
|
|
|
55
55
|
var _a;
|
|
56
56
|
const usesPrefixSlot = hasSlot('prefix', this.host);
|
|
57
57
|
const usesSuffixSlot = hasSlot('suffix', this.host);
|
|
58
|
-
return (h("div", { key: '
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
: ''
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
58
|
+
return (h("div", { key: '2b312cea422545b69a06408597cc8acdb2e1b571', class: {
|
|
59
|
+
'form-text-field-nomin': this.noMinWidth,
|
|
60
|
+
'form-text-field': !this.focusInput || this.disabled,
|
|
61
|
+
'text-field-focus': this.focusInput && !this.disabled,
|
|
62
|
+
'text-field-data': this.value !== '' && this.value !== null,
|
|
63
|
+
'text-field-container-label-inside': this.labelPosition === 'inside' && this.size !== 'sm',
|
|
64
|
+
'form-text-field-disabled': this.disabled,
|
|
65
|
+
'form-text-field-readonly': this.readOnly,
|
|
66
|
+
'tds-mode-variant-primary': this.modeVariant === 'primary',
|
|
67
|
+
'tds-mode-variant-secondary': this.modeVariant === 'secondary',
|
|
68
|
+
'form-text-field-md': this.size === 'md',
|
|
69
|
+
'form-text-field-sm': this.size === 'sm',
|
|
70
|
+
'form-text-field-error': this.state === 'error',
|
|
71
|
+
'form-text-field-success': this.state === 'success',
|
|
72
|
+
} }, 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: {
|
|
73
|
+
'text-field-slot-wrap-prefix': true,
|
|
74
|
+
'text-field-error': this.state === 'error',
|
|
75
|
+
'text-field-success': this.state === 'success',
|
|
76
|
+
'text-field-default': this.state === 'default',
|
|
77
|
+
} }, h("slot", { name: "prefix" }))), h("div", { key: 'aea27bc666bf486c46b9fe07bf0fb7290addf5ad', class: "text-field-input-container" }, h("input", { key: '6b2cb5c19fdac8280806cf70d0ebbc4aefc80e8a', ref: (inputEl) => (this.textInput = inputEl), class: {
|
|
78
|
+
'text-field-input': true,
|
|
79
|
+
'text-field-input-sm': this.size === 'sm',
|
|
80
|
+
'text-field-input-md': this.size === 'md',
|
|
81
|
+
'text-field-input-lg': this.size === 'lg',
|
|
82
|
+
}, 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) => {
|
|
74
83
|
if (!this.readOnly) {
|
|
75
84
|
this.handleFocus(event);
|
|
76
85
|
}
|
|
@@ -78,7 +87,13 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
|
|
|
78
87
|
if (!this.readOnly) {
|
|
79
88
|
this.handleBlur(event);
|
|
80
89
|
}
|
|
81
|
-
} }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { class: "text-field-label-inside" }, this.label))), h("div", { key: '
|
|
90
|
+
} }), 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: {
|
|
91
|
+
'text-field-slot-wrap-suffix': true,
|
|
92
|
+
'text-field-error': this.state === 'error',
|
|
93
|
+
'text-field-success': this.state === 'success',
|
|
94
|
+
'text-field-default': this.state === 'default',
|
|
95
|
+
'tds-u-display-none': this.readOnly,
|
|
96
|
+
} }, 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))))));
|
|
82
97
|
}
|
|
83
98
|
get host() { return this; }
|
|
84
99
|
static get style() { return TdsTextFieldStyle0; }
|
|
@@ -38,8 +38,8 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
|
|
|
38
38
|
}
|
|
39
39
|
// Data input event in value prop
|
|
40
40
|
handleInput(event) {
|
|
41
|
-
this.tdsInput.emit(event);
|
|
42
41
|
this.value = event.target.value;
|
|
42
|
+
this.tdsInput.emit(event);
|
|
43
43
|
}
|
|
44
44
|
/* Set the input as focus when clicking the whole textarea with suffix/prefix */
|
|
45
45
|
handleFocus(event) {
|
|
@@ -3,7 +3,7 @@ import { g as generateUniqueId } from './generateUniqueId.js';
|
|
|
3
3
|
import { h as hasSlot } from './hasSlot.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
5
5
|
|
|
6
|
-
const toastCss = ":host(.hide){display:none;visibility:hidden}:host{z-index:800}:host .wrapper{display:flex;width:348px;background-color:var(--tds-toast-background-color);border-radius:4px}:host .wrapper.information{border-left:4px solid var(--tds-information)}:host .wrapper.information tds-icon{color:var(--tds-information)}:host .wrapper.success{border-left:4px solid var(--tds-positive)}:host .wrapper.success tds-icon{color:var(--tds-positive)}:host .wrapper.error{border-left:4px solid var(--tds-negative)}:host .wrapper.error tds-icon{color:var(--tds-negative)}:host .wrapper.warning{border-left:4px solid var(--tds-warning)}:host .wrapper.warning tds-icon{color:var(--tds-warning)}:host .wrapper button.close{height:20px;width:20px;display:flex;align-items:center;justify-content:center;margin:14px 14px 0
|
|
6
|
+
const toastCss = ":host(.hide){display:none;visibility:hidden}:host{z-index:800}:host .wrapper{display:flex;width:348px;background-color:var(--tds-toast-background-color);border-radius:4px}:host .wrapper.information{border-left:4px solid var(--tds-information)}:host .wrapper.information tds-icon{color:var(--tds-information)}:host .wrapper.success{border-left:4px solid var(--tds-positive)}:host .wrapper.success tds-icon{color:var(--tds-positive)}:host .wrapper.error{border-left:4px solid var(--tds-negative)}:host .wrapper.error tds-icon{color:var(--tds-negative)}:host .wrapper.warning{border-left:4px solid var(--tds-warning)}:host .wrapper.warning tds-icon{color:var(--tds-warning)}:host .wrapper button.close{height:20px;width:20px;display:flex;align-items:center;justify-content:center;margin:14px 14px 0 22px;border:none;background:transparent}:host .wrapper button.close:hover{cursor:pointer}:host .wrapper button.close:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .wrapper button.close tds-icon{color:var(--tds-toast-dissmiss-color);padding:0}:host tds-icon{padding:14px 0 0 12px}:host .content{padding:16px 0 16px 10px;display:flex;flex-direction:column;flex:1;max-width:250px;word-break:break-word}:host .content .header-subheader{display:flex;flex-direction:column;gap:4px}:host .content .header,:host .content slot[name=header]::slotted(*){font:var(--tds-headline-07) !important;letter-spacing:var(--tds-headline-07-ls) !important;color:var(--tds-toast-headline-color)}:host .content .subheader,:host .content slot[name=subheader]::slotted(*){color:var(--tds-toast-subheadline-color);font:var(--tds-detail-02) !important;letter-spacing:var(--tds-detail-02-ls) !important}:host .content .subheader.no-link slot::slotted(*),:host .content slot[name=subheader]::slotted(*).no-link slot::slotted(*){padding-bottom:0}:host .content .toast-bottom{margin-top:12px}:host slot[name=actions]::slotted(*){color:var(--tds-toast-link-color)}:host .tds-mode-variant-primary{--tds-toast-background:var(--tds-toast-background-primary)}:host .tds-mode-variant-secondary{--tds-toast-background:var(--tds-toast-background-secondary)}";
|
|
7
7
|
const TdsToastStyle0 = toastCss;
|
|
8
8
|
|
|
9
9
|
const TdsToast$1 = /*@__PURE__*/ proxyCustomElement(class TdsToast extends HTMLElement {
|
|
@@ -47,6 +47,7 @@ const TdsToast$1 = /*@__PURE__*/ proxyCustomElement(class TdsToast extends HTMLE
|
|
|
47
47
|
this.subheader = undefined;
|
|
48
48
|
this.variant = 'information';
|
|
49
49
|
this.hidden = false;
|
|
50
|
+
this.closable = true;
|
|
50
51
|
this.toastRole = 'alert';
|
|
51
52
|
}
|
|
52
53
|
/** Hides the Toast. */
|
|
@@ -61,14 +62,12 @@ const TdsToast$1 = /*@__PURE__*/ proxyCustomElement(class TdsToast extends HTMLE
|
|
|
61
62
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
62
63
|
const usesSubheaderSlot = hasSlot('subheader', this.host);
|
|
63
64
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
64
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: 'b4a35bad02fc58bae1ec849e9018b47da0471efa', toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
|
|
65
66
|
hide: this.hidden,
|
|
66
67
|
show: !this.hidden,
|
|
67
|
-
} }, h("div", { key: '
|
|
68
|
+
} }, h("div", { key: '302b734e22d80b84ec04378d019476b360913b7a', class: `
|
|
68
69
|
wrapper
|
|
69
|
-
${this.variant}` }, h("tds-icon", { key: '
|
|
70
|
-
this.handleClose();
|
|
71
|
-
}, class: `close` }, h("tds-icon", { key: 'e1ce21f0ef7fb6862f560f153c515296c83d4f57', name: "cross", size: "20px" })))));
|
|
70
|
+
${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" }))))));
|
|
72
71
|
}
|
|
73
72
|
get host() { return this; }
|
|
74
73
|
static get style() { return TdsToastStyle0; }
|
|
@@ -78,6 +77,7 @@ const TdsToast$1 = /*@__PURE__*/ proxyCustomElement(class TdsToast extends HTMLE
|
|
|
78
77
|
"subheader": [1],
|
|
79
78
|
"variant": [1],
|
|
80
79
|
"hidden": [516],
|
|
80
|
+
"closable": [4],
|
|
81
81
|
"toastRole": [1, "toast-role"],
|
|
82
82
|
"hideToast": [64],
|
|
83
83
|
"showToast": [64]
|
|
@@ -33,7 +33,7 @@ const TdsToggle$1 = /*@__PURE__*/ proxyCustomElement(class TdsToggle extends HTM
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h("div", { key: '
|
|
36
|
+
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" }))));
|
|
37
37
|
}
|
|
38
38
|
get host() { return this; }
|
|
39
39
|
static get style() { return TdsToggleStyle0; }
|