@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
|
@@ -3,6 +3,16 @@ export interface ComponentDecorator {
|
|
|
3
3
|
(opts?: ComponentOptions): ClassDecorator;
|
|
4
4
|
}
|
|
5
5
|
export interface ComponentOptions {
|
|
6
|
+
/**
|
|
7
|
+
* When set to `true` this component will be form-associated. See
|
|
8
|
+
* https://stenciljs.com/docs/next/form-associated documentation on how to
|
|
9
|
+
* build form-associated Stencil components that integrate into forms like
|
|
10
|
+
* native browser elements such as `<input>` and `<textarea>`.
|
|
11
|
+
*
|
|
12
|
+
* The {@link AttachInternals} decorator allows for access to the
|
|
13
|
+
* `ElementInternals` object to modify the associated form.
|
|
14
|
+
*/
|
|
15
|
+
formAssociated?: boolean;
|
|
6
16
|
/**
|
|
7
17
|
* Tag name of the web component. Ideally, the tag name must be globally unique,
|
|
8
18
|
* so it's recommended to choose an unique prefix for all your components within the same collection.
|
|
@@ -107,6 +117,9 @@ export interface EventOptions {
|
|
|
107
117
|
*/
|
|
108
118
|
composed?: boolean;
|
|
109
119
|
}
|
|
120
|
+
export interface AttachInternalsDecorator {
|
|
121
|
+
(): PropertyDecorator;
|
|
122
|
+
}
|
|
110
123
|
export interface ListenDecorator {
|
|
111
124
|
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
|
|
112
125
|
}
|
|
@@ -175,6 +188,12 @@ export declare const Element: ElementDecorator;
|
|
|
175
188
|
* https://stenciljs.com/docs/events
|
|
176
189
|
*/
|
|
177
190
|
export declare const Event: EventDecorator;
|
|
191
|
+
/**
|
|
192
|
+
* If the `formAssociated` option is set in options passed to the
|
|
193
|
+
* `@Component()` decorator then this decorator may be used to get access to the
|
|
194
|
+
* `ElementInternals` instance associated with the component.
|
|
195
|
+
*/
|
|
196
|
+
export declare const AttachInternals: AttachInternalsDecorator;
|
|
178
197
|
/**
|
|
179
198
|
* The `Listen()` decorator is for listening DOM events, including the ones
|
|
180
199
|
* dispatched from `@Events()`.
|
|
@@ -1115,11 +1134,13 @@ export declare namespace JSXBase {
|
|
|
1115
1134
|
autocomplete?: string;
|
|
1116
1135
|
}
|
|
1117
1136
|
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1137
|
+
height?: number;
|
|
1118
1138
|
media?: string;
|
|
1119
1139
|
sizes?: string;
|
|
1120
1140
|
src?: string;
|
|
1121
1141
|
srcSet?: string;
|
|
1122
1142
|
type?: string;
|
|
1143
|
+
width?: number;
|
|
1123
1144
|
}
|
|
1124
1145
|
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1125
1146
|
media?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const formatHtmlPreview: (htmlStr: any) =>
|
|
1
|
+
declare const formatHtmlPreview: (htmlStr: any) => any;
|
|
2
2
|
export default formatHtmlPreview;
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scania/tegel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Tegel Design System",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"tegel",
|
|
7
8
|
"scania",
|
|
@@ -34,12 +35,12 @@
|
|
|
34
35
|
"scripts": {
|
|
35
36
|
"build": "stencil build --docs",
|
|
36
37
|
"start": "stencil build --dev --watch --serve",
|
|
37
|
-
"test": "
|
|
38
|
+
"test": "node docker-test-runner.js",
|
|
39
|
+
"update-snapshots": "docker run --rm --network host -v $(pwd):/work/ -w /work/ mcr.microsoft.com/playwright:v1.39.0-jammy /bin/bash -c 'npm install && npx playwright test --update-snapshots && exit'",
|
|
38
40
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
39
41
|
"generate": "stencil generate",
|
|
40
42
|
"build-stencil:watch": "stencil build --docs-readme --watch",
|
|
41
43
|
"commit": "npm run --prefix ../ commit",
|
|
42
|
-
"tegel-release": "./tegel-release.sh",
|
|
43
44
|
"build-storybook": "build-storybook --quiet",
|
|
44
45
|
"build-stencil-storybook": "npm run build && npm run build-storybook",
|
|
45
46
|
"start-storybook": "start-storybook -p 6006",
|
|
@@ -47,12 +48,12 @@
|
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@popperjs/core": "^2.11.8",
|
|
50
|
-
"@stencil/core": "^4.
|
|
51
|
-
"dotenv": "^16.0.3",
|
|
51
|
+
"@stencil/core": "^4.7.1",
|
|
52
52
|
"prettier": "^2.7.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@babel/core": "^7.19.1",
|
|
56
|
+
"@playwright/test": "^1.39.0",
|
|
56
57
|
"@stencil/angular-output-target": "^0.8.2",
|
|
57
58
|
"@stencil/react-output-target": "^0.5.3",
|
|
58
59
|
"@stencil/sass": "^3.0.4",
|
|
@@ -66,14 +67,12 @@
|
|
|
66
67
|
"@storybook/addons": "^6.5.15",
|
|
67
68
|
"@storybook/builder-webpack4": "^6.5.16",
|
|
68
69
|
"@storybook/html": "^6.5.15",
|
|
69
|
-
"@types/jest": "^27.0.3",
|
|
70
70
|
"addon-screen-reader": "^1.8.6",
|
|
71
71
|
"babel-loader": "^8.2.5",
|
|
72
72
|
"concurrently": "^8.0.1",
|
|
73
73
|
"highlight.js": "^11.8.0",
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"puppeteer": "^20.8.0",
|
|
74
|
+
"serve": "^14.2.1",
|
|
75
|
+
"stencil-playwright": "^0.3.0",
|
|
77
76
|
"storybook-addon-designs": "^6.3.1",
|
|
78
77
|
"storybook-dark-mode": "^3.0.0",
|
|
79
78
|
"storybook-version": "^0.1.1"
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { Divider } from "./divider";
|
|
3
|
-
describe('tds-divider', () => {
|
|
4
|
-
it('renders a horizontal divider by default', async () => {
|
|
5
|
-
const page = await newSpecPage({
|
|
6
|
-
components: [Divider],
|
|
7
|
-
html: '<tds-divider></tds-divider>',
|
|
8
|
-
supportsShadowDom: true,
|
|
9
|
-
});
|
|
10
|
-
const { root } = page;
|
|
11
|
-
const divElement = root.shadowRoot.querySelector('div');
|
|
12
|
-
expect(divElement).not.toBeNull();
|
|
13
|
-
expect(root.getAttribute('role')).toBe('separator');
|
|
14
|
-
expect(root.getAttribute('aria-orientation')).toBeFalsy();
|
|
15
|
-
});
|
|
16
|
-
it('renders a vertical divider when orientation is set to "vertical"', async () => {
|
|
17
|
-
const page = await newSpecPage({
|
|
18
|
-
components: [Divider],
|
|
19
|
-
html: '<tds-divider orientation="vertical"></tds-divider>',
|
|
20
|
-
supportsShadowDom: true,
|
|
21
|
-
});
|
|
22
|
-
const { root } = page;
|
|
23
|
-
const divElement = root.shadowRoot.querySelector('div');
|
|
24
|
-
expect(divElement).not.toBeNull();
|
|
25
|
-
expect(root.getAttribute('role')).toBe('separator');
|
|
26
|
-
expect(root.getAttribute('aria-orientation')).toBe('vertical');
|
|
27
|
-
});
|
|
28
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
describe('tds-dropdown', () => {
|
|
3
|
-
it('should updated value when an option is clicked', async () => {
|
|
4
|
-
const page = await newE2EPage();
|
|
5
|
-
await page.setContent(`
|
|
6
|
-
<tds-dropdown>
|
|
7
|
-
<tds-dropdown-option value="option-1">
|
|
8
|
-
Option 1
|
|
9
|
-
</tds-dropdown-option>
|
|
10
|
-
<tds-dropdown-option value="option-2">
|
|
11
|
-
Option 2
|
|
12
|
-
</tds-dropdown-option>
|
|
13
|
-
<tds-dropdown-option value="option-3">
|
|
14
|
-
Option 3
|
|
15
|
-
</tds-dropdown-option>
|
|
16
|
-
</tds-drodpown>
|
|
17
|
-
`);
|
|
18
|
-
const dropdown = await page.find('tds-dropdown');
|
|
19
|
-
expect(dropdown).not.toBeNull();
|
|
20
|
-
await dropdown.click();
|
|
21
|
-
await page.waitForChanges();
|
|
22
|
-
const firstDropdownOption = await page.find('tds-dropdown-option[value="option-1"]');
|
|
23
|
-
await firstDropdownOption.click();
|
|
24
|
-
await page.waitForChanges();
|
|
25
|
-
expect(dropdown.getAttribute('value')).toBe('option-1');
|
|
26
|
-
await dropdown.click();
|
|
27
|
-
const secondDropdownOption = await page.find('tds-dropdown-option[value="option-2"]');
|
|
28
|
-
await secondDropdownOption.click();
|
|
29
|
-
await page.waitForChanges();
|
|
30
|
-
expect(dropdown.getAttribute('value')).toBe('option-2');
|
|
31
|
-
});
|
|
32
|
-
});
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { h } from "@stencil/core";
|
|
3
|
-
import { TdsDropdown } from "../dropdown";
|
|
4
|
-
import { TdsDropdownOption } from "../dropdown-option/dropdown-option";
|
|
5
|
-
const options = [
|
|
6
|
-
{
|
|
7
|
-
value: 'option-1',
|
|
8
|
-
label: 'Option 1',
|
|
9
|
-
disabled: false,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
value: 'option-2',
|
|
13
|
-
label: 'Option 2',
|
|
14
|
-
disabled: false,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
value: 'option-3',
|
|
18
|
-
label: 'Option 3',
|
|
19
|
-
disabled: true,
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
const getTemplate = (defaultValue) => ({
|
|
23
|
-
components: [TdsDropdown, TdsDropdownOption],
|
|
24
|
-
template: () => (h("tds-dropdown", { filter: true, defaultValue: defaultValue }, options.map((option) => (h("tds-dropdown-option", { value: option.value, disabled: option.disabled }, option.label))))),
|
|
25
|
-
});
|
|
26
|
-
describe('filter dropdown', () => {
|
|
27
|
-
it('should render children correctly', async () => {
|
|
28
|
-
const page = await newSpecPage(getTemplate());
|
|
29
|
-
const children = await page.doc.querySelectorAll('tds-dropdown-option');
|
|
30
|
-
expect(children.length).toBe(3);
|
|
31
|
-
});
|
|
32
|
-
it('should set defaultValue correctly', async () => {
|
|
33
|
-
const page = await newSpecPage(getTemplate('option-1'));
|
|
34
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
35
|
-
expect(dropdown.getAttribute('value')).toBe('option-1');
|
|
36
|
-
});
|
|
37
|
-
it('should set value using setValue() correctly', async () => {
|
|
38
|
-
const page = await newSpecPage(getTemplate('option-3'));
|
|
39
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
40
|
-
await dropdown.setValue('option-1');
|
|
41
|
-
expect(dropdown.getAttribute('value')).toBe('option-1');
|
|
42
|
-
});
|
|
43
|
-
it('should remove value using removeValue() correctly', async () => {
|
|
44
|
-
const page = await newSpecPage(getTemplate('option-3'));
|
|
45
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
46
|
-
await dropdown.removeValue('option-3');
|
|
47
|
-
expect(dropdown.getAttribute('value')).toBe('null');
|
|
48
|
-
});
|
|
49
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
-
describe('tds-dropdown multiselect', () => {
|
|
3
|
-
it('should updated value when an option is clicked', async () => {
|
|
4
|
-
const page = await newE2EPage();
|
|
5
|
-
await page.setContent(`
|
|
6
|
-
<tds-dropdown multiselect>
|
|
7
|
-
<tds-dropdown-option value="option-1">
|
|
8
|
-
Option 1
|
|
9
|
-
</tds-dropdown-option>
|
|
10
|
-
<tds-dropdown-option value="option-2">
|
|
11
|
-
Option 2
|
|
12
|
-
</tds-dropdown-option>
|
|
13
|
-
<tds-dropdown-option value="option-3">
|
|
14
|
-
Option 3
|
|
15
|
-
</tds-dropdown-option>
|
|
16
|
-
</tds-drodpown>
|
|
17
|
-
`);
|
|
18
|
-
const dropdown = await page.find('tds-dropdown');
|
|
19
|
-
expect(dropdown).not.toBeNull();
|
|
20
|
-
await dropdown.click();
|
|
21
|
-
await page.waitForChanges();
|
|
22
|
-
const firstDropdownOption = await page.find('tds-dropdown-option[value="option-1"]');
|
|
23
|
-
await firstDropdownOption.click();
|
|
24
|
-
await page.waitForChanges();
|
|
25
|
-
expect(dropdown.getAttribute('value')).toBe('option-1');
|
|
26
|
-
const secondDropdownOption = await page.find('tds-dropdown-option[value="option-2"]');
|
|
27
|
-
await secondDropdownOption.click();
|
|
28
|
-
await page.waitForChanges();
|
|
29
|
-
expect(dropdown.getAttribute('value')).toBe('option-1,option-2');
|
|
30
|
-
});
|
|
31
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { h } from "@stencil/core";
|
|
3
|
-
import { TdsDropdown } from "../dropdown";
|
|
4
|
-
import { TdsDropdownOption } from "../dropdown-option/dropdown-option";
|
|
5
|
-
const options = [
|
|
6
|
-
{
|
|
7
|
-
value: 'option-1',
|
|
8
|
-
label: 'Option 1',
|
|
9
|
-
disabled: false,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
value: 'option-2',
|
|
13
|
-
label: 'Option 2',
|
|
14
|
-
disabled: false,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
value: 'option-3',
|
|
18
|
-
label: 'Option 3',
|
|
19
|
-
disabled: true,
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
const getTemplate = (defaultValue) => ({
|
|
23
|
-
components: [TdsDropdown, TdsDropdownOption],
|
|
24
|
-
template: () => (h("tds-dropdown", { multiselect: true, defaultValue: defaultValue }, options.map((option) => (h("tds-dropdown-option", { value: option.value, disabled: option.disabled }, option.label))))),
|
|
25
|
-
});
|
|
26
|
-
describe('multiselect dropdown', () => {
|
|
27
|
-
it('should render children correctly', async () => {
|
|
28
|
-
const page = await newSpecPage(getTemplate());
|
|
29
|
-
const children = await page.doc.querySelectorAll('tds-dropdown-option');
|
|
30
|
-
expect(children.length).toBe(3);
|
|
31
|
-
});
|
|
32
|
-
it('should set defaultValue correctly', async () => {
|
|
33
|
-
const page = await newSpecPage(getTemplate('option-1,option-2'));
|
|
34
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
35
|
-
expect(dropdown.getAttribute('value')).toBe('option-1,option-2');
|
|
36
|
-
});
|
|
37
|
-
it('should set value using setValue() correctly', async () => {
|
|
38
|
-
const page = await newSpecPage(getTemplate('option-1,option-2'));
|
|
39
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
40
|
-
await dropdown.setValue(['option-1', 'option-3']);
|
|
41
|
-
expect(dropdown.getAttribute('value')).toBe('option-1,option-3');
|
|
42
|
-
});
|
|
43
|
-
it('should remove value using removeValue() correctly', async () => {
|
|
44
|
-
const page = await newSpecPage(getTemplate('option-3,option-1'));
|
|
45
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
46
|
-
await dropdown.removeValue('option-3');
|
|
47
|
-
expect(dropdown.getAttribute('value')).toBe('option-1');
|
|
48
|
-
await dropdown.removeValue('option-1');
|
|
49
|
-
expect(dropdown.getAttribute('value')).toBe('null');
|
|
50
|
-
});
|
|
51
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { h } from "@stencil/core";
|
|
3
|
-
import { TdsDropdown } from "../dropdown";
|
|
4
|
-
import { TdsDropdownOption } from "../dropdown-option/dropdown-option";
|
|
5
|
-
const options = [
|
|
6
|
-
{
|
|
7
|
-
value: 'option-1',
|
|
8
|
-
label: 'Option 1',
|
|
9
|
-
disabled: false,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
value: 'option-2',
|
|
13
|
-
label: 'Option 2',
|
|
14
|
-
disabled: false,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
value: 'option-3',
|
|
18
|
-
label: 'Option 3',
|
|
19
|
-
disabled: true,
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
const getTemplate = (defaultValue) => ({
|
|
23
|
-
components: [TdsDropdown, TdsDropdownOption],
|
|
24
|
-
template: () => (h("tds-dropdown", { defaultValue: defaultValue }, options.map((option) => (h("tds-dropdown-option", { value: option.value, disabled: option.disabled }, option.label))))),
|
|
25
|
-
});
|
|
26
|
-
describe('singleselect dropdown', () => {
|
|
27
|
-
it('should render children correctly', async () => {
|
|
28
|
-
const page = await newSpecPage(getTemplate());
|
|
29
|
-
const children = await page.doc.querySelectorAll('tds-dropdown-option');
|
|
30
|
-
expect(children.length).toBe(3);
|
|
31
|
-
});
|
|
32
|
-
it('should set defaultValue correctly', async () => {
|
|
33
|
-
const page = await newSpecPage(getTemplate('option-3'));
|
|
34
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
35
|
-
expect(dropdown.getAttribute('value')).toBe('option-3');
|
|
36
|
-
expect(dropdown.getAttribute('value')).not.toBe('option-2');
|
|
37
|
-
});
|
|
38
|
-
it('should set value using setValue() correctly', async () => {
|
|
39
|
-
const page = await newSpecPage(getTemplate('option-3'));
|
|
40
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
41
|
-
await dropdown.setValue('option-1');
|
|
42
|
-
expect(dropdown.getAttribute('value')).toBe('option-1');
|
|
43
|
-
expect(dropdown.getAttribute('value')).not.toBe('option-3');
|
|
44
|
-
});
|
|
45
|
-
it('should remove value using removeValue() correctly', async () => {
|
|
46
|
-
const page = await newSpecPage(getTemplate('option-3'));
|
|
47
|
-
const dropdown = await page.doc.querySelector('tds-dropdown');
|
|
48
|
-
await dropdown.removeValue('option-3');
|
|
49
|
-
expect(dropdown.getAttribute('value')).toBe('null');
|
|
50
|
-
});
|
|
51
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { h } from "@stencil/core";
|
|
3
|
-
import { TdsTableBody } from "./table-body/table-body";
|
|
4
|
-
import { TdsTableHeaderRow } from "./table-header/table-header";
|
|
5
|
-
import { TdsTable } from "./table/table";
|
|
6
|
-
import { TdsTableHeaderCell } from "./table-header-cell/table-header-cell";
|
|
7
|
-
import { TdsTableToolbar } from "./table-toolbar/table-toolbar";
|
|
8
|
-
describe('tds-table filtering', () => {
|
|
9
|
-
it('should render cells from enable-dummy-data prop', async () => {
|
|
10
|
-
const mismatchingCellSpy = jest.fn();
|
|
11
|
-
const matchingCellSpy = jest.fn();
|
|
12
|
-
const page = await newSpecPage({
|
|
13
|
-
components: [TdsTable, TdsTableToolbar, TdsTableHeaderRow, TdsTableHeaderCell, TdsTableBody],
|
|
14
|
-
template: () => (h("tds-table", { "table-id": "unique-test-id" }, h("tds-table-toolbar", { "table-title": "Filter me", filter: true }), h("tds-table-header", null, h("tds-header-cell", { "cell-key": "truck" }), h("tds-header-cell", { "cell-key": "driver" }), h("tds-header-cell", { "cell-key": "country" }), h("tds-header-cell", { "cell-key": "mileage" })), h("tds-table-body", null, h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "L-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Sonya Bruce", onClick: (e) => matchingCellSpy(e) }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Brazil" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "123987" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "P-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Guerra Bowman" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Sweden" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "2000852" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "G-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Ferrell Wallace", onClick: (e) => mismatchingCellSpy(e) }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Germany" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "564" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "R-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Cox Burris" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Spain" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "1789357" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "S-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Montgomery Cervantes" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Croatia" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "65" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "L-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Sheryl Nielsen" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Greece" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "365784" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "G-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Benton Gomez" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "France" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "80957" }))))),
|
|
15
|
-
});
|
|
16
|
-
const toolbarEl = await page.doc.querySelector('tds-table-toolbar');
|
|
17
|
-
const inputEl = toolbarEl.shadowRoot.querySelector('input');
|
|
18
|
-
inputEl.value = 'sonya';
|
|
19
|
-
inputEl.dispatchEvent(new Event('keydown'));
|
|
20
|
-
inputEl.dispatchEvent(new Event('input'));
|
|
21
|
-
inputEl.dispatchEvent(new Event('keyup'));
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { h } from "@stencil/core";
|
|
3
|
-
import { TdsTableBody } from "./table-body/table-body";
|
|
4
|
-
import { TdsTableHeaderRow } from "./table-header/table-header";
|
|
5
|
-
import { TdsTable } from "./table/table";
|
|
6
|
-
import { TdsTableHeaderCell } from "./table-header-cell/table-header-cell";
|
|
7
|
-
describe('tds-table', () => {
|
|
8
|
-
it('should render cells from body-data prop', async () => {
|
|
9
|
-
const page = await newSpecPage({
|
|
10
|
-
components: [TdsTable, TdsTableHeaderRow, TdsTableHeaderCell, TdsTableBody],
|
|
11
|
-
template: () => (h("tds-table", { "table-id": "unique-test-id" }, h("tds-table-header", null, h("tds-header-cell", { "cell-key": "truck" }), h("tds-header-cell", { "cell-key": "driver" }), h("tds-header-cell", { "cell-key": "country" }), h("tds-header-cell", { "cell-key": "mileage" })), h("tds-table-body", null, h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "L-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Sonya Bruce" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Brazil" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "123987" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "P-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Guerra Bowman" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Sweden" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "2000852" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "G-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Ferrell Wallace" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Germany" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "564" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "R-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Cox Burris" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Spain" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "1789357" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "S-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Montgomery Cervantes" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Croatia" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "65" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "L-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Sheryl Nielsen" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "Greece" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "365784" })), h("tds-table-body-row", null, h("tds-body-cell", { "cell-key": "truck", "cell-value": "G-series" }), h("tds-body-cell", { "cell-key": "driver", "cell-value": "Benton Gomez" }), h("tds-body-cell", { "cell-key": "country", "cell-value": "France" }), h("tds-body-cell", { "cell-key": "mileage", "cell-value": "80957" }))))),
|
|
12
|
-
});
|
|
13
|
-
const cells = await page.doc.querySelectorAll('tds-body-cell');
|
|
14
|
-
expect(cells.length).toBe(4 * 7);
|
|
15
|
-
});
|
|
16
|
-
});
|