@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
|
@@ -36,6 +36,20 @@ export default {
|
|
|
36
36
|
defaultValue: { summary: 'Inherit from parent' },
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
|
+
allSelected: {
|
|
40
|
+
name: 'All selected',
|
|
41
|
+
description: `Controls the checked state of the "all-selected"-checkbox.`,
|
|
42
|
+
control: {
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
allIndeterminate: {
|
|
47
|
+
name: 'All indeterminate',
|
|
48
|
+
description: `Controls the indeterminate state of the "all-selected"-checkbox.`,
|
|
49
|
+
control: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
39
53
|
compactDesign: {
|
|
40
54
|
name: 'Compact design',
|
|
41
55
|
description: 'Enables compact design of the Table, rows with less height.',
|
|
@@ -108,6 +122,8 @@ export default {
|
|
|
108
122
|
},
|
|
109
123
|
args: {
|
|
110
124
|
modeVariant: 'Inherit from parent',
|
|
125
|
+
allSelected: false,
|
|
126
|
+
allIndeterminate: false,
|
|
111
127
|
compactDesign: false,
|
|
112
128
|
responsiveDesign: false,
|
|
113
129
|
verticalDivider: false,
|
|
@@ -118,7 +134,7 @@ export default {
|
|
|
118
134
|
column4Width: '',
|
|
119
135
|
},
|
|
120
136
|
};
|
|
121
|
-
const MultiselectTemplate = ({ modeVariant, compactDesign, responsiveDesign, verticalDivider, noMinWidth, column1Width, column2Width, column3Width, column4Width, }) => formatHtmlPreview(`
|
|
137
|
+
const MultiselectTemplate = ({ modeVariant, allSelected, allIndeterminate, compactDesign, responsiveDesign, verticalDivider, noMinWidth, column1Width, column2Width, column3Width, column4Width, }) => formatHtmlPreview(`
|
|
122
138
|
<tds-table
|
|
123
139
|
table-id="multiselect-table"
|
|
124
140
|
multiselect
|
|
@@ -128,7 +144,7 @@ const MultiselectTemplate = ({ modeVariant, compactDesign, responsiveDesign, ver
|
|
|
128
144
|
${noMinWidth ? 'no-min-width' : ''}
|
|
129
145
|
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
130
146
|
>
|
|
131
|
-
<tds-table-header>
|
|
147
|
+
<tds-table-header ${allSelected ? 'selected' : ''} ${allIndeterminate ? 'indeterminate' : ''}>
|
|
132
148
|
<tds-header-cell cell-key='truck' cell-value='Truck type' ${column1Width ? `custom-width="${column1Width}"` : ''}></tds-header-cell>
|
|
133
149
|
<tds-header-cell cell-key='driver' cell-value='Driver name' ${column2Width ? `custom-width="${column2Width}"` : ''}></tds-header-cell>
|
|
134
150
|
<tds-header-cell cell-key='country' cell-value='Country' ${column3Width ? `custom-width="${column3Width}"` : ''}></tds-header-cell>
|
|
@@ -12,6 +12,8 @@ const relevantTableProps = [
|
|
|
12
12
|
export class TdsTableHeaderRow {
|
|
13
13
|
constructor() {
|
|
14
14
|
this.allSelected = false;
|
|
15
|
+
this.selected = undefined;
|
|
16
|
+
this.indeterminate = false;
|
|
15
17
|
this.multiselect = false;
|
|
16
18
|
this.expandableRows = false;
|
|
17
19
|
this.mainCheckboxSelected = false;
|
|
@@ -83,7 +85,7 @@ export class TdsTableHeaderRow {
|
|
|
83
85
|
'tds-table--compact': this.compactDesign,
|
|
84
86
|
'tds-table--divider': this.verticalDividers,
|
|
85
87
|
'tds-table--toolbar-available': this.enableToolbarDesign,
|
|
86
|
-
} }, h("tr", null, this.multiselect && (h("th", { class: "tds-table__header-cell tds-table__header-cell--checkbox" }, h("div", { class: "tds-form-label tds-form-label--table" }, h("tds-checkbox", { checked: this.allSelected, onTdsChange: (event) => this.handleCheckboxChange(event) })))), this.expandableRows && (h("th", { class: "tds-table__header-cell tds-table__header-cell--checkbox" })), h("slot", null))));
|
|
88
|
+
} }, h("tr", null, this.multiselect && (h("th", { class: "tds-table__header-cell tds-table__header-cell--checkbox" }, h("div", { class: "tds-form-label tds-form-label--table" }, h("tds-checkbox", { checked: this.allSelected || this.selected, indeterminate: this.indeterminate, onTdsChange: (event) => this.handleCheckboxChange(event) })))), this.expandableRows && (h("th", { class: "tds-table__header-cell tds-table__header-cell--checkbox" })), h("slot", null))));
|
|
87
89
|
}
|
|
88
90
|
static get is() { return "tds-table-header"; }
|
|
89
91
|
static get encapsulation() { return "shadow"; }
|
|
@@ -110,12 +112,50 @@ export class TdsTableHeaderRow {
|
|
|
110
112
|
"required": false,
|
|
111
113
|
"optional": false,
|
|
112
114
|
"docs": {
|
|
113
|
-
"tags": [
|
|
114
|
-
|
|
115
|
+
"tags": [{
|
|
116
|
+
"name": "deprecated",
|
|
117
|
+
"text": "Deprecated, use selected instead.."
|
|
118
|
+
}],
|
|
119
|
+
"text": ""
|
|
115
120
|
},
|
|
116
121
|
"attribute": "all-selected",
|
|
117
122
|
"reflect": true,
|
|
118
123
|
"defaultValue": "false"
|
|
124
|
+
},
|
|
125
|
+
"selected": {
|
|
126
|
+
"type": "boolean",
|
|
127
|
+
"mutable": true,
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "boolean",
|
|
130
|
+
"resolved": "boolean",
|
|
131
|
+
"references": {}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": false,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": "Prop for controling the checked/unchecked state of the \"All selected\"-checkbox."
|
|
138
|
+
},
|
|
139
|
+
"attribute": "selected",
|
|
140
|
+
"reflect": true
|
|
141
|
+
},
|
|
142
|
+
"indeterminate": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "boolean",
|
|
147
|
+
"resolved": "boolean",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "Prop for controling the indeterminate state of the \"All selected\"-checkbox."
|
|
155
|
+
},
|
|
156
|
+
"attribute": "indeterminate",
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"defaultValue": "false"
|
|
119
159
|
}
|
|
120
160
|
};
|
|
121
161
|
}
|
|
@@ -204,7 +204,7 @@ const Template = ({ modeVariant, state, type, size, label, labelPosition, placeh
|
|
|
204
204
|
|
|
205
205
|
<div class="demo-wrapper">
|
|
206
206
|
<tds-text-field
|
|
207
|
-
type="${type}"
|
|
207
|
+
type="${type.toLowerCase()}"
|
|
208
208
|
size="${sizeLookUp[size]}"
|
|
209
209
|
${modeVariant !== 'Inherit from parent' ? `mode-variant="${modeVariant.toLowerCase()}"` : ''}
|
|
210
210
|
state="${stateValue}"
|
|
@@ -57,7 +57,10 @@ export class TdsToast {
|
|
|
57
57
|
const usesHeaderSlot = hasSlot('header', this.host);
|
|
58
58
|
const usesSubheaderSlot = hasSlot('subheader', this.host);
|
|
59
59
|
const usesActionsSlot = hasSlot('actions', this.host);
|
|
60
|
-
return (h(Host, { toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class:
|
|
60
|
+
return (h(Host, { toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: {
|
|
61
|
+
hide: this.hidden,
|
|
62
|
+
show: !this.hidden,
|
|
63
|
+
} }, h("div", { class: `
|
|
61
64
|
wrapper
|
|
62
65
|
${this.variant}` }, h("tds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `content` }, h("div", { class: "header-subheader" }, this.header && h("div", { class: "header" }, this.header), usesHeaderSlot && h("slot", { name: "header" }), this.subheader && h("div", { class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { name: "subheader" })), usesActionsSlot && (h("div", { class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { name: "actions" })))), h("button", { onClick: () => {
|
|
63
66
|
this.handleClose();
|
|
@@ -54,6 +54,13 @@ export default {
|
|
|
54
54
|
type: 'text',
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
|
+
hidden: {
|
|
58
|
+
name: 'Hidden',
|
|
59
|
+
description: 'Hides the Toast.',
|
|
60
|
+
control: {
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
},
|
|
63
|
+
},
|
|
57
64
|
},
|
|
58
65
|
args: {
|
|
59
66
|
variant: 'Information',
|
|
@@ -62,12 +69,14 @@ export default {
|
|
|
62
69
|
actions: `<tds-link slot="actions">
|
|
63
70
|
<a href="https://tegel.scania.com/home" target="_blank">Tegel</a>
|
|
64
71
|
</tds-link>`,
|
|
72
|
+
hidden: false,
|
|
65
73
|
},
|
|
66
74
|
};
|
|
67
|
-
const Template = ({ variant, header, subheader, actions }) => formatHtmlPreview(`<tds-toast
|
|
75
|
+
const Template = ({ variant, header, subheader, actions, hidden }) => formatHtmlPreview(`<tds-toast
|
|
68
76
|
variant="${variant.toLowerCase()}"
|
|
69
77
|
header="${header}"
|
|
70
78
|
${subheader ? `subheader="${subheader}"` : ''}
|
|
79
|
+
${hidden ? 'hidden' : ''}
|
|
71
80
|
>
|
|
72
81
|
${actions || ''}
|
|
73
82
|
</tds-toast>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
const meta = {
|
|
2
|
+
title: 'Intro/Installation',
|
|
3
|
+
parameters: {
|
|
4
|
+
layout: 'fullscreen',
|
|
5
|
+
options: {
|
|
6
|
+
showPanel: false,
|
|
7
|
+
showToolbar: false,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const Angular = {
|
|
13
|
+
render: () => `<style>
|
|
14
|
+
article {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
max-width: 688px;
|
|
17
|
+
padding: 32px;
|
|
18
|
+
margin: auto;
|
|
19
|
+
> * {
|
|
20
|
+
margin-bottom: 72px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
section > p,
|
|
25
|
+
section > ul,
|
|
26
|
+
section > tds-link {
|
|
27
|
+
margin-bottom: 32px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
tds-link {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mb-72 {
|
|
35
|
+
margin-bottom: 72px;
|
|
36
|
+
}
|
|
37
|
+
code {
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
<article class="tds-u-p2 tds-body-01">
|
|
42
|
+
<section>
|
|
43
|
+
<p class="tds-body-01"><strong>Published: 2023-10-11</strong></p>
|
|
44
|
+
<h1 class="tds-headline-02">Using Tegel in Angular</h1>
|
|
45
|
+
<p>
|
|
46
|
+
Tegel offers Angular wrappers for all web components. While the rendered components still maintain
|
|
47
|
+
their core as web components, these wrappers significantly enhance the developer's experience by
|
|
48
|
+
providing a more intuitive API and seamless integration with Angular. You can find these wrappers
|
|
49
|
+
in a separate package called <code>@scania/tegel-angular</code>, which is the recommended approach for integrating
|
|
50
|
+
Tegel into a Angular application.
|
|
51
|
+
</p>
|
|
52
|
+
</section>
|
|
53
|
+
<section>
|
|
54
|
+
<h4 class="tds-u-mb2">Prerequisites</h4>
|
|
55
|
+
<ul>
|
|
56
|
+
<li>Node version 18+</li>
|
|
57
|
+
<li>Angular 14+</li>
|
|
58
|
+
</ul>
|
|
59
|
+
</section>
|
|
60
|
+
<section>
|
|
61
|
+
<h4 class="tds-u-mb2">
|
|
62
|
+
Installing <code>@scania/tegel-angular</<code>
|
|
63
|
+
</h4>
|
|
64
|
+
<p class="tds-body-01">Install the <code>@scania/tegel-angular</code> package via npm.</p>
|
|
65
|
+
<pre>
|
|
66
|
+
<code>
|
|
67
|
+
npm install @scania/tegel-angular
|
|
68
|
+
</code>
|
|
69
|
+
</pre>
|
|
70
|
+
<p class="tds-body-01">In your global css file import the tegel stylesheet.</p>
|
|
71
|
+
<pre>
|
|
72
|
+
<code>
|
|
73
|
+
@import url('@scania/tegel/dist/tegel/tegel.css');
|
|
74
|
+
</code>
|
|
75
|
+
</pre>
|
|
76
|
+
|
|
77
|
+
<p class="tds-body-01">Import the <code>TegelModule</code> in your app.module.ts.</p>
|
|
78
|
+
<pre>
|
|
79
|
+
<code>
|
|
80
|
+
import { NgModule } from '@angular/core';
|
|
81
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
82
|
+
import { AppComponent } from './app.component';
|
|
83
|
+
import { TegelModule } from '@scania/tegel-angular';
|
|
84
|
+
|
|
85
|
+
@NgModule({
|
|
86
|
+
declarations: [
|
|
87
|
+
AppComponent,
|
|
88
|
+
TesterComponent
|
|
89
|
+
],
|
|
90
|
+
imports: [
|
|
91
|
+
BrowserModule,
|
|
92
|
+
TegelModule,
|
|
93
|
+
],
|
|
94
|
+
providers: [],
|
|
95
|
+
bootstrap: [AppComponent]
|
|
96
|
+
})
|
|
97
|
+
export class AppModule { }
|
|
98
|
+
</code>
|
|
99
|
+
</pre>
|
|
100
|
+
<p class="tds-body-01">After this, all TDS components will be available in your template files. Example:</p>
|
|
101
|
+
<pre>
|
|
102
|
+
<code>
|
|
103
|
+
<tds-button text="Click me!" variant="primary" size="sm">
|
|
104
|
+
<tds-icon slot="icon" name="truck"> </tds-icon>
|
|
105
|
+
</tds-button>
|
|
106
|
+
</code>
|
|
107
|
+
</pre>
|
|
108
|
+
|
|
109
|
+
</section>
|
|
110
|
+
</article> `,
|
|
111
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import hljs from "highlight.js";
|
|
2
|
+
import "../../../.storybook/tegel.syntax.highlighter.css";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Intro/Installation',
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: 'fullscreen',
|
|
7
|
+
options: {
|
|
8
|
+
showPanel: false,
|
|
9
|
+
showToolbar: false,
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
hljs.highlightAll();
|
|
14
|
+
export default meta;
|
|
15
|
+
export const Javascript = {
|
|
16
|
+
render: () => `
|
|
17
|
+
<style>
|
|
18
|
+
article {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
max-width: 688px;
|
|
21
|
+
|
|
22
|
+
padding: 32px;
|
|
23
|
+
margin: auto;
|
|
24
|
+
>* {
|
|
25
|
+
margin-bottom: 72px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
code {
|
|
30
|
+
border-radius: 4px;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
33
|
+
<article class="tds-u-p2 tds-body-01">
|
|
34
|
+
<section>
|
|
35
|
+
<p class="tds-body-01"><strong>Published: 2023-10-11</strong></p>
|
|
36
|
+
<h1 class="tds-headline-02">Installing Tegel</h1>
|
|
37
|
+
<p>This is a getting started guide aimed at developers that want to install and use the @scania/tegel library (TDS).
|
|
38
|
+
This library consists of web components built using Stencil, which means that they are framework agnostic and follow
|
|
39
|
+
browser standards. The library is installed and updated via NPM (node package manager). For further installation
|
|
40
|
+
information please see the framework specific installation guides below.
|
|
41
|
+
</p>
|
|
42
|
+
</section>
|
|
43
|
+
|
|
44
|
+
<section>
|
|
45
|
+
<h4>Migration from SDDS</h4>
|
|
46
|
+
<p>TDS and @scania/components (SDDS) share a lot of design, but the tech implementation have two different approaches.
|
|
47
|
+
Therefore there is some migration work needed when going from SDDS to TDS. We have outlined all the differences in this
|
|
48
|
+
<tds-link><a href="?path=/story/intro-migrating-from-components-v4--page">migration document</a></tds-link>. However, since they exist in different namespaces (SDDS is prefixed with ‘sdds’ and TDS with ‘tds’)
|
|
49
|
+
the two solutions can exist alongside each other, enabling a soft migration that can be done over time.</p>
|
|
50
|
+
</section>
|
|
51
|
+
|
|
52
|
+
<section>
|
|
53
|
+
<h4>Framework integrations</h4>
|
|
54
|
+
<p>TDS is, like previously mentioned, a collection of web components. This enables them to work within any frontend
|
|
55
|
+
framework since they are built on web standards. However, achieving a seamless integration can be challenging because
|
|
56
|
+
different frameworks offer varying levels of support for vanilla web components. To still allow for a premium developer
|
|
57
|
+
experience we leverage Stencils (the complier used to build the TDS web components) output targets to build
|
|
58
|
+
“framework-wrappers”. These are separate npm packages consisting of framework specific counterparts for all of the
|
|
59
|
+
components in @scania/tegel. The currently available packages are built for Angular (@scania/tegel-angular) and
|
|
60
|
+
React (@scania/tegel-react). If you are planning to use TDS in an Angular or React application we recommend you follow the
|
|
61
|
+
installation guide for the respective framework.
|
|
62
|
+
|
|
63
|
+
<div><tds-link><a href="?path=/story/intro-installation--angular">Angular installation guide</a></tds-link></div>
|
|
64
|
+
<div><tds-link><a href="?path=/story/intro-installation--react">React installation guide</a></tds-link></div>
|
|
65
|
+
|
|
66
|
+
</p>
|
|
67
|
+
</section>
|
|
68
|
+
<section>
|
|
69
|
+
<h4>Javascript</h4>
|
|
70
|
+
<p>This guide is aimed at developers that want to use TDS in an application without any framework.</p>
|
|
71
|
+
<p>Run npm init to generate a package.json, and then install @scania/tegel.</p>
|
|
72
|
+
<pre>
|
|
73
|
+
<code>
|
|
74
|
+
npm install @scania/tegel
|
|
75
|
+
</code>
|
|
76
|
+
</pre>
|
|
77
|
+
<p>The components needs to be registered before they can be used. For example, import and call the <code>defineCustomElements</code> function in your <code><head></code>. You also need to import the Tegel stylesheet.</p>
|
|
78
|
+
<pre>
|
|
79
|
+
<code>
|
|
80
|
+
<script type="module">
|
|
81
|
+
import { defineCustomElements } from './node_modules/@scania/tegel/loader/index.es2017.js';
|
|
82
|
+
defineCustomElements();
|
|
83
|
+
</script>
|
|
84
|
+
<link rel="stylesheet" href="./node_modules/@scania/tegel/dist/tegel/tegel.css"/>
|
|
85
|
+
</code>
|
|
86
|
+
</pre>
|
|
87
|
+
<p class="tds-body-01">After this, all TDS component will be available in your template files. Example:</p>
|
|
88
|
+
<pre>
|
|
89
|
+
<code>
|
|
90
|
+
<tds-button text="Click me!" variant="primary" size="sm">
|
|
91
|
+
<tds-icon slot="icon" name="truck"> </tds-icon>
|
|
92
|
+
</tds-button>
|
|
93
|
+
</code>
|
|
94
|
+
</pre>
|
|
95
|
+
|
|
96
|
+
</section>
|
|
97
|
+
</article>
|
|
98
|
+
`,
|
|
99
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const meta = {
|
|
2
|
+
title: 'Intro/Installation',
|
|
3
|
+
parameters: {
|
|
4
|
+
layout: 'fullscreen',
|
|
5
|
+
options: {
|
|
6
|
+
showPanel: false,
|
|
7
|
+
showToolbar: false,
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
export const React = {
|
|
13
|
+
render: () => `<style>
|
|
14
|
+
article {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
max-width: 688px;
|
|
17
|
+
padding: 32px;
|
|
18
|
+
margin: auto;
|
|
19
|
+
> * {
|
|
20
|
+
margin-bottom: 72px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
section > p,
|
|
25
|
+
section > ul,
|
|
26
|
+
section > tds-link {
|
|
27
|
+
margin-bottom: 32px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
tds-link {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mb-72 {
|
|
35
|
+
margin-bottom: 72px;
|
|
36
|
+
}
|
|
37
|
+
code {
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
<article class="tds-u-p2 tds-body-01">
|
|
42
|
+
<section>
|
|
43
|
+
<p class="tds-body-01"><strong>Published: 2023-10-11</strong></p>
|
|
44
|
+
<h1 class="tds-headline-02">Using Tegel in React</h1>
|
|
45
|
+
<p class="tds-body-01">
|
|
46
|
+
Tegel offers React wrappers for all web components. While the rendered components still maintain
|
|
47
|
+
their core as web components, these wrappers significantly enhance the developers experience by
|
|
48
|
+
providing a more intuitive API and seamless integration with React. You can find these wrappers
|
|
49
|
+
in a separate package called <code>@scania/tegel-react</code>, which is the recommended approach for integrating
|
|
50
|
+
Tegel into a React application.
|
|
51
|
+
</p>
|
|
52
|
+
</section>
|
|
53
|
+
<section>
|
|
54
|
+
<h4 class="tds-u-mb2">Prerequisites</h4>
|
|
55
|
+
<ul>
|
|
56
|
+
<li>Node version 18+</li>
|
|
57
|
+
</ul>
|
|
58
|
+
</section>
|
|
59
|
+
<section>
|
|
60
|
+
<h4 class="tds-u-mb2">
|
|
61
|
+
Installing <code>@scania/tegel-react</<code>
|
|
62
|
+
</h4>
|
|
63
|
+
<p class="tds-body-01">Install the <code>@scania/tegel-react</code> package via npm.</p>
|
|
64
|
+
<pre>
|
|
65
|
+
<code>
|
|
66
|
+
npm install @scania/tegel-react
|
|
67
|
+
</code>
|
|
68
|
+
</pre>
|
|
69
|
+
<p class="tds-body-01">In your global css file import the tegel stylesheet.</p>
|
|
70
|
+
<pre>
|
|
71
|
+
<code>
|
|
72
|
+
@import url('@scania/tegel/dist/tegel/tegel.css');
|
|
73
|
+
</code>
|
|
74
|
+
</pre>
|
|
75
|
+
|
|
76
|
+
<p class="tds-body-01">Import the <code>defineCustomElements</code> function and call it. After that, import the components you want to use. </p>
|
|
77
|
+
<pre>
|
|
78
|
+
<code>
|
|
79
|
+
import React from 'react';
|
|
80
|
+
import logo from './logo.svg';
|
|
81
|
+
import './App.css';
|
|
82
|
+
import { defineCustomElements, TdsButton } '@scania/tegel-react';
|
|
83
|
+
|
|
84
|
+
defineCustomElements();
|
|
85
|
+
function App() {
|
|
86
|
+
<div className="App">
|
|
87
|
+
<TdsButton text="Click me!">
|
|
88
|
+
<span slot="icon">
|
|
89
|
+
<TdsIcon name="truck"/>
|
|
90
|
+
</slot>
|
|
91
|
+
</TdsButton>
|
|
92
|
+
</div>
|
|
93
|
+
}
|
|
94
|
+
export default App;
|
|
95
|
+
</code>
|
|
96
|
+
</pre>
|
|
97
|
+
|
|
98
|
+
</section>
|
|
99
|
+
<section>
|
|
100
|
+
<h4 class="tds-u-mb2">
|
|
101
|
+
PascalCase
|
|
102
|
+
</h4>
|
|
103
|
+
<p class="tds-body-01">
|
|
104
|
+
Since the components exported from the @scania/tegel-react package
|
|
105
|
+
are React components these have a different look than our vanilla web components.
|
|
106
|
+
They are for one, PascalCased. This means that instead of being called
|
|
107
|
+
<code><tds-button></code> the Button component from @scania/tegel-react is called
|
|
108
|
+
<code><TdsButton></code>. The same goes for the props passed to the components.
|
|
109
|
+
Instead of using a hyphen, the props use PascalCase. For example:
|
|
110
|
+
<code><tds-button mode-variant="secondary"></tds-button></code>
|
|
111
|
+
would instead be
|
|
112
|
+
<code><TdsButton modeVariant="secondary"></TdsButton></code>.
|
|
113
|
+
</p>
|
|
114
|
+
|
|
115
|
+
</section>
|
|
116
|
+
</article> `,
|
|
117
|
+
};
|
|
@@ -51,7 +51,7 @@ export const Tegel = {
|
|
|
51
51
|
<h4 class="tds-u-mb2">@scania/tegel 🧱</h4>
|
|
52
52
|
<p>
|
|
53
53
|
The new
|
|
54
|
-
package includes all components as web components, removes the old
|
|
54
|
+
package includes all components as web components, removes the old CSS class components and makes the
|
|
55
55
|
installation and updates easier. The current prefix for components, CSS variables, and utility classes -
|
|
56
56
|
"sdds",
|
|
57
57
|
will be changed. We have also created a new Storybook for @scania/tegel, which allows developers and
|
|
@@ -90,7 +90,7 @@ export const Tegel = {
|
|
|
90
90
|
And we have saved the best for last, @scania/tegel is 100% web component. Previous packages
|
|
91
91
|
had
|
|
92
92
|
some
|
|
93
|
-
web components, but also
|
|
93
|
+
web components, but also CSS components, these were utility classes that could be added to a predefined
|
|
94
94
|
HTML
|
|
95
95
|
structure to create the look and feel of Tegel. Now we are making a big effort to provide all components as
|
|
96
96
|
web
|
|
@@ -131,13 +131,13 @@ export const Tegel = {
|
|
|
131
131
|
</section>
|
|
132
132
|
<section>
|
|
133
133
|
<h4 class="tds-u-mb2">
|
|
134
|
-
Removing
|
|
134
|
+
Removing CSS class components ❌
|
|
135
135
|
</h4>
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
<p>
|
|
139
|
-
With this new package we are also removing our
|
|
140
|
-
counterparts to these. This means that every component that was available as a
|
|
139
|
+
With this new package we are also removing our CSS components and instead introducing web component
|
|
140
|
+
counterparts to these. This means that every component that was available as a CSS component in
|
|
141
141
|
@scania/components will have a web component alternative in @scania/tegel. This removal will be done in our
|
|
142
142
|
next
|
|
143
143
|
release of @scania/tegel. This change does not change the current @scania/components package.
|
|
@@ -73,7 +73,7 @@ export const TegelDesignSystem = {
|
|
|
73
73
|
</p>
|
|
74
74
|
<p>
|
|
75
75
|
The new
|
|
76
|
-
package includes all components as web components, removes the old
|
|
76
|
+
package includes all components as web components, removes the old CSS class components and makes the
|
|
77
77
|
installation and updates easier. The current prefix for components, CSS variables, and utility classes -
|
|
78
78
|
"sdds",
|
|
79
79
|
will be changed. We have also created a new Storybook for @scania/tegel, which allows developers and
|
|
@@ -109,14 +109,13 @@ export const TegelDesignSystem = {
|
|
|
109
109
|
latest major.
|
|
110
110
|
</p>
|
|
111
111
|
<p>
|
|
112
|
-
And we have saved the best for last, @scania/tegel is 100% web
|
|
112
|
+
And we have saved the best for last, @scania/tegel is 100% web components. Previous packages
|
|
113
113
|
had
|
|
114
114
|
some
|
|
115
|
-
web components, but also
|
|
115
|
+
web components, but also CSS class components, these were utility classes that could be added to a predefined
|
|
116
116
|
HTML
|
|
117
117
|
structure to create the look and feel of Tegel. Now we are making a big effort to provide all components as
|
|
118
|
-
web
|
|
119
|
-
components.
|
|
118
|
+
web components.
|
|
120
119
|
</p>
|
|
121
120
|
</section>
|
|
122
121
|
<section>
|
|
@@ -153,13 +152,13 @@ export const TegelDesignSystem = {
|
|
|
153
152
|
</section>
|
|
154
153
|
<section>
|
|
155
154
|
<h4 class="tds-u-mb2">
|
|
156
|
-
Removing
|
|
155
|
+
Removing CSS class components ❌
|
|
157
156
|
</h4>
|
|
158
157
|
|
|
159
158
|
|
|
160
159
|
<p>
|
|
161
|
-
With this new package we are also removing our
|
|
162
|
-
counterparts to these. This means that every component that was available as a
|
|
160
|
+
With this new package we are also removing our CSS components and instead introducing web component
|
|
161
|
+
counterparts to these. This means that every component that was available as a CSS component in
|
|
163
162
|
@scania/components will have a web component alternative in @scania/tegel. This removal will be done in our
|
|
164
163
|
next
|
|
165
164
|
release of @scania/tegel. This change does not change the current @scania/components package.
|