@scania/tegel 1.3.3 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (777) hide show
  1. package/dist/cjs/dfs-84f7f63e.js +29 -0
  2. package/dist/cjs/{generateUniqueId-56da4810.js → generateUniqueId-e3fc9863.js} +9 -9
  3. package/dist/cjs/{index-705dca7c.js → index-ae4fbf97.js} +417 -356
  4. package/dist/cjs/inheritAriaAttributes-dedbbc57.js +78 -0
  5. package/dist/cjs/{inheritAttributes-845f5217.js → inheritAttributes-ff9ad737.js} +11 -11
  6. package/dist/cjs/{isHeadingElement-d31dde38.js → isHeadingElement-4f06b688.js} +19 -19
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/tds-accordion-item.cjs.entry.js +22 -22
  9. package/dist/cjs/tds-accordion.cjs.entry.js +8 -8
  10. package/dist/cjs/tds-badge.cjs.entry.js +34 -34
  11. package/dist/cjs/tds-banner.cjs.entry.js +42 -42
  12. package/dist/cjs/tds-block.cjs.entry.js +22 -22
  13. package/dist/cjs/tds-body-cell.cjs.entry.js +61 -61
  14. package/dist/cjs/tds-breadcrumb.cjs.entry.js +8 -8
  15. package/dist/cjs/tds-breadcrumbs.cjs.entry.js +10 -10
  16. package/dist/cjs/tds-button.cjs.entry.js +34 -34
  17. package/dist/cjs/tds-card.cjs.entry.js +40 -40
  18. package/dist/cjs/tds-checkbox.cjs.entry.js +57 -57
  19. package/dist/cjs/tds-chip.cjs.entry.js +62 -62
  20. package/dist/cjs/tds-core-header-item_2.cjs.entry.js +46 -46
  21. package/dist/cjs/tds-datetime.cjs.entry.js +82 -82
  22. package/dist/cjs/tds-divider.cjs.entry.js +8 -8
  23. package/dist/cjs/tds-dropdown-option.cjs.entry.js +78 -78
  24. package/dist/cjs/tds-dropdown.cjs.entry.js +368 -350
  25. package/dist/cjs/tds-folder-tab.cjs.entry.js +18 -18
  26. package/dist/cjs/tds-folder-tabs.cjs.entry.js +149 -149
  27. package/dist/cjs/tds-footer-group.cjs.entry.js +22 -22
  28. package/dist/cjs/tds-footer-item.cjs.entry.js +12 -12
  29. package/dist/cjs/tds-footer.cjs.entry.js +14 -12
  30. package/dist/cjs/tds-header-brand-symbol.cjs.entry.js +8 -8
  31. package/dist/cjs/tds-header-cell.cjs.entry.js +122 -122
  32. package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +13 -13
  33. package/dist/cjs/tds-header-dropdown-list-user.cjs.entry.js +12 -12
  34. package/dist/cjs/tds-header-dropdown-list.cjs.entry.js +70 -70
  35. package/dist/cjs/tds-header-dropdown.cjs.entry.js +37 -37
  36. package/dist/cjs/tds-header-hamburger.cjs.entry.js +11 -11
  37. package/dist/cjs/tds-header-launcher-button.cjs.entry.js +13 -13
  38. package/dist/cjs/tds-header-launcher-grid-item.cjs.entry.js +7 -7
  39. package/dist/cjs/tds-header-launcher-grid-title.cjs.entry.js +9 -9
  40. package/dist/cjs/tds-header-launcher-grid.cjs.entry.js +28 -28
  41. package/dist/cjs/tds-header-launcher-list-item.cjs.entry.js +7 -7
  42. package/dist/cjs/tds-header-launcher-list-title.cjs.entry.js +10 -10
  43. package/dist/cjs/tds-header-launcher-list.cjs.entry.js +9 -9
  44. package/dist/cjs/tds-header-launcher.cjs.entry.js +48 -48
  45. package/dist/cjs/tds-header-title.cjs.entry.js +7 -7
  46. package/dist/cjs/tds-header.cjs.entry.js +39 -39
  47. package/dist/cjs/tds-icon.cjs.entry.js +29 -28
  48. package/dist/cjs/tds-inline-tab.cjs.entry.js +13 -13
  49. package/dist/cjs/tds-inline-tabs.cjs.entry.js +134 -134
  50. package/dist/cjs/tds-link.cjs.entry.js +13 -13
  51. package/dist/cjs/tds-message.cjs.entry.js +26 -26
  52. package/dist/cjs/tds-modal.cjs.entry.js +83 -83
  53. package/dist/cjs/tds-navigation-tab.cjs.entry.js +13 -13
  54. package/dist/cjs/tds-navigation-tabs.cjs.entry.js +130 -130
  55. package/dist/cjs/tds-popover-canvas.cjs.entry.js +24 -24
  56. package/dist/cjs/tds-popover-core.cjs.entry.js +148 -148
  57. package/dist/cjs/tds-popover-menu-item.cjs.entry.js +11 -11
  58. package/dist/cjs/tds-popover-menu.cjs.entry.js +25 -25
  59. package/dist/cjs/tds-radio-button.cjs.entry.js +22 -22
  60. package/dist/cjs/tds-side-menu-close-button.cjs.entry.js +11 -11
  61. package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +39 -39
  62. package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +34 -34
  63. package/dist/cjs/tds-side-menu-dropdown-list.cjs.entry.js +19 -19
  64. package/dist/cjs/tds-side-menu-dropdown.cjs.entry.js +56 -56
  65. package/dist/cjs/tds-side-menu-item.cjs.entry.js +57 -57
  66. package/dist/cjs/tds-side-menu-overlay.cjs.entry.js +7 -7
  67. package/dist/cjs/tds-side-menu-user-image_2.cjs.entry.js +17 -17
  68. package/dist/cjs/tds-side-menu-user.cjs.entry.js +11 -11
  69. package/dist/cjs/tds-side-menu.cjs.entry.js +68 -60
  70. package/dist/cjs/tds-slider.cjs.entry.js +285 -283
  71. package/dist/cjs/tds-spinner.cjs.entry.js +9 -9
  72. package/dist/cjs/tds-step.cjs.entry.js +37 -37
  73. package/dist/cjs/tds-stepper.cjs.entry.js +55 -55
  74. package/dist/cjs/tds-table-body-row-expandable.cjs.entry.js +58 -58
  75. package/dist/cjs/tds-table-body-row.cjs.entry.js +51 -51
  76. package/dist/cjs/tds-table-body.cjs.entry.js +52 -52
  77. package/dist/cjs/tds-table-footer.cjs.entry.js +87 -87
  78. package/dist/cjs/tds-table-header.cjs.entry.js +81 -81
  79. package/dist/cjs/tds-table-toolbar.cjs.entry.js +51 -51
  80. package/dist/cjs/tds-table.cjs.entry.js +83 -83
  81. package/dist/cjs/tds-text-field.cjs.entry.js +62 -62
  82. package/dist/cjs/tds-textarea.cjs.entry.js +54 -54
  83. package/dist/cjs/tds-toast.cjs.entry.js +60 -60
  84. package/dist/cjs/tds-toggle.cjs.entry.js +32 -32
  85. package/dist/cjs/tds-tooltip.cjs.entry.js +54 -54
  86. package/dist/cjs/tegel.cjs.js +3 -3
  87. package/dist/collection/collection-manifest.json +1 -1
  88. package/dist/collection/components/accordion/accordion-item/accordion-item.js +163 -163
  89. package/dist/collection/components/accordion/accordion.js +40 -40
  90. package/dist/collection/components/badge/badge.js +113 -113
  91. package/dist/collection/components/banner/banner.js +212 -212
  92. package/dist/collection/components/block/block.js +54 -54
  93. package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.js +40 -40
  94. package/dist/collection/components/breadcrumbs/breadcrumbs.js +18 -18
  95. package/dist/collection/components/button/button.css +23 -25
  96. package/dist/collection/components/button/button.js +177 -177
  97. package/dist/collection/components/card/card.js +228 -228
  98. package/dist/collection/components/checkbox/checkbox.js +270 -270
  99. package/dist/collection/components/chip/chip.js +211 -211
  100. package/dist/collection/components/datetime/datetime.js +419 -419
  101. package/dist/collection/components/divider/divider.js +40 -40
  102. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +212 -211
  103. package/dist/collection/components/dropdown/dropdown.css +1 -0
  104. package/dist/collection/components/dropdown/dropdown.js +831 -809
  105. package/dist/collection/components/footer/footer-group/footer-group.js +58 -58
  106. package/dist/collection/components/footer/footer-item/footer-item.js +22 -22
  107. package/dist/collection/components/footer/footer.js +48 -45
  108. package/dist/collection/components/header/core-header-item/core-header-item.js +15 -15
  109. package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.js +16 -16
  110. package/dist/collection/components/header/header-dropdown/header-dropdown.js +118 -118
  111. package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.js +105 -105
  112. package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.js +63 -63
  113. package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.js +94 -94
  114. package/dist/collection/components/header/header-hamburger/header-hamburger.js +17 -17
  115. package/dist/collection/components/header/header-item/header-item.js +89 -89
  116. package/dist/collection/components/header/header-launcher/header-launcher.js +71 -71
  117. package/dist/collection/components/header/header-launcher-button/header-launcher-button.js +43 -43
  118. package/dist/collection/components/header/header-launcher-grid/header-launcher-grid.js +40 -40
  119. package/dist/collection/components/header/header-launcher-grid-item/header-launcher-grid-item.js +15 -15
  120. package/dist/collection/components/header/header-launcher-grid-title/header-launcher-grid-title.js +17 -17
  121. package/dist/collection/components/header/header-launcher-list/header-launcher-list.js +7 -7
  122. package/dist/collection/components/header/header-launcher-list-item/header-launcher-list-item.js +15 -15
  123. package/dist/collection/components/header/header-launcher-list-title/header-launcher-list-title.js +18 -18
  124. package/dist/collection/components/header/header-title/header-title.js +15 -15
  125. package/dist/collection/components/header/header.js +38 -38
  126. package/dist/collection/components/icon/icon.js +119 -101
  127. package/dist/collection/components/link/link.js +63 -63
  128. package/dist/collection/components/message/message.js +129 -129
  129. package/dist/collection/components/modal/modal.css +1 -1
  130. package/dist/collection/components/modal/modal.js +278 -278
  131. package/dist/collection/components/popover-canvas/popover-canvas.js +173 -173
  132. package/dist/collection/components/popover-core/popover-core.js +384 -384
  133. package/dist/collection/components/popover-menu/popover-menu-item/popover-menu-item.js +43 -43
  134. package/dist/collection/components/popover-menu/popover-menu.js +171 -171
  135. package/dist/collection/components/radio-button/radio-button.js +158 -158
  136. package/dist/collection/components/side-menu/side-menu-close-button/side-menu-close-button.js +17 -17
  137. package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +108 -108
  138. package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.js +163 -163
  139. package/dist/collection/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.js +43 -43
  140. package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.js +81 -81
  141. package/dist/collection/components/side-menu/side-menu-item/side-menu-item.js +120 -120
  142. package/dist/collection/components/side-menu/side-menu-overlay/side-menu-overlay.js +15 -15
  143. package/dist/collection/components/side-menu/side-menu-user/side-menu-user.js +93 -93
  144. package/dist/collection/components/side-menu/side-menu-user-image/side-menu-user-image.js +57 -57
  145. package/dist/collection/components/side-menu/side-menu-user-label/side-menu-user-label.js +57 -57
  146. package/dist/collection/components/side-menu/side-menu.js +221 -212
  147. package/dist/collection/components/slider/slider.js +684 -682
  148. package/dist/collection/components/spinner/spinner.js +58 -58
  149. package/dist/collection/components/stepper/step/step.js +103 -103
  150. package/dist/collection/components/stepper/stepper.js +192 -192
  151. package/dist/collection/components/table/table/table.js +296 -296
  152. package/dist/collection/components/table/table-body/table-body.js +88 -88
  153. package/dist/collection/components/table/table-body-cell/table-body-cell.js +159 -159
  154. package/dist/collection/components/table/table-body-row/table-body-row.js +119 -119
  155. package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +129 -129
  156. package/dist/collection/components/table/table-footer/table-footer.js +207 -207
  157. package/dist/collection/components/table/table-header/table-header.js +197 -197
  158. package/dist/collection/components/table/table-header-cell/table-header-cell.js +320 -317
  159. package/dist/collection/components/table/table-toolbar/table-toolbar.js +135 -135
  160. package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +106 -104
  161. package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +266 -265
  162. package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +77 -76
  163. package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +251 -250
  164. package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +77 -76
  165. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +246 -245
  166. package/dist/collection/components/text-field/text-field.js +422 -422
  167. package/dist/collection/components/textarea/textarea.js +412 -412
  168. package/dist/collection/components/toast/toast.js +232 -232
  169. package/dist/collection/components/toggle/toggle.js +206 -206
  170. package/dist/collection/components/tooltip/tooltip.js +182 -182
  171. package/dist/collection/utils/appendHiddenInput.js +11 -11
  172. package/dist/collection/utils/dfs.js +15 -15
  173. package/dist/collection/utils/findNextFocusableElement.js +7 -7
  174. package/dist/collection/utils/findPreviousFocusableElement.js +7 -7
  175. package/dist/collection/utils/generateUniqueId.js +9 -9
  176. package/dist/collection/utils/getNestedChildOfSiblingsMatching.js +15 -15
  177. package/dist/collection/utils/inheritAriaAttributes.js +56 -56
  178. package/dist/collection/utils/inheritAttributes.js +11 -11
  179. package/dist/collection/utils/isHeadingElement.js +3 -3
  180. package/dist/collection/utils/updateListChildrenRoles.js +8 -8
  181. package/dist/components/checkbox.js +79 -79
  182. package/dist/components/core-header-item.js +20 -20
  183. package/dist/components/dfs.js +15 -15
  184. package/dist/components/divider.js +23 -23
  185. package/dist/components/generateUniqueId.js +9 -9
  186. package/dist/components/getPreviousNestedChildOfSiblingsMatching.js +18 -18
  187. package/dist/components/header-dropdown-list-item.js +29 -29
  188. package/dist/components/header-dropdown-list.js +84 -84
  189. package/dist/components/header-item.js +60 -60
  190. package/dist/components/header-launcher-button.js +41 -41
  191. package/dist/components/icon.js +49 -47
  192. package/dist/components/inheritAriaAttributes.js +56 -56
  193. package/dist/components/inheritAttributes.js +11 -11
  194. package/dist/components/popover-canvas.js +48 -48
  195. package/dist/components/popover-core.js +177 -177
  196. package/dist/components/side-menu-item.js +73 -73
  197. package/dist/components/side-menu-user-image.js +25 -25
  198. package/dist/components/side-menu-user-label.js +25 -25
  199. package/dist/components/tds-accordion-item.d.ts +2 -2
  200. package/dist/components/tds-accordion-item.js +47 -47
  201. package/dist/components/tds-accordion.d.ts +2 -2
  202. package/dist/components/tds-accordion.js +23 -23
  203. package/dist/components/tds-badge.d.ts +2 -2
  204. package/dist/components/tds-badge.js +56 -56
  205. package/dist/components/tds-banner.d.ts +2 -2
  206. package/dist/components/tds-banner.js +68 -68
  207. package/dist/components/tds-block.d.ts +2 -2
  208. package/dist/components/tds-block.js +37 -37
  209. package/dist/components/tds-body-cell.d.ts +2 -2
  210. package/dist/components/tds-body-cell.js +85 -85
  211. package/dist/components/tds-breadcrumb.d.ts +2 -2
  212. package/dist/components/tds-breadcrumb.js +23 -23
  213. package/dist/components/tds-breadcrumbs.d.ts +2 -2
  214. package/dist/components/tds-breadcrumbs.js +23 -23
  215. package/dist/components/tds-button.d.ts +2 -2
  216. package/dist/components/tds-button.js +55 -55
  217. package/dist/components/tds-card.d.ts +2 -2
  218. package/dist/components/tds-card.js +67 -67
  219. package/dist/components/tds-checkbox.d.ts +2 -2
  220. package/dist/components/tds-chip.d.ts +2 -2
  221. package/dist/components/tds-chip.js +80 -80
  222. package/dist/components/tds-core-header-item.d.ts +2 -2
  223. package/dist/components/tds-datetime.d.ts +2 -2
  224. package/dist/components/tds-datetime.js +115 -115
  225. package/dist/components/tds-divider.d.ts +2 -2
  226. package/dist/components/tds-dropdown-option.d.ts +2 -2
  227. package/dist/components/tds-dropdown-option.js +108 -108
  228. package/dist/components/tds-dropdown.d.ts +2 -2
  229. package/dist/components/tds-dropdown.js +413 -395
  230. package/dist/components/tds-folder-tab.d.ts +2 -2
  231. package/dist/components/tds-folder-tab.js +37 -37
  232. package/dist/components/tds-folder-tabs.d.ts +2 -2
  233. package/dist/components/tds-folder-tabs.js +177 -177
  234. package/dist/components/tds-footer-group.d.ts +2 -2
  235. package/dist/components/tds-footer-group.js +43 -43
  236. package/dist/components/tds-footer-item.d.ts +2 -2
  237. package/dist/components/tds-footer-item.js +25 -25
  238. package/dist/components/tds-footer.d.ts +2 -2
  239. package/dist/components/tds-footer.js +29 -27
  240. package/dist/components/tds-header-brand-symbol.d.ts +2 -2
  241. package/dist/components/tds-header-brand-symbol.js +31 -31
  242. package/dist/components/tds-header-cell.d.ts +2 -2
  243. package/dist/components/tds-header-cell.js +151 -151
  244. package/dist/components/tds-header-dropdown-list-item.d.ts +2 -2
  245. package/dist/components/tds-header-dropdown-list-user.d.ts +2 -2
  246. package/dist/components/tds-header-dropdown-list-user.js +30 -30
  247. package/dist/components/tds-header-dropdown-list.d.ts +2 -2
  248. package/dist/components/tds-header-dropdown.d.ts +2 -2
  249. package/dist/components/tds-header-dropdown.js +80 -80
  250. package/dist/components/tds-header-hamburger.d.ts +2 -2
  251. package/dist/components/tds-header-hamburger.js +37 -37
  252. package/dist/components/tds-header-item.d.ts +2 -2
  253. package/dist/components/tds-header-launcher-button.d.ts +2 -2
  254. package/dist/components/tds-header-launcher-grid-item.d.ts +2 -2
  255. package/dist/components/tds-header-launcher-grid-item.js +20 -20
  256. package/dist/components/tds-header-launcher-grid-title.d.ts +2 -2
  257. package/dist/components/tds-header-launcher-grid-title.js +20 -20
  258. package/dist/components/tds-header-launcher-grid.d.ts +2 -2
  259. package/dist/components/tds-header-launcher-grid.js +40 -40
  260. package/dist/components/tds-header-launcher-list-item.d.ts +2 -2
  261. package/dist/components/tds-header-launcher-list-item.js +25 -25
  262. package/dist/components/tds-header-launcher-list-title.d.ts +2 -2
  263. package/dist/components/tds-header-launcher-list-title.js +21 -21
  264. package/dist/components/tds-header-launcher-list.d.ts +2 -2
  265. package/dist/components/tds-header-launcher-list.js +24 -24
  266. package/dist/components/tds-header-launcher.d.ts +2 -2
  267. package/dist/components/tds-header-launcher.js +92 -92
  268. package/dist/components/tds-header-title.d.ts +2 -2
  269. package/dist/components/tds-header-title.js +20 -20
  270. package/dist/components/tds-header.d.ts +2 -2
  271. package/dist/components/tds-header.js +49 -49
  272. package/dist/components/tds-icon.d.ts +2 -2
  273. package/dist/components/tds-inline-tab.d.ts +2 -2
  274. package/dist/components/tds-inline-tab.js +30 -30
  275. package/dist/components/tds-inline-tabs.d.ts +2 -2
  276. package/dist/components/tds-inline-tabs.js +162 -162
  277. package/dist/components/tds-link.d.ts +2 -2
  278. package/dist/components/tds-link.js +29 -29
  279. package/dist/components/tds-message.d.ts +2 -2
  280. package/dist/components/tds-message.js +50 -50
  281. package/dist/components/tds-modal.d.ts +2 -2
  282. package/dist/components/tds-modal.js +112 -112
  283. package/dist/components/tds-navigation-tab.d.ts +2 -2
  284. package/dist/components/tds-navigation-tab.js +30 -30
  285. package/dist/components/tds-navigation-tabs.d.ts +2 -2
  286. package/dist/components/tds-navigation-tabs.js +157 -157
  287. package/dist/components/tds-popover-canvas.d.ts +2 -2
  288. package/dist/components/tds-popover-core.d.ts +2 -2
  289. package/dist/components/tds-popover-menu-item.d.ts +2 -2
  290. package/dist/components/tds-popover-menu-item.js +26 -26
  291. package/dist/components/tds-popover-menu.d.ts +2 -2
  292. package/dist/components/tds-popover-menu.js +49 -49
  293. package/dist/components/tds-radio-button.d.ts +2 -2
  294. package/dist/components/tds-radio-button.js +40 -40
  295. package/dist/components/tds-side-menu-close-button.d.ts +2 -2
  296. package/dist/components/tds-side-menu-close-button.js +27 -27
  297. package/dist/components/tds-side-menu-collapse-button.d.ts +2 -2
  298. package/dist/components/tds-side-menu-collapse-button.js +59 -59
  299. package/dist/components/tds-side-menu-dropdown-list-item.d.ts +2 -2
  300. package/dist/components/tds-side-menu-dropdown-list-item.js +51 -51
  301. package/dist/components/tds-side-menu-dropdown-list.d.ts +2 -2
  302. package/dist/components/tds-side-menu-dropdown-list.js +34 -34
  303. package/dist/components/tds-side-menu-dropdown.d.ts +2 -2
  304. package/dist/components/tds-side-menu-dropdown.js +86 -86
  305. package/dist/components/tds-side-menu-item.d.ts +2 -2
  306. package/dist/components/tds-side-menu-overlay.d.ts +2 -2
  307. package/dist/components/tds-side-menu-overlay.js +20 -20
  308. package/dist/components/tds-side-menu-user-image.d.ts +2 -2
  309. package/dist/components/tds-side-menu-user-label.d.ts +2 -2
  310. package/dist/components/tds-side-menu-user.d.ts +2 -2
  311. package/dist/components/tds-side-menu-user.js +39 -39
  312. package/dist/components/tds-side-menu.d.ts +2 -2
  313. package/dist/components/tds-side-menu.js +90 -81
  314. package/dist/components/tds-slider.d.ts +2 -2
  315. package/dist/components/tds-slider.js +321 -319
  316. package/dist/components/tds-spinner.d.ts +2 -2
  317. package/dist/components/tds-spinner.js +24 -24
  318. package/dist/components/tds-step.d.ts +2 -2
  319. package/dist/components/tds-step.js +62 -62
  320. package/dist/components/tds-stepper.d.ts +2 -2
  321. package/dist/components/tds-stepper.js +78 -78
  322. package/dist/components/tds-table-body-row-expandable.d.ts +2 -2
  323. package/dist/components/tds-table-body-row-expandable.js +80 -80
  324. package/dist/components/tds-table-body-row.d.ts +2 -2
  325. package/dist/components/tds-table-body-row.js +77 -77
  326. package/dist/components/tds-table-body.d.ts +2 -2
  327. package/dist/components/tds-table-body.js +73 -73
  328. package/dist/components/tds-table-footer.d.ts +2 -2
  329. package/dist/components/tds-table-footer.js +114 -114
  330. package/dist/components/tds-table-header.d.ts +2 -2
  331. package/dist/components/tds-table-header.js +113 -113
  332. package/dist/components/tds-table-toolbar.d.ts +2 -2
  333. package/dist/components/tds-table-toolbar.js +77 -77
  334. package/dist/components/tds-table.d.ts +2 -2
  335. package/dist/components/tds-table.js +112 -112
  336. package/dist/components/tds-text-field.d.ts +2 -2
  337. package/dist/components/tds-text-field.js +96 -96
  338. package/dist/components/tds-textarea.d.ts +2 -2
  339. package/dist/components/tds-textarea.js +88 -88
  340. package/dist/components/tds-toast.d.ts +2 -2
  341. package/dist/components/tds-toast.js +86 -86
  342. package/dist/components/tds-toggle.d.ts +2 -2
  343. package/dist/components/tds-toggle.js +52 -52
  344. package/dist/components/tds-tooltip.d.ts +2 -2
  345. package/dist/components/tds-tooltip.js +77 -77
  346. package/dist/esm/dfs-1e574d5f.js +27 -0
  347. package/dist/esm/{generateUniqueId-c96c8ee6.js → generateUniqueId-7934d315.js} +9 -9
  348. package/dist/esm/{index-7dc8c41f.js → index-6e6ff771.js} +417 -356
  349. package/dist/esm/inheritAriaAttributes-04f2f252.js +76 -0
  350. package/dist/esm/{inheritAttributes-8bb09af0.js → inheritAttributes-d21e267b.js} +11 -11
  351. package/dist/esm/{isHeadingElement-2c158fc4.js → isHeadingElement-8efea284.js} +19 -19
  352. package/dist/esm/loader.js +3 -3
  353. package/dist/esm/tds-accordion-item.entry.js +22 -22
  354. package/dist/esm/tds-accordion.entry.js +8 -8
  355. package/dist/esm/tds-badge.entry.js +34 -34
  356. package/dist/esm/tds-banner.entry.js +42 -42
  357. package/dist/esm/tds-block.entry.js +22 -22
  358. package/dist/esm/tds-body-cell.entry.js +61 -61
  359. package/dist/esm/tds-breadcrumb.entry.js +8 -8
  360. package/dist/esm/tds-breadcrumbs.entry.js +10 -10
  361. package/dist/esm/tds-button.entry.js +34 -34
  362. package/dist/esm/tds-card.entry.js +40 -40
  363. package/dist/esm/tds-checkbox.entry.js +57 -57
  364. package/dist/esm/tds-chip.entry.js +62 -62
  365. package/dist/esm/tds-core-header-item_2.entry.js +46 -46
  366. package/dist/esm/tds-datetime.entry.js +82 -82
  367. package/dist/esm/tds-divider.entry.js +8 -8
  368. package/dist/esm/tds-dropdown-option.entry.js +78 -78
  369. package/dist/esm/tds-dropdown.entry.js +368 -350
  370. package/dist/esm/tds-folder-tab.entry.js +18 -18
  371. package/dist/esm/tds-folder-tabs.entry.js +149 -149
  372. package/dist/esm/tds-footer-group.entry.js +22 -22
  373. package/dist/esm/tds-footer-item.entry.js +12 -12
  374. package/dist/esm/tds-footer.entry.js +14 -12
  375. package/dist/esm/tds-header-brand-symbol.entry.js +8 -8
  376. package/dist/esm/tds-header-cell.entry.js +122 -122
  377. package/dist/esm/tds-header-dropdown-list-item.entry.js +13 -13
  378. package/dist/esm/tds-header-dropdown-list-user.entry.js +12 -12
  379. package/dist/esm/tds-header-dropdown-list.entry.js +70 -70
  380. package/dist/esm/tds-header-dropdown.entry.js +37 -37
  381. package/dist/esm/tds-header-hamburger.entry.js +11 -11
  382. package/dist/esm/tds-header-launcher-button.entry.js +13 -13
  383. package/dist/esm/tds-header-launcher-grid-item.entry.js +7 -7
  384. package/dist/esm/tds-header-launcher-grid-title.entry.js +9 -9
  385. package/dist/esm/tds-header-launcher-grid.entry.js +28 -28
  386. package/dist/esm/tds-header-launcher-list-item.entry.js +7 -7
  387. package/dist/esm/tds-header-launcher-list-title.entry.js +10 -10
  388. package/dist/esm/tds-header-launcher-list.entry.js +9 -9
  389. package/dist/esm/tds-header-launcher.entry.js +48 -48
  390. package/dist/esm/tds-header-title.entry.js +7 -7
  391. package/dist/esm/tds-header.entry.js +39 -39
  392. package/dist/esm/tds-icon.entry.js +29 -28
  393. package/dist/esm/tds-inline-tab.entry.js +13 -13
  394. package/dist/esm/tds-inline-tabs.entry.js +134 -134
  395. package/dist/esm/tds-link.entry.js +13 -13
  396. package/dist/esm/tds-message.entry.js +26 -26
  397. package/dist/esm/tds-modal.entry.js +83 -83
  398. package/dist/esm/tds-navigation-tab.entry.js +13 -13
  399. package/dist/esm/tds-navigation-tabs.entry.js +130 -130
  400. package/dist/esm/tds-popover-canvas.entry.js +24 -24
  401. package/dist/esm/tds-popover-core.entry.js +148 -148
  402. package/dist/esm/tds-popover-menu-item.entry.js +11 -11
  403. package/dist/esm/tds-popover-menu.entry.js +25 -25
  404. package/dist/esm/tds-radio-button.entry.js +22 -22
  405. package/dist/esm/tds-side-menu-close-button.entry.js +11 -11
  406. package/dist/esm/tds-side-menu-collapse-button.entry.js +39 -39
  407. package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +34 -34
  408. package/dist/esm/tds-side-menu-dropdown-list.entry.js +19 -19
  409. package/dist/esm/tds-side-menu-dropdown.entry.js +56 -56
  410. package/dist/esm/tds-side-menu-item.entry.js +57 -57
  411. package/dist/esm/tds-side-menu-overlay.entry.js +7 -7
  412. package/dist/esm/tds-side-menu-user-image_2.entry.js +17 -17
  413. package/dist/esm/tds-side-menu-user.entry.js +11 -11
  414. package/dist/esm/tds-side-menu.entry.js +68 -60
  415. package/dist/esm/tds-slider.entry.js +285 -283
  416. package/dist/esm/tds-spinner.entry.js +9 -9
  417. package/dist/esm/tds-step.entry.js +37 -37
  418. package/dist/esm/tds-stepper.entry.js +55 -55
  419. package/dist/esm/tds-table-body-row-expandable.entry.js +58 -58
  420. package/dist/esm/tds-table-body-row.entry.js +51 -51
  421. package/dist/esm/tds-table-body.entry.js +52 -52
  422. package/dist/esm/tds-table-footer.entry.js +87 -87
  423. package/dist/esm/tds-table-header.entry.js +81 -81
  424. package/dist/esm/tds-table-toolbar.entry.js +51 -51
  425. package/dist/esm/tds-table.entry.js +83 -83
  426. package/dist/esm/tds-text-field.entry.js +62 -62
  427. package/dist/esm/tds-textarea.entry.js +54 -54
  428. package/dist/esm/tds-toast.entry.js +60 -60
  429. package/dist/esm/tds-toggle.entry.js +32 -32
  430. package/dist/esm/tds-tooltip.entry.js +54 -54
  431. package/dist/esm/tegel.js +4 -4
  432. package/dist/tegel/{p-d757dc45.entry.js → p-0657ff1a.entry.js} +1 -1
  433. package/dist/tegel/{p-0edeccb6.js → p-0bd4c19c.js} +1 -1
  434. package/dist/tegel/{p-ee299956.entry.js → p-0d0c6493.entry.js} +1 -1
  435. package/dist/tegel/p-15f8ac46.entry.js +1 -0
  436. package/dist/tegel/p-18940c9c.entry.js +1 -0
  437. package/dist/tegel/{p-851520df.entry.js → p-1945a0f3.entry.js} +1 -1
  438. package/dist/tegel/{p-9108c81f.entry.js → p-1a7230e1.entry.js} +1 -1
  439. package/dist/tegel/{p-80dd10db.entry.js → p-1e4217c5.entry.js} +1 -1
  440. package/dist/tegel/{p-33dfc79a.entry.js → p-21df464d.entry.js} +1 -1
  441. package/dist/tegel/{p-c5138ecf.entry.js → p-24e3d7e2.entry.js} +1 -1
  442. package/dist/tegel/{p-8c41b79d.entry.js → p-25e56f32.entry.js} +1 -1
  443. package/dist/tegel/{p-5b1d6647.entry.js → p-29556a90.entry.js} +1 -1
  444. package/dist/tegel/{p-cb477168.entry.js → p-2b344346.entry.js} +1 -1
  445. package/dist/tegel/{p-0204ea55.entry.js → p-2b829947.entry.js} +1 -1
  446. package/dist/tegel/{p-4c913e4b.entry.js → p-2c513250.entry.js} +1 -1
  447. package/dist/tegel/{p-83dc1dde.entry.js → p-2c8de389.entry.js} +1 -1
  448. package/dist/tegel/{p-e1cd3cc1.entry.js → p-2caafb56.entry.js} +1 -1
  449. package/dist/tegel/{p-99632e91.entry.js → p-2cdb5f19.entry.js} +1 -1
  450. package/dist/tegel/p-2f9c1ad7.entry.js +1 -0
  451. package/dist/tegel/p-30f28214.entry.js +1 -0
  452. package/dist/tegel/{p-cec4cc4d.entry.js → p-317b5299.entry.js} +1 -1
  453. package/dist/tegel/{p-5e8bf615.entry.js → p-326cb2ba.entry.js} +1 -1
  454. package/dist/tegel/p-3b597a64.entry.js +1 -0
  455. package/dist/tegel/{p-e889c82b.entry.js → p-40562f4b.entry.js} +1 -1
  456. package/dist/tegel/{p-574f1148.entry.js → p-422e53ec.entry.js} +1 -1
  457. package/dist/tegel/{p-242abd17.entry.js → p-49813878.entry.js} +1 -1
  458. package/dist/tegel/{p-24ac98b9.entry.js → p-4c4f5168.entry.js} +1 -1
  459. package/dist/tegel/{p-86c1146e.entry.js → p-4cc28733.entry.js} +1 -1
  460. package/dist/tegel/p-4d661599.js +2 -0
  461. package/dist/tegel/{p-a872e086.entry.js → p-4da1c8a8.entry.js} +1 -1
  462. package/dist/tegel/{p-d2989b66.entry.js → p-4e195abb.entry.js} +1 -1
  463. package/dist/tegel/{p-6243906b.entry.js → p-50978479.entry.js} +1 -1
  464. package/dist/tegel/{p-281a7ea6.entry.js → p-50ffec23.entry.js} +1 -1
  465. package/dist/tegel/p-515dfcea.entry.js +1 -0
  466. package/dist/tegel/{p-32d2354f.entry.js → p-55964061.entry.js} +1 -1
  467. package/dist/tegel/{p-1d6b48e1.entry.js → p-58835a58.entry.js} +1 -1
  468. package/dist/tegel/{p-49c03547.entry.js → p-63cd5c41.entry.js} +1 -1
  469. package/dist/tegel/{p-74478110.entry.js → p-66b5c8ba.entry.js} +1 -1
  470. package/dist/tegel/{p-15527d1c.entry.js → p-6a8a1f0f.entry.js} +1 -1
  471. package/dist/tegel/{p-4c314d67.entry.js → p-6ae68836.entry.js} +1 -1
  472. package/dist/tegel/{p-1b55a206.entry.js → p-71479b49.entry.js} +1 -1
  473. package/dist/tegel/p-73db3fab.entry.js +1 -0
  474. package/dist/tegel/{p-e0a62474.entry.js → p-75846b6a.entry.js} +1 -1
  475. package/dist/tegel/{p-f46ab7e0.entry.js → p-78853c02.entry.js} +1 -1
  476. package/dist/tegel/{p-825be958.entry.js → p-7bb9c668.entry.js} +1 -1
  477. package/dist/tegel/p-7d93c35b.entry.js +1 -0
  478. package/dist/tegel/{p-d5bd93b0.entry.js → p-86ae068b.entry.js} +1 -1
  479. package/dist/tegel/{p-cdf605b6.entry.js → p-8d22e0d4.entry.js} +1 -1
  480. package/dist/tegel/p-8f1b824b.entry.js +1 -0
  481. package/dist/tegel/{p-8c781ff3.entry.js → p-8fedca76.entry.js} +1 -1
  482. package/dist/tegel/{p-86f542a6.js → p-9332c225.js} +1 -1
  483. package/dist/tegel/{p-e07afb36.entry.js → p-936a8c86.entry.js} +1 -1
  484. package/dist/tegel/{p-e32e00dc.entry.js → p-94bce2be.entry.js} +1 -1
  485. package/dist/tegel/{p-10600320.entry.js → p-981e917a.entry.js} +1 -1
  486. package/dist/tegel/{p-5c11a9c9.entry.js → p-98716bbf.entry.js} +1 -1
  487. package/dist/tegel/{p-a00c06d4.entry.js → p-9a00d07e.entry.js} +1 -1
  488. package/dist/tegel/{p-7be1c8ea.entry.js → p-a3f6cc1e.entry.js} +1 -1
  489. package/dist/tegel/{p-75eae0ae.entry.js → p-aa069789.entry.js} +1 -1
  490. package/dist/tegel/{p-0891c691.entry.js → p-aa627d7b.entry.js} +1 -1
  491. package/dist/tegel/{p-bda16bee.entry.js → p-aebe9fdf.entry.js} +1 -1
  492. package/dist/tegel/{p-8837c8f0.entry.js → p-be72cf43.entry.js} +1 -1
  493. package/dist/tegel/{p-604022ba.entry.js → p-bf95003c.entry.js} +1 -1
  494. package/dist/tegel/{p-d73f40b0.entry.js → p-c7b2017c.entry.js} +1 -1
  495. package/dist/tegel/{p-7b5c5881.entry.js → p-ca6b5098.entry.js} +1 -1
  496. package/dist/tegel/{p-8a7a998e.entry.js → p-ceb13ac1.entry.js} +1 -1
  497. package/dist/tegel/{p-caaab9d1.entry.js → p-d08d8a44.entry.js} +1 -1
  498. package/dist/tegel/{p-6b625fe1.entry.js → p-d2efffab.entry.js} +1 -1
  499. package/dist/tegel/{p-81c7ece9.entry.js → p-d33b5f47.entry.js} +1 -1
  500. package/dist/tegel/{p-b2466d89.entry.js → p-d82ec760.entry.js} +1 -1
  501. package/dist/tegel/{p-ffe71966.entry.js → p-d82fecc1.entry.js} +1 -1
  502. package/dist/tegel/{p-05815c7a.entry.js → p-dc2b8ccc.entry.js} +1 -1
  503. package/dist/tegel/{p-56a341a1.entry.js → p-dee090d9.entry.js} +1 -1
  504. package/dist/tegel/{p-f7b73968.entry.js → p-df3d220d.entry.js} +1 -1
  505. package/dist/tegel/{p-0308dd60.entry.js → p-ea6b7621.entry.js} +1 -1
  506. package/dist/tegel/{p-c7301ecb.entry.js → p-ed69bc61.entry.js} +1 -1
  507. package/dist/tegel/{p-d72f1690.entry.js → p-f4011972.entry.js} +1 -1
  508. package/dist/tegel/{p-47a92f41.entry.js → p-f54daf7d.entry.js} +1 -1
  509. package/dist/tegel/{p-ff6dfbe5.entry.js → p-fc250504.entry.js} +1 -1
  510. package/dist/tegel/{p-2f69406d.entry.js → p-fc3df599.entry.js} +1 -1
  511. package/dist/tegel/{p-46808902.entry.js → p-fcfb96da.entry.js} +1 -1
  512. package/dist/tegel/{p-84b79c10.entry.js → p-fe2a3b1d.entry.js} +1 -1
  513. package/dist/tegel/tegel.css +3 -3
  514. package/dist/tegel/tegel.esm.js +1 -1
  515. package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +16 -16
  516. package/dist/types/components/accordion/accordion.d.ts +3 -3
  517. package/dist/types/components/badge/badge.d.ts +12 -12
  518. package/dist/types/components/banner/banner.d.ts +27 -27
  519. package/dist/types/components/block/block.d.ts +6 -6
  520. package/dist/types/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +3 -3
  521. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +2 -2
  522. package/dist/types/components/button/button.d.ts +17 -17
  523. package/dist/types/components/card/card.d.ts +30 -30
  524. package/dist/types/components/checkbox/checkbox.d.ts +36 -36
  525. package/dist/types/components/chip/chip.d.ts +35 -35
  526. package/dist/types/components/datetime/datetime.d.ts +49 -49
  527. package/dist/types/components/divider/divider.d.ts +3 -3
  528. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +30 -30
  529. package/dist/types/components/dropdown/dropdown.d.ts +102 -99
  530. package/dist/types/components/footer/footer-group/footer-group.d.ts +12 -12
  531. package/dist/types/components/footer/footer-item/footer-item.d.ts +4 -4
  532. package/dist/types/components/footer/footer.d.ts +7 -5
  533. package/dist/types/components/header/core-header-item/core-header-item.d.ts +1 -1
  534. package/dist/types/components/header/header-brand-symbol/header-brand-symbol.d.ts +2 -2
  535. package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +14 -14
  536. package/dist/types/components/header/header-dropdown-list/header-dropdown-list.d.ts +10 -10
  537. package/dist/types/components/header/header-dropdown-list-item/header-dropdown-list-item.d.ts +6 -6
  538. package/dist/types/components/header/header-dropdown-list-user/header-dropdown-list-user.d.ts +10 -10
  539. package/dist/types/components/header/header-hamburger/header-hamburger.d.ts +2 -2
  540. package/dist/types/components/header/header-item/header-item.d.ts +14 -14
  541. package/dist/types/components/header/header-launcher/header-launcher.d.ts +10 -10
  542. package/dist/types/components/header/header-launcher-button/header-launcher-button.d.ts +6 -6
  543. package/dist/types/components/header/header-launcher-grid/header-launcher-grid.d.ts +4 -4
  544. package/dist/types/components/header/header-launcher-grid-item/header-launcher-grid-item.d.ts +1 -1
  545. package/dist/types/components/header/header-launcher-grid-title/header-launcher-grid-title.d.ts +2 -2
  546. package/dist/types/components/header/header-launcher-list/header-launcher-list.d.ts +2 -2
  547. package/dist/types/components/header/header-launcher-list-item/header-launcher-list-item.d.ts +1 -1
  548. package/dist/types/components/header/header-launcher-list-title/header-launcher-list-title.d.ts +3 -3
  549. package/dist/types/components/header/header-title/header-title.d.ts +1 -1
  550. package/dist/types/components/header/header.d.ts +6 -6
  551. package/dist/types/components/icon/icon.d.ts +15 -12
  552. package/dist/types/components/link/link.d.ts +7 -7
  553. package/dist/types/components/message/message.d.ts +12 -12
  554. package/dist/types/components/modal/modal.d.ts +35 -35
  555. package/dist/types/components/popover-canvas/popover-canvas.d.ts +20 -20
  556. package/dist/types/components/popover-core/popover-core.d.ts +43 -43
  557. package/dist/types/components/popover-menu/popover-menu-item/popover-menu-item.d.ts +3 -3
  558. package/dist/types/components/popover-menu/popover-menu.d.ts +21 -21
  559. package/dist/types/components/radio-button/radio-button.d.ts +21 -21
  560. package/dist/types/components/side-menu/side-menu-close-button/side-menu-close-button.d.ts +2 -2
  561. package/dist/types/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.d.ts +12 -12
  562. package/dist/types/components/side-menu/side-menu-dropdown/side-menu-dropdown.d.ts +25 -25
  563. package/dist/types/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.d.ts +6 -6
  564. package/dist/types/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.d.ts +10 -10
  565. package/dist/types/components/side-menu/side-menu-item/side-menu-item.d.ts +18 -18
  566. package/dist/types/components/side-menu/side-menu-overlay/side-menu-overlay.d.ts +1 -1
  567. package/dist/types/components/side-menu/side-menu-user/side-menu-user.d.ts +9 -9
  568. package/dist/types/components/side-menu/side-menu-user-image/side-menu-user-image.d.ts +5 -5
  569. package/dist/types/components/side-menu/side-menu-user-label/side-menu-user-label.d.ts +5 -5
  570. package/dist/types/components/side-menu/side-menu.d.ts +28 -27
  571. package/dist/types/components/slider/slider.d.ts +77 -77
  572. package/dist/types/components/spinner/spinner.d.ts +5 -5
  573. package/dist/types/components/stepper/step/step.d.ts +14 -14
  574. package/dist/types/components/stepper/stepper.d.ts +29 -29
  575. package/dist/types/components/table/table/table.d.ts +43 -43
  576. package/dist/types/components/table/table-body/table-body.d.ts +17 -17
  577. package/dist/types/components/table/table-body-cell/table-body-cell.d.ts +21 -21
  578. package/dist/types/components/table/table-body-row/table-body-row.d.ts +20 -20
  579. package/dist/types/components/table/table-body-row-expandable/table-body-row-expandable.d.ts +21 -21
  580. package/dist/types/components/table/table-footer/table-footer.d.ts +28 -28
  581. package/dist/types/components/table/table-header/table-header.d.ts +31 -31
  582. package/dist/types/components/table/table-header-cell/table-header-cell.d.ts +56 -50
  583. package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +21 -21
  584. package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +9 -9
  585. package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +36 -36
  586. package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +6 -6
  587. package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +34 -34
  588. package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +6 -6
  589. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +33 -33
  590. package/dist/types/components/text-field/text-field.d.ts +50 -50
  591. package/dist/types/components/textarea/textarea.d.ts +47 -47
  592. package/dist/types/components/toast/toast.d.ts +24 -24
  593. package/dist/types/components/toggle/toggle.d.ts +25 -25
  594. package/dist/types/components/tooltip/tooltip.d.ts +27 -27
  595. package/dist/types/components.d.ts +25 -17
  596. package/dist/types/stencil-public-runtime.d.ts +8 -0
  597. package/dist/types/types/Attributes.d.ts +1 -1
  598. package/dist/types/utils/appendHiddenInput.d.ts +2 -2
  599. package/package.json +3 -3
  600. package/dist/cjs/dfs-babd18a6.js +0 -29
  601. package/dist/cjs/inheritAriaAttributes-640b1abb.js +0 -78
  602. package/dist/collection/components/accordion/accordion.stories.js +0 -100
  603. package/dist/collection/components/accordion/test/basic/accordion.e2e.js +0 -19
  604. package/dist/collection/components/accordion/test/disabled/accordion.e2e.js +0 -19
  605. package/dist/collection/components/accordion/test/expanded/accordion.e2e.js +0 -24
  606. package/dist/collection/components/accordion/test/padding-reset/accordion.e2e.js +0 -24
  607. package/dist/collection/components/badge/badge.stories.js +0 -106
  608. package/dist/collection/components/badge/test/basic/badge.e2e.js +0 -10
  609. package/dist/collection/components/badge/test/value/badge.e2e.js +0 -11
  610. package/dist/collection/components/banner/banner.stories.js +0 -92
  611. package/dist/collection/components/banner/test/basic/banner.e2e.js +0 -10
  612. package/dist/collection/components/block/block.stories.js +0 -49
  613. package/dist/collection/components/breadcrumbs/breadcrumbs.stories.js +0 -36
  614. package/dist/collection/components/button/button.stories.js +0 -185
  615. package/dist/collection/components/button/test/basic/button.e2e.js +0 -35
  616. package/dist/collection/components/button/test/danger/button.e2e.js +0 -18
  617. package/dist/collection/components/button/test/disabled/button.e2e.js +0 -24
  618. package/dist/collection/components/button/test/ghost/button.e2e.js +0 -18
  619. package/dist/collection/components/button/test/icon/button.e2e.js +0 -38
  620. package/dist/collection/components/button/test/secondary/button.e2e.js +0 -18
  621. package/dist/collection/components/card/card.stories.js +0 -163
  622. package/dist/collection/components/checkbox/checkbox.stories.js +0 -93
  623. package/dist/collection/components/chip/chip.stories.js +0 -230
  624. package/dist/collection/components/datetime/datetime.stories.js +0 -219
  625. package/dist/collection/components/divider/divider.stories.js +0 -62
  626. package/dist/collection/components/dropdown/dropdown.stories.js +0 -248
  627. package/dist/collection/components/dropdown/test/basic/dropdown.e2e.js +0 -41
  628. package/dist/collection/components/dropdown/test/default/dropdown.e2e.js +0 -76
  629. package/dist/collection/components/dropdown/test/error/dropdown.e2e.js +0 -36
  630. package/dist/collection/components/dropdown/test/filter/dropdown.e2e.js +0 -56
  631. package/dist/collection/components/dropdown/test/filter/normalize-text-false/dropdown.e2e.js +0 -43
  632. package/dist/collection/components/dropdown/test/multiselect/dropdown.e2e.js +0 -81
  633. package/dist/collection/components/footer/footer.stories.js +0 -145
  634. package/dist/collection/components/header/header.stories.js +0 -82
  635. package/dist/collection/components/icon/icon.stories.js +0 -48
  636. package/dist/collection/components/link/link.stories.js +0 -59
  637. package/dist/collection/components/message/message.stories.js +0 -109
  638. package/dist/collection/components/message/test/error/message.e2e.js +0 -33
  639. package/dist/collection/components/message/test/information/message.e2e.js +0 -33
  640. package/dist/collection/components/message/test/success/message.e2e.js +0 -33
  641. package/dist/collection/components/message/test/warning/message.e2e.js +0 -33
  642. package/dist/collection/components/modal/modal.stories.js +0 -119
  643. package/dist/collection/components/popover-canvas/popover-canvas.stories.js +0 -92
  644. package/dist/collection/components/popover-menu/popover-menu.stories.js +0 -146
  645. package/dist/collection/components/radio-button/radio-button.stories.js +0 -91
  646. package/dist/collection/components/side-menu/side-menu.stories.js +0 -224
  647. package/dist/collection/components/slider/slider.stories.js +0 -243
  648. package/dist/collection/components/spinner/spinner.stories.js +0 -61
  649. package/dist/collection/components/stepper/stepper.stories.js +0 -95
  650. package/dist/collection/components/table/table/test/batch/table.e2e.js +0 -24
  651. package/dist/collection/components/table/table/test/default/table.e2e.js +0 -46
  652. package/dist/collection/components/table/table/test/expandable-row/table.e2e.js +0 -64
  653. package/dist/collection/components/table/table/test/filtering/table.e2e.js +0 -41
  654. package/dist/collection/components/table/table/test/multiselect/table.e2e.js +0 -47
  655. package/dist/collection/components/table/table/test/pagination/table.e2e.js +0 -53
  656. package/dist/collection/components/table/table/test/sorting/table.e2e.js +0 -36
  657. package/dist/collection/components/table/table-component-basic.stories.js +0 -184
  658. package/dist/collection/components/table/table-component-batch-actions.stories.js +0 -188
  659. package/dist/collection/components/table/table-component-custom-width.stories.js +0 -174
  660. package/dist/collection/components/table/table-component-expandable-rows.stories.js +0 -160
  661. package/dist/collection/components/table/table-component-filtering.stories.js +0 -195
  662. package/dist/collection/components/table/table-component-multiselect.stories.js +0 -211
  663. package/dist/collection/components/table/table-component-pagination.stories.js +0 -196
  664. package/dist/collection/components/table/table-component-sorting.stories.js +0 -240
  665. package/dist/collection/components/tabs/folder-tabs/folder-tabs.stories.js +0 -105
  666. package/dist/collection/components/tabs/inline-tabs/inline-tabs.stories.js +0 -99
  667. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +0 -101
  668. package/dist/collection/components/text-field/text-field.stories.js +0 -247
  669. package/dist/collection/components/textarea/test/basic/textarea.e2e.js +0 -26
  670. package/dist/collection/components/textarea/test/default/textarea.e2e.js +0 -34
  671. package/dist/collection/components/textarea/test/read-only/textarea.e2e.js +0 -26
  672. package/dist/collection/components/textarea/textarea.stories.js +0 -188
  673. package/dist/collection/components/toast/toast.stories.js +0 -90
  674. package/dist/collection/components/toggle/toggle.stories.js +0 -95
  675. package/dist/collection/components/tooltip/tooltip.stories.js +0 -126
  676. package/dist/collection/stories/Installation/angular.stories.js +0 -111
  677. package/dist/collection/stories/Installation/javascript.stories.js +0 -99
  678. package/dist/collection/stories/Installation/react.stories.js +0 -117
  679. package/dist/collection/stories/announcements/announce-tegel.stories.js +0 -262
  680. package/dist/collection/stories/announcements/prefix-change.stories.js +0 -93
  681. package/dist/collection/stories/formatHtmlPreview.js +0 -10
  682. package/dist/collection/stories/foundations/color/color-brand.stories.js +0 -38
  683. package/dist/collection/stories/foundations/color/color-scales.stories.js +0 -71
  684. package/dist/collection/stories/foundations/color/color-semantic.stories.js +0 -40
  685. package/dist/collection/stories/foundations/grid/grid.stories.js +0 -386
  686. package/dist/collection/stories/foundations/spacing/spacing-element.stories.js +0 -100
  687. package/dist/collection/stories/foundations/spacing/spacing-layout.stories.js +0 -94
  688. package/dist/collection/stories/foundations/typography/typography-body.stories.js +0 -16
  689. package/dist/collection/stories/foundations/typography/typography-detail.stories.js +0 -17
  690. package/dist/collection/stories/foundations/typography/typography-headline.stories.js +0 -39
  691. package/dist/collection/stories/foundations/typography/typography-paragraph.stories.js +0 -12
  692. package/dist/collection/stories/patterns/navigation/navigation-basic.stories.js +0 -85
  693. package/dist/collection/stories/patterns/navigation/navigation-fewitems.stories.js +0 -259
  694. package/dist/collection/stories/patterns/navigation/navigation-manyitems.stories.js +0 -247
  695. package/dist/collection/stories/patterns/navigation/navigation-user-menu.stories.js +0 -140
  696. package/dist/collection/stories/tegel.stories.js +0 -283
  697. package/dist/collection/stories/utility/color/background-color.stories.js +0 -96
  698. package/dist/collection/stories/utility/color/text-color.stories.js +0 -94
  699. package/dist/esm/dfs-3f5bd9e8.js +0 -27
  700. package/dist/esm/inheritAriaAttributes-d4dfca6b.js +0 -76
  701. package/dist/tegel/p-027473cc.entry.js +0 -1
  702. package/dist/tegel/p-31bb4c3e.entry.js +0 -1
  703. package/dist/tegel/p-3418e94b.entry.js +0 -1
  704. package/dist/tegel/p-3e9b9672.js +0 -2
  705. package/dist/tegel/p-5092497e.entry.js +0 -1
  706. package/dist/tegel/p-5dc4f120.entry.js +0 -1
  707. package/dist/tegel/p-7f94a735.entry.js +0 -1
  708. package/dist/tegel/p-ae19b833.entry.js +0 -1
  709. package/dist/tegel/p-c1f3d3a9.entry.js +0 -1
  710. package/dist/tegel/p-f0c9ff6a.entry.js +0 -1
  711. package/dist/types/components/accordion/accordion.stories.d.ts +0 -77
  712. package/dist/types/components/badge/badge.stories.d.ts +0 -73
  713. package/dist/types/components/banner/banner.stories.d.ts +0 -69
  714. package/dist/types/components/block/block.stories.d.ts +0 -32
  715. package/dist/types/components/breadcrumbs/breadcrumbs.stories.d.ts +0 -16
  716. package/dist/types/components/button/button.stories.d.ts +0 -147
  717. package/dist/types/components/card/card.stories.d.ts +0 -128
  718. package/dist/types/components/checkbox/checkbox.stories.d.ts +0 -65
  719. package/dist/types/components/chip/chip.stories.d.ts +0 -99
  720. package/dist/types/components/datetime/datetime.stories.d.ts +0 -151
  721. package/dist/types/components/divider/divider.stories.d.ts +0 -58
  722. package/dist/types/components/dropdown/dropdown.stories.d.ts +0 -189
  723. package/dist/types/components/footer/footer.stories.d.ts +0 -44
  724. package/dist/types/components/header/header.stories.d.ts +0 -32
  725. package/dist/types/components/icon/icon.stories.d.ts +0 -36
  726. package/dist/types/components/link/link.stories.d.ts +0 -44
  727. package/dist/types/components/message/message.stories.d.ts +0 -88
  728. package/dist/types/components/modal/modal.stories.d.ts +0 -78
  729. package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +0 -27
  730. package/dist/types/components/popover-menu/popover-menu.stories.d.ts +0 -51
  731. package/dist/types/components/radio-button/radio-button.stories.d.ts +0 -39
  732. package/dist/types/components/side-menu/side-menu.stories.d.ts +0 -65
  733. package/dist/types/components/slider/slider.stories.d.ts +0 -235
  734. package/dist/types/components/spinner/spinner.stories.d.ts +0 -46
  735. package/dist/types/components/stepper/stepper.stories.d.ts +0 -80
  736. package/dist/types/components/table/table-component-basic.stories.d.ts +0 -144
  737. package/dist/types/components/table/table-component-batch-actions.stories.d.ts +0 -139
  738. package/dist/types/components/table/table-component-custom-width.stories.d.ts +0 -131
  739. package/dist/types/components/table/table-component-expandable-rows.stories.d.ts +0 -131
  740. package/dist/types/components/table/table-component-filtering.stories.d.ts +0 -131
  741. package/dist/types/components/table/table-component-multiselect.stories.d.ts +0 -147
  742. package/dist/types/components/table/table-component-pagination.stories.d.ts +0 -131
  743. package/dist/types/components/table/table-component-sorting.stories.d.ts +0 -183
  744. package/dist/types/components/tabs/folder-tabs/folder-tabs.stories.d.ts +0 -69
  745. package/dist/types/components/tabs/inline-tabs/inline-tabs.stories.d.ts +0 -61
  746. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +0 -61
  747. package/dist/types/components/text-field/text-field.stories.d.ts +0 -201
  748. package/dist/types/components/textarea/textarea.stories.d.ts +0 -139
  749. package/dist/types/components/toast/toast.stories.d.ts +0 -64
  750. package/dist/types/components/toggle/toggle.stories.d.ts +0 -74
  751. package/dist/types/components/tooltip/tooltip.stories.d.ts +0 -66
  752. package/dist/types/stories/Installation/angular.stories.d.ts +0 -6
  753. package/dist/types/stories/Installation/javascript.stories.d.ts +0 -7
  754. package/dist/types/stories/Installation/react.stories.d.ts +0 -6
  755. package/dist/types/stories/announcements/announce-tegel.stories.d.ts +0 -6
  756. package/dist/types/stories/announcements/prefix-change.stories.d.ts +0 -6
  757. package/dist/types/stories/formatHtmlPreview.d.ts +0 -2
  758. package/dist/types/stories/foundations/color/color-brand.stories.d.ts +0 -13
  759. package/dist/types/stories/foundations/color/color-scales.stories.d.ts +0 -30
  760. package/dist/types/stories/foundations/color/color-semantic.stories.d.ts +0 -13
  761. package/dist/types/stories/foundations/grid/grid.stories.d.ts +0 -35
  762. package/dist/types/stories/foundations/spacing/spacing-element.stories.d.ts +0 -8
  763. package/dist/types/stories/foundations/spacing/spacing-layout.stories.d.ts +0 -8
  764. package/dist/types/stories/foundations/typography/typography-body.stories.d.ts +0 -8
  765. package/dist/types/stories/foundations/typography/typography-detail.stories.d.ts +0 -8
  766. package/dist/types/stories/foundations/typography/typography-headline.stories.d.ts +0 -21
  767. package/dist/types/stories/foundations/typography/typography-paragraph.stories.d.ts +0 -8
  768. package/dist/types/stories/patterns/navigation/navigation-basic.stories.d.ts +0 -23
  769. package/dist/types/stories/patterns/navigation/navigation-fewitems.stories.d.ts +0 -23
  770. package/dist/types/stories/patterns/navigation/navigation-manyitems.stories.d.ts +0 -38
  771. package/dist/types/stories/patterns/navigation/navigation-user-menu.stories.d.ts +0 -33
  772. package/dist/types/stories/tegel.stories.d.ts +0 -6
  773. package/dist/types/stories/utility/color/background-color.stories.d.ts +0 -64
  774. package/dist/types/stories/utility/color/text-color.stories.d.ts +0 -64
  775. /package/dist/tegel/{p-f7ce52e9.js → p-11648030.js} +0 -0
  776. /package/dist/tegel/{p-098a26f3.js → p-3fe9cbbf.js} +0 -0
  777. /package/dist/tegel/{p-81039661.js → p-52bf0fdf.js} +0 -0
@@ -6,339 +6,357 @@ import appendHiddenInput from "../../utils/appendHiddenInput";
6
6
  * @slot <default> - <b>Unnamed slot.</b> For dropdown option elements.
7
7
  */
8
8
  export class TdsDropdown {
9
- constructor() {
10
- this.setDefaultOption = () => {
11
- Array.from(this.host.children)
12
- .filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION')
13
- .forEach((element) => {
14
- if (this.multiselect) {
15
- this.defaultValue.split(',').forEach((value) => {
16
- if (value === element.value) {
17
- element.setSelected(true);
18
- this.value = this.value ? [...this.value, element.value] : [element.value];
9
+ constructor() {
10
+ this.setDefaultOption = () => {
11
+ Array.from(this.host.children)
12
+ .filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION')
13
+ .forEach((element) => {
14
+ if (this.multiselect) {
15
+ this.defaultValue.split(',').forEach((value) => {
16
+ if (value === element.value) {
17
+ element.setSelected(true);
18
+ this.value = this.value ? [...this.value, element.value] : [element.value];
19
+ }
20
+ });
21
+ }
22
+ else {
23
+ if (this.defaultValue === element.value) {
24
+ element.setSelected(true);
25
+ this.value = [element.value];
26
+ }
27
+ else {
28
+ element.setSelected(false);
29
+ }
30
+ }
31
+ this.setValueAttribute();
32
+ return element;
33
+ });
34
+ };
35
+ /* Returns a list of all children that are tds-dropdown-option elements */
36
+ this.getChildren = () => {
37
+ const tdsDropdownOptions = Array.from(this.host.children).filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION');
38
+ if (tdsDropdownOptions.length === 0) {
39
+ console.warn('TDS DROPDOWN: Data missing. Disregard if loading data asynchronously.');
40
+ }
41
+ else
42
+ return tdsDropdownOptions;
43
+ };
44
+ this.getOpenDirection = () => {
45
+ var _a, _b, _c, _d, _e;
46
+ if (this.openDirection === 'auto' || !this.openDirection) {
47
+ const dropdownMenuHeight = (_b = (_a = this.dropdownList) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
48
+ const distanceToBottom = (_e = (_d = (_c = this.host).getBoundingClientRect) === null || _d === void 0 ? void 0 : _d.call(_c).top) !== null && _e !== void 0 ? _e : 0;
49
+ const viewportHeight = window.innerHeight;
50
+ if (distanceToBottom + dropdownMenuHeight + 57 > viewportHeight) {
51
+ return 'up';
52
+ }
53
+ return 'down';
54
+ }
55
+ return this.openDirection;
56
+ };
57
+ /* Toggles the open state of the Dropdown and sets focus to the input element */
58
+ this.handleToggleOpen = () => {
59
+ if (!this.disabled) {
60
+ this.open = !this.open;
61
+ if (this.open) {
62
+ this.focusInputElement();
63
+ }
64
+ }
65
+ };
66
+ /* Focuses the input element in the Dropdown, if the reference is present. */
67
+ this.focusInputElement = () => {
68
+ if (this.inputElement)
69
+ this.inputElement.focus();
70
+ };
71
+ this.getSelectedChildren = () => {
72
+ var _a;
73
+ return (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((stringValue) => {
74
+ const matchingElement = this.getChildren().find((element) => element.value === stringValue);
75
+ return matchingElement;
76
+ }).filter(Boolean);
77
+ };
78
+ this.getSelectedChildrenLabels = () => {
79
+ var _a;
80
+ return (_a = this.getSelectedChildren()) === null || _a === void 0 ? void 0 : _a.map((element) => element.textContent.trim());
81
+ };
82
+ this.getValue = () => {
83
+ const labels = this.getSelectedChildrenLabels();
84
+ if (!labels) {
85
+ return '';
86
+ }
87
+ return this.filter ? labels === null || labels === void 0 ? void 0 : labels.join(', ') : labels === null || labels === void 0 ? void 0 : labels.toString();
88
+ };
89
+ this.setValueAttribute = () => {
90
+ var _a, _b, _c;
91
+ if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) === '')
92
+ this.value = null;
93
+ this.host.setAttribute('value', (_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.map((val) => val).toString()) !== null && _c !== void 0 ? _c : null);
94
+ };
95
+ this.handleFilter = (event) => {
96
+ this.tdsInput.emit(event);
97
+ const query = event.target.value.toLowerCase();
98
+ /* Check if the query is empty, and if so, show all options */
99
+ const children = this.getChildren();
100
+ if (query === '') {
101
+ children.forEach((element) => {
102
+ element.removeAttribute('hidden');
103
+ return element;
104
+ });
105
+ this.filterResult = null;
106
+ /* Hide the options that do not match the query */
107
+ }
108
+ else {
109
+ this.filterResult = children.filter((element) => {
110
+ if (!this.normalizeString(element.textContent)
111
+ .toLowerCase()
112
+ .includes(this.normalizeString(query).toLowerCase())) {
113
+ element.setAttribute('hidden', '');
114
+ }
115
+ else {
116
+ element.removeAttribute('hidden');
117
+ }
118
+ return !element.hasAttribute('hidden');
119
+ }).length;
19
120
  }
20
- });
121
+ };
122
+ this.handleFocus = (event) => {
123
+ this.tdsFocus.emit(event);
124
+ };
125
+ this.handleBlur = (event) => {
126
+ this.tdsBlur.emit(event);
127
+ };
128
+ this.handleChange = () => {
129
+ var _a, _b;
130
+ this.tdsChange.emit({
131
+ name: this.name,
132
+ value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString()) !== null && _b !== void 0 ? _b : null,
133
+ });
134
+ };
135
+ this.name = undefined;
136
+ this.disabled = false;
137
+ this.helper = undefined;
138
+ this.label = undefined;
139
+ this.labelPosition = undefined;
140
+ this.modeVariant = null;
141
+ this.openDirection = 'auto';
142
+ this.placeholder = undefined;
143
+ this.size = 'lg';
144
+ this.error = false;
145
+ this.multiselect = false;
146
+ this.filter = false;
147
+ this.normalizeText = true;
148
+ this.noResultText = 'No result';
149
+ this.defaultValue = undefined;
150
+ this.open = false;
151
+ this.value = undefined;
152
+ this.filterResult = undefined;
153
+ this.filterFocus = undefined;
154
+ }
155
+ /** Method that resets the Dropdown, marks all children as non-selected and resets the value to null. */
156
+ async reset() {
157
+ this.internalReset();
158
+ this.handleChange();
159
+ }
160
+ /** Method for setting the value of the Dropdown.
161
+ *
162
+ * Single selection example:
163
+ *
164
+ * <code>
165
+ * dropdown.setValue('option-1', 'Option 1');
166
+ * </code>
167
+ *
168
+ * Multiselect example:
169
+ *
170
+ * <code>
171
+ * dropdown.setValue(['option-1', 'option-2']);
172
+ * </code>
173
+ */
174
+ // The label is optional here ONLY to not break the API. Should be removed for 2.0.
175
+ // @ts-ignore
176
+ // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
177
+ async setValue(value, label) {
178
+ let nextValue;
179
+ if (typeof value === 'string')
180
+ nextValue = [value];
181
+ else
182
+ nextValue = value;
183
+ if (!this.multiselect && nextValue.length > 1) {
184
+ console.warn('Tried to select multiple items, but multiselect is not enabled.');
185
+ nextValue = [nextValue[0]];
21
186
  }
22
- else {
23
- if (this.defaultValue === element.value) {
24
- element.setSelected(true);
25
- this.value = [element.value];
26
- }
27
- else {
28
- element.setSelected(false);
29
- }
187
+ this.internalReset();
188
+ for (let i = 0; i < nextValue.length; i++) {
189
+ const optionExist = this.getChildren().some((element) => element.value === nextValue[i]);
190
+ if (!optionExist) {
191
+ nextValue.splice(i, 1);
192
+ }
30
193
  }
194
+ this.value = nextValue;
31
195
  this.setValueAttribute();
32
- return element;
33
- });
34
- };
35
- /* Returns a list of all children that are are tds-dropdown-option elements */
36
- this.getChildren = () => Array.from(this.host.children).filter((element) => element.tagName === 'TDS-DROPDOWN-OPTION');
37
- this.getOpenDirection = () => {
38
- var _a, _b, _c, _d, _e;
39
- if (this.openDirection === 'auto' || !this.openDirection) {
40
- const dropdownMenuHeight = (_b = (_a = this.dropdownList) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
41
- const distanceToBottom = (_e = (_d = (_c = this.host).getBoundingClientRect) === null || _d === void 0 ? void 0 : _d.call(_c).top) !== null && _e !== void 0 ? _e : 0;
42
- const viewportHeight = window.innerHeight;
43
- if (distanceToBottom + dropdownMenuHeight + 57 > viewportHeight) {
44
- return 'up';
196
+ this.selectChildrenAsSelectedBasedOnSelectionProp();
197
+ this.handleChange();
198
+ /* This returns an array of object with a value and label pair. This is ONLY to not break the API. Should be removed for 2.0. */
199
+ /* https://tegel.atlassian.net/browse/CDEP-2703 */
200
+ const selection = this.getSelectedChildren().map((element) => ({
201
+ value: element.value,
202
+ label: element.textContent.trim(),
203
+ }));
204
+ // Update inputElement value and placeholder text
205
+ if (this.filter) {
206
+ this.inputElement.value = this.getValue();
45
207
  }
46
- return 'down';
47
- }
48
- return this.openDirection;
49
- };
50
- this.getSelectedChildren = () => {
51
- var _a;
52
- return (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((stringValue) => {
53
- const matchingElement = this.getChildren().find((element) => element.value === stringValue);
54
- return matchingElement;
55
- }).filter(Boolean);
56
- };
57
- this.getSelectedChildrenLabels = () => {
58
- var _a;
59
- return (_a = this.getSelectedChildren()) === null || _a === void 0 ? void 0 : _a.map((element) => element.textContent.trim());
60
- };
61
- this.getValue = () => {
62
- const labels = this.getSelectedChildrenLabels();
63
- if (!labels) {
64
- return '';
65
- }
66
- return this.filter ? labels === null || labels === void 0 ? void 0 : labels.join(', ') : labels === null || labels === void 0 ? void 0 : labels.toString();
67
- };
68
- this.setValueAttribute = () => {
69
- var _a, _b, _c;
70
- if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) === '')
71
- this.value = null;
72
- this.host.setAttribute('value', (_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.map((val) => val).toString()) !== null && _c !== void 0 ? _c : null);
73
- };
74
- this.handleFilter = (event) => {
75
- this.tdsInput.emit(event);
76
- const query = event.target.value.toLowerCase();
77
- /* Check if the query is empty, and if so, show all options */
78
- const children = this.getChildren();
79
- if (query === '') {
80
- children.forEach((element) => {
81
- element.removeAttribute('hidden');
82
- return element;
83
- });
84
- this.filterResult = null;
85
- /* Hide the options that do not match the query */
86
- }
87
- else {
88
- this.filterResult = children.filter((element) => {
89
- if (!this.normalizeString(element.textContent)
90
- .toLowerCase()
91
- .includes(this.normalizeString(query).toLowerCase())) {
92
- element.setAttribute('hidden', '');
93
- }
94
- else {
95
- element.removeAttribute('hidden');
96
- }
97
- return !element.hasAttribute('hidden');
98
- }).length;
99
- }
100
- };
101
- this.handleFocus = (event) => {
102
- this.tdsFocus.emit(event);
103
- };
104
- this.handleBlur = (event) => {
105
- this.tdsBlur.emit(event);
106
- };
107
- this.handleChange = () => {
108
- var _a, _b;
109
- this.tdsChange.emit({
110
- name: this.name,
111
- value: (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString()) !== null && _b !== void 0 ? _b : null,
112
- });
113
- };
114
- this.name = undefined;
115
- this.disabled = false;
116
- this.helper = undefined;
117
- this.label = undefined;
118
- this.labelPosition = undefined;
119
- this.modeVariant = null;
120
- this.openDirection = 'auto';
121
- this.placeholder = undefined;
122
- this.size = 'lg';
123
- this.error = false;
124
- this.multiselect = false;
125
- this.filter = false;
126
- this.normalizeText = true;
127
- this.noResultText = 'No result';
128
- this.defaultValue = undefined;
129
- this.open = false;
130
- this.value = undefined;
131
- this.filterResult = undefined;
132
- this.filterFocus = undefined;
133
- }
134
- /** Method that resets the Dropdown, marks all children as non-selected and resets the value to null. */
135
- async reset() {
136
- this.internalReset();
137
- this.handleChange();
138
- }
139
- /** Method for setting the value of the Dropdown.
140
- *
141
- * Single selection example:
142
- *
143
- * <code>
144
- * dropdown.setValue('option-1', 'Option 1');
145
- * </code>
146
- *
147
- * Multiselect example:
148
- *
149
- * <code>
150
- * dropdown.setValue(['option-1', 'option-2']);
151
- * </code>
152
- */
153
- // The label is optional here ONLY to not break the API. Should be removed for 2.0.
154
- // @ts-ignore
155
- // eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
156
- async setValue(value, label) {
157
- let nextValue;
158
- if (typeof value === 'string')
159
- nextValue = [value];
160
- else
161
- nextValue = value;
162
- if (!this.multiselect && nextValue.length > 1) {
163
- console.warn('Tried to select multiple items, but multiselect is not enabled.');
164
- nextValue = [nextValue[0]];
165
- }
166
- this.internalReset();
167
- for (let i = 0; i < nextValue.length; i++) {
168
- const optionExist = this.getChildren().some((element) => element.value === nextValue[i]);
169
- if (!optionExist) {
170
- nextValue.splice(i, 1);
171
- }
208
+ return selection;
172
209
  }
173
- this.value = nextValue;
174
- this.setValueAttribute();
175
- this.selectChildrenAsSelectedBasedOnSelectionProp();
176
- this.handleChange();
177
- /* This returns an array of object with a value and label pair. This is ONLY to not break the API. Should be removed for 2.0. */
178
- /* https://tegel.atlassian.net/browse/CDEP-2703 */
179
- const selection = this.getSelectedChildren().map((element) => ({
180
- value: element.value,
181
- label: element.textContent.trim(),
182
- }));
183
- return selection;
184
- }
185
- /**
186
- * @internal
187
- */
188
- async appendValue(value) {
189
- if (this.multiselect && this.value) {
190
- this.setValue([...this.value, value]);
191
- }
192
- else {
193
- this.setValue(value);
194
- }
195
- }
196
- /** Method for removing a selected value in the Dropdown. */
197
- async removeValue(oldValue) {
198
- var _a, _b;
199
- let label;
200
- if (this.multiselect) {
201
- (_a = this.getChildren()) === null || _a === void 0 ? void 0 : _a.forEach((element) => {
202
- var _a;
203
- if (element.value === oldValue) {
204
- this.value = (_a = this.value) === null || _a === void 0 ? void 0 : _a.filter((value) => value !== element.value);
205
- label = element.textContent.trim();
206
- element.setSelected(false);
210
+ /**
211
+ * @internal
212
+ */
213
+ async appendValue(value) {
214
+ if (this.multiselect && this.value) {
215
+ this.setValue([...this.value, value]);
216
+ }
217
+ else {
218
+ this.setValue(value);
207
219
  }
208
- return element;
209
- });
210
220
  }
211
- else {
212
- this.reset();
221
+ /** Method for removing a selected value in the Dropdown. */
222
+ async removeValue(oldValue) {
223
+ var _a, _b;
224
+ let label;
225
+ if (this.multiselect) {
226
+ (_a = this.getChildren()) === null || _a === void 0 ? void 0 : _a.forEach((element) => {
227
+ var _a;
228
+ if (element.value === oldValue) {
229
+ this.value = (_a = this.value) === null || _a === void 0 ? void 0 : _a.filter((value) => value !== element.value);
230
+ label = element.textContent.trim();
231
+ element.setSelected(false);
232
+ }
233
+ return element;
234
+ });
235
+ }
236
+ else {
237
+ this.reset();
238
+ }
239
+ this.handleChange();
240
+ this.setValueAttribute();
241
+ /* This returns an array of object with a value and label pair. This is ONLY to not break the API. Should be removed for 2.0. */
242
+ /* https://tegel.atlassian.net/browse/CDEP-2703 */
243
+ return (_b = this.value) === null || _b === void 0 ? void 0 : _b.map((value) => ({ value, label }));
213
244
  }
214
- this.handleChange();
215
- this.setValueAttribute();
216
- /* This returns an array of object with a value and label pair. This is ONLY to not break the API. Should be removed for 2.0. */
217
- /* https://tegel.atlassian.net/browse/CDEP-2703 */
218
- return (_b = this.value) === null || _b === void 0 ? void 0 : _b.map((value) => ({ value, label }));
219
- }
220
- /** Method for closing the Dropdown. */
221
- async close() {
222
- this.open = false;
223
- }
224
- onAnyClick(event) {
225
- if (this.open) {
226
- // Source: https://lamplightdev.com/blog/2021/04/10/how-to-detect-clicks-outside-of-a-web-component/
227
- const isClickOutside = !event.composedPath().includes(this.host);
228
- if (isClickOutside) {
245
+ /** Method for closing the Dropdown. */
246
+ async close() {
229
247
  this.open = false;
230
- }
231
- }
232
- }
233
- async onKeyDown(event) {
234
- // Get the active element
235
- const { activeElement } = document;
236
- if (!activeElement) {
237
- return;
238
248
  }
239
- const children = this.getChildren();
240
- if (event.key === 'ArrowDown') {
241
- /* Get the index of the current focus index, if there is no
242
- nextElementSibling return the index for the first child in our Dropdown. */
243
- const startingIndex = activeElement.nextElementSibling
244
- ? children.findIndex((element) => element === activeElement.nextElementSibling)
245
- : 0;
246
- const elementIndex = findNextFocusableElement(children, startingIndex);
247
- children[elementIndex].focus();
249
+ onAnyClick(event) {
250
+ if (this.open) {
251
+ // Source: https://lamplightdev.com/blog/2021/04/10/how-to-detect-clicks-outside-of-a-web-component/
252
+ const isClickOutside = !event.composedPath().includes(this.host);
253
+ if (isClickOutside) {
254
+ this.open = false;
255
+ }
256
+ }
248
257
  }
249
- else if (event.key === 'ArrowUp') {
250
- /* Get the index of the current focus index, if there is no
251
- previousElementSibling return the index for the first last in our Dropdown. */
252
- const startingIndex = activeElement.nextElementSibling
253
- ? this.getChildren().findIndex((element) => element === activeElement.previousElementSibling)
254
- : 0;
255
- const elementIndex = findPreviousFocusableElement(children, startingIndex);
256
- children[elementIndex].focus();
258
+ async onKeyDown(event) {
259
+ // Get the active element
260
+ const { activeElement } = document;
261
+ if (!activeElement) {
262
+ return;
263
+ }
264
+ const children = this.getChildren();
265
+ if (event.key === 'ArrowDown') {
266
+ /* Get the index of the current focus index, if there is no
267
+ nextElementSibling return the index for the first child in our Dropdown. */
268
+ const startingIndex = activeElement.nextElementSibling
269
+ ? children.findIndex((element) => element === activeElement.nextElementSibling)
270
+ : 0;
271
+ const elementIndex = findNextFocusableElement(children, startingIndex);
272
+ children[elementIndex].focus();
273
+ }
274
+ else if (event.key === 'ArrowUp') {
275
+ /* Get the index of the current focus index, if there is no
276
+ previousElementSibling return the index for the first last in our Dropdown. */
277
+ const startingIndex = activeElement.nextElementSibling
278
+ ? this.getChildren().findIndex((element) => element === activeElement.previousElementSibling)
279
+ : 0;
280
+ const elementIndex = findPreviousFocusableElement(children, startingIndex);
281
+ children[elementIndex].focus();
282
+ }
283
+ else if (event.key === 'Escape') {
284
+ this.open = false;
285
+ }
257
286
  }
258
- else if (event.key === 'Escape') {
259
- this.open = false;
287
+ // If the Dropdown gets closed,
288
+ // this sets the value of the dropdown to the current selection labels or null if no selection is made.
289
+ handleOpenState() {
290
+ if (this.filter && this.multiselect) {
291
+ if (!this.open) {
292
+ this.inputElement.value = this.getValue();
293
+ }
294
+ }
260
295
  }
261
- }
262
- // If the Dropdown gets closed,
263
- // this sets the value of the dropdown to the current selection labels or null if no selection is made.
264
- handleOpenState() {
265
- if (this.filter && this.multiselect) {
266
- if (!this.open) {
267
- this.inputElement.value = this.getValue();
268
- }
296
+ componentWillLoad() {
297
+ if (this.defaultValue) {
298
+ this.setDefaultOption();
299
+ }
269
300
  }
270
- }
271
- componentWillLoad() {
272
- if (this.defaultValue) {
273
- this.setDefaultOption();
301
+ /** Method to check if we should normalize text */
302
+ normalizeString(text) {
303
+ return this.normalizeText ? text.normalize('NFD').replace(/\p{Diacritic}/gu, '') : text;
274
304
  }
275
- }
276
- /** Method to check if we should normalize text */
277
- normalizeString(text) {
278
- return this.normalizeText ? text.normalize('NFD').replace(/\p{Diacritic}/gu, '') : text;
279
- }
280
- /** Method that resets the dropdown without emitting an event. */
281
- internalReset() {
282
- this.getChildren().forEach((element) => {
283
- element.setSelected(false);
284
- return element;
285
- });
286
- this.value = null;
287
- this.setValueAttribute();
288
- }
289
- selectChildrenAsSelectedBasedOnSelectionProp() {
290
- this.getChildren().forEach((element) => {
291
- this.value.forEach((selection) => {
292
- if (element.value !== selection) {
293
- // If not multiselect, we need to unselect all other options.
294
- if (!this.multiselect) {
305
+ /** Method that resets the dropdown without emitting an event. */
306
+ internalReset() {
307
+ this.getChildren().forEach((element) => {
295
308
  element.setSelected(false);
296
- }
297
- }
298
- else {
299
- element.setSelected(true);
300
- }
301
- });
302
- });
303
- }
304
- render() {
305
- var _a, _b, _c, _d;
306
- appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
307
- 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: {
308
- filter: true,
309
- focus: this.filterFocus,
310
- disabled: this.disabled,
311
- error: this.error,
312
- } }, 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: `
309
+ return element;
310
+ });
311
+ this.value = null;
312
+ this.setValueAttribute();
313
+ }
314
+ selectChildrenAsSelectedBasedOnSelectionProp() {
315
+ this.getChildren().forEach((element) => {
316
+ this.value.forEach((selection) => {
317
+ if (element.value !== selection) {
318
+ // If not multiselect, we need to unselect all other options.
319
+ if (!this.multiselect) {
320
+ element.setSelected(false);
321
+ }
322
+ }
323
+ else {
324
+ element.setSelected(true);
325
+ }
326
+ });
327
+ });
328
+ }
329
+ render() {
330
+ var _a, _b, _c, _d;
331
+ appendHiddenInput(this.host, this.name, (_a = this.value) === null || _a === void 0 ? void 0 : _a.map((value) => value).toString(), this.disabled);
332
+ 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: {
333
+ filter: true,
334
+ focus: this.filterFocus,
335
+ disabled: this.disabled,
336
+ error: this.error,
337
+ } }, 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: `
313
338
  label-inside-as-placeholder
314
339
  ${this.size}
315
340
  ${((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) ? 'selected' : ''}
316
341
  ` }, this.label)), h("input", {
317
- // eslint-disable-next-line no-return-assign
318
- ref: (element) => (this.inputElement = element), class: `${this.labelPosition === 'inside' ? 'placeholder' : ''}`, type: "text", placeholder: this.placeholder, value: this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onBlur: (event) => {
319
- this.filterFocus = false;
320
- this.handleBlur(event);
321
- }, onFocus: (event) => {
322
- this.open = true;
323
- this.filterFocus = true;
324
- this.handleFocus(event);
325
- }, onKeyDown: (event) => {
326
- if (event.key === 'Escape') {
327
- this.open = false;
328
- }
329
- }
330
- })), h("tds-icon", { onClick: () => {
331
- this.open = !this.open;
332
- if (this.open) {
333
- this.inputElement.focus();
334
- }
335
- }, class: `${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))) : (h("button", { onClick: () => {
336
- this.open = !this.open;
337
- }, onKeyDown: (event) => {
338
- if (event.key === 'Escape') {
339
- this.open = false;
340
- }
341
- }, class: `
342
+ // eslint-disable-next-line no-return-assign
343
+ ref: (inputEl) => (this.inputElement = inputEl), class: `${this.labelPosition === 'inside' ? 'placeholder' : ''}`, type: "text", placeholder: this.placeholder, value: this.getValue(), disabled: this.disabled, onInput: (event) => this.handleFilter(event), onBlur: (event) => {
344
+ this.filterFocus = false;
345
+ this.handleBlur(event);
346
+ }, onFocus: (event) => {
347
+ this.open = true;
348
+ this.filterFocus = true;
349
+ this.handleFocus(event);
350
+ }, onKeyDown: (event) => {
351
+ if (event.key === 'Escape') {
352
+ this.open = false;
353
+ }
354
+ }
355
+ })), h("tds-icon", { onClick: this.handleToggleOpen, class: `${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))) : (h("button", { onClick: () => this.handleToggleOpen(), onKeyDown: (event) => {
356
+ if (event.key === 'Escape') {
357
+ this.open = false;
358
+ }
359
+ }, class: `
342
360
  ${this.value ? 'value' : 'placeholder'}
343
361
  ${this.open ? 'open' : 'closed'}
344
362
  ${this.error ? 'error' : ''}
@@ -350,506 +368,510 @@ export class TdsDropdown {
350
368
  ${this.size}
351
369
  ${this.open ? 'open' : 'closed'}
352
370
  ${this.getOpenDirection()}
353
- ${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", null), this.filterResult === 0 && (h("div", { class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { name: "error", size: "16px" }), this.helper))));
354
- }
355
- static get is() { return "tds-dropdown"; }
356
- static get encapsulation() { return "shadow"; }
357
- static get originalStyleUrls() {
358
- return {
359
- "$": ["dropdown.scss"]
360
- };
361
- }
362
- static get styleUrls() {
363
- return {
364
- "$": ["dropdown.css"]
365
- };
366
- }
367
- static get properties() {
368
- return {
369
- "name": {
370
- "type": "string",
371
- "mutable": false,
372
- "complexType": {
373
- "original": "string",
374
- "resolved": "string",
375
- "references": {}
376
- },
377
- "required": false,
378
- "optional": false,
379
- "docs": {
380
- "tags": [],
381
- "text": "Name for the Dropdowns input element."
382
- },
383
- "attribute": "name",
384
- "reflect": false
385
- },
386
- "disabled": {
387
- "type": "boolean",
388
- "mutable": false,
389
- "complexType": {
390
- "original": "boolean",
391
- "resolved": "boolean",
392
- "references": {}
393
- },
394
- "required": false,
395
- "optional": false,
396
- "docs": {
397
- "tags": [],
398
- "text": "Sets the Dropdown in a disabled state"
399
- },
400
- "attribute": "disabled",
401
- "reflect": false,
402
- "defaultValue": "false"
403
- },
404
- "helper": {
405
- "type": "string",
406
- "mutable": false,
407
- "complexType": {
408
- "original": "string",
409
- "resolved": "string",
410
- "references": {}
411
- },
412
- "required": false,
413
- "optional": false,
414
- "docs": {
415
- "tags": [],
416
- "text": "Helper text for the Dropdown."
417
- },
418
- "attribute": "helper",
419
- "reflect": false
420
- },
421
- "label": {
422
- "type": "string",
423
- "mutable": false,
424
- "complexType": {
425
- "original": "string",
426
- "resolved": "string",
427
- "references": {}
428
- },
429
- "required": false,
430
- "optional": false,
431
- "docs": {
432
- "tags": [],
433
- "text": "Label text for the Dropdown."
434
- },
435
- "attribute": "label",
436
- "reflect": false
437
- },
438
- "labelPosition": {
439
- "type": "string",
440
- "mutable": false,
441
- "complexType": {
442
- "original": "'inside' | 'outside'",
443
- "resolved": "\"inside\" | \"outside\"",
444
- "references": {}
445
- },
446
- "required": false,
447
- "optional": false,
448
- "docs": {
449
- "tags": [],
450
- "text": "Label text position"
451
- },
452
- "attribute": "label-position",
453
- "reflect": false
454
- },
455
- "modeVariant": {
456
- "type": "string",
457
- "mutable": false,
458
- "complexType": {
459
- "original": "'primary' | 'secondary'",
460
- "resolved": "\"primary\" | \"secondary\"",
461
- "references": {}
462
- },
463
- "required": false,
464
- "optional": false,
465
- "docs": {
466
- "tags": [],
467
- "text": "Mode variant of the component, based on current mode."
468
- },
469
- "attribute": "mode-variant",
470
- "reflect": false,
471
- "defaultValue": "null"
472
- },
473
- "openDirection": {
474
- "type": "string",
475
- "mutable": false,
476
- "complexType": {
477
- "original": "'up' | 'down' | 'auto'",
478
- "resolved": "\"auto\" | \"down\" | \"up\"",
479
- "references": {}
480
- },
481
- "required": false,
482
- "optional": false,
483
- "docs": {
484
- "tags": [],
485
- "text": "The direction the Dropdown should open, auto if not specified."
486
- },
487
- "attribute": "open-direction",
488
- "reflect": false,
489
- "defaultValue": "'auto'"
490
- },
491
- "placeholder": {
492
- "type": "string",
493
- "mutable": false,
494
- "complexType": {
495
- "original": "string",
496
- "resolved": "string",
497
- "references": {}
498
- },
499
- "required": false,
500
- "optional": false,
501
- "docs": {
502
- "tags": [],
503
- "text": "Placeholder text for the Dropdown."
504
- },
505
- "attribute": "placeholder",
506
- "reflect": false
507
- },
508
- "size": {
509
- "type": "string",
510
- "mutable": false,
511
- "complexType": {
512
- "original": "'sm' | 'md' | 'lg'",
513
- "resolved": "\"lg\" | \"md\" | \"sm\"",
514
- "references": {}
515
- },
516
- "required": false,
517
- "optional": false,
518
- "docs": {
519
- "tags": [],
520
- "text": "The size of the Dropdown."
521
- },
522
- "attribute": "size",
523
- "reflect": false,
524
- "defaultValue": "'lg'"
525
- },
526
- "error": {
527
- "type": "boolean",
528
- "mutable": false,
529
- "complexType": {
530
- "original": "boolean",
531
- "resolved": "boolean",
532
- "references": {}
533
- },
534
- "required": false,
535
- "optional": false,
536
- "docs": {
537
- "tags": [],
538
- "text": "Sets the Dropdown in an error state"
539
- },
540
- "attribute": "error",
541
- "reflect": false,
542
- "defaultValue": "false"
543
- },
544
- "multiselect": {
545
- "type": "boolean",
546
- "mutable": false,
547
- "complexType": {
548
- "original": "boolean",
549
- "resolved": "boolean",
550
- "references": {}
551
- },
552
- "required": false,
553
- "optional": false,
554
- "docs": {
555
- "tags": [],
556
- "text": "Enables multiselect in the Dropdown."
557
- },
558
- "attribute": "multiselect",
559
- "reflect": false,
560
- "defaultValue": "false"
561
- },
562
- "filter": {
563
- "type": "boolean",
564
- "mutable": false,
565
- "complexType": {
566
- "original": "boolean",
567
- "resolved": "boolean",
568
- "references": {}
569
- },
570
- "required": false,
571
- "optional": false,
572
- "docs": {
573
- "tags": [],
574
- "text": "Enables filtration in the Dropdown."
575
- },
576
- "attribute": "filter",
577
- "reflect": false,
578
- "defaultValue": "false"
579
- },
580
- "normalizeText": {
581
- "type": "boolean",
582
- "mutable": false,
583
- "complexType": {
584
- "original": "boolean",
585
- "resolved": "boolean",
586
- "references": {}
587
- },
588
- "required": false,
589
- "optional": false,
590
- "docs": {
591
- "tags": [],
592
- "text": "Normalizes input text for fuzzier search"
593
- },
594
- "attribute": "normalize-text",
595
- "reflect": false,
596
- "defaultValue": "true"
597
- },
598
- "noResultText": {
599
- "type": "string",
600
- "mutable": false,
601
- "complexType": {
602
- "original": "string",
603
- "resolved": "string",
604
- "references": {}
605
- },
606
- "required": false,
607
- "optional": false,
608
- "docs": {
609
- "tags": [],
610
- "text": "Text that is displayed if filter is used and there are no options that matches the search."
611
- },
612
- "attribute": "no-result-text",
613
- "reflect": false,
614
- "defaultValue": "'No result'"
615
- },
616
- "defaultValue": {
617
- "type": "string",
618
- "mutable": false,
619
- "complexType": {
620
- "original": "string",
621
- "resolved": "string",
622
- "references": {}
623
- },
624
- "required": false,
625
- "optional": false,
626
- "docs": {
627
- "tags": [],
628
- "text": "Default value selected in the Dropdown."
629
- },
630
- "attribute": "default-value",
631
- "reflect": false
632
- }
633
- };
634
- }
635
- static get states() {
636
- return {
637
- "open": {},
638
- "value": {},
639
- "filterResult": {},
640
- "filterFocus": {}
641
- };
642
- }
643
- static get events() {
644
- return [{
645
- "method": "tdsChange",
646
- "name": "tdsChange",
647
- "bubbles": true,
648
- "cancelable": false,
649
- "composed": true,
650
- "docs": {
651
- "tags": [],
652
- "text": "Change event for the Dropdown."
653
- },
654
- "complexType": {
655
- "original": "{\n name: string;\n value: string;\n }",
656
- "resolved": "{ name: string; value: string; }",
657
- "references": {}
658
- }
659
- }, {
660
- "method": "tdsFocus",
661
- "name": "tdsFocus",
662
- "bubbles": true,
663
- "cancelable": false,
664
- "composed": true,
665
- "docs": {
666
- "tags": [],
667
- "text": "Focus event for the Dropdown."
668
- },
669
- "complexType": {
670
- "original": "FocusEvent",
671
- "resolved": "FocusEvent",
672
- "references": {
673
- "FocusEvent": {
674
- "location": "global",
675
- "id": "global::FocusEvent"
676
- }
677
- }
678
- }
679
- }, {
680
- "method": "tdsBlur",
681
- "name": "tdsBlur",
682
- "bubbles": true,
683
- "cancelable": false,
684
- "composed": true,
685
- "docs": {
686
- "tags": [],
687
- "text": "Blur event for the Dropdown."
688
- },
689
- "complexType": {
690
- "original": "FocusEvent",
691
- "resolved": "FocusEvent",
692
- "references": {
693
- "FocusEvent": {
694
- "location": "global",
695
- "id": "global::FocusEvent"
696
- }
697
- }
698
- }
699
- }, {
700
- "method": "tdsInput",
701
- "name": "tdsInput",
702
- "bubbles": true,
703
- "cancelable": false,
704
- "composed": true,
705
- "docs": {
706
- "tags": [],
707
- "text": "Input event for the Dropdown."
708
- },
709
- "complexType": {
710
- "original": "InputEvent",
711
- "resolved": "InputEvent",
712
- "references": {
713
- "InputEvent": {
714
- "location": "global",
715
- "id": "global::InputEvent"
716
- }
717
- }
718
- }
719
- }];
720
- }
721
- static get methods() {
722
- return {
723
- "reset": {
724
- "complexType": {
725
- "signature": "() => Promise<void>",
726
- "parameters": [],
727
- "references": {
728
- "Promise": {
729
- "location": "global",
730
- "id": "global::Promise"
371
+ ${this.label && this.labelPosition === 'outside' ? 'label-outside' : ''}` }, h("slot", null), this.filterResult === 0 && this.noResultText !== '' && (h("div", { class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { class: `helper ${this.error ? 'error' : ''} ${this.disabled ? 'disabled' : ''}` }, this.error && h("tds-icon", { name: "error", size: "16px" }), this.helper))));
372
+ }
373
+ static get is() { return "tds-dropdown"; }
374
+ static get encapsulation() { return "shadow"; }
375
+ static get originalStyleUrls() {
376
+ return {
377
+ "$": ["dropdown.scss"]
378
+ };
379
+ }
380
+ static get styleUrls() {
381
+ return {
382
+ "$": ["dropdown.css"]
383
+ };
384
+ }
385
+ static get properties() {
386
+ return {
387
+ "name": {
388
+ "type": "string",
389
+ "mutable": false,
390
+ "complexType": {
391
+ "original": "string",
392
+ "resolved": "string",
393
+ "references": {}
394
+ },
395
+ "required": false,
396
+ "optional": false,
397
+ "docs": {
398
+ "tags": [],
399
+ "text": "Name for the Dropdowns input element."
400
+ },
401
+ "attribute": "name",
402
+ "reflect": false
403
+ },
404
+ "disabled": {
405
+ "type": "boolean",
406
+ "mutable": false,
407
+ "complexType": {
408
+ "original": "boolean",
409
+ "resolved": "boolean",
410
+ "references": {}
411
+ },
412
+ "required": false,
413
+ "optional": false,
414
+ "docs": {
415
+ "tags": [],
416
+ "text": "Sets the Dropdown in a disabled state"
417
+ },
418
+ "attribute": "disabled",
419
+ "reflect": false,
420
+ "defaultValue": "false"
421
+ },
422
+ "helper": {
423
+ "type": "string",
424
+ "mutable": false,
425
+ "complexType": {
426
+ "original": "string",
427
+ "resolved": "string",
428
+ "references": {}
429
+ },
430
+ "required": false,
431
+ "optional": false,
432
+ "docs": {
433
+ "tags": [],
434
+ "text": "Helper text for the Dropdown."
435
+ },
436
+ "attribute": "helper",
437
+ "reflect": false
438
+ },
439
+ "label": {
440
+ "type": "string",
441
+ "mutable": false,
442
+ "complexType": {
443
+ "original": "string",
444
+ "resolved": "string",
445
+ "references": {}
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": "Label text for the Dropdown."
452
+ },
453
+ "attribute": "label",
454
+ "reflect": false
455
+ },
456
+ "labelPosition": {
457
+ "type": "string",
458
+ "mutable": false,
459
+ "complexType": {
460
+ "original": "'inside' | 'outside'",
461
+ "resolved": "\"inside\" | \"outside\"",
462
+ "references": {}
463
+ },
464
+ "required": false,
465
+ "optional": false,
466
+ "docs": {
467
+ "tags": [],
468
+ "text": "Label text position"
469
+ },
470
+ "attribute": "label-position",
471
+ "reflect": false
472
+ },
473
+ "modeVariant": {
474
+ "type": "string",
475
+ "mutable": false,
476
+ "complexType": {
477
+ "original": "'primary' | 'secondary'",
478
+ "resolved": "\"primary\" | \"secondary\"",
479
+ "references": {}
480
+ },
481
+ "required": false,
482
+ "optional": false,
483
+ "docs": {
484
+ "tags": [],
485
+ "text": "Mode variant of the component, based on current mode."
486
+ },
487
+ "attribute": "mode-variant",
488
+ "reflect": false,
489
+ "defaultValue": "null"
490
+ },
491
+ "openDirection": {
492
+ "type": "string",
493
+ "mutable": false,
494
+ "complexType": {
495
+ "original": "'up' | 'down' | 'auto'",
496
+ "resolved": "\"auto\" | \"down\" | \"up\"",
497
+ "references": {}
498
+ },
499
+ "required": false,
500
+ "optional": false,
501
+ "docs": {
502
+ "tags": [],
503
+ "text": "The direction the Dropdown should open, auto if not specified."
504
+ },
505
+ "attribute": "open-direction",
506
+ "reflect": false,
507
+ "defaultValue": "'auto'"
508
+ },
509
+ "placeholder": {
510
+ "type": "string",
511
+ "mutable": false,
512
+ "complexType": {
513
+ "original": "string",
514
+ "resolved": "string",
515
+ "references": {}
516
+ },
517
+ "required": false,
518
+ "optional": false,
519
+ "docs": {
520
+ "tags": [],
521
+ "text": "Placeholder text for the Dropdown."
522
+ },
523
+ "attribute": "placeholder",
524
+ "reflect": false
525
+ },
526
+ "size": {
527
+ "type": "string",
528
+ "mutable": false,
529
+ "complexType": {
530
+ "original": "'sm' | 'md' | 'lg'",
531
+ "resolved": "\"lg\" | \"md\" | \"sm\"",
532
+ "references": {}
533
+ },
534
+ "required": false,
535
+ "optional": false,
536
+ "docs": {
537
+ "tags": [],
538
+ "text": "The size of the Dropdown."
539
+ },
540
+ "attribute": "size",
541
+ "reflect": false,
542
+ "defaultValue": "'lg'"
543
+ },
544
+ "error": {
545
+ "type": "boolean",
546
+ "mutable": false,
547
+ "complexType": {
548
+ "original": "boolean",
549
+ "resolved": "boolean",
550
+ "references": {}
551
+ },
552
+ "required": false,
553
+ "optional": false,
554
+ "docs": {
555
+ "tags": [],
556
+ "text": "Sets the Dropdown in an error state"
557
+ },
558
+ "attribute": "error",
559
+ "reflect": false,
560
+ "defaultValue": "false"
561
+ },
562
+ "multiselect": {
563
+ "type": "boolean",
564
+ "mutable": false,
565
+ "complexType": {
566
+ "original": "boolean",
567
+ "resolved": "boolean",
568
+ "references": {}
569
+ },
570
+ "required": false,
571
+ "optional": false,
572
+ "docs": {
573
+ "tags": [],
574
+ "text": "Enables multiselect in the Dropdown."
575
+ },
576
+ "attribute": "multiselect",
577
+ "reflect": false,
578
+ "defaultValue": "false"
579
+ },
580
+ "filter": {
581
+ "type": "boolean",
582
+ "mutable": false,
583
+ "complexType": {
584
+ "original": "boolean",
585
+ "resolved": "boolean",
586
+ "references": {}
587
+ },
588
+ "required": false,
589
+ "optional": false,
590
+ "docs": {
591
+ "tags": [],
592
+ "text": "Enables filtration in the Dropdown."
593
+ },
594
+ "attribute": "filter",
595
+ "reflect": false,
596
+ "defaultValue": "false"
597
+ },
598
+ "normalizeText": {
599
+ "type": "boolean",
600
+ "mutable": false,
601
+ "complexType": {
602
+ "original": "boolean",
603
+ "resolved": "boolean",
604
+ "references": {}
605
+ },
606
+ "required": false,
607
+ "optional": false,
608
+ "docs": {
609
+ "tags": [],
610
+ "text": "Normalizes input text for fuzzier search"
611
+ },
612
+ "attribute": "normalize-text",
613
+ "reflect": false,
614
+ "defaultValue": "true"
615
+ },
616
+ "noResultText": {
617
+ "type": "string",
618
+ "mutable": false,
619
+ "complexType": {
620
+ "original": "string",
621
+ "resolved": "string",
622
+ "references": {}
623
+ },
624
+ "required": false,
625
+ "optional": true,
626
+ "docs": {
627
+ "tags": [],
628
+ "text": "Text that is displayed if filter is used and there are no options that matches the search.\nSetting it to an empty string disables message from showing up."
629
+ },
630
+ "attribute": "no-result-text",
631
+ "reflect": false,
632
+ "defaultValue": "'No result'"
633
+ },
634
+ "defaultValue": {
635
+ "type": "string",
636
+ "mutable": false,
637
+ "complexType": {
638
+ "original": "string",
639
+ "resolved": "string",
640
+ "references": {}
641
+ },
642
+ "required": false,
643
+ "optional": false,
644
+ "docs": {
645
+ "tags": [],
646
+ "text": "Default value selected in the Dropdown."
647
+ },
648
+ "attribute": "default-value",
649
+ "reflect": false
731
650
  }
732
- },
733
- "return": "Promise<void>"
734
- },
735
- "docs": {
736
- "text": "Method that resets the Dropdown, marks all children as non-selected and resets the value to null.",
737
- "tags": []
738
- }
739
- },
740
- "setValue": {
741
- "complexType": {
742
- "signature": "(value: string | string[], label?: string) => Promise<{ value: string; label: string; }[]>",
743
- "parameters": [{
744
- "tags": [],
745
- "text": ""
651
+ };
652
+ }
653
+ static get states() {
654
+ return {
655
+ "open": {},
656
+ "value": {},
657
+ "filterResult": {},
658
+ "filterFocus": {}
659
+ };
660
+ }
661
+ static get events() {
662
+ return [{
663
+ "method": "tdsChange",
664
+ "name": "tdsChange",
665
+ "bubbles": true,
666
+ "cancelable": false,
667
+ "composed": true,
668
+ "docs": {
669
+ "tags": [],
670
+ "text": "Change event for the Dropdown."
671
+ },
672
+ "complexType": {
673
+ "original": "{\n name: string;\n value: string;\n }",
674
+ "resolved": "{ name: string; value: string; }",
675
+ "references": {}
676
+ }
677
+ }, {
678
+ "method": "tdsFocus",
679
+ "name": "tdsFocus",
680
+ "bubbles": true,
681
+ "cancelable": false,
682
+ "composed": true,
683
+ "docs": {
684
+ "tags": [],
685
+ "text": "Focus event for the Dropdown."
686
+ },
687
+ "complexType": {
688
+ "original": "FocusEvent",
689
+ "resolved": "FocusEvent",
690
+ "references": {
691
+ "FocusEvent": {
692
+ "location": "global",
693
+ "id": "global::FocusEvent"
694
+ }
695
+ }
696
+ }
697
+ }, {
698
+ "method": "tdsBlur",
699
+ "name": "tdsBlur",
700
+ "bubbles": true,
701
+ "cancelable": false,
702
+ "composed": true,
703
+ "docs": {
704
+ "tags": [],
705
+ "text": "Blur event for the Dropdown."
706
+ },
707
+ "complexType": {
708
+ "original": "FocusEvent",
709
+ "resolved": "FocusEvent",
710
+ "references": {
711
+ "FocusEvent": {
712
+ "location": "global",
713
+ "id": "global::FocusEvent"
714
+ }
715
+ }
716
+ }
746
717
  }, {
747
- "tags": [],
748
- "text": ""
749
- }],
750
- "references": {
751
- "Promise": {
752
- "location": "global",
753
- "id": "global::Promise"
718
+ "method": "tdsInput",
719
+ "name": "tdsInput",
720
+ "bubbles": true,
721
+ "cancelable": false,
722
+ "composed": true,
723
+ "docs": {
724
+ "tags": [],
725
+ "text": "Input event for the Dropdown."
726
+ },
727
+ "complexType": {
728
+ "original": "InputEvent",
729
+ "resolved": "InputEvent",
730
+ "references": {
731
+ "InputEvent": {
732
+ "location": "global",
733
+ "id": "global::InputEvent"
734
+ }
735
+ }
736
+ }
737
+ }];
738
+ }
739
+ static get methods() {
740
+ return {
741
+ "reset": {
742
+ "complexType": {
743
+ "signature": "() => Promise<void>",
744
+ "parameters": [],
745
+ "references": {
746
+ "Promise": {
747
+ "location": "global",
748
+ "id": "global::Promise"
749
+ }
750
+ },
751
+ "return": "Promise<void>"
752
+ },
753
+ "docs": {
754
+ "text": "Method that resets the Dropdown, marks all children as non-selected and resets the value to null.",
755
+ "tags": []
756
+ }
754
757
  },
755
- "HTMLTdsDropdownOptionElement": {
756
- "location": "global",
757
- "id": "global::HTMLTdsDropdownOptionElement"
758
- }
759
- },
760
- "return": "Promise<{ value: string; label: string; }[]>"
761
- },
762
- "docs": {
763
- "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>",
764
- "tags": []
765
- }
766
- },
767
- "appendValue": {
768
- "complexType": {
769
- "signature": "(value: string) => Promise<void>",
770
- "parameters": [{
771
- "tags": [],
772
- "text": ""
773
- }],
774
- "references": {
775
- "Promise": {
776
- "location": "global",
777
- "id": "global::Promise"
778
- }
779
- },
780
- "return": "Promise<void>"
781
- },
782
- "docs": {
783
- "text": "",
784
- "tags": [{
785
- "name": "internal",
786
- "text": undefined
787
- }]
788
- }
789
- },
790
- "removeValue": {
791
- "complexType": {
792
- "signature": "(oldValue: string) => Promise<{ value: string; label: string; }[]>",
793
- "parameters": [{
794
- "tags": [],
795
- "text": ""
796
- }],
797
- "references": {
798
- "Promise": {
799
- "location": "global",
800
- "id": "global::Promise"
758
+ "setValue": {
759
+ "complexType": {
760
+ "signature": "(value: string | string[], label?: string) => Promise<{ value: string; label: string; }[]>",
761
+ "parameters": [{
762
+ "name": "value",
763
+ "type": "string | string[]",
764
+ "docs": ""
765
+ }, {
766
+ "name": "label",
767
+ "type": "string",
768
+ "docs": ""
769
+ }],
770
+ "references": {
771
+ "Promise": {
772
+ "location": "global",
773
+ "id": "global::Promise"
774
+ },
775
+ "HTMLTdsDropdownOptionElement": {
776
+ "location": "global",
777
+ "id": "global::HTMLTdsDropdownOptionElement"
778
+ }
779
+ },
780
+ "return": "Promise<{ value: string; label: string; }[]>"
781
+ },
782
+ "docs": {
783
+ "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>",
784
+ "tags": []
785
+ }
801
786
  },
802
- "HTMLTdsDropdownOptionElement": {
803
- "location": "global",
804
- "id": "global::HTMLTdsDropdownOptionElement"
805
- }
806
- },
807
- "return": "Promise<{ value: string; label: string; }[]>"
808
- },
809
- "docs": {
810
- "text": "Method for removing a selected value in the Dropdown.",
811
- "tags": []
812
- }
813
- },
814
- "close": {
815
- "complexType": {
816
- "signature": "() => Promise<void>",
817
- "parameters": [],
818
- "references": {
819
- "Promise": {
820
- "location": "global",
821
- "id": "global::Promise"
787
+ "appendValue": {
788
+ "complexType": {
789
+ "signature": "(value: string) => Promise<void>",
790
+ "parameters": [{
791
+ "name": "value",
792
+ "type": "string",
793
+ "docs": ""
794
+ }],
795
+ "references": {
796
+ "Promise": {
797
+ "location": "global",
798
+ "id": "global::Promise"
799
+ }
800
+ },
801
+ "return": "Promise<void>"
802
+ },
803
+ "docs": {
804
+ "text": "",
805
+ "tags": [{
806
+ "name": "internal",
807
+ "text": undefined
808
+ }]
809
+ }
810
+ },
811
+ "removeValue": {
812
+ "complexType": {
813
+ "signature": "(oldValue: string) => Promise<{ value: string; label: string; }[]>",
814
+ "parameters": [{
815
+ "name": "oldValue",
816
+ "type": "string",
817
+ "docs": ""
818
+ }],
819
+ "references": {
820
+ "Promise": {
821
+ "location": "global",
822
+ "id": "global::Promise"
823
+ },
824
+ "HTMLTdsDropdownOptionElement": {
825
+ "location": "global",
826
+ "id": "global::HTMLTdsDropdownOptionElement"
827
+ }
828
+ },
829
+ "return": "Promise<{ value: string; label: string; }[]>"
830
+ },
831
+ "docs": {
832
+ "text": "Method for removing a selected value in the Dropdown.",
833
+ "tags": []
834
+ }
835
+ },
836
+ "close": {
837
+ "complexType": {
838
+ "signature": "() => Promise<void>",
839
+ "parameters": [],
840
+ "references": {
841
+ "Promise": {
842
+ "location": "global",
843
+ "id": "global::Promise"
844
+ }
845
+ },
846
+ "return": "Promise<void>"
847
+ },
848
+ "docs": {
849
+ "text": "Method for closing the Dropdown.",
850
+ "tags": []
851
+ }
822
852
  }
823
- },
824
- "return": "Promise<void>"
825
- },
826
- "docs": {
827
- "text": "Method for closing the Dropdown.",
828
- "tags": []
829
- }
830
- }
831
- };
832
- }
833
- static get elementRef() { return "host"; }
834
- static get watchers() {
835
- return [{
836
- "propName": "open",
837
- "methodName": "handleOpenState"
838
- }];
839
- }
840
- static get listeners() {
841
- return [{
842
- "name": "mousedown",
843
- "method": "onAnyClick",
844
- "target": "window",
845
- "capture": false,
846
- "passive": true
847
- }, {
848
- "name": "keydown",
849
- "method": "onKeyDown",
850
- "target": undefined,
851
- "capture": false,
852
- "passive": false
853
- }];
854
- }
853
+ };
854
+ }
855
+ static get elementRef() { return "host"; }
856
+ static get watchers() {
857
+ return [{
858
+ "propName": "open",
859
+ "methodName": "handleOpenState"
860
+ }];
861
+ }
862
+ static get listeners() {
863
+ return [{
864
+ "name": "mousedown",
865
+ "method": "onAnyClick",
866
+ "target": "window",
867
+ "capture": false,
868
+ "passive": true
869
+ }, {
870
+ "name": "keydown",
871
+ "method": "onKeyDown",
872
+ "target": undefined,
873
+ "capture": false,
874
+ "passive": false
875
+ }];
876
+ }
855
877
  }