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