@scania/tegel 0.0.9 → 0.0.11

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 (594) hide show
  1. package/README.md +3 -0
  2. package/dist/cjs/index-ee36ffa1.js +10 -14
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/tds-accordion-item.cjs.entry.js +1 -1
  5. package/dist/cjs/tds-badge.cjs.entry.js +3 -3
  6. package/dist/cjs/tds-banner.cjs.entry.js +13 -13
  7. package/dist/cjs/tds-breadcrumb.cjs.entry.js +2 -4
  8. package/dist/cjs/tds-breadcrumbs.cjs.entry.js +0 -3
  9. package/dist/cjs/tds-button.cjs.entry.js +20 -18
  10. package/dist/cjs/tds-card.cjs.entry.js +19 -23
  11. package/dist/cjs/tds-checkbox.cjs.entry.js +2 -1
  12. package/dist/cjs/tds-chip.cjs.entry.js +14 -3
  13. package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
  14. package/dist/cjs/{tds-dropdown-option-v2.cjs.entry.js → tds-dropdown-option.cjs.entry.js} +5 -5
  15. package/dist/cjs/{tds-dropdown-v2.cjs.entry.js → tds-dropdown.cjs.entry.js} +31 -26
  16. package/dist/cjs/tds-folder-tab.cjs.entry.js +2 -3
  17. package/dist/cjs/tds-folder-tabs.cjs.entry.js +5 -5
  18. package/dist/cjs/tds-footer-group.cjs.entry.js +3 -3
  19. package/dist/cjs/tds-footer-item.cjs.entry.js +1 -1
  20. package/dist/cjs/tds-footer.cjs.entry.js +6 -6
  21. package/dist/cjs/tds-header-cell.cjs.entry.js +1 -1
  22. package/dist/cjs/tds-header-dropdown-list-item.cjs.entry.js +2 -2
  23. package/dist/cjs/tds-header-dropdown-list-user.cjs.entry.js +4 -4
  24. package/dist/cjs/tds-header-dropdown-list.cjs.entry.js +6 -6
  25. package/dist/cjs/tds-header-dropdown.cjs.entry.js +4 -3
  26. package/dist/cjs/tds-header-hamburger.cjs.entry.js +1 -1
  27. package/dist/cjs/tds-header-launcher-button.cjs.entry.js +1 -1
  28. package/dist/cjs/tds-header-launcher-grid-title.cjs.entry.js +3 -2
  29. package/dist/cjs/tds-header-launcher-grid.cjs.entry.js +1 -1
  30. package/dist/cjs/tds-header-launcher-list-item.cjs.entry.js +1 -1
  31. package/dist/cjs/tds-header-launcher-list-title.cjs.entry.js +3 -2
  32. package/dist/cjs/tds-header-launcher-list.cjs.entry.js +3 -2
  33. package/dist/cjs/tds-header-launcher.cjs.entry.js +2 -2
  34. package/dist/cjs/tds-header.cjs.entry.js +1 -1
  35. package/dist/cjs/tds-inline-tab.cjs.entry.js +1 -1
  36. package/dist/cjs/tds-inline-tabs.cjs.entry.js +5 -5
  37. package/dist/cjs/tds-link.cjs.entry.js +2 -2
  38. package/dist/cjs/tds-message.cjs.entry.js +6 -6
  39. package/dist/cjs/tds-modal.cjs.entry.js +13 -5
  40. package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
  41. package/dist/cjs/tds-navigation-tabs.cjs.entry.js +5 -5
  42. package/dist/cjs/tds-popover-canvas.cjs.entry.js +10 -80
  43. package/dist/{components/popper.js → cjs/tds-popover-core.cjs.entry.js} +166 -13
  44. package/dist/cjs/tds-popover-menu.cjs.entry.js +12 -62
  45. package/dist/cjs/tds-radio-button.cjs.entry.js +3 -2
  46. package/dist/cjs/tds-side-menu-close-button.cjs.entry.js +1 -1
  47. package/dist/cjs/tds-side-menu-dropdown.cjs.entry.js +1 -1
  48. package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
  49. package/dist/cjs/tds-side-menu.cjs.entry.js +2 -2
  50. package/dist/cjs/tds-slider.cjs.entry.js +16 -15
  51. package/dist/cjs/tds-stepper.cjs.entry.js +3 -2
  52. package/dist/cjs/tds-table-body.cjs.entry.js +4 -51
  53. package/dist/cjs/tds-table-footer.cjs.entry.js +47 -39
  54. package/dist/cjs/tds-table-toolbar.cjs.entry.js +2 -2
  55. package/dist/cjs/tds-table.cjs.entry.js +2 -1
  56. package/dist/cjs/tds-text-field.cjs.entry.js +6 -2
  57. package/dist/cjs/tds-toast.cjs.entry.js +13 -28
  58. package/dist/cjs/tds-toggle.cjs.entry.js +2 -1
  59. package/dist/cjs/tds-tooltip.cjs.entry.js +41 -78
  60. package/dist/cjs/tegel.cjs.js +1 -1
  61. package/dist/cjs/{utils-2beb1aa0.js → utils-a908536d.js} +33 -12
  62. package/dist/collection/collection-manifest.json +1 -3
  63. package/dist/collection/components/accordion/accordion-item/accordion-item.js +5 -1
  64. package/dist/collection/components/accordion/accordion.js +3 -0
  65. package/dist/collection/components/accordion/accordion.stories.js +100 -0
  66. package/dist/collection/components/badge/badge.js +4 -4
  67. package/dist/collection/components/badge/badge.stories.js +106 -0
  68. package/dist/collection/components/banner/banner.css +12 -9
  69. package/dist/collection/components/banner/banner.js +40 -24
  70. package/dist/collection/components/banner/banner.stories.js +107 -0
  71. package/dist/collection/components/block/block.js +3 -0
  72. package/dist/collection/components/block/block.stories.js +49 -0
  73. package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.css +4 -4
  74. package/dist/collection/components/breadcrumbs/breadcrumb/breadcrumb.js +4 -21
  75. package/dist/collection/components/breadcrumbs/breadcrumbs.js +3 -3
  76. package/dist/collection/components/breadcrumbs/breadcrumbs.stories.js +36 -0
  77. package/dist/collection/components/button/button.css +20 -14
  78. package/dist/collection/components/button/button.js +46 -23
  79. package/dist/collection/components/button/button.stories.js +185 -0
  80. package/dist/collection/components/card/card.css +18 -14
  81. package/dist/collection/components/card/card.js +32 -68
  82. package/dist/collection/components/card/card.stories.js +163 -0
  83. package/dist/collection/components/checkbox/checkbox.js +6 -2
  84. package/dist/collection/components/checkbox/checkbox.stories.js +80 -0
  85. package/dist/collection/components/chip/chip.css +23 -8
  86. package/dist/collection/components/chip/chip.js +19 -3
  87. package/dist/collection/components/chip/chip.stories.js +230 -0
  88. package/dist/collection/components/datetime/datetime.stories.js +195 -0
  89. package/dist/collection/components/divider/divider.stories.js +62 -0
  90. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +145 -116
  91. package/dist/collection/components/dropdown/dropdown.css +212 -386
  92. package/dist/collection/components/dropdown/dropdown.js +480 -329
  93. package/dist/collection/components/dropdown/dropdown.stories.js +268 -0
  94. package/dist/collection/components/footer/footer-group/footer-group.css +3 -3
  95. package/dist/collection/components/footer/footer-group/footer-group.js +5 -2
  96. package/dist/collection/components/footer/footer-item/footer-item.css +16 -8
  97. package/dist/collection/components/footer/footer-item/footer-item.js +3 -0
  98. package/dist/collection/components/footer/footer.css +9 -12
  99. package/dist/collection/components/footer/footer.js +10 -10
  100. package/dist/collection/components/footer/footer.stories.js +145 -0
  101. package/dist/collection/components/header/core-header-item/core-header-item.js +3 -0
  102. package/dist/collection/components/header/header-brand-symbol/header-brand-symbol.js +3 -0
  103. package/dist/collection/components/header/header-dropdown/header-dropdown.js +11 -5
  104. package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.css +2 -2
  105. package/dist/collection/components/header/header-dropdown-list/header-dropdown-list.js +10 -7
  106. package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.css +3 -3
  107. package/dist/collection/components/header/header-dropdown-list-item/header-dropdown-list-item.js +7 -4
  108. package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.css +1 -1
  109. package/dist/collection/components/header/header-dropdown-list-user/header-dropdown-list-user.js +13 -9
  110. package/dist/collection/components/header/header-hamburger/header-hamburger.css +0 -1
  111. package/dist/collection/components/header/header-item/header-item.js +3 -0
  112. package/dist/collection/components/header/header-launcher/header-launcher.js +5 -2
  113. package/dist/collection/components/header/header-launcher-grid/header-launcher-grid.js +3 -0
  114. package/dist/collection/components/header/header-launcher-grid-item/header-launcher-grid-item.js +3 -0
  115. package/dist/collection/components/header/header-launcher-grid-title/header-launcher-grid-title.js +6 -2
  116. package/dist/collection/components/header/header-launcher-list/header-launcher-list.js +6 -2
  117. package/dist/collection/components/header/header-launcher-list-item/header-launcher-list-item.js +4 -1
  118. package/dist/collection/components/header/header-launcher-list-title/header-launcher-list-title.js +6 -2
  119. package/dist/collection/components/header/header-title/header-title.js +3 -0
  120. package/dist/collection/components/header/header.css +1 -1
  121. package/dist/collection/components/header/header.js +6 -0
  122. package/dist/collection/components/header/header.stories.js +82 -0
  123. package/dist/collection/components/icon/icon.stories.js +48 -0
  124. package/dist/collection/components/link/link.css +16 -13
  125. package/dist/collection/components/link/link.js +5 -1
  126. package/dist/collection/components/link/link.stories.js +59 -0
  127. package/dist/collection/components/message/message.css +16 -16
  128. package/dist/collection/components/message/message.js +11 -8
  129. package/dist/collection/components/message/message.stories.js +110 -0
  130. package/dist/collection/components/modal/modal.css +19 -33
  131. package/dist/collection/components/modal/modal.js +36 -6
  132. package/dist/collection/components/modal/modal.stories.js +109 -0
  133. package/dist/collection/components/popover-canvas/popover-canvas.css +3 -7
  134. package/dist/collection/components/popover-canvas/popover-canvas.js +15 -104
  135. package/dist/collection/components/popover-canvas/popover-canvas.stories.js +92 -0
  136. package/dist/collection/components/popover-core/popover-core.js +390 -0
  137. package/dist/collection/components/popover-menu/popover-menu.css +2 -8
  138. package/dist/collection/components/popover-menu/popover-menu.js +18 -81
  139. package/dist/collection/components/popover-menu/popover-menu.stories.js +140 -0
  140. package/dist/collection/components/radio-button/radio-button.css +1 -1
  141. package/dist/collection/components/radio-button/radio-button.js +6 -2
  142. package/dist/collection/components/radio-button/radio-button.stories.js +91 -0
  143. package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +3 -0
  144. package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.css +1 -1
  145. package/dist/collection/components/side-menu/side-menu-dropdown/side-menu-dropdown.js +5 -0
  146. package/dist/collection/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.js +3 -0
  147. package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.js +3 -0
  148. package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +1 -1
  149. package/dist/collection/components/side-menu/side-menu-item/side-menu-item.js +3 -0
  150. package/dist/collection/components/side-menu/side-menu-user/side-menu-user.js +3 -0
  151. package/dist/collection/components/side-menu/side-menu-user-image/side-menu-user-image.js +5 -0
  152. package/dist/collection/components/side-menu/side-menu.css +6 -5
  153. package/dist/collection/components/side-menu/side-menu.js +11 -3
  154. package/dist/collection/components/side-menu/side-menu.stories.js +215 -0
  155. package/dist/collection/components/slider/slider.js +17 -16
  156. package/dist/collection/components/slider/slider.stories.js +243 -0
  157. package/dist/collection/components/spinner/spinner.stories.js +61 -0
  158. package/dist/collection/components/stepper/step/step.js +3 -0
  159. package/dist/collection/components/stepper/stepper.css +3 -0
  160. package/dist/collection/components/stepper/stepper.js +7 -3
  161. package/dist/collection/components/stepper/stepper.stories.js +95 -0
  162. package/dist/collection/components/table/table/table.js +7 -3
  163. package/dist/collection/components/table/table-body/table-body.js +15 -60
  164. package/dist/collection/components/table/table-body-cell/table-body-cell.js +3 -0
  165. package/dist/collection/components/table/table-body-row/table-body-row.js +3 -0
  166. package/dist/collection/components/table/table-body-row-expandable/table-body-row-expandable.js +4 -0
  167. package/dist/collection/components/table/table-component-basic.stories.js +184 -0
  168. package/dist/collection/components/table/table-component-batch-actions.stories.js +201 -0
  169. package/dist/collection/components/table/table-component-bodydata.stories.js +101 -0
  170. package/dist/collection/components/table/table-component-custom-width.stories.js +174 -0
  171. package/dist/collection/components/table/table-component-event-listeners.stories.js +193 -0
  172. package/dist/collection/components/table/table-component-expandable-rows.stories.js +160 -0
  173. package/dist/collection/components/table/table-component-filtering.stories.js +210 -0
  174. package/dist/collection/components/table/table-component-multiselect.stories.js +230 -0
  175. package/dist/collection/components/table/table-component-pagination.stories.js +215 -0
  176. package/dist/collection/components/table/table-component-sorting.stories.js +238 -0
  177. package/dist/collection/components/table/table-footer/table-footer.js +65 -54
  178. package/dist/collection/components/table/table-header/table-header.js +3 -0
  179. package/dist/collection/components/table/table-header-cell/table-header-cell.css +1 -0
  180. package/dist/collection/components/table/table-toolbar/table-toolbar.css +2 -1
  181. package/dist/collection/components/table/table-toolbar/table-toolbar.js +4 -1
  182. package/dist/collection/components/table/table.filtering.spec.js +0 -6
  183. package/dist/collection/components/table/table.spec.js +0 -6
  184. package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.css +10 -11
  185. package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.js +4 -2
  186. package/dist/collection/components/tabs/folder-tabs/folder-tabs.js +8 -5
  187. package/dist/collection/components/tabs/folder-tabs/folder-tabs.stories.js +105 -0
  188. package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.css +13 -2
  189. package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.js +3 -0
  190. package/dist/collection/components/tabs/inline-tabs/inline-tabs.js +8 -5
  191. package/dist/collection/components/tabs/inline-tabs/inline-tabs.stories.js +99 -0
  192. package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.css +13 -2
  193. package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.js +3 -0
  194. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.js +8 -5
  195. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.stories.js +101 -0
  196. package/dist/collection/components/text-field/text-field.js +10 -2
  197. package/dist/collection/components/text-field/text-field.stories.js +247 -0
  198. package/dist/collection/components/textarea/textarea.stories.js +188 -0
  199. package/dist/collection/components/toast/toast.css +32 -25
  200. package/dist/collection/components/toast/toast.js +21 -37
  201. package/dist/collection/components/toast/toast.stories.js +79 -0
  202. package/dist/collection/components/toggle/toggle.js +6 -2
  203. package/dist/collection/components/toggle/toggle.stories.js +95 -0
  204. package/dist/collection/components/tooltip/tooltip.js +47 -87
  205. package/dist/collection/components/tooltip/tooltip.stories.js +136 -0
  206. package/dist/collection/stories/Installation/installation.stories.js +222 -0
  207. package/dist/collection/stories/announcements/announce-tegel.stories.js +262 -0
  208. package/dist/collection/stories/announcements/prefix-change.stories.js +93 -0
  209. package/dist/collection/stories/foundations/color/color-brand.stories.js +38 -0
  210. package/dist/collection/stories/foundations/color/color-scales.stories.js +71 -0
  211. package/dist/collection/stories/foundations/color/color-semantic.stories.js +40 -0
  212. package/dist/collection/stories/foundations/grid/grid.stories.js +386 -0
  213. package/dist/collection/stories/foundations/spacing/spacing-element.stories.js +100 -0
  214. package/dist/collection/stories/foundations/spacing/spacing-layout.stories.js +94 -0
  215. package/dist/collection/stories/foundations/typography/typography-body.stories.js +16 -0
  216. package/dist/collection/stories/foundations/typography/typography-detail.stories.js +17 -0
  217. package/dist/collection/stories/foundations/typography/typography-headline.stories.js +39 -0
  218. package/dist/collection/stories/foundations/typography/typography-paragraph.stories.js +12 -0
  219. package/dist/collection/stories/patterns/navigation/navigation-basic.stories.js +85 -0
  220. package/dist/collection/stories/patterns/navigation/navigation-fewitems.stories.js +259 -0
  221. package/dist/collection/stories/patterns/navigation/navigation-manyitems.stories.js +246 -0
  222. package/dist/collection/stories/patterns/navigation/navigation-user-menu.stories.js +140 -0
  223. package/dist/collection/stories/tegel.stories.js +293 -0
  224. package/dist/collection/stories/utility/color/background-color.stories.js +96 -0
  225. package/dist/collection/stories/utility/color/text-color.stories.js +94 -0
  226. package/dist/collection/utils/utils.js +30 -11
  227. package/dist/components/checkbox.js +2 -1
  228. package/dist/components/header-dropdown-list-item.js +3 -3
  229. package/dist/components/header-dropdown-list.js +7 -7
  230. package/dist/components/header-item.js +1 -1
  231. package/dist/components/popover-canvas.js +20 -89
  232. package/dist/{esm/popper-bfa25c7f.js → components/popover-core.js} +190 -13
  233. package/dist/components/side-menu-item.js +1 -1
  234. package/dist/components/tds-accordion-item.js +1 -1
  235. package/dist/components/tds-badge.js +4 -4
  236. package/dist/components/tds-banner.js +16 -17
  237. package/dist/components/tds-breadcrumb.js +3 -6
  238. package/dist/components/tds-breadcrumbs.js +0 -3
  239. package/dist/components/tds-button.js +23 -22
  240. package/dist/components/tds-card.js +21 -29
  241. package/dist/components/tds-chip.js +14 -3
  242. package/dist/components/tds-dropdown-option.js +121 -1
  243. package/dist/components/tds-dropdown.js +323 -1
  244. package/dist/components/tds-folder-tab.js +2 -3
  245. package/dist/components/tds-folder-tabs.js +5 -5
  246. package/dist/components/tds-footer-group.js +3 -3
  247. package/dist/components/tds-footer-item.js +1 -1
  248. package/dist/components/tds-footer.js +7 -8
  249. package/dist/components/tds-header-cell.js +1 -1
  250. package/dist/components/tds-header-dropdown-list-user.js +6 -6
  251. package/dist/components/tds-header-dropdown.js +19 -12
  252. package/dist/components/tds-header-launcher-grid-title.js +3 -2
  253. package/dist/components/tds-header-launcher-grid.js +1 -1
  254. package/dist/components/tds-header-launcher-list-item.js +1 -1
  255. package/dist/components/tds-header-launcher-list-title.js +3 -2
  256. package/dist/components/tds-header-launcher-list.js +3 -2
  257. package/dist/components/tds-header-launcher.js +18 -12
  258. package/dist/components/tds-inline-tab.js +1 -1
  259. package/dist/components/tds-inline-tabs.js +5 -5
  260. package/dist/components/tds-link.js +4 -3
  261. package/dist/components/tds-message.js +7 -7
  262. package/dist/components/tds-modal.js +14 -5
  263. package/dist/components/tds-navigation-tab.js +1 -1
  264. package/dist/components/tds-navigation-tabs.js +5 -5
  265. package/dist/components/{tds-dropdown-v2.d.ts → tds-popover-core.d.ts} +4 -4
  266. package/dist/components/tds-popover-core.js +6 -0
  267. package/dist/components/tds-popover-menu.js +22 -70
  268. package/dist/components/tds-radio-button.js +3 -2
  269. package/dist/components/tds-side-menu-dropdown.js +1 -1
  270. package/dist/components/tds-side-menu.js +2 -2
  271. package/dist/components/tds-slider.js +16 -15
  272. package/dist/components/tds-stepper.js +3 -2
  273. package/dist/components/tds-table-body.js +5 -53
  274. package/dist/components/tds-table-footer.js +50 -42
  275. package/dist/components/tds-table-toolbar.js +9 -3
  276. package/dist/components/tds-table.js +2 -1
  277. package/dist/components/tds-text-field.js +6 -2
  278. package/dist/components/tds-toast.js +15 -32
  279. package/dist/components/tds-toggle.js +2 -1
  280. package/dist/components/tds-tooltip.js +51 -85
  281. package/dist/components/utils.js +31 -12
  282. package/dist/esm/index-23ee700b.js +10 -14
  283. package/dist/esm/loader.js +1 -1
  284. package/dist/esm/tds-accordion-item.entry.js +1 -1
  285. package/dist/esm/tds-badge.entry.js +3 -3
  286. package/dist/esm/tds-banner.entry.js +13 -13
  287. package/dist/esm/tds-breadcrumb.entry.js +2 -4
  288. package/dist/esm/tds-breadcrumbs.entry.js +0 -3
  289. package/dist/esm/tds-button.entry.js +20 -18
  290. package/dist/esm/tds-card.entry.js +19 -23
  291. package/dist/esm/tds-checkbox.entry.js +2 -1
  292. package/dist/esm/tds-chip.entry.js +15 -4
  293. package/dist/esm/tds-core-header-item_2.entry.js +1 -1
  294. package/dist/esm/{tds-dropdown-option-v2.entry.js → tds-dropdown-option.entry.js} +5 -5
  295. package/dist/esm/{tds-dropdown-v2.entry.js → tds-dropdown.entry.js} +31 -26
  296. package/dist/esm/tds-folder-tab.entry.js +2 -3
  297. package/dist/esm/tds-folder-tabs.entry.js +5 -5
  298. package/dist/esm/tds-footer-group.entry.js +3 -3
  299. package/dist/esm/tds-footer-item.entry.js +1 -1
  300. package/dist/esm/tds-footer.entry.js +6 -6
  301. package/dist/esm/tds-header-cell.entry.js +1 -1
  302. package/dist/esm/tds-header-dropdown-list-item.entry.js +2 -2
  303. package/dist/esm/tds-header-dropdown-list-user.entry.js +4 -4
  304. package/dist/esm/tds-header-dropdown-list.entry.js +6 -6
  305. package/dist/esm/tds-header-dropdown.entry.js +4 -3
  306. package/dist/esm/tds-header-hamburger.entry.js +1 -1
  307. package/dist/esm/tds-header-launcher-button.entry.js +1 -1
  308. package/dist/esm/tds-header-launcher-grid-title.entry.js +3 -2
  309. package/dist/esm/tds-header-launcher-grid.entry.js +1 -1
  310. package/dist/esm/tds-header-launcher-list-item.entry.js +1 -1
  311. package/dist/esm/tds-header-launcher-list-title.entry.js +3 -2
  312. package/dist/esm/tds-header-launcher-list.entry.js +3 -2
  313. package/dist/esm/tds-header-launcher.entry.js +2 -2
  314. package/dist/esm/tds-header.entry.js +1 -1
  315. package/dist/esm/tds-inline-tab.entry.js +1 -1
  316. package/dist/esm/tds-inline-tabs.entry.js +5 -5
  317. package/dist/esm/tds-link.entry.js +2 -2
  318. package/dist/esm/tds-message.entry.js +6 -6
  319. package/dist/esm/tds-modal.entry.js +13 -5
  320. package/dist/esm/tds-navigation-tab.entry.js +1 -1
  321. package/dist/esm/tds-navigation-tabs.entry.js +5 -5
  322. package/dist/esm/tds-popover-canvas.entry.js +10 -80
  323. package/dist/{cjs/popper-9def2535.js → esm/tds-popover-core.entry.js} +161 -14
  324. package/dist/esm/tds-popover-menu.entry.js +12 -62
  325. package/dist/esm/tds-radio-button.entry.js +3 -2
  326. package/dist/esm/tds-side-menu-close-button.entry.js +1 -1
  327. package/dist/esm/tds-side-menu-dropdown.entry.js +1 -1
  328. package/dist/esm/tds-side-menu-item.entry.js +1 -1
  329. package/dist/esm/tds-side-menu.entry.js +2 -2
  330. package/dist/esm/tds-slider.entry.js +16 -15
  331. package/dist/esm/tds-stepper.entry.js +3 -2
  332. package/dist/esm/tds-table-body.entry.js +4 -51
  333. package/dist/esm/tds-table-footer.entry.js +47 -39
  334. package/dist/esm/tds-table-toolbar.entry.js +2 -2
  335. package/dist/esm/tds-table.entry.js +2 -1
  336. package/dist/esm/tds-text-field.entry.js +7 -3
  337. package/dist/esm/tds-toast.entry.js +13 -28
  338. package/dist/esm/tds-toggle.entry.js +2 -1
  339. package/dist/esm/tds-tooltip.entry.js +42 -79
  340. package/dist/esm/tegel.js +1 -1
  341. package/dist/esm/{utils-9ac24735.js → utils-8544b156.js} +31 -12
  342. package/dist/tegel/p-000d60e5.entry.js +1 -0
  343. package/dist/tegel/p-04bff255.entry.js +1 -0
  344. package/dist/tegel/p-0641ac24.entry.js +1 -0
  345. package/dist/tegel/p-099025f0.entry.js +1 -0
  346. package/dist/tegel/p-0ae649c3.entry.js +1 -0
  347. package/dist/tegel/p-1a907ae9.entry.js +1 -0
  348. package/dist/tegel/p-1c82ccf0.entry.js +1 -0
  349. package/dist/tegel/{p-1acb8407.entry.js → p-1f43d4f0.entry.js} +1 -1
  350. package/dist/tegel/p-2e5f6086.entry.js +1 -0
  351. package/dist/tegel/{p-89283891.entry.js → p-31848a92.entry.js} +1 -1
  352. package/dist/tegel/{p-fb3f4a14.entry.js → p-3d28689e.entry.js} +1 -1
  353. package/dist/tegel/p-400282e5.entry.js +1 -0
  354. package/dist/tegel/p-4163997b.entry.js +1 -0
  355. package/dist/tegel/{p-bcb2fad3.entry.js → p-42990ec0.entry.js} +1 -1
  356. package/dist/tegel/p-43320d81.entry.js +1 -0
  357. package/dist/tegel/p-49a084db.entry.js +1 -0
  358. package/dist/tegel/{p-e8fccebc.entry.js → p-56189659.entry.js} +1 -1
  359. package/dist/tegel/{p-b6a16219.entry.js → p-656add37.entry.js} +1 -1
  360. package/dist/tegel/p-65ab407b.entry.js +1 -0
  361. package/dist/tegel/p-6654e59d.entry.js +1 -0
  362. package/dist/tegel/p-6f0072cc.entry.js +1 -0
  363. package/dist/tegel/{p-39227588.js → p-72fced16.js} +1 -1
  364. package/dist/tegel/p-79b1bb29.entry.js +1 -0
  365. package/dist/tegel/p-7ccff0a5.entry.js +1 -0
  366. package/dist/tegel/p-81915088.entry.js +1 -0
  367. package/dist/tegel/{p-232f5889.entry.js → p-823399ef.entry.js} +1 -1
  368. package/dist/tegel/p-84d231a5.entry.js +1 -0
  369. package/dist/tegel/{p-7b34156b.entry.js → p-88807dac.entry.js} +1 -1
  370. package/dist/tegel/p-88d7c4c1.entry.js +1 -0
  371. package/dist/tegel/p-8bd0a233.entry.js +1 -0
  372. package/dist/tegel/{p-e0ee20ee.entry.js → p-8c194dd8.entry.js} +1 -1
  373. package/dist/tegel/p-8e745d73.entry.js +1 -0
  374. package/dist/tegel/p-9991a816.entry.js +1 -0
  375. package/dist/tegel/{p-135575ae.entry.js → p-a08be1c3.entry.js} +1 -1
  376. package/dist/tegel/{p-3aa634ed.entry.js → p-a1ad46d2.entry.js} +1 -1
  377. package/dist/tegel/p-a8cc3901.entry.js +1 -0
  378. package/dist/tegel/{p-7d3a66ae.entry.js → p-aa7e2f79.entry.js} +1 -1
  379. package/dist/tegel/{p-cd2a74d7.entry.js → p-b0d313cd.entry.js} +1 -1
  380. package/dist/tegel/p-b1067b50.entry.js +1 -0
  381. package/dist/tegel/p-c411f254.entry.js +1 -0
  382. package/dist/tegel/p-cacdd03f.entry.js +1 -0
  383. package/dist/tegel/p-cb5a4d7d.entry.js +1 -0
  384. package/dist/tegel/p-d0f15f73.entry.js +1 -0
  385. package/dist/tegel/p-d2ca7f58.entry.js +1 -0
  386. package/dist/tegel/p-d4c25eb6.entry.js +1 -0
  387. package/dist/tegel/p-d5bd9b2e.entry.js +1 -0
  388. package/dist/tegel/{p-de799b9a.entry.js → p-d60cb9e5.entry.js} +1 -1
  389. package/dist/tegel/p-da6f310c.entry.js +1 -0
  390. package/dist/tegel/p-df318a85.entry.js +1 -0
  391. package/dist/tegel/p-df95f0ae.entry.js +1 -0
  392. package/dist/tegel/p-e36ceefe.entry.js +1 -0
  393. package/dist/tegel/p-e4d6a4c5.entry.js +1 -0
  394. package/dist/tegel/p-f36ec03b.entry.js +1 -0
  395. package/dist/tegel/p-f64ff692.entry.js +1 -0
  396. package/dist/tegel/p-f682dd0b.entry.js +1 -0
  397. package/dist/tegel/p-fa30061f.entry.js +1 -0
  398. package/dist/tegel/tegel.css +2 -2
  399. package/dist/tegel/tegel.esm.js +1 -1
  400. package/dist/types/components/accordion/accordion-item/accordion-item.d.ts +4 -0
  401. package/dist/types/components/accordion/accordion.d.ts +3 -0
  402. package/dist/types/components/accordion/accordion.stories.d.ts +77 -0
  403. package/dist/types/components/badge/badge.stories.d.ts +73 -0
  404. package/dist/types/components/banner/banner.d.ts +10 -5
  405. package/dist/types/components/banner/banner.stories.d.ts +82 -0
  406. package/dist/types/components/block/block.d.ts +3 -0
  407. package/dist/types/components/block/block.stories.d.ts +32 -0
  408. package/dist/types/components/breadcrumbs/breadcrumb/breadcrumb.d.ts +3 -2
  409. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +3 -1
  410. package/dist/types/components/breadcrumbs/breadcrumbs.stories.d.ts +16 -0
  411. package/dist/types/components/button/button.d.ts +9 -3
  412. package/dist/types/components/button/button.stories.d.ts +147 -0
  413. package/dist/types/components/card/card.d.ts +11 -9
  414. package/dist/types/components/card/card.stories.d.ts +128 -0
  415. package/dist/types/components/checkbox/checkbox.d.ts +3 -0
  416. package/dist/types/components/checkbox/checkbox.stories.d.ts +52 -0
  417. package/dist/types/components/chip/chip.d.ts +6 -0
  418. package/dist/types/components/chip/chip.stories.d.ts +99 -0
  419. package/dist/types/components/datetime/datetime.stories.d.ts +125 -0
  420. package/dist/types/components/divider/divider.stories.d.ts +58 -0
  421. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +31 -17
  422. package/dist/types/components/dropdown/dropdown.d.ts +82 -54
  423. package/dist/types/components/dropdown/dropdown.stories.d.ts +183 -0
  424. package/dist/types/components/footer/footer-group/footer-group.d.ts +4 -1
  425. package/dist/types/components/footer/footer-item/footer-item.d.ts +3 -0
  426. package/dist/types/components/footer/footer.d.ts +5 -3
  427. package/dist/types/components/footer/footer.stories.d.ts +44 -0
  428. package/dist/types/components/header/core-header-item/core-header-item.d.ts +3 -0
  429. package/dist/types/components/header/header-brand-symbol/header-brand-symbol.d.ts +3 -0
  430. package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +6 -1
  431. package/dist/types/components/header/header-dropdown-list/header-dropdown-list.d.ts +5 -1
  432. package/dist/types/components/header/header-dropdown-list-item/header-dropdown-list-item.d.ts +5 -2
  433. package/dist/types/components/header/header-dropdown-list-user/header-dropdown-list-user.d.ts +8 -4
  434. package/dist/types/components/header/header-item/header-item.d.ts +3 -0
  435. package/dist/types/components/header/header-launcher/header-launcher.d.ts +3 -0
  436. package/dist/types/components/header/header-launcher-grid/header-launcher-grid.d.ts +3 -0
  437. package/dist/types/components/header/header-launcher-grid-item/header-launcher-grid-item.d.ts +3 -0
  438. package/dist/types/components/header/header-launcher-grid-title/header-launcher-grid-title.d.ts +3 -0
  439. package/dist/types/components/header/header-launcher-list/header-launcher-list.d.ts +3 -0
  440. package/dist/types/components/header/header-launcher-list-item/header-launcher-list-item.d.ts +3 -0
  441. package/dist/types/components/header/header-launcher-list-title/header-launcher-list-title.d.ts +3 -0
  442. package/dist/types/components/header/header-title/header-title.d.ts +3 -0
  443. package/dist/types/components/header/header.d.ts +6 -0
  444. package/dist/types/components/header/header.stories.d.ts +32 -0
  445. package/dist/types/components/icon/icon.stories.d.ts +36 -0
  446. package/dist/types/components/link/link.d.ts +3 -0
  447. package/dist/types/components/link/link.stories.d.ts +44 -0
  448. package/dist/types/components/message/message.d.ts +5 -2
  449. package/dist/types/components/message/message.stories.d.ts +88 -0
  450. package/dist/types/components/modal/modal.d.ts +9 -3
  451. package/dist/types/components/modal/modal.stories.d.ts +70 -0
  452. package/dist/types/components/popover-canvas/popover-canvas.d.ts +8 -14
  453. package/dist/types/components/popover-canvas/popover-canvas.stories.d.ts +27 -0
  454. package/dist/types/components/popover-core/popover-core.d.ts +46 -0
  455. package/dist/types/components/popover-menu/popover-menu.d.ts +9 -10
  456. package/dist/types/components/popover-menu/popover-menu.stories.d.ts +40 -0
  457. package/dist/types/components/radio-button/radio-button.d.ts +3 -0
  458. package/dist/types/components/radio-button/radio-button.stories.d.ts +39 -0
  459. package/dist/types/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.d.ts +3 -0
  460. package/dist/types/components/side-menu/side-menu-dropdown/side-menu-dropdown.d.ts +5 -0
  461. package/dist/types/components/side-menu/side-menu-dropdown-list/side-menu-dropdown-list.d.ts +3 -0
  462. package/dist/types/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.d.ts +3 -0
  463. package/dist/types/components/side-menu/side-menu-item/side-menu-item.d.ts +3 -0
  464. package/dist/types/components/side-menu/side-menu-user/side-menu-user.d.ts +3 -0
  465. package/dist/types/components/side-menu/side-menu-user-image/side-menu-user-image.d.ts +4 -0
  466. package/dist/types/components/side-menu/side-menu.d.ts +8 -0
  467. package/dist/types/components/side-menu/side-menu.stories.d.ts +53 -0
  468. package/dist/types/components/slider/slider.d.ts +0 -1
  469. package/dist/types/components/slider/slider.stories.d.ts +235 -0
  470. package/dist/types/components/spinner/spinner.stories.d.ts +46 -0
  471. package/dist/types/components/stepper/step/step.d.ts +3 -0
  472. package/dist/types/components/stepper/stepper.d.ts +3 -0
  473. package/dist/types/components/stepper/stepper.stories.d.ts +80 -0
  474. package/dist/types/components/table/table/table.d.ts +3 -0
  475. package/dist/types/components/table/table-body/table-body.d.ts +6 -3
  476. package/dist/types/components/table/table-body-cell/table-body-cell.d.ts +3 -0
  477. package/dist/types/components/table/table-body-row/table-body-row.d.ts +3 -0
  478. package/dist/types/components/table/table-body-row-expandable/table-body-row-expandable.d.ts +4 -0
  479. package/dist/types/components/table/table-component-basic.stories.d.ts +144 -0
  480. package/dist/types/components/table/table-component-batch-actions.stories.d.ts +139 -0
  481. package/dist/types/components/table/table-component-bodydata.stories.d.ts +35 -0
  482. package/dist/types/components/table/table-component-custom-width.stories.d.ts +131 -0
  483. package/dist/types/components/table/table-component-event-listeners.stories.d.ts +131 -0
  484. package/dist/types/components/table/table-component-expandable-rows.stories.d.ts +131 -0
  485. package/dist/types/components/table/table-component-filtering.stories.d.ts +139 -0
  486. package/dist/types/components/table/table-component-multiselect.stories.d.ts +144 -0
  487. package/dist/types/components/table/table-component-pagination.stories.d.ts +131 -0
  488. package/dist/types/components/table/table-component-sorting.stories.d.ts +183 -0
  489. package/dist/types/components/table/table-footer/table-footer.d.ts +7 -7
  490. package/dist/types/components/table/table-header/table-header.d.ts +3 -0
  491. package/dist/types/components/table/table-toolbar/table-toolbar.d.ts +3 -0
  492. package/dist/types/components/tabs/folder-tabs/folder-tab/folder-tab.d.ts +3 -0
  493. package/dist/types/components/tabs/folder-tabs/folder-tabs.d.ts +3 -0
  494. package/dist/types/components/tabs/folder-tabs/folder-tabs.stories.d.ts +69 -0
  495. package/dist/types/components/tabs/inline-tabs/inline-tab/inline-tab.d.ts +3 -0
  496. package/dist/types/components/tabs/inline-tabs/inline-tabs.d.ts +3 -0
  497. package/dist/types/components/tabs/inline-tabs/inline-tabs.stories.d.ts +61 -0
  498. package/dist/types/components/tabs/navigation-tabs/navigation-tab/navigation-tab.d.ts +3 -0
  499. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.d.ts +3 -0
  500. package/dist/types/components/tabs/navigation-tabs/navigation-tabs.stories.d.ts +61 -0
  501. package/dist/types/components/text-field/text-field.d.ts +5 -0
  502. package/dist/types/components/text-field/text-field.stories.d.ts +201 -0
  503. package/dist/types/components/textarea/textarea.stories.d.ts +139 -0
  504. package/dist/types/components/toast/toast.d.ts +6 -5
  505. package/dist/types/components/toast/toast.stories.d.ts +56 -0
  506. package/dist/types/components/toggle/toggle.d.ts +3 -0
  507. package/dist/types/components/toggle/toggle.stories.d.ts +74 -0
  508. package/dist/types/components/tooltip/tooltip.d.ts +17 -7
  509. package/dist/types/components/tooltip/tooltip.stories.d.ts +66 -0
  510. package/dist/types/components.d.ts +232 -415
  511. package/dist/types/stories/Installation/installation.stories.d.ts +7 -0
  512. package/dist/types/stories/announcements/announce-tegel.stories.d.ts +6 -0
  513. package/dist/types/stories/announcements/prefix-change.stories.d.ts +6 -0
  514. package/dist/types/stories/foundations/color/color-brand.stories.d.ts +13 -0
  515. package/dist/types/stories/foundations/color/color-scales.stories.d.ts +30 -0
  516. package/dist/types/stories/foundations/color/color-semantic.stories.d.ts +13 -0
  517. package/dist/types/stories/foundations/grid/grid.stories.d.ts +35 -0
  518. package/dist/types/stories/foundations/spacing/spacing-element.stories.d.ts +8 -0
  519. package/dist/types/stories/foundations/spacing/spacing-layout.stories.d.ts +8 -0
  520. package/dist/types/stories/foundations/typography/typography-body.stories.d.ts +8 -0
  521. package/dist/types/stories/foundations/typography/typography-detail.stories.d.ts +8 -0
  522. package/dist/types/stories/foundations/typography/typography-headline.stories.d.ts +21 -0
  523. package/dist/types/stories/foundations/typography/typography-paragraph.stories.d.ts +8 -0
  524. package/dist/types/stories/patterns/navigation/navigation-basic.stories.d.ts +23 -0
  525. package/dist/types/stories/patterns/navigation/navigation-fewitems.stories.d.ts +23 -0
  526. package/dist/types/stories/patterns/navigation/navigation-manyitems.stories.d.ts +38 -0
  527. package/dist/types/stories/patterns/navigation/navigation-user-menu.stories.d.ts +33 -0
  528. package/dist/types/stories/tegel.stories.d.ts +6 -0
  529. package/dist/types/stories/utility/color/background-color.stories.d.ts +64 -0
  530. package/dist/types/stories/utility/color/text-color.stories.d.ts +64 -0
  531. package/dist/types/utils/utils.d.ts +20 -6
  532. package/package.json +22 -24
  533. package/dist/cjs/tds-dropdown-filter.cjs.entry.js +0 -96
  534. package/dist/cjs/tds-dropdown_2.cjs.entry.js +0 -339
  535. package/dist/collection/components/dropdown/dropdown-filter/dropdown-filter.js +0 -380
  536. package/dist/collection/components/dropdown-v2/dropdown-option-v2/dropdown-option-v2.js +0 -216
  537. package/dist/collection/components/dropdown-v2/dropdown-v2.css +0 -286
  538. package/dist/collection/components/dropdown-v2/dropdown-v2.js +0 -726
  539. package/dist/components/dropdown-option.js +0 -104
  540. package/dist/components/dropdown.js +0 -304
  541. package/dist/components/tds-dropdown-filter.d.ts +0 -11
  542. package/dist/components/tds-dropdown-filter.js +0 -150
  543. package/dist/components/tds-dropdown-option-v2.d.ts +0 -11
  544. package/dist/components/tds-dropdown-option-v2.js +0 -126
  545. package/dist/components/tds-dropdown-v2.js +0 -323
  546. package/dist/esm/tds-dropdown-filter.entry.js +0 -92
  547. package/dist/esm/tds-dropdown_2.entry.js +0 -334
  548. package/dist/tegel/p-07e5df94.entry.js +0 -1
  549. package/dist/tegel/p-0a3e7512.entry.js +0 -1
  550. package/dist/tegel/p-0e55d72f.entry.js +0 -1
  551. package/dist/tegel/p-107d3da8.entry.js +0 -1
  552. package/dist/tegel/p-13b02a4f.entry.js +0 -1
  553. package/dist/tegel/p-19e9addd.entry.js +0 -1
  554. package/dist/tegel/p-1fb5c5d4.entry.js +0 -1
  555. package/dist/tegel/p-2bee16f6.entry.js +0 -1
  556. package/dist/tegel/p-2e2c91c4.entry.js +0 -1
  557. package/dist/tegel/p-330ed982.entry.js +0 -1
  558. package/dist/tegel/p-3604b5d3.entry.js +0 -1
  559. package/dist/tegel/p-375e361b.entry.js +0 -1
  560. package/dist/tegel/p-55dc4711.entry.js +0 -1
  561. package/dist/tegel/p-59f1cb9b.entry.js +0 -1
  562. package/dist/tegel/p-5a6aba01.entry.js +0 -1
  563. package/dist/tegel/p-60733f89.entry.js +0 -1
  564. package/dist/tegel/p-6a530c2f.entry.js +0 -1
  565. package/dist/tegel/p-732256e0.entry.js +0 -1
  566. package/dist/tegel/p-7331ec7b.entry.js +0 -1
  567. package/dist/tegel/p-76f941e8.entry.js +0 -1
  568. package/dist/tegel/p-7b0853e6.entry.js +0 -1
  569. package/dist/tegel/p-90686bc7.entry.js +0 -1
  570. package/dist/tegel/p-95da9b7f.entry.js +0 -1
  571. package/dist/tegel/p-99f540db.entry.js +0 -1
  572. package/dist/tegel/p-9bcc42cf.entry.js +0 -1
  573. package/dist/tegel/p-9d707f6e.js +0 -1
  574. package/dist/tegel/p-9f57d275.entry.js +0 -1
  575. package/dist/tegel/p-9fe384ad.entry.js +0 -1
  576. package/dist/tegel/p-a5604352.entry.js +0 -1
  577. package/dist/tegel/p-acb62b52.entry.js +0 -1
  578. package/dist/tegel/p-aeffa257.entry.js +0 -1
  579. package/dist/tegel/p-b8d88873.entry.js +0 -1
  580. package/dist/tegel/p-beb8a6bd.entry.js +0 -1
  581. package/dist/tegel/p-c8d4af09.entry.js +0 -1
  582. package/dist/tegel/p-c90a247c.entry.js +0 -1
  583. package/dist/tegel/p-ca4527de.entry.js +0 -1
  584. package/dist/tegel/p-cf4cfc54.entry.js +0 -1
  585. package/dist/tegel/p-d3f5cf74.entry.js +0 -1
  586. package/dist/tegel/p-d67d67be.entry.js +0 -1
  587. package/dist/tegel/p-da4c92b9.entry.js +0 -1
  588. package/dist/tegel/p-e95059e9.entry.js +0 -1
  589. package/dist/tegel/p-f6206d3c.entry.js +0 -1
  590. package/dist/tegel/p-fc47d911.entry.js +0 -1
  591. package/dist/types/components/dropdown/dropdown-filter/dropdown-filter.d.ts +0 -47
  592. package/dist/types/components/dropdown-v2/dropdown-option-v2/dropdown-option-v2.d.ts +0 -35
  593. package/dist/types/components/dropdown-v2/dropdown-v2.d.ts +0 -86
  594. /package/dist/collection/components/{dropdown-v2/dropdown-option-v2/dropdown-option-v2.css → dropdown/dropdown-option/dropdown-option.css} +0 -0
@@ -12,66 +12,69 @@ const TdsTableFooter = class {
12
12
  this.tdsPageChange = createEvent(this, "tdsPageChange", 7);
13
13
  this.previousPage = () => {
14
14
  /* Emits pagination event. */
15
- const pageChangeEvent = this.tdsPageChange.emit({
15
+ this.tdsPageChange.emit({
16
16
  tableId: this.tableId,
17
17
  paginationValue: Number(this.inputElement.value) - 1,
18
18
  });
19
19
  /** If pages and greater or equal to 2, decrease pagination value.
20
20
  * This is to not get under 1 in pagination value. */
21
- if (this.paginationValue >= 2) {
22
- this.paginationValue--;
21
+ if (this.defaultPage >= 2) {
22
+ this.defaultPage--;
23
23
  }
24
24
  /* If the change event is not prevented -> do pagination. */
25
- if (!pageChangeEvent.defaultPrevented) {
25
+ if (!this.pages) {
26
26
  /* Decrease the pagination until the first page. */
27
27
  this.runPagination();
28
28
  }
29
29
  };
30
30
  this.nextPage = () => {
31
- /* Emits pagination event. */
32
- const pageChangeEvent = this.tdsPageChange.emit({
31
+ var _a;
32
+ this.tdsPageChange.emit({
33
33
  tableId: this.tableId,
34
34
  paginationValue: Number(this.inputElement.value) + 1,
35
35
  });
36
36
  /** If pages and greater or equal to the amount of pages, increase pagination value.
37
37
  * This is to not get above the amount of pages in pagination value. */
38
- if (this.paginationValue <= this.numberOfPages) {
39
- this.paginationValue++;
38
+ if (this.defaultPage <= ((_a = this.pages) !== null && _a !== void 0 ? _a : this.numberOfPages)) {
39
+ this.defaultPage++;
40
40
  }
41
41
  /* If the change event is not prevented -> do pagination. */
42
- if (!pageChangeEvent.defaultPrevented) {
42
+ if (!this.pages) {
43
43
  /* Increase the pagination until the last page. */
44
44
  this.runPagination();
45
45
  }
46
46
  };
47
47
  this.runPagination = () => {
48
- // grab all rows in body
49
- const dataRowsPagination = this.host.parentNode
50
- .querySelector('tds-table-body')
51
- .querySelectorAll('.tds-table__row');
52
- dataRowsPagination.forEach((item, i) => {
53
- // for making logic easier 1st result, 2nd result...
54
- const index = i + 1;
55
- if (this.tempPaginationDisable) {
56
- this.paginationValue = 1;
57
- }
58
- else {
59
- const lastResult = this.rowsPerPage * this.paginationValue;
60
- const firstResult = lastResult - this.rowsPerPage;
61
- if (index > firstResult && index <= lastResult) {
62
- item.classList.remove('tds-table__row--hidden');
48
+ /** Check the rows per page is used - if so, we need to do all the pagination. */
49
+ if (this.rowsPerPage) {
50
+ // grab all rows in body
51
+ const dataRowsPagination = this.host.parentNode
52
+ .querySelector('tds-table-body')
53
+ .querySelectorAll('.tds-table__row');
54
+ dataRowsPagination.forEach((item, i) => {
55
+ // for making logic easier 1st result, 2nd result...
56
+ const index = i + 1;
57
+ if (this.tempPaginationDisable) {
58
+ this.defaultPage = 1;
63
59
  }
64
60
  else {
65
- item.classList.add('tds-table__row--hidden');
61
+ const lastResult = this.rowsPerPage * this.defaultPage;
62
+ const firstResult = lastResult - this.rowsPerPage;
63
+ if (index > firstResult && index <= lastResult) {
64
+ item.classList.remove('tds-table__row--hidden');
65
+ }
66
+ else {
67
+ item.classList.add('tds-table__row--hidden');
68
+ }
66
69
  }
67
- }
68
- });
70
+ });
71
+ }
69
72
  };
70
73
  this.pagination = false;
71
- this.rowsPerPage = 5;
72
- this.paginationValue = 1;
73
- this.maxPages = undefined;
74
- this.clientSetColumnsNumber = null;
74
+ this.defaultPage = 1;
75
+ this.pages = null;
76
+ this.rowsPerPage = undefined;
77
+ this.cols = null;
75
78
  this.columnsNumber = 0;
76
79
  this.numberOfPages = 0;
77
80
  this.tempPaginationDisable = false;
@@ -98,11 +101,15 @@ const TdsTableFooter = class {
98
101
  relevantTableProps.forEach((tablePropName) => {
99
102
  this[tablePropName] = this.tableEl[tablePropName];
100
103
  });
101
- const numberOfRows = this.host.parentElement.querySelector('tds-table-body').childElementCount;
104
+ if (this.rowsPerPage) {
105
+ /* Number of children which are <tds-table-body-row> */
106
+ const numberOfRows = Array.from(this.host.parentElement.querySelector('tds-table-body').children).filter((element) => element.tagName === 'TDS-TABLE-BODY-ROW').length;
107
+ this.numberOfPages = Math.ceil(numberOfRows / this.rowsPerPage);
108
+ }
109
+ /** Get the number of columns. */
102
110
  const numberOfColumns = this.host.parentElement.querySelector('tds-table-header').childElementCount;
103
- this.numberOfPages = Math.ceil(numberOfRows / this.rowsPerPage);
104
- if (this.clientSetColumnsNumber !== null) {
105
- this.columnsNumber = this.clientSetColumnsNumber;
111
+ if (this.cols) {
112
+ this.columnsNumber = this.cols;
106
113
  }
107
114
  else {
108
115
  this.columnsNumber = numberOfColumns;
@@ -112,10 +119,10 @@ const TdsTableFooter = class {
112
119
  const insertedValue = event.target.value;
113
120
  if (insertedValue > this.numberOfPages || insertedValue < 1) {
114
121
  event.target.classList.add('tds-table__page-selector-input--shake');
115
- this.paginationValue = event.target.max;
122
+ this.defaultPage = event.target.max;
116
123
  }
117
124
  else {
118
- this.paginationValue = event.target.value;
125
+ this.defaultPage = event.target.value;
119
126
  }
120
127
  const paginationEvent = this.tdsPageChange.emit({
121
128
  tableId: this.tableId,
@@ -131,8 +138,9 @@ const TdsTableFooter = class {
131
138
  }
132
139
  }
133
140
  render() {
134
- var _a;
135
- return (h(Host, { class: this.compactDesign ? 'tds-table--compact' : '' }, h("tr", { class: "tds-table__footer-row" }, h("td", { class: "tds-table__footer-cell", colSpan: this.columnsNumber }, this.pagination && (h("div", { class: "tds-table__pagination" }, h("div", { class: "tds-table__row-selector" }), h("div", { class: "tds-table__page-selector" }, h("input", { ref: (element) => (this.inputElement = element), class: "tds-table__page-selector-input", type: "number", min: "1", max: (_a = this.maxPages) !== null && _a !== void 0 ? _a : this.numberOfPages, value: this.paginationValue, pattern: "[0-9]+", dir: "rtl", onChange: (event) => this.paginationInputChange(event), onFocusout: (event) => this.paginationInputChange(event), onAnimationEnd: removeShakeAnimation, disabled: this.tempPaginationDisable }), h("p", { class: "tds-table__footer-text" }, "of ", h("span", null, this.tempPaginationDisable ? 1 : this.numberOfPages), " pages"), h("button", { type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue <= 1 || this.tempPaginationDisable, onClick: () => this.previousPage() }, h("tds-icon", { name: "chevron_left", size: "20px" })), h("button", { type: "button", class: "tds-table__footer-btn", disabled: this.paginationValue >= this.numberOfPages || this.tempPaginationDisable, onClick: () => this.nextPage() }, h("tds-icon", { name: "chevron_right", size: "20px" })))))))));
141
+ var _a, _b, _c;
142
+ return (h(Host, { class: this.compactDesign ? 'tds-table--compact' : '' }, h("tr", { class: "tds-table__footer-row" }, h("td", { class: "tds-table__footer-cell", colSpan: this.columnsNumber }, this.pagination && (h("div", { class: "tds-table__pagination" }, h("div", { class: "tds-table__row-selector" }), h("div", { class: "tds-table__page-selector" }, h("input", { ref: (element) => (this.inputElement = element), class: "tds-table__page-selector-input", type: "number", min: "1", max: (_a = this.pages) !== null && _a !== void 0 ? _a : this.numberOfPages, value: this.defaultPage, pattern: "[0-9]+", dir: "rtl", onChange: (event) => this.paginationInputChange(event), onFocusout: (event) => this.paginationInputChange(event), onAnimationEnd: removeShakeAnimation, disabled: this.tempPaginationDisable }), h("p", { class: "tds-table__footer-text" }, "of", ' ', h("span", null, this.tempPaginationDisable ? 1 : (_b = this.pages) !== null && _b !== void 0 ? _b : this.numberOfPages), ' ', "pages"), h("button", { type: "button", class: "tds-table__footer-btn", disabled: this.defaultPage <= 1 || this.tempPaginationDisable, onClick: () => this.previousPage() }, h("tds-icon", { name: "chevron_left", size: "20px" })), h("button", { type: "button", class: "tds-table__footer-btn", disabled: this.defaultPage >= ((_c = this.pages) !== null && _c !== void 0 ? _c : this.numberOfPages) ||
143
+ this.tempPaginationDisable, onClick: () => this.nextPage() }, h("tds-icon", { name: "chevron_right", size: "20px" })))))))));
136
144
  }
137
145
  get host() { return getElement(this); }
138
146
  };
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-23ee700b.js';
2
2
 
3
- const tableToolbarCss = ":host{box-sizing:border-box;display:table-caption;position:relative;background-color:var(--tds-table-toolbar-background);color:var(--tds-table-color);padding:0 var(--tds-spacing-element-16);height:64px;border-top-left-radius:4px;border-top-right-radius:4px}:host *{box-sizing:border-box}:host .tds-table__upper-bar-flex{width:100%;height:100%;display:flex;justify-content:space-between}:host .tds-table__title{font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);padding-top:var(--tds-spacing-element-16);text-align:left}:host .tds-table__actionbar{display:flex;align-self:center;gap:8px}:host .tds-table__searchbar{display:flex;align-self:center;position:relative;height:40px;width:40px;border-radius:4px 4px 0 0;transition:background-color 250ms ease, width 250ms ease;overflow:hidden;background-color:transparent}:host .tds-table__searchbar::after{content:\"\";width:100%;height:2px;position:absolute;bottom:0;background-color:var(--tds-blue-400);transform:scaleX(0);transition:transform 150ms ease}:host .tds-table__searchbar:focus-within::after{transform:scaleX(100%)}:host .tds-table__searchbar:focus-within,:host .tds-table__searchbar.tds-table__searchbar--active{width:208px;background-color:var(--tds-table-toolbar-searchbar-background)}:host .tds-table__searchbar:focus-within:hover,:host .tds-table__searchbar.tds-table__searchbar--active:hover{background-color:var(--tds-table-toolbar-searchbar-background)}:host .tds-table__searchbar .tds-table__searchbar-input{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-table-color);z-index:1;width:100%;height:100%;border:none;padding:0 36px 0 16px;background-color:transparent;outline:none;cursor:pointer}:host .tds-table__searchbar .tds-table__searchbar-input :focus{background-color:var(--tds-table-toolbar-searchbar-background)}:host .tds-table__searchbar:hover{background-color:var(--tds-table-toolbar-searchbar-background-hover)}:host .tds-table__searchbar .tds-table__searchbar-icon{z-index:0;position:absolute;right:9px;top:9px;width:20px;height:20px}:host(.tds-table--compact){height:56px}";
3
+ const tableToolbarCss = ":host{box-sizing:border-box;display:table-caption;position:relative;background-color:var(--tds-table-toolbar-background);color:var(--tds-table-color);padding:0 var(--tds-spacing-element-16);height:64px;border-top-left-radius:4px;border-top-right-radius:4px}:host *{box-sizing:border-box}:host .tds-table__upper-bar-flex{width:100%;height:100%;display:flex;justify-content:space-between}:host .tds-table__title{font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);padding-top:var(--tds-spacing-element-16);text-align:left}:host .tds-table__actionbar,:host slot[name=end]::slotted(*){display:flex;align-self:center;gap:8px}:host .tds-table__searchbar{display:flex;align-self:center;position:relative;height:40px;width:40px;border-radius:4px 4px 0 0;transition:background-color 250ms ease, width 250ms ease;overflow:hidden;background-color:transparent}:host .tds-table__searchbar::after{content:\"\";width:100%;height:2px;position:absolute;bottom:0;background-color:var(--tds-blue-400);transform:scaleX(0);transition:transform 150ms ease}:host .tds-table__searchbar:focus-within::after{transform:scaleX(100%)}:host .tds-table__searchbar:focus-within,:host .tds-table__searchbar.tds-table__searchbar--active{width:208px;background-color:var(--tds-table-toolbar-searchbar-background)}:host .tds-table__searchbar:focus-within:hover,:host .tds-table__searchbar.tds-table__searchbar--active:hover{background-color:var(--tds-table-toolbar-searchbar-background)}:host .tds-table__searchbar .tds-table__searchbar-input{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-table-color);z-index:1;width:100%;height:100%;border:none;padding:0 36px 0 16px;background-color:transparent;outline:none;cursor:pointer}:host .tds-table__searchbar .tds-table__searchbar-input :focus{background-color:var(--tds-table-toolbar-searchbar-background)}:host .tds-table__searchbar:hover{background-color:var(--tds-table-toolbar-searchbar-background-hover)}:host .tds-table__searchbar .tds-table__searchbar-icon{z-index:0;position:absolute;right:9px;top:9px;width:20px;height:20px}:host(.tds-table--compact){height:56px}";
4
4
 
5
5
  const relevantTableProps = [
6
6
  'compactDesign',
@@ -62,7 +62,7 @@ const TdsTableToolbar = class {
62
62
  }
63
63
  }
64
64
  render() {
65
- return (h(Host, { class: this.compactDesign ? 'tds-table--compact' : '' }, h("div", { class: "tds-table__upper-bar-flex" }, h("caption", { class: "tds-table__title" }, this.tableTitle), h("div", { class: "tds-table__actionbar" }, this.enableFiltering && (h("div", { class: "tds-table__searchbar" }, h("input", { class: "tds-table__searchbar-input", type: "text", onKeyUp: (event) => this.searchFunction(event) }), h("span", { class: "tds-table__searchbar-icon" }, h("svg", { fill: "none", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M12.942 1.985c-6.051 0-10.957 4.905-10.957 10.957 0 6.051 4.906 10.957 10.957 10.957 2.666 0 5.109-.952 7.008-2.534l8.332 8.331a1 1 0 1 0 1.414-1.414l-8.331-8.331a10.912 10.912 0 0 0 2.534-7.01c0-6.05-4.905-10.956-10.957-10.956ZM3.985 12.942a8.957 8.957 0 1 1 17.914 0 8.957 8.957 0 0 1-17.914 0Z", fill: "currentColor" }))))), h("slot", { name: "tds-table__actionbar" })))));
65
+ return (h(Host, { class: this.compactDesign ? 'tds-table--compact' : '' }, h("div", { class: "tds-table__upper-bar-flex" }, h("caption", { class: "tds-table__title" }, this.tableTitle), h("div", { class: "tds-table__actionbar" }, this.enableFiltering && (h("div", { class: "tds-table__searchbar" }, h("input", { class: "tds-table__searchbar-input", type: "text", onKeyUp: (event) => this.searchFunction(event) }), h("span", { class: "tds-table__searchbar-icon" }, h("tds-icon", { name: "search", size: "20px" })))), h("slot", { name: "end" })))));
66
66
  }
67
67
  get host() { return getElement(this); }
68
68
  };
@@ -1,4 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-23ee700b.js';
2
+ import { g as generateUniqueId } from './utils-8544b156.js';
2
3
 
3
4
  const tableCss = ":host,.tds-table{border-collapse:collapse;display:table;box-sizing:border-box}:host *,.tds-table *{box-sizing:border-box}:host(.tds-table--responsive),.tds-table--responsive{width:100%}";
4
5
 
@@ -13,7 +14,7 @@ const TdsTable = class {
13
14
  this.enableExpandableRows = false;
14
15
  this.enableResponsive = false;
15
16
  this.modeVariant = null;
16
- this.tableId = crypto.randomUUID();
17
+ this.tableId = generateUniqueId();
17
18
  }
18
19
  emitInternalTdsPropChange(changedValueName, changedValue) {
19
20
  this.internalTdsTablePropChange.emit({
@@ -1,4 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-23ee700b.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-23ee700b.js';
2
+ import { h as hasSlot } from './utils-8544b156.js';
2
3
 
3
4
  const textFieldCss = ".text-field-input-lg.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-20) var(--tds-spacing-element-16)}.text-field-input-lg.sc-tds-text-field::placeholder{opacity:1;color:var(--tds-text-field-placeholder)}.text-field-input-lg.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-lg.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-lg.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-lg.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-md.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-md.sc-tds-text-field::placeholder{opacity:1;color:var(--tds-text-field-placeholder)}.text-field-input-md.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-md.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-md.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-md.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-sm.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-sm.sc-tds-text-field::placeholder{opacity:1;color:var(--tds-text-field-placeholder)}.text-field-input-sm.sc-tds-text-field:focus::placeholder{color:var(--tds-text-field-placeholder-focus-color)}.text-field-input-sm.sc-tds-text-field:disabled{cursor:not-allowed;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-sm.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-sm.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-container.sc-tds-text-field{border-radius:4px 4px 0 0;display:flex;position:relative;height:56px;box-sizing:border-box;background-color:var(--tds-text-field-background);border-bottom:1px solid var(--tds-text-field-border-bottom);transition:border-bottom-color 200ms ease}.text-field-container.sc-tds-text-field:hover{border-bottom-color:var(--tds-text-field-border-bottom-hover)}.form-text-field-md.sc-tds-text-field .text-field-container.sc-tds-text-field{height:48px}.form-text-field-sm.sc-tds-text-field .text-field-container.sc-tds-text-field{height:40px}.text-field-input-container.sc-tds-text-field{position:relative;width:100%}.text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:block;margin-bottom:var(--tds-spacing-element-8);color:var(--tds-text-field-label-color)}.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);position:absolute;pointer-events:none;color:var(--tds-text-field-label-inside-color);left:16px}.form-text-field.sc-tds-text-field{display:block;min-width:208px}.form-text-field-nomin.sc-tds-text-field{min-width:auto}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field{padding-top:var(--tds-spacing-element-24);padding-bottom:15px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:20px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder-focus-color)}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:12px}.text-field-bar.sc-tds-text-field{position:absolute;width:100%}.text-field-bar.sc-tds-text-field::before,.text-field-bar.sc-tds-text-field::after{content:\"\";height:2px;top:54px;width:0;position:absolute;background:var(--tds-text-field-bar);transition:0.35s ease all}.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:46px}.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:40px}.text-field-bar.sc-tds-text-field::before{left:50%}.text-field-bar.sc-tds-text-field::after{right:50%}.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{width:50%}.text-field-helper.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;gap:8px;justify-content:space-between;flex-basis:100%;padding-top:var(--tds-spacing-element-4);color:var(--tds-text-field-helper)}.text-field-helper.sc-tds-text-field .text-field-textcounter.sc-tds-text-field{margin-left:auto}.form-text-field-disabled.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:transparent}.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-prefix.sc-tds-text-field>*.sc-tds-text-field,.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-suffix.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-ps-color-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-icon__readonly.sc-tds-text-field{display:none;position:absolute;right:18px;top:18px;color:var(--tds-text-field-icon-read-only-label-color)}.text-field-icon__readonly-label.sc-tds-text-field{display:none;position:absolute;right:18px;top:48px;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);padding:8px;white-space:nowrap;border-radius:4px 0 4px 4px;background-color:var(--tds-text-field-icon-read-only-label-background)}.form-text-field-readonly.sc-tds-text-field{pointer-events:none}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field:hover~.text-field-icon__readonly-label.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-input.sc-tds-text-field{padding-right:54px;background-color:transparent}.form-text-field-success.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-success)}.form-text-field-error.sc-tds-text-field .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-error)}.form-text-field-error.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-error)}.form-text-field-error.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-error.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{background:var(--tds-text-field-bar-error)}.text-field-helper-error-state.sc-tds-text-field{display:flex;gap:8px;flex-wrap:nowrap}.text-field-textcounter.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-text-field-textcounter);float:right}.text-field-textcounter.sc-tds-text-field .text-field-textcounter-divider.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider)}.text-field-slot-wrap-prefix.sc-tds-text-field,.text-field-slot-wrap-suffix.sc-tds-text-field{align-self:center;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);margin:0 0 0 14px;color:var(--tds-text-field-ps-color)}.text-field-slot-wrap-prefix.sc-tds-text-field-s>:not(tds-icon),.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 0 0 2px}.text-field-slot-wrap-prefix.text-field-error.sc-tds-text-field,.text-field-slot-wrap-suffix.text-field-error.sc-tds-text-field{color:var(--tds-text-field-ps-color-error)}.text-field-slot-wrap-suffix.sc-tds-text-field{margin:0 14px 0 0}.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 2px 0 0}";
4
5
 
@@ -47,6 +48,8 @@ const TdsTextField = class {
47
48
  }
48
49
  render() {
49
50
  var _a;
51
+ const usesPrefixSlot = hasSlot('prefix', this.host);
52
+ const usesSuffixSlot = hasSlot('suffix', this.host);
50
53
  return (h("div", { class: `
51
54
  ${this.noMinWidth ? 'form-text-field-nomin' : ''}
52
55
  ${this.focusInput && !this.disabled
@@ -62,7 +65,7 @@ const TdsTextField = class {
62
65
  ${this.size === 'md' ? 'form-text-field-md' : ''}
63
66
  ${this.size === 'sm' ? 'form-text-field-sm' : ''}
64
67
  ${this.state === 'error' || this.state === 'success' ? `form-text-field-${this.state}` : ''}
65
- ` }, this.labelPosition === 'outside' && (h("div", { class: "text-field-label-outside" }, h("div", null, this.label))), h("div", { onClick: () => this.textInput.focus(), class: "text-field-container" }, h("div", { class: `text-field-slot-wrap-prefix text-field-${this.state}` }, h("slot", { name: "prefix" })), h("div", { class: "text-field-input-container" }, h("input", { ref: (inputEl) => (this.textInput = inputEl), class: `text-field-input text-field-input-${this.size}`, type: this.type, disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
68
+ ` }, this.labelPosition === 'outside' && (h("div", { class: "text-field-label-outside" }, h("div", null, this.label))), h("div", { onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { class: `text-field-slot-wrap-prefix text-field-${this.state}` }, h("slot", { name: "prefix" }))), h("div", { class: "text-field-input-container" }, h("input", { ref: (inputEl) => (this.textInput = inputEl), class: `text-field-input text-field-input-${this.size}`, type: this.type, disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
66
69
  if (!this.readOnly) {
67
70
  this.handleFocus(event);
68
71
  }
@@ -70,8 +73,9 @@ const TdsTextField = class {
70
73
  if (!this.readOnly) {
71
74
  this.handleBlur(event);
72
75
  }
73
- } }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { class: "text-field-label-inside" }, this.label))), h("div", { class: "text-field-bar" }), h("div", { class: `text-field-slot-wrap-suffix text-field-${this.state}` }, h("slot", { name: "suffix" })), h("span", { class: "text-field-icon__readonly" }, h("tds-icon", { name: "edit_inactive", size: "20px" })), h("span", { class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { class: "text-field-helper" }, this.state === 'error' && (h("div", { class: "text-field-helper-error-state" }, h("tds-icon", { name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, this.maxLength > 0 && (h("div", { class: "text-field-textcounter" }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { class: "text-field-textcounter-divider" }, " / "), this.maxLength)))));
76
+ } }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { class: "text-field-label-inside" }, this.label))), h("div", { class: "text-field-bar" }), usesSuffixSlot && (h("div", { class: `text-field-slot-wrap-suffix text-field-${this.state}` }, h("slot", { name: "suffix" }))), h("span", { class: "text-field-icon__readonly" }, h("tds-icon", { name: "edit_inactive", size: "20px" })), h("span", { class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { class: "text-field-helper" }, this.state === 'error' && (h("div", { class: "text-field-helper-error-state" }, h("tds-icon", { name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, this.maxLength > 0 && (h("div", { class: "text-field-textcounter" }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { class: "text-field-textcounter-divider" }, " / "), this.maxLength)))));
74
77
  }
78
+ get host() { return getElement(this); }
75
79
  };
76
80
  TdsTextField.style = textFieldCss;
77
81
 
@@ -1,13 +1,14 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-23ee700b.js';
2
+ import { g as generateUniqueId, h as hasSlot } from './utils-8544b156.js';
2
3
 
3
- const toastCss = ":host(.hide){display:none;visibility:hidden}:host{z-index:700}:host .toast-wrapper{display:flex;width:348px;background-color:var(--tds-toast-background-color);border-radius:4px}:host .toast-wrapper.information{border-left:4px solid var(--tds-information)}:host .toast-wrapper.information tds-icon{color:var(--tds-information)}:host .toast-wrapper.success{border-left:4px solid var(--tds-positive)}:host .toast-wrapper.success tds-icon{color:var(--tds-positive)}:host .toast-wrapper.error{border-left:4px solid var(--tds-negative)}:host .toast-wrapper.error tds-icon{color:var(--tds-negative)}:host .toast-wrapper.warning{border-left:4px solid var(--tds-warning)}:host .toast-wrapper.warning tds-icon{color:var(--tds-warning)}:host .toast-wrapper button.toast-close{height:20px;width:20px;display:flex;align-items:center;justify-content:center;margin:14px 14px 0 0;border:none;background:transparent}:host .toast-wrapper button.toast-close:hover{cursor:pointer}:host .toast-wrapper button.toast-close:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .toast-wrapper button.toast-close tds-icon{color:var(--tds-toast-dissmiss-color);padding:0}:host tds-icon{padding:14px 0 0 12px}:host .toast-content{padding:16px 0 16px 10px;display:flex;flex-direction:column;flex:1}:host .toast-content .toast-header{font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-toast-headline-color)}:host .toast-content .toast-header.no-subheader{margin-bottom:4px}:host .toast-content .toast-header.only-header{margin-bottom:0}:host .toast-content .toast-subheader slot::slotted(*){margin-top:4px;color:var(--tds-toast-subheadline-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding-bottom:16px;max-width:252px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .toast-content .toast-subheader.no-link slot::slotted(*){padding-bottom:0}:host slot[name=toast-link]::slotted(*){color:var(--tds-toast-link-color)}:host .tds-mode-variant-primary{--tds-toast-background:var(--tds-toast-background-primary)}:host .tds-mode-variant-secondary{--tds-toast-background:var(--tds-toast-background-secondary)}";
4
+ const toastCss = ":host(.hide){display:none;visibility:hidden}:host{z-index:700}:host .wrapper{display:flex;width:348px;background-color:var(--tds-toast-background-color);border-radius:4px}:host .wrapper.information{border-left:4px solid var(--tds-information)}:host .wrapper.information tds-icon{color:var(--tds-information)}:host .wrapper.success{border-left:4px solid var(--tds-positive)}:host .wrapper.success tds-icon{color:var(--tds-positive)}:host .wrapper.error{border-left:4px solid var(--tds-negative)}:host .wrapper.error tds-icon{color:var(--tds-negative)}:host .wrapper.warning{border-left:4px solid var(--tds-warning)}:host .wrapper.warning tds-icon{color:var(--tds-warning)}:host .wrapper button.close{height:20px;width:20px;display:flex;align-items:center;justify-content:center;margin:14px 14px 0 0;border:none;background:transparent}:host .wrapper button.close:hover{cursor:pointer}:host .wrapper button.close:focus{outline:2px solid var(--tds-blue-400);outline-offset:-2px}:host .wrapper button.close tds-icon{color:var(--tds-toast-dissmiss-color);padding:0}:host tds-icon{padding:14px 0 0 12px}:host .content{padding:16px 0 16px 10px;display:flex;flex-direction:column;flex:1}:host .content .header-subheader{display:flex;flex-direction:column;gap:4px}:host .content .header,:host .content slot[name=header]::slotted(*){font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-toast-headline-color)}:host .content .subheader,:host .content slot[name=subheader]::slotted(*){margin-top:4px;color:var(--tds-toast-subheadline-color);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);max-width:252px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .content .subheader.no-link slot::slotted(*),:host .content slot[name=subheader]::slotted(*).no-link slot::slotted(*){padding-bottom:0}:host .content .toast-bottom.subheader{margin-top:16px}:host .content .toast-bottom.no-subheader{margin-top:4px}:host slot[name=bottom]::slotted(*){color:var(--tds-toast-link-color)}:host .tds-mode-variant-primary{--tds-toast-background:var(--tds-toast-background-primary)}:host .tds-mode-variant-secondary{--tds-toast-background:var(--tds-toast-background-secondary)}";
4
5
 
5
6
  const TdsToast = class {
6
7
  constructor(hostRef) {
7
8
  registerInstance(this, hostRef);
8
9
  this.tdsClose = createEvent(this, "tdsClose", 7);
9
10
  this.getIconName = () => {
10
- switch (this.type) {
11
+ switch (this.variant) {
11
12
  case 'information':
12
13
  return 'info';
13
14
  case 'error':
@@ -36,46 +37,30 @@ const TdsToast = class {
36
37
  this.hidden = false;
37
38
  }
38
39
  };
39
- this.getHeaderClasses = () => {
40
- if (!this.hasSubheader && !this.hasLink) {
41
- return 'only-header';
42
- }
43
- if (!this.hasSubheader) {
44
- return 'no-subheader';
45
- }
46
- return '';
47
- };
48
- this.toastId = crypto.randomUUID();
40
+ this.toastId = generateUniqueId();
49
41
  this.header = undefined;
50
42
  this.subheader = undefined;
51
- this.type = 'information';
43
+ this.variant = 'information';
52
44
  this.hidden = false;
53
45
  this.toastRole = 'alert';
54
- this.hasSubheader = undefined;
55
- this.hasLink = undefined;
56
46
  }
57
47
  /** Hides the Toast. */
58
48
  async hideToast() {
59
- this.handleClose();
49
+ this.hidden = true;
60
50
  }
61
51
  /** Shows the Toast. */
62
52
  async showToast() {
63
- this.handleShow();
64
- }
65
- connectedCallback() {
66
- const children = Array.from(this.host.children);
67
- this.hasSubheader = children.some((childElement) => childElement.slot === 'toast-subheader');
68
- this.hasLink = children.some((childElement) => childElement.slot === 'toast-link');
53
+ this.hidden = false;
69
54
  }
70
55
  render() {
56
+ const usesHeaderSlot = hasSlot('header', this.host);
57
+ const usesSubheaderSlot = hasSlot('subheader', this.host);
58
+ const usesBottomSlot = hasSlot('bottom', this.host);
71
59
  return (h(Host, { toastRole: this.toastRole, "aria-describedby": this.host.getAttribute('aria-describedby'), class: `${this.hidden ? 'hide' : 'show'}` }, h("div", { class: `
72
- toast-wrapper
73
- ${this.type}
74
- ` }, h("tds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `toast-content` }, h("div", { class: `toast-header
75
- ${this.getHeaderClasses()}
76
- ` }, this.header), h("div", { class: `toast-subheader ${this.hasLink ? '' : 'no-link'}` }, h("slot", { name: "toast-subheader" })), h("slot", { name: "toast-link" })), h("button", { onClick: () => {
60
+ wrapper
61
+ ${this.variant}` }, h("tds-icon", { name: this.getIconName(), size: "20px" }), h("div", { class: `content` }, h("div", { class: "header-subheader" }, this.header && h("div", { class: "header" }, this.header), usesHeaderSlot && h("slot", { name: "header" }), this.subheader && h("div", { class: "subheader" }, this.subheader), usesSubheaderSlot && h("slot", { name: "subheader" })), usesBottomSlot && (h("div", { class: `toast-bottom ${usesSubheaderSlot || this.subheader ? 'subheader' : 'no-subheader'}` }, h("slot", { name: "bottom" })))), h("button", { onClick: () => {
77
62
  this.handleClose();
78
- }, class: `toast-close` }, h("tds-icon", { name: "cross", size: "20px" })))));
63
+ }, class: `close` }, h("tds-icon", { name: "cross", size: "20px" })))));
79
64
  }
80
65
  get host() { return getElement(this); }
81
66
  };
@@ -1,4 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-23ee700b.js';
2
+ import { g as generateUniqueId } from './utils-8544b156.js';
2
3
 
3
4
  const toggleCss = ".tds-toggle.sc-tds-toggle .toggle-headline.sc-tds-toggle{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);color:var(--tds-toggle-headline);margin-bottom:12px}.tds-toggle.sc-tds-toggle .toggle-headline.disabled.sc-tds-toggle{color:var(--tds-toggle-headline-disabled)}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle{appearance:initial;margin:0;width:44px;height:24px;position:relative;display:inline-block;vertical-align:middle}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle::after,.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle::before{content:\"\";position:absolute;box-sizing:border-box;transition:all 0.5s cubic-bezier(0.075, 0.82, 0.165, 1)}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle::before{width:44px;height:24px;border-radius:16px;background-color:var(--tds-toggle-off-slider);left:0}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle::after{width:16px;height:16px;background-color:var(--tds-toggle-switch);border-radius:50%;left:4px;top:4px}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:focus{outline:none}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:focus::before{background-color:var(--tds-toggle-off-slider-focus);border:1px solid var(--tds-toggle-off-border-focus)}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:checked::before{background-color:var(--tds-toggle-on-slider);border:1px solid var(--tds-toggle-on-border-focus)}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:checked::after{left:24px}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:disabled::before{background-color:var(--tds-toggle-slider-disabled);border:1px solid var(--tds-toggle-slider-disabled)}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:disabled::after{background-color:var(--tds-toggle-switch-disabled)}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:disabled:checked::before{background-color:var(--tds-toggle-on-slider-disabled);border:1px solid var(--tds-toggle-on-slider-disabled)}.tds-toggle.sc-tds-toggle input[type=checkbox].sc-tds-toggle:disabled:checked::after{background-color:var(--tds-toggle-switch-disabled)}.tds-toggle.sc-tds-toggle input[type=checkbox].sm.sc-tds-toggle{width:28px;height:16px}.tds-toggle.sc-tds-toggle input[type=checkbox].sm.sc-tds-toggle::before{width:28px;height:16px}.tds-toggle.sc-tds-toggle input[type=checkbox].sm.sc-tds-toggle::after{width:8px;height:8px}.tds-toggle.sc-tds-toggle input[type=checkbox].sm.sc-tds-toggle:checked::before{background-color:var(--tds-toggle-on-slider)}.tds-toggle.sc-tds-toggle input[type=checkbox].sm.sc-tds-toggle:checked::after{left:16px}.tds-toggle.sc-tds-toggle input[type=checkbox].sm.sc-tds-toggle:disabled::before{background-color:var(--tds-toggle-slider-disabled);border:1px solid var(--tds-toggle-slider-disabled)}.tds-toggle.sc-tds-toggle input[type=checkbox].sm.sc-tds-toggle:disabled::after{background-color:var(--tds-toggle-switch-disabled)}.tds-toggle.sc-tds-toggle label.sc-tds-toggle{display:inline-block;vertical-align:middle;font:var(--tds-detail-01);letter-spacing:var(--tds-detail-01-ls);color:var(--tds-toggle-label-color);padding-left:8px}.tds-toggle.sc-tds-toggle label.disabled.sc-tds-toggle{color:var(--tds-toggle-label-color-disabled)}";
4
5
 
@@ -19,7 +20,7 @@ const TdsToggle = class {
19
20
  this.name = undefined;
20
21
  this.headline = undefined;
21
22
  this.disabled = false;
22
- this.toggleId = crypto.randomUUID();
23
+ this.toggleId = generateUniqueId();
23
24
  }
24
25
  /** Toggles the Toggle. */
25
26
  async toggle() {
@@ -1,99 +1,62 @@
1
- import { r as registerInstance, h } from './index-23ee700b.js';
2
- import { c as createPopper } from './popper-bfa25c7f.js';
1
+ import { r as registerInstance, h, H as Host, g as getElement } from './index-23ee700b.js';
2
+ import { j as inheritAttributes } from './utils-8544b156.js';
3
3
 
4
- const tooltipCss = ":root,.tds-mode-light{--tds-tooltip-background:var(--tds-grey-800);--tds-tooltip-color:var(--tds-white)}.tds-mode-dark{--tds-tooltip-background:var(--tds-grey-200);--tds-tooltip-color:var(--tds-grey-958)}.tds-tooltip{box-sizing:border-box;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-tooltip-color);background-color:var(--tds-tooltip-background);border-radius:4px;padding:8px;word-wrap:break-word;max-width:192px;z-index:800;opacity:0;visibility:hidden;transition:opacity 200ms ease-in, visibility 200ms ease-in}.tds-tooltip *{box-sizing:border-box}.tds-tooltip.tds-tooltip-top-left{border-radius:0 4px 4px}.tds-tooltip.tds-tooltip-top-right{border-radius:4px 0 4px 4px}.tds-tooltip.tds-tooltip-bottom-right{border-radius:4px 4px 0}.tds-tooltip.tds-tooltip-bottom-left{border-radius:4px 4px 4px 0}.tds-tooltip-show{opacity:1;visibility:visible}";
4
+ const tooltipCss = ".sc-tds-tooltip:root,.tds-mode-light.sc-tds-tooltip{--tds-tooltip-background:var(--tds-grey-800);--tds-tooltip-color:var(--tds-white)}.tds-mode-dark.sc-tds-tooltip{--tds-tooltip-background:var(--tds-grey-200);--tds-tooltip-color:var(--tds-grey-958)}.tds-tooltip.sc-tds-tooltip{box-sizing:border-box;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-tooltip-color);background-color:var(--tds-tooltip-background);border-radius:4px;padding:8px;word-wrap:break-word;max-width:192px;z-index:800;opacity:0;visibility:hidden;transition:opacity 200ms ease-in, visibility 200ms ease-in}.tds-tooltip.sc-tds-tooltip *.sc-tds-tooltip{box-sizing:border-box}.tds-tooltip.tds-tooltip-top-left.sc-tds-tooltip{border-radius:0 4px 4px}.tds-tooltip.tds-tooltip-top-right.sc-tds-tooltip{border-radius:4px 0 4px 4px}.tds-tooltip.tds-tooltip-bottom-right.sc-tds-tooltip{border-radius:4px 4px 0}.tds-tooltip.tds-tooltip-bottom-left.sc-tds-tooltip{border-radius:4px 4px 4px 0}.tds-tooltip-show.sc-tds-tooltip{opacity:1;visibility:visible}";
5
5
 
6
6
  const TdsTooltip = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.offsetSkidding = 0;
10
10
  this.offsetDistance = 8;
11
+ this.popperjsExtraModifiers = [
12
+ {
13
+ name: 'positionCalc',
14
+ enabled: true,
15
+ phase: 'main',
16
+ fn: ({ state }) => {
17
+ if (state.placement === 'bottom-start' || state.placement === 'right-start') {
18
+ this.border = 'top-left';
19
+ }
20
+ else if (state.placement === 'bottom-end' || state.placement === 'left-start') {
21
+ this.border = 'top-right';
22
+ }
23
+ else if (state.placement === 'top-end' || state.placement === 'left-end') {
24
+ this.border = 'bottom-right';
25
+ }
26
+ else if (state.placement === 'top-start' || state.placement === 'right-end') {
27
+ this.border = 'bottom-left';
28
+ }
29
+ else if (state.placement === 'bottom' || state.placement === 'top') {
30
+ this.border = 'default';
31
+ }
32
+ },
33
+ },
34
+ ];
35
+ this.inheritedAttributes = [];
11
36
  this.text = '';
12
37
  this.selector = '';
13
38
  this.referenceEl = undefined;
14
39
  this.mouseOverTooltip = false;
15
40
  this.show = false;
16
41
  this.placement = 'bottom';
17
- this.popperInstance = undefined;
18
- this.target = undefined;
19
42
  }
20
- componentDidLoad() {
21
- var _a;
22
- this.target = (_a = this.referenceEl) !== null && _a !== void 0 ? _a : document.querySelector(this.selector);
23
- const thisValue = this;
24
- this.popperInstance = createPopper(this.target, this.tooltip, {
25
- placement: thisValue.placement,
26
- modifiers: [
27
- {
28
- name: 'positionCalc',
29
- enabled: true,
30
- phase: 'main',
31
- fn({ state }) {
32
- if (state.placement === 'bottom-start' || state.placement === 'right-start') {
33
- thisValue.border = 'top-left';
34
- }
35
- else if (state.placement === 'bottom-end' || state.placement === 'left-start') {
36
- thisValue.border = 'top-right';
37
- }
38
- else if (state.placement === 'top-end' || state.placement === 'left-end') {
39
- thisValue.border = 'bottom-right';
40
- }
41
- else if (state.placement === 'top-start' || state.placement === 'right-end') {
42
- thisValue.border = 'bottom-left';
43
- }
44
- else if (state.placement === 'bottom' || state.placement === 'top') {
45
- thisValue.border = 'default';
46
- }
47
- },
48
- },
49
- {
50
- name: 'offset',
51
- options: {
52
- offset: [this.offsetSkidding, this.offsetDistance],
53
- },
54
- },
55
- ],
56
- });
57
- const showTooltip = () => {
58
- this.show = true;
59
- };
60
- const hideTooltip = () => {
61
- this.show = false;
62
- };
63
- // For tabbing over element
64
- this.target.addEventListener('focusin', () => {
65
- showTooltip();
66
- });
67
- this.target.addEventListener('focusout', () => {
68
- hideTooltip();
69
- });
70
- // For hovering over element with selector
71
- this.target.addEventListener('mouseenter', () => {
72
- showTooltip();
73
- });
74
- this.target.addEventListener('mouseleave', () => {
75
- hideTooltip();
76
- });
77
- // For hovering over Tooltip itself:
78
- if (this.mouseOverTooltip === true) {
79
- this.tooltip.addEventListener('mouseenter', () => {
80
- showTooltip();
81
- });
82
- this.tooltip.addEventListener('mouseleave', () => {
83
- hideTooltip();
84
- });
85
- }
43
+ componentWillLoad() {
44
+ this.inheritedAttributes = inheritAttributes(this.host, ['style', 'class']);
86
45
  }
87
- disconnectedCallback() {
88
- var _a;
89
- (_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
90
- }
91
- /* Slot on line 118 is added to support adding HTML elements to component */
92
46
  render() {
93
- return (h("span", { ref: (el) => {
94
- this.tooltip = el;
95
- }, class: `tds-tooltip tds-tooltip-${this.border} ${this.show ? 'tds-tooltip-show' : ''}` }, this.text, h("slot", null)));
47
+ var _a;
48
+ return (h(Host, null, h("tds-popover-core", Object.assign({}, this.inheritedAttributes, { class: {
49
+ 'tds-tooltip': true,
50
+ [`tds-tooltip-${this.border}`]: true,
51
+ [(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
52
+ 'tds-tooltip-show': this.show,
53
+ }, selector: this.selector, referenceEl: this.referenceEl, trigger: this.mouseOverTooltip ? 'hover-popover' : 'hover', modifiers: this.popperjsExtraModifiers, show: this.show, placement: this.placement, autoHide: false, onInternalTdsShow: () => {
54
+ this.show = true;
55
+ }, onInternalTdsClose: () => {
56
+ this.show = false;
57
+ } }), this.text, h("slot", null))));
96
58
  }
59
+ get host() { return getElement(this); }
97
60
  };
98
61
  TdsTooltip.style = tooltipCss;
99
62