@scania/tegel 1.2.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/cjs/{index-f21bdb5d.js → index-705dca7c.js} +184 -95
- package/dist/cjs/loader.cjs.js +2 -2
- 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 +1 -1
- package/dist/cjs/tds-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/tds-breadcrumbs.cjs.entry.js +4 -2
- package/dist/cjs/tds-button.cjs.entry.js +2 -2
- package/dist/cjs/tds-card.cjs.entry.js +1 -1
- package/dist/cjs/tds-checkbox.cjs.entry.js +17 -4
- package/dist/cjs/tds-chip.cjs.entry.js +2 -2
- package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
- package/dist/cjs/tds-datetime.cjs.entry.js +1 -1
- package/dist/cjs/tds-divider.cjs.entry.js +1 -1
- package/dist/cjs/tds-dropdown-option.cjs.entry.js +6 -4
- package/dist/cjs/tds-dropdown.cjs.entry.js +14 -4
- package/dist/cjs/tds-folder-tab.cjs.entry.js +1 -1
- package/dist/cjs/tds-folder-tabs.cjs.entry.js +2 -2
- package/dist/cjs/tds-footer-group.cjs.entry.js +1 -1
- package/dist/cjs/tds-footer-item.cjs.entry.js +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- package/dist/cjs/tds-inline-tabs.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/tds-navigation-tab.cjs.entry.js +2 -2
- package/dist/cjs/tds-navigation-tabs.cjs.entry.js +2 -2
- 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 +61 -105
- package/dist/cjs/tds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tds-step.cjs.entry.js +13 -8
- package/dist/cjs/tds-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-body-row.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-body.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-footer.cjs.entry.js +1 -1
- package/dist/cjs/tds-table-header.cjs.entry.js +4 -2
- 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 +1 -1
- package/dist/cjs/tds-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tds-toast.cjs.entry.js +5 -2
- package/dist/cjs/tds-toggle.cjs.entry.js +1 -1
- package/dist/cjs/tds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/tegel.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/accordion/test/basic/accordion.e2e.js +19 -0
- package/dist/collection/components/accordion/test/disabled/accordion.e2e.js +19 -0
- package/dist/collection/components/accordion/test/expanded/accordion.e2e.js +24 -0
- package/dist/collection/components/accordion/test/padding-reset/accordion.e2e.js +24 -0
- package/dist/collection/components/badge/test/basic/badge.e2e.js +10 -0
- package/dist/collection/components/badge/test/value/badge.e2e.js +11 -0
- package/dist/collection/components/banner/test/basic/banner.e2e.js +10 -0
- package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.css +4 -3
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +3 -1
- package/dist/collection/components/button/button.css +0 -4
- package/dist/collection/components/checkbox/checkbox.css +19 -0
- package/dist/collection/components/checkbox/checkbox.js +39 -5
- package/dist/collection/components/checkbox/checkbox.stories.js +25 -12
- package/dist/collection/components/datetime/datetime.stories.js +2 -2
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.css +26 -16
- package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +4 -2
- package/dist/collection/components/dropdown/dropdown.css +28 -0
- package/dist/collection/components/dropdown/dropdown.js +14 -4
- package/dist/collection/components/footer/footer-item/footer-item.css +4 -6
- package/dist/collection/components/modal/modal.stories.js +3 -3
- package/dist/collection/components/side-menu/side-menu.js +3 -3
- package/dist/collection/components/slider/slider.js +61 -105
- package/dist/collection/components/stepper/step/step.js +13 -8
- 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-component-multiselect.stories.js +18 -2
- package/dist/collection/components/table/table-header/table-header.js +43 -3
- package/dist/collection/components/tabs/folder-tabs/folder-tabs.css +2 -2
- package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.css +0 -1
- package/dist/collection/components/tabs/inline-tabs/inline-tabs.css +2 -2
- package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.css +0 -1
- package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +2 -2
- package/dist/collection/components/text-field/text-field.stories.js +1 -1
- package/dist/collection/components/toast/toast.js +4 -1
- package/dist/collection/components/toast/toast.stories.js +10 -1
- package/dist/collection/stories/Installation/angular.stories.js +111 -0
- package/dist/collection/stories/Installation/javascript.stories.js +99 -0
- package/dist/collection/stories/Installation/react.stories.js +117 -0
- package/dist/collection/stories/announcements/announce-tegel.stories.js +5 -5
- package/dist/collection/stories/tegel.stories.js +7 -8
- package/dist/components/checkbox.js +20 -4
- package/dist/components/tds-breadcrumb.js +1 -1
- package/dist/components/tds-breadcrumbs.js +3 -1
- package/dist/components/tds-button.js +1 -1
- package/dist/components/tds-chip.js +1 -1
- package/dist/components/tds-dropdown-option.js +5 -3
- package/dist/components/tds-dropdown.js +13 -3
- package/dist/components/tds-folder-tabs.js +1 -1
- package/dist/components/tds-footer-item.js +1 -1
- package/dist/components/tds-inline-tab.js +1 -1
- package/dist/components/tds-inline-tabs.js +1 -1
- package/dist/components/tds-navigation-tab.js +1 -1
- package/dist/components/tds-navigation-tabs.js +1 -1
- package/dist/components/tds-slider.js +61 -105
- package/dist/components/tds-step.js +13 -8
- package/dist/components/tds-table-header.js +5 -1
- package/dist/components/tds-toast.js +4 -1
- package/dist/esm/{index-35cb608c.js → index-7dc8c41f.js} +184 -95
- package/dist/esm/loader.js +3 -3
- 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 +1 -1
- package/dist/esm/tds-breadcrumb.entry.js +2 -2
- package/dist/esm/tds-breadcrumbs.entry.js +4 -2
- package/dist/esm/tds-button.entry.js +2 -2
- package/dist/esm/tds-card.entry.js +1 -1
- package/dist/esm/tds-checkbox.entry.js +17 -4
- package/dist/esm/tds-chip.entry.js +2 -2
- package/dist/esm/tds-core-header-item_2.entry.js +1 -1
- package/dist/esm/tds-datetime.entry.js +1 -1
- package/dist/esm/tds-divider.entry.js +1 -1
- package/dist/esm/tds-dropdown-option.entry.js +6 -4
- package/dist/esm/tds-dropdown.entry.js +14 -4
- package/dist/esm/tds-folder-tab.entry.js +1 -1
- package/dist/esm/tds-folder-tabs.entry.js +2 -2
- package/dist/esm/tds-footer-group.entry.js +1 -1
- package/dist/esm/tds-footer-item.entry.js +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- package/dist/esm/tds-inline-tabs.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/tds-navigation-tab.entry.js +2 -2
- package/dist/esm/tds-navigation-tabs.entry.js +2 -2
- 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 +61 -105
- package/dist/esm/tds-spinner.entry.js +1 -1
- package/dist/esm/tds-step.entry.js +13 -8
- package/dist/esm/tds-stepper.entry.js +1 -1
- package/dist/esm/tds-table-body-row-expandable.entry.js +1 -1
- package/dist/esm/tds-table-body-row.entry.js +1 -1
- package/dist/esm/tds-table-body.entry.js +1 -1
- package/dist/esm/tds-table-footer.entry.js +1 -1
- package/dist/esm/tds-table-header.entry.js +4 -2
- 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 +1 -1
- package/dist/esm/tds-textarea.entry.js +1 -1
- package/dist/esm/tds-toast.entry.js +5 -2
- package/dist/esm/tds-toggle.entry.js +1 -1
- package/dist/esm/tds-tooltip.entry.js +1 -1
- package/dist/esm/tegel.js +4 -4
- package/dist/tegel/{p-db67d784.entry.js → p-0204ea55.entry.js} +1 -1
- package/dist/tegel/{p-f55da9ef.entry.js → p-027473cc.entry.js} +1 -1
- package/dist/tegel/{p-0893ad9d.entry.js → p-0308dd60.entry.js} +1 -1
- package/dist/tegel/{p-9839df9e.entry.js → p-05815c7a.entry.js} +1 -1
- package/dist/tegel/{p-cb9aba1b.entry.js → p-0891c691.entry.js} +1 -1
- package/dist/tegel/{p-c277a05d.entry.js → p-10600320.entry.js} +1 -1
- package/dist/tegel/{p-1efa3ab3.entry.js → p-15527d1c.entry.js} +1 -1
- package/dist/tegel/{p-7480ddd3.entry.js → p-1b55a206.entry.js} +1 -1
- package/dist/tegel/{p-41016d27.entry.js → p-1d6b48e1.entry.js} +1 -1
- package/dist/tegel/{p-bc94c1c2.entry.js → p-242abd17.entry.js} +1 -1
- package/dist/tegel/{p-a5a9cac8.entry.js → p-24ac98b9.entry.js} +1 -1
- package/dist/tegel/{p-d5bf6d99.entry.js → p-281a7ea6.entry.js} +1 -1
- package/dist/tegel/{p-52979643.entry.js → p-2f69406d.entry.js} +1 -1
- package/dist/tegel/p-31bb4c3e.entry.js +1 -0
- package/dist/tegel/p-32d2354f.entry.js +1 -0
- package/dist/tegel/{p-e55ec17c.entry.js → p-3418e94b.entry.js} +1 -1
- package/dist/tegel/p-3e9b9672.js +2 -0
- package/dist/tegel/{p-ea5a0c9d.entry.js → p-46808902.entry.js} +1 -1
- package/dist/tegel/{p-0be49c5e.entry.js → p-47a92f41.entry.js} +1 -1
- package/dist/tegel/{p-f935d5f3.entry.js → p-4c314d67.entry.js} +1 -1
- package/dist/tegel/{p-b0703dd5.entry.js → p-4c913e4b.entry.js} +1 -1
- package/dist/tegel/{p-e3aa0903.entry.js → p-5092497e.entry.js} +1 -1
- package/dist/tegel/p-56a341a1.entry.js +1 -0
- package/dist/tegel/{p-535504e3.entry.js → p-574f1148.entry.js} +1 -1
- package/dist/tegel/{p-dc0fcac8.entry.js → p-5b1d6647.entry.js} +1 -1
- package/dist/tegel/{p-374161a8.entry.js → p-5c11a9c9.entry.js} +1 -1
- package/dist/tegel/{p-e3c5a663.entry.js → p-5dc4f120.entry.js} +1 -1
- package/dist/tegel/{p-89e23724.entry.js → p-5e8bf615.entry.js} +1 -1
- package/dist/tegel/{p-5e9aacd5.entry.js → p-604022ba.entry.js} +1 -1
- package/dist/tegel/{p-1f35bdc7.entry.js → p-6243906b.entry.js} +1 -1
- package/dist/tegel/{p-c56160f2.entry.js → p-6b625fe1.entry.js} +1 -1
- package/dist/tegel/{p-f8da6ce5.entry.js → p-74478110.entry.js} +1 -1
- package/dist/tegel/{p-a5152b59.entry.js → p-75eae0ae.entry.js} +1 -1
- package/dist/tegel/{p-517deee0.entry.js → p-7b5c5881.entry.js} +1 -1
- package/dist/tegel/{p-d6c9b267.entry.js → p-7be1c8ea.entry.js} +1 -1
- package/dist/tegel/{p-0e6f9768.entry.js → p-7f94a735.entry.js} +1 -1
- package/dist/tegel/{p-e8c8ed2f.entry.js → p-80dd10db.entry.js} +1 -1
- package/dist/tegel/{p-0d300a96.entry.js → p-81c7ece9.entry.js} +1 -1
- package/dist/tegel/{p-80a99356.entry.js → p-825be958.entry.js} +1 -1
- package/dist/tegel/p-83dc1dde.entry.js +1 -0
- package/dist/tegel/{p-90987d11.entry.js → p-84b79c10.entry.js} +1 -1
- package/dist/tegel/{p-2eb27fd7.entry.js → p-851520df.entry.js} +1 -1
- package/dist/tegel/{p-a8712a64.entry.js → p-86c1146e.entry.js} +1 -1
- package/dist/tegel/p-8837c8f0.entry.js +1 -0
- package/dist/tegel/{p-2b8680cb.entry.js → p-8a7a998e.entry.js} +1 -1
- package/dist/tegel/{p-d8137332.entry.js → p-8c41b79d.entry.js} +1 -1
- package/dist/tegel/{p-3ade3e28.entry.js → p-8c781ff3.entry.js} +1 -1
- package/dist/tegel/{p-72d3a19b.entry.js → p-9108c81f.entry.js} +1 -1
- package/dist/tegel/{p-e035ddeb.entry.js → p-99632e91.entry.js} +1 -1
- package/dist/tegel/{p-900532bf.entry.js → p-9e1430c5.entry.js} +1 -1
- package/dist/tegel/{p-05eda91f.entry.js → p-a00c06d4.entry.js} +1 -1
- package/dist/tegel/{p-3516a5fc.entry.js → p-a872e086.entry.js} +1 -1
- package/dist/tegel/p-ae19b833.entry.js +1 -0
- package/dist/tegel/p-b2466d89.entry.js +1 -0
- package/dist/tegel/p-bda16bee.entry.js +1 -0
- package/dist/tegel/{p-fecfc7c7.entry.js → p-c5138ecf.entry.js} +1 -1
- package/dist/tegel/{p-25347b32.entry.js → p-c7301ecb.entry.js} +1 -1
- package/dist/tegel/p-caaab9d1.entry.js +1 -0
- package/dist/tegel/{p-ceaa2ea7.entry.js → p-cb477168.entry.js} +1 -1
- package/dist/tegel/{p-fc76d99c.entry.js → p-cdf605b6.entry.js} +1 -1
- package/dist/tegel/{p-97c23511.entry.js → p-cec4cc4d.entry.js} +1 -1
- package/dist/tegel/{p-dfbb887e.entry.js → p-d2989b66.entry.js} +1 -1
- package/dist/tegel/{p-5f203f87.entry.js → p-d5bd93b0.entry.js} +1 -1
- package/dist/tegel/{p-03fc5ca3.entry.js → p-d72f1690.entry.js} +1 -1
- package/dist/tegel/p-d73f40b0.entry.js +1 -0
- package/dist/tegel/{p-92984605.entry.js → p-d757dc45.entry.js} +1 -1
- package/dist/tegel/{p-792a3cb6.entry.js → p-e07afb36.entry.js} +1 -1
- package/dist/tegel/{p-aaaced18.entry.js → p-e0a62474.entry.js} +1 -1
- package/dist/tegel/{p-18de1663.entry.js → p-e1cd3cc1.entry.js} +1 -1
- package/dist/tegel/{p-6e863efc.entry.js → p-e32e00dc.entry.js} +1 -1
- package/dist/tegel/p-e5fd7377.entry.js +1 -0
- package/dist/tegel/{p-d1dffa21.entry.js → p-e889c82b.entry.js} +1 -1
- package/dist/tegel/{p-54680d69.entry.js → p-ee299956.entry.js} +1 -1
- package/dist/tegel/{p-efb40b9c.entry.js → p-f0c9ff6a.entry.js} +1 -1
- package/dist/tegel/{p-f5063d5b.entry.js → p-f46ab7e0.entry.js} +1 -1
- package/dist/tegel/p-f7b73968.entry.js +1 -0
- package/dist/tegel/p-ff006811.entry.js +1 -0
- package/dist/tegel/{p-d5d2a4f0.entry.js → p-ff6dfbe5.entry.js} +1 -1
- package/dist/tegel/p-ffe71966.entry.js +1 -0
- package/dist/tegel/tegel.css +1 -1
- package/dist/tegel/tegel.esm.js +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +5 -0
- package/dist/types/components/checkbox/checkbox.stories.d.ts +13 -0
- package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +0 -1
- package/dist/types/components/dropdown/dropdown.d.ts +3 -3
- package/dist/types/components/slider/slider.d.ts +19 -22
- package/dist/types/components/stepper/step/step.d.ts +1 -1
- package/dist/types/components/table/table-component-batch-actions.stories.d.ts +1 -1
- package/dist/types/components/table/table-component-multiselect.stories.d.ts +16 -0
- package/dist/types/components/toast/toast.stories.d.ts +8 -0
- package/dist/types/components.d.ts +433 -3
- package/dist/types/stencil-public-runtime.d.ts +21 -0
- package/dist/types/stories/Installation/angular.stories.d.ts +6 -0
- package/dist/types/stories/Installation/{installation.stories.d.ts → javascript.stories.d.ts} +1 -1
- package/dist/types/stories/Installation/react.stories.d.ts +6 -0
- package/dist/types/stories/formatHtmlPreview.d.ts +1 -1
- package/package.json +8 -9
- package/dist/collection/components/accordion/accordion.spec.js +0 -6
- package/dist/collection/components/divider/divider.spec.js +0 -28
- package/dist/collection/components/dropdown/test/dropdown.e2e.js +0 -32
- package/dist/collection/components/dropdown/test/dropdown.filter.spec.js +0 -49
- package/dist/collection/components/dropdown/test/dropdown.multiselect.e2e.js +0 -31
- package/dist/collection/components/dropdown/test/dropdown.multiselect.spec.js +0 -51
- package/dist/collection/components/dropdown/test/dropdown.spec.js +0 -51
- package/dist/collection/components/table/table.filtering.spec.js +0 -23
- package/dist/collection/components/table/table.spec.js +0 -16
- package/dist/collection/stories/Installation/installation.stories.js +0 -218
- package/dist/tegel/p-016d07b2.entry.js +0 -1
- package/dist/tegel/p-1a978a31.entry.js +0 -1
- package/dist/tegel/p-25f306a0.js +0 -2
- package/dist/tegel/p-5b9f499d.entry.js +0 -1
- package/dist/tegel/p-6adb65cb.entry.js +0 -1
- package/dist/tegel/p-78f42968.entry.js +0 -1
- package/dist/tegel/p-80b501e3.entry.js +0 -1
- package/dist/tegel/p-8f1a037c.entry.js +0 -1
- package/dist/tegel/p-a001ec58.entry.js +0 -1
- package/dist/tegel/p-a0f3086c.entry.js +0 -1
- package/dist/tegel/p-be7119d3.entry.js +0 -1
- package/dist/tegel/p-c0b7acbb.entry.js +0 -1
- package/dist/tegel/p-c191ca51.entry.js +0 -1
- package/dist/tegel/p-e4db065d.entry.js +0 -1
- package/dist/tegel/p-eda7ecf6.entry.js +0 -1
- package/dist/types/components/block/block.d.ts +0 -11
- package/dist/types/components/header/header-launcher/header-launcher.d.ts +0 -15
- package/dist/types/components/popover-canvas/popover-canvas.d.ts +0 -27
- package/dist/types/components/popover-core/popover-core.d.ts +0 -46
- package/dist/types/components/popover-menu/popover-menu.d.ts +0 -28
- package/dist/types/components/side-menu/side-menu-item/side-menu-item.d.ts +0 -24
- package/dist/types/components/side-menu/side-menu.d.ts +0 -45
- package/dist/types/components/table/table-body/table-body.d.ts +0 -24
- package/dist/types/components/table/table-body-cell/table-body-cell.d.ts +0 -27
- package/dist/types/components/table/table-body-row/table-body-row.d.ts +0 -28
- package/dist/types/components/table/table-body-row-expandable/table-body-row-expandable.d.ts +0 -29
- package/dist/types/components/table/table-header/table-header.d.ts +0 -35
- package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +0 -56
- package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +0 -29
- package/dist/types/components/tooltip/tooltip.d.ts +0 -34
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
box-sizing: border-box;
|
|
2
3
|
display: block;
|
|
3
4
|
background-color: var(--tds-dropdown-option-background);
|
|
4
5
|
}
|
|
6
|
+
:host * {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
5
9
|
:host .dropdown-option {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
10
|
color: var(--tds-dropdown-option-color);
|
|
9
11
|
border-bottom: 1px solid var(--tds-dropdown-option-border);
|
|
10
12
|
font: var(--tds-detail-02);
|
|
11
13
|
letter-spacing: var(--tds-detail-02-ls);
|
|
14
|
+
overflow-wrap: anywhere;
|
|
12
15
|
}
|
|
13
16
|
:host .dropdown-option.selected {
|
|
14
17
|
background-color: var(--tds-dropdown-option-background-selected);
|
|
@@ -16,19 +19,22 @@
|
|
|
16
19
|
:host .dropdown-option.disabled {
|
|
17
20
|
color: var(--tds-dropdown-option-color-disabled);
|
|
18
21
|
}
|
|
19
|
-
:host .dropdown-option
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
:host .dropdown-option.md {
|
|
23
|
-
height: 47px;
|
|
24
|
-
}
|
|
25
|
-
:host .dropdown-option.sm {
|
|
26
|
-
height: 39px;
|
|
22
|
+
:host .dropdown-option button:focus {
|
|
23
|
+
outline: 2px solid var(--tds-blue-400);
|
|
24
|
+
outline-offset: -2px;
|
|
27
25
|
}
|
|
28
26
|
:host .dropdown-option button {
|
|
29
27
|
all: unset;
|
|
30
28
|
width: 100%;
|
|
31
|
-
|
|
29
|
+
}
|
|
30
|
+
:host .dropdown-option button.lg {
|
|
31
|
+
padding: 19px 0 20px;
|
|
32
|
+
}
|
|
33
|
+
:host .dropdown-option button.md {
|
|
34
|
+
padding: 15px 0 16px;
|
|
35
|
+
}
|
|
36
|
+
:host .dropdown-option button.sm {
|
|
37
|
+
padding: 11px 0 12px;
|
|
32
38
|
}
|
|
33
39
|
:host .dropdown-option button .single-select {
|
|
34
40
|
display: flex;
|
|
@@ -36,10 +42,6 @@
|
|
|
36
42
|
justify-content: space-between;
|
|
37
43
|
padding: 0 16px;
|
|
38
44
|
}
|
|
39
|
-
:host .dropdown-option button:focus {
|
|
40
|
-
outline: 2px solid var(--tds-blue-400);
|
|
41
|
-
outline-offset: -2px;
|
|
42
|
-
}
|
|
43
45
|
:host .dropdown-option .multiselect {
|
|
44
46
|
width: 100%;
|
|
45
47
|
height: 100%;
|
|
@@ -48,7 +50,15 @@
|
|
|
48
50
|
display: flex;
|
|
49
51
|
height: 100%;
|
|
50
52
|
width: 100%;
|
|
51
|
-
|
|
53
|
+
}
|
|
54
|
+
:host .dropdown-option .multiselect tds-checkbox.lg {
|
|
55
|
+
padding: 15px 16px 16px;
|
|
56
|
+
}
|
|
57
|
+
:host .dropdown-option .multiselect tds-checkbox.md {
|
|
58
|
+
padding: 11px 16px 12px;
|
|
59
|
+
}
|
|
60
|
+
:host .dropdown-option .multiselect tds-checkbox.sm {
|
|
61
|
+
padding: 7px 16px 8px;
|
|
52
62
|
}
|
|
53
63
|
:host .dropdown-option:hover {
|
|
54
64
|
background-color: var(--tds-dropdown-option-background-hover);
|
|
@@ -72,9 +72,11 @@ export class TdsDropdownOption {
|
|
|
72
72
|
}
|
|
73
73
|
} }, h("tds-checkbox", { onTdsChange: (event) => {
|
|
74
74
|
this.handleMultiselect(event);
|
|
75
|
-
}, disabled: this.disabled, checked: this.selected
|
|
75
|
+
}, disabled: this.disabled, checked: this.selected, class: {
|
|
76
|
+
[this.size]: true,
|
|
77
|
+
} }, h("div", { slot: "label" }, h("slot", null))))) : (h("button", { onClick: () => {
|
|
76
78
|
this.handleSingleSelect();
|
|
77
|
-
}, onFocus: (event) => this.handleFocus(event), onBlur: (event) => this.handleBlur(event), disabled: this.disabled }, h("div", { class: "single-select" }, h("slot", null), this.selected && h("tds-icon", { name: "tick", size: "16px" })))))));
|
|
79
|
+
}, onFocus: (event) => this.handleFocus(event), onBlur: (event) => this.handleBlur(event), disabled: this.disabled, class: this.size }, h("div", { class: "single-select" }, h("slot", null), this.selected && h("tds-icon", { name: "tick", size: "16px" })))))));
|
|
78
80
|
}
|
|
79
81
|
static get is() { return "tds-dropdown-option"; }
|
|
80
82
|
static get encapsulation() { return "shadow"; }
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
:host button.placeholder {
|
|
19
19
|
color: var(--tds-dropdown-placeholder-color);
|
|
20
|
+
line-height: 1.3;
|
|
20
21
|
}
|
|
21
22
|
:host button.value {
|
|
22
23
|
color: var(--tds-dropdown-value-color);
|
|
@@ -41,6 +42,18 @@
|
|
|
41
42
|
:host button.error {
|
|
42
43
|
border-bottom: 1px solid var(--tds-negative);
|
|
43
44
|
}
|
|
45
|
+
:host button.error:focus {
|
|
46
|
+
border-bottom-color: transparent;
|
|
47
|
+
}
|
|
48
|
+
:host button.error:focus::before {
|
|
49
|
+
content: "";
|
|
50
|
+
position: absolute;
|
|
51
|
+
bottom: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: 2px;
|
|
55
|
+
background: var(--tds-negative);
|
|
56
|
+
}
|
|
44
57
|
:host button:disabled {
|
|
45
58
|
color: var(--tds-dropdown-disabled-color);
|
|
46
59
|
border-bottom: 1px solid transparent;
|
|
@@ -111,6 +124,21 @@
|
|
|
111
124
|
height: 2px;
|
|
112
125
|
background: var(--tds-dropdown-border-bottom-open);
|
|
113
126
|
}
|
|
127
|
+
:host .filter.error {
|
|
128
|
+
border-bottom: 1px solid var(--tds-negative);
|
|
129
|
+
}
|
|
130
|
+
:host .filter.error.focus {
|
|
131
|
+
border-bottom-color: transparent;
|
|
132
|
+
}
|
|
133
|
+
:host .filter.error.focus::before {
|
|
134
|
+
content: "";
|
|
135
|
+
position: absolute;
|
|
136
|
+
bottom: 0;
|
|
137
|
+
left: 0;
|
|
138
|
+
width: 100%;
|
|
139
|
+
height: 2px;
|
|
140
|
+
background: var(--tds-negative);
|
|
141
|
+
}
|
|
114
142
|
:host .filter input {
|
|
115
143
|
flex: 1;
|
|
116
144
|
all: unset;
|
|
@@ -60,6 +60,9 @@ export class TdsDropdown {
|
|
|
60
60
|
};
|
|
61
61
|
this.getValue = () => {
|
|
62
62
|
const labels = this.getSelectedChildrenLabels();
|
|
63
|
+
if (!labels) {
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
63
66
|
return this.filter ? labels === null || labels === void 0 ? void 0 : labels.join(', ') : labels === null || labels === void 0 ? void 0 : labels.toString();
|
|
64
67
|
};
|
|
65
68
|
this.setValueAttribute = () => {
|
|
@@ -294,8 +297,12 @@ export class TdsDropdown {
|
|
|
294
297
|
render() {
|
|
295
298
|
var _a, _b, _c, _d;
|
|
296
299
|
appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
|
|
297
|
-
return (h(Host, { 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", { class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class:
|
|
298
|
-
|
|
300
|
+
return (h(Host, { 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", { class: `dropdown-select ${this.size} ${this.disabled ? 'disabled' : ''}` }, this.filter ? (h("div", { class: {
|
|
301
|
+
filter: true,
|
|
302
|
+
focus: this.filterFocus,
|
|
303
|
+
disabled: this.disabled,
|
|
304
|
+
error: this.error,
|
|
305
|
+
} }, h("div", { class: "value-wrapper" }, this.label && this.labelPosition === 'inside' && this.placeholder && (h("div", { class: `label-inside ${this.size}` }, this.label)), this.label && this.labelPosition === 'inside' && !this.placeholder && (h("div", { class: `
|
|
299
306
|
label-inside-as-placeholder
|
|
300
307
|
${this.size}
|
|
301
308
|
${((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) ? 'selected' : ''}
|
|
@@ -315,6 +322,9 @@ export class TdsDropdown {
|
|
|
315
322
|
}
|
|
316
323
|
})), h("tds-icon", { onClick: () => {
|
|
317
324
|
this.open = !this.open;
|
|
325
|
+
if (this.open) {
|
|
326
|
+
this.inputElement.focus();
|
|
327
|
+
}
|
|
318
328
|
}, class: `${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))) : (h("button", { onClick: () => {
|
|
319
329
|
this.open = !this.open;
|
|
320
330
|
}, onKeyDown: (event) => {
|
|
@@ -704,7 +714,7 @@ export class TdsDropdown {
|
|
|
704
714
|
},
|
|
705
715
|
"setValue": {
|
|
706
716
|
"complexType": {
|
|
707
|
-
"signature": "(value: string | string[], label?: string) => Promise<{ value:
|
|
717
|
+
"signature": "(value: string | string[], label?: string) => Promise<{ value: any; label: any; }[]>",
|
|
708
718
|
"parameters": [{
|
|
709
719
|
"tags": [],
|
|
710
720
|
"text": ""
|
|
@@ -722,7 +732,7 @@ export class TdsDropdown {
|
|
|
722
732
|
"id": "global::HTMLTdsDropdownOptionElement"
|
|
723
733
|
}
|
|
724
734
|
},
|
|
725
|
-
"return": "Promise<{ value:
|
|
735
|
+
"return": "Promise<{ value: any; label: any; }[]>"
|
|
726
736
|
},
|
|
727
737
|
"docs": {
|
|
728
738
|
"text": "Method for setting the value of the Dropdown.\n\nSingle selection example:\n\n<code>\ndropdown.setValue('option-1', 'Option 1');\n</code>\n\nMultiselect example:\n\n<code>\ndropdown.setValue(['option-1', 'option-2']);\n</code>",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[role=listitem] ::slotted(a),
|
|
2
2
|
[role=listitem] ::slotted(button) {
|
|
3
|
-
font: var(--tds-headline-
|
|
4
|
-
letter-spacing: var(--tds-headline-
|
|
3
|
+
font: var(--tds-headline-07);
|
|
4
|
+
letter-spacing: var(--tds-headline-07-ls);
|
|
5
5
|
color: var(--tds-footer-main-links);
|
|
6
6
|
opacity: var(--tds-footer-main-links-opacity);
|
|
7
7
|
text-decoration: none;
|
|
@@ -17,11 +17,9 @@
|
|
|
17
17
|
}
|
|
18
18
|
[role=listitem].top-part-child ::slotted(a),
|
|
19
19
|
[role=listitem].top-part-child ::slotted(button) {
|
|
20
|
+
font: var(--tds-headline-07);
|
|
21
|
+
letter-spacing: var(--tds-headline-07-ls);
|
|
20
22
|
color: var(--tds-footer-top-links);
|
|
21
|
-
font-family: "Scania Sans Semi Condensed", "Scania Sans Condensed", arial, helvetica, sans-serif;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
font-size: 14px;
|
|
24
|
-
line-height: 18px;
|
|
25
23
|
}
|
|
26
24
|
[role=listitem].top-part-child ::slotted(a:focus-visible),
|
|
27
25
|
[role=listitem].top-part-child ::slotted(button:focus-visible) {
|
|
@@ -102,9 +102,9 @@ const ModalTemplate = ({ actionsPosition, size, headerText, bodyContent, showMod
|
|
|
102
102
|
<span slot="body">
|
|
103
103
|
${bodyContent}
|
|
104
104
|
</span>
|
|
105
|
-
<span slot='actions'>
|
|
106
|
-
<tds-button data-dismiss-modal size="md" text="Delete"
|
|
107
|
-
<tds-button data-dismiss-modal size="md" text="Cancel"></tds-button>
|
|
105
|
+
<span slot='actions' class='tds-u-flex tds-u-gap2'>
|
|
106
|
+
<tds-button data-dismiss-modal size="md" text="Delete" variant="danger"></tds-button>
|
|
107
|
+
<tds-button data-dismiss-modal size="md" text="Cancel" variant="secondary"></tds-button>
|
|
108
108
|
</span>
|
|
109
109
|
</tds-modal>
|
|
110
110
|
|
|
@@ -154,7 +154,7 @@ export class TdsSideMenu {
|
|
|
154
154
|
"references": {
|
|
155
155
|
"CollapseEvent": {
|
|
156
156
|
"location": "local",
|
|
157
|
-
"path": "/
|
|
157
|
+
"path": "/home/runner/work/tegel/tegel/packages/core/src/components/side-menu/side-menu.tsx",
|
|
158
158
|
"id": "src/components/side-menu/side-menu.tsx::CollapseEvent"
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -178,7 +178,7 @@ export class TdsSideMenu {
|
|
|
178
178
|
"references": {
|
|
179
179
|
"CollapseEvent": {
|
|
180
180
|
"location": "local",
|
|
181
|
-
"path": "/
|
|
181
|
+
"path": "/home/runner/work/tegel/tegel/packages/core/src/components/side-menu/side-menu.tsx",
|
|
182
182
|
"id": "src/components/side-menu/side-menu.tsx::CollapseEvent"
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -202,7 +202,7 @@ export class TdsSideMenu {
|
|
|
202
202
|
"references": {
|
|
203
203
|
"InternalTdsSideMenuPropChange": {
|
|
204
204
|
"location": "local",
|
|
205
|
-
"path": "/
|
|
205
|
+
"path": "/home/runner/work/tegel/tegel/packages/core/src/components/side-menu/side-menu.tsx",
|
|
206
206
|
"id": "src/components/side-menu/side-menu.tsx::InternalTdsSideMenuPropChange"
|
|
207
207
|
}
|
|
208
208
|
}
|
|
@@ -7,9 +7,6 @@ export class TdsSlider {
|
|
|
7
7
|
this.thumbInnerElement = null;
|
|
8
8
|
this.trackElement = null;
|
|
9
9
|
this.trackFillElement = null;
|
|
10
|
-
this.minusElement = null;
|
|
11
|
-
this.plusElement = null;
|
|
12
|
-
this.inputElement = null;
|
|
13
10
|
this.thumbGrabbed = false;
|
|
14
11
|
this.thumbLeft = 0;
|
|
15
12
|
this.tickValues = [];
|
|
@@ -18,7 +15,6 @@ export class TdsSlider {
|
|
|
18
15
|
this.useSmall = false;
|
|
19
16
|
this.useSnapping = false;
|
|
20
17
|
this.supposedValueSlot = -1;
|
|
21
|
-
this.eventListenersAdded = false;
|
|
22
18
|
this.resizeObserverAdded = false;
|
|
23
19
|
this.label = '';
|
|
24
20
|
this.value = '0';
|
|
@@ -39,7 +35,6 @@ export class TdsSlider {
|
|
|
39
35
|
}
|
|
40
36
|
/** Public method to re-initialise the slider if some configuration props are changed */
|
|
41
37
|
async reset() {
|
|
42
|
-
// @TODO: maybe refactor to use watch-decorators instead
|
|
43
38
|
this.componentWillLoad();
|
|
44
39
|
this.componentDidLoad();
|
|
45
40
|
}
|
|
@@ -90,10 +85,8 @@ export class TdsSlider {
|
|
|
90
85
|
}
|
|
91
86
|
this.thumbCore(event);
|
|
92
87
|
}
|
|
93
|
-
handleValueUpdate(
|
|
94
|
-
this.
|
|
95
|
-
this.updateValueForced(newVal);
|
|
96
|
-
this.updateTrack();
|
|
88
|
+
handleValueUpdate(newValue) {
|
|
89
|
+
this.forceValueUpdate(newValue);
|
|
97
90
|
}
|
|
98
91
|
updateSupposedValueSlot(localLeft) {
|
|
99
92
|
const numTicks = parseInt(this.ticks);
|
|
@@ -138,9 +131,6 @@ export class TdsSlider {
|
|
|
138
131
|
const percentageFilled = (this.thumbLeft / trackWidth) * 100;
|
|
139
132
|
this.trackFillElement.style.width = `${percentageFilled}%`;
|
|
140
133
|
}
|
|
141
|
-
dispatchChangeEvent() {
|
|
142
|
-
this.tdsChange.emit({ value: this.value });
|
|
143
|
-
}
|
|
144
134
|
updateValue() {
|
|
145
135
|
const trackWidth = this.getTrackWidth();
|
|
146
136
|
const numTicks = parseInt(this.ticks);
|
|
@@ -152,20 +142,16 @@ export class TdsSlider {
|
|
|
152
142
|
}
|
|
153
143
|
else {
|
|
154
144
|
const percentage = this.thumbLeft / trackWidth;
|
|
155
|
-
this.value = `${Math.trunc(this.
|
|
145
|
+
this.value = `${Math.trunc(parseFloat(this.min) + percentage * (parseFloat(this.max) - parseFloat(this.min)))}`;
|
|
156
146
|
}
|
|
157
147
|
this.updateTrack();
|
|
158
|
-
this.
|
|
159
|
-
}
|
|
160
|
-
updateValueForced(value) {
|
|
161
|
-
this.value = value;
|
|
162
|
-
this.dispatchChangeEvent();
|
|
163
|
-
}
|
|
164
|
-
getMin() {
|
|
165
|
-
return parseFloat(this.min);
|
|
148
|
+
this.tdsChange.emit({ value: this.value });
|
|
166
149
|
}
|
|
167
|
-
|
|
168
|
-
|
|
150
|
+
forceValueUpdate(newValue) {
|
|
151
|
+
this.calculateThumbLeftFromValue(newValue);
|
|
152
|
+
this.value = newValue;
|
|
153
|
+
this.tdsChange.emit({ value: this.value });
|
|
154
|
+
this.updateTrack();
|
|
169
155
|
}
|
|
170
156
|
constrainThumb(x) {
|
|
171
157
|
const width = this.getTrackWidth();
|
|
@@ -184,61 +170,33 @@ export class TdsSlider {
|
|
|
184
170
|
calculateThumbLeftFromValue(value) {
|
|
185
171
|
const initValue = value;
|
|
186
172
|
const trackWidth = this.getTrackWidth();
|
|
187
|
-
const normalizedValue = initValue - this.
|
|
188
|
-
const normalizedMax = this.
|
|
173
|
+
const normalizedValue = initValue - parseFloat(this.min);
|
|
174
|
+
const normalizedMax = parseFloat(this.max) - parseFloat(this.min);
|
|
189
175
|
const calculatedLeft = (normalizedValue / normalizedMax) * trackWidth;
|
|
190
176
|
this.thumbLeft = calculatedLeft;
|
|
191
177
|
this.updateSupposedValueSlot(this.thumbLeft);
|
|
192
178
|
this.thumbElement.style.left = `${this.thumbLeft}px`;
|
|
193
179
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
});
|
|
201
|
-
resizeObserver.observe(this.wrapperElement);
|
|
180
|
+
/** Updates the slider value based on the current input value */
|
|
181
|
+
updateSliderValueOnInputChange(event) {
|
|
182
|
+
const inputElement = event.target;
|
|
183
|
+
let newValue = parseInt(inputElement.value);
|
|
184
|
+
if (newValue < parseFloat(this.min)) {
|
|
185
|
+
newValue = parseFloat(this.min);
|
|
202
186
|
}
|
|
203
|
-
if (
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
});
|
|
216
|
-
this.plusElement.addEventListener('click', () => {
|
|
217
|
-
this.stepRight();
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
if (this.inputElement) {
|
|
221
|
-
this.inputElement.addEventListener('keydown', (event) => {
|
|
222
|
-
event.stopPropagation();
|
|
223
|
-
if (event.key === 'Enter') {
|
|
224
|
-
let newValue = parseInt(this.inputElement.value);
|
|
225
|
-
if (newValue < this.getMin()) {
|
|
226
|
-
newValue = this.getMin();
|
|
227
|
-
}
|
|
228
|
-
else if (newValue > this.getMax()) {
|
|
229
|
-
newValue = this.getMax();
|
|
230
|
-
}
|
|
231
|
-
this.calculateThumbLeftFromValue(newValue);
|
|
232
|
-
this.updateValueForced(newValue);
|
|
233
|
-
this.updateTrack();
|
|
234
|
-
this.inputElement.blur();
|
|
235
|
-
this.wrapperElement.focus();
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
187
|
+
else if (newValue > parseFloat(this.max)) {
|
|
188
|
+
newValue = parseFloat(this.max);
|
|
189
|
+
}
|
|
190
|
+
this.forceValueUpdate(String(newValue));
|
|
191
|
+
}
|
|
192
|
+
/** Updates the slider value based on the current input value when enter is pressed */
|
|
193
|
+
handleInputFieldEnterPress(event) {
|
|
194
|
+
event.stopPropagation();
|
|
195
|
+
if (event.key === 'Enter') {
|
|
196
|
+
this.updateSliderValueOnInputChange(event);
|
|
197
|
+
const inputElement = event.target;
|
|
198
|
+
inputElement.blur();
|
|
239
199
|
}
|
|
240
|
-
this.calculateThumbLeftFromValue(this.value);
|
|
241
|
-
this.updateTrack();
|
|
242
200
|
}
|
|
243
201
|
grabThumb() {
|
|
244
202
|
if (this.readOnly) {
|
|
@@ -270,19 +228,17 @@ export class TdsSlider {
|
|
|
270
228
|
else {
|
|
271
229
|
const trackWidth = this.getTrackWidth();
|
|
272
230
|
const percentage = this.thumbLeft / trackWidth;
|
|
273
|
-
let currentValue = this.
|
|
231
|
+
let currentValue = parseFloat(this.min) + percentage * (parseFloat(this.max) - parseFloat(this.min));
|
|
274
232
|
currentValue += delta;
|
|
275
233
|
currentValue = Math.round(currentValue);
|
|
276
|
-
if (currentValue < this.
|
|
277
|
-
currentValue = this.
|
|
234
|
+
if (currentValue < parseFloat(this.min)) {
|
|
235
|
+
currentValue = parseFloat(this.min);
|
|
278
236
|
}
|
|
279
|
-
else if (currentValue > this.
|
|
280
|
-
currentValue = this.
|
|
237
|
+
else if (currentValue > parseFloat(this.max)) {
|
|
238
|
+
currentValue = parseFloat(this.max);
|
|
281
239
|
}
|
|
282
240
|
this.value = `${currentValue}`;
|
|
283
|
-
this.
|
|
284
|
-
this.updateValueForced(currentValue);
|
|
285
|
-
this.updateTrack();
|
|
241
|
+
this.forceValueUpdate(this.value);
|
|
286
242
|
}
|
|
287
243
|
}
|
|
288
244
|
stepLeft() {
|
|
@@ -294,12 +250,12 @@ export class TdsSlider {
|
|
|
294
250
|
componentWillLoad() {
|
|
295
251
|
const numTicks = parseInt(this.ticks);
|
|
296
252
|
if (numTicks > 0) {
|
|
297
|
-
this.tickValues = [this.
|
|
298
|
-
const step = (this.
|
|
253
|
+
this.tickValues = [parseFloat(this.min)];
|
|
254
|
+
const step = (parseFloat(this.max) - parseFloat(this.min)) / (numTicks + 1);
|
|
299
255
|
for (let i = 1; i < numTicks + 1; i++) {
|
|
300
|
-
this.tickValues.push(this.
|
|
256
|
+
this.tickValues.push(parseFloat(this.min) + Math.round(step * i));
|
|
301
257
|
}
|
|
302
|
-
this.tickValues.push(this.
|
|
258
|
+
this.tickValues.push(parseFloat(this.max));
|
|
303
259
|
}
|
|
304
260
|
this.useInput = false;
|
|
305
261
|
this.useControls = false;
|
|
@@ -311,44 +267,44 @@ export class TdsSlider {
|
|
|
311
267
|
}
|
|
312
268
|
this.useSmall = this.thumbSize === 'sm';
|
|
313
269
|
this.useSnapping = this.snap;
|
|
314
|
-
const min = this.
|
|
315
|
-
const max = this.
|
|
270
|
+
const min = parseFloat(this.min);
|
|
271
|
+
const max = parseFloat(this.max);
|
|
316
272
|
if (min > max) {
|
|
317
273
|
console.warn('min-prop must have a higher value than max-prop for the component to work correctly.');
|
|
318
274
|
this.disabled = true;
|
|
319
275
|
}
|
|
320
276
|
}
|
|
277
|
+
componentDidLoad() {
|
|
278
|
+
if (!this.resizeObserverAdded) {
|
|
279
|
+
this.resizeObserverAdded = true;
|
|
280
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
281
|
+
this.calculateThumbLeftFromValue(this.value);
|
|
282
|
+
this.updateTrack();
|
|
283
|
+
});
|
|
284
|
+
resizeObserver.observe(this.wrapperElement);
|
|
285
|
+
}
|
|
286
|
+
this.calculateThumbLeftFromValue(this.value);
|
|
287
|
+
this.updateTrack();
|
|
288
|
+
}
|
|
321
289
|
render() {
|
|
322
|
-
return (h("div", { class:
|
|
290
|
+
return (h("div", { class: {
|
|
291
|
+
'tds-slider-wrapper': true,
|
|
292
|
+
'read-only': this.readOnly,
|
|
293
|
+
} }, h("input", { class: "tds-slider-native-element", type: "range", name: this.name, min: this.min, max: this.max, value: this.value, disabled: this.disabled }), h("div", { class: {
|
|
323
294
|
'tds-slider': true,
|
|
324
295
|
'disabled': this.disabled,
|
|
325
296
|
'tds-slider-small': this.useSmall,
|
|
326
297
|
}, ref: (el) => {
|
|
327
298
|
this.wrapperElement = el;
|
|
328
|
-
} }, h("label", { class: this.showTickNumbers && 'offset' }, this.label), this.useInput && (h("div", { class: "tds-slider__input-values" }, h("div", { ref: (el) => {
|
|
329
|
-
this.minusElement = el;
|
|
330
|
-
}, class: "tds-slider__input-value min-value" }, this.min))), this.useControls && (h("div", { class: "tds-slider__controls" }, h("div", { ref: (el) => {
|
|
331
|
-
this.minusElement = el;
|
|
332
|
-
}, class: "tds-slider__control tds-slider__control-minus" }, h("tds-icon", { name: "minus", size: "16px" })))), h("div", { 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", { class: "tds-slider__track", ref: (el) => {
|
|
299
|
+
} }, h("label", { 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: () => this.stepLeft() }, h("tds-icon", { name: "minus", size: "16px" })))), h("div", { 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", { class: "tds-slider__track", ref: (el) => {
|
|
333
300
|
this.trackElement = el;
|
|
334
301
|
}, tabindex: this.disabled ? '-1' : '0' }, h("div", { class: "tds-slider__track-fill", ref: (el) => {
|
|
335
302
|
this.trackFillElement = el;
|
|
336
303
|
} }), h("div", { class: "tds-slider__thumb", ref: (el) => {
|
|
337
304
|
this.thumbElement = el;
|
|
338
|
-
} }, 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", { class: "tds-slider__thumb-inner", ref: (el) => {
|
|
305
|
+
}, 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", { class: "tds-slider__thumb-inner", ref: (el) => {
|
|
339
306
|
this.thumbInnerElement = el;
|
|
340
|
-
} })))), this.useInput && (h("div", { class: "tds-slider__input-values" }, h("div", {
|
|
341
|
-
this.minusElement = el;
|
|
342
|
-
}, class: "tds-slider__input-value" }, this.max), h("div", { class: "tds-slider__input-field-wrapper" }, h("input", { onFocus: (e) => {
|
|
343
|
-
if (this.readOnly) {
|
|
344
|
-
e.preventDefault();
|
|
345
|
-
this.inputElement.blur();
|
|
346
|
-
}
|
|
347
|
-
}, size: this.calculateInputSizeFromMax(), class: "tds-slider__input-field", value: this.value, ref: (el) => {
|
|
348
|
-
this.inputElement = el;
|
|
349
|
-
} })))), this.useControls && (h("div", { class: "tds-slider__controls" }, h("div", { ref: (el) => {
|
|
350
|
-
this.plusElement = el;
|
|
351
|
-
}, class: "tds-slider__control tds-slider__control-plus" }, h("tds-icon", { name: "plus", size: "16px" })))))));
|
|
307
|
+
} })))), 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" })))))));
|
|
352
308
|
}
|
|
353
309
|
static get is() { return "tds-slider"; }
|
|
354
310
|
static get originalStyleUrls() {
|
|
@@ -383,7 +339,7 @@ export class TdsSlider {
|
|
|
383
339
|
},
|
|
384
340
|
"value": {
|
|
385
341
|
"type": "string",
|
|
386
|
-
"mutable":
|
|
342
|
+
"mutable": true,
|
|
387
343
|
"complexType": {
|
|
388
344
|
"original": "string",
|
|
389
345
|
"resolved": "string",
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
const propToStateMap = {
|
|
3
|
+
orientation: 'orientation',
|
|
4
|
+
labelPosition: 'labelPosition',
|
|
5
|
+
size: 'size',
|
|
6
|
+
hideLabels: 'hideLabels',
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* @slot label - Slot for the label text.
|
|
4
10
|
*/
|
|
@@ -6,7 +12,7 @@ export class TdsStep {
|
|
|
6
12
|
constructor() {
|
|
7
13
|
this.index = undefined;
|
|
8
14
|
this.state = 'upcoming';
|
|
9
|
-
this.
|
|
15
|
+
this.hideLabels = undefined;
|
|
10
16
|
this.size = undefined;
|
|
11
17
|
this.orientation = undefined;
|
|
12
18
|
this.labelPosition = undefined;
|
|
@@ -17,24 +23,23 @@ export class TdsStep {
|
|
|
17
23
|
this.orientation = this.stepperEl.orientation;
|
|
18
24
|
this.labelPosition = this.stepperEl.labelPosition;
|
|
19
25
|
this.size = this.stepperEl.size;
|
|
20
|
-
this.
|
|
26
|
+
this.hideLabels = this.stepperEl.hideLabels;
|
|
21
27
|
this.stepperId = this.stepperEl.stepperId;
|
|
22
28
|
}
|
|
23
29
|
handlePropsChange(event) {
|
|
24
30
|
if (this.stepperId === event.detail.stepperId) {
|
|
25
31
|
event.detail.changed.forEach((changedProp) => {
|
|
26
32
|
if (typeof this[changedProp] === 'undefined') {
|
|
27
|
-
throw new Error(`
|
|
33
|
+
throw new Error(`Stepper prop is not supported: ${changedProp}`);
|
|
28
34
|
}
|
|
29
|
-
if (
|
|
30
|
-
this
|
|
35
|
+
else if (changedProp in propToStateMap) {
|
|
36
|
+
this[propToStateMap[changedProp]] = event.detail[changedProp];
|
|
31
37
|
}
|
|
32
|
-
this[changedProp] = event.detail[changedProp];
|
|
33
38
|
});
|
|
34
39
|
}
|
|
35
40
|
}
|
|
36
41
|
render() {
|
|
37
|
-
return (h(Host, null, h("div", { role: "listitem", class: `${this.size} ${this.orientation} text-${this.labelPosition} ${this.
|
|
42
|
+
return (h(Host, null, h("div", { role: "listitem", class: `${this.size} ${this.orientation} text-${this.labelPosition} ${this.hideLabels ? 'hide-labels' : ''}` }, h("div", { class: `${this.state} content-container` }, this.state === 'success' || this.state === 'error' ? (h("tds-icon", { name: this.state === 'success' ? 'tick' : 'warning', size: this.size === 'lg' ? '20px' : '16px' })) : (this.index)), !this.hideLabels && (h("div", { class: `label ${this.size} ${this.state}` }, h("slot", { name: "label" }))))));
|
|
38
43
|
}
|
|
39
44
|
static get is() { return "tds-step"; }
|
|
40
45
|
static get encapsulation() { return "shadow"; }
|
|
@@ -89,7 +94,7 @@ export class TdsStep {
|
|
|
89
94
|
}
|
|
90
95
|
static get states() {
|
|
91
96
|
return {
|
|
92
|
-
"
|
|
97
|
+
"hideLabels": {},
|
|
93
98
|
"size": {},
|
|
94
99
|
"orientation": {},
|
|
95
100
|
"labelPosition": {}
|
|
@@ -175,7 +175,7 @@ export class TdsStepper {
|
|
|
175
175
|
"references": {
|
|
176
176
|
"InternalTdsStepperPropChange": {
|
|
177
177
|
"location": "local",
|
|
178
|
-
"path": "/
|
|
178
|
+
"path": "/home/runner/work/tegel/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": "/home/runner/work/tegel/tegel/packages/core/src/components/table/table/table.tsx",
|
|
259
259
|
"id": "src/components/table/table/table.tsx::InternalTdsTablePropChange"
|
|
260
260
|
}
|
|
261
261
|
}
|