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