@db-ux/wc-core-components 1.1.0 → 2.0.0-0-6589a60

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 (425) hide show
  1. package/README.md +7 -2
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
  3. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
  4. package/dist/cjs/{constants-89822e5f.js → constants-C75d4JiJ.js} +2 -1
  5. package/dist/cjs/constants-C75d4JiJ.js.map +1 -0
  6. package/dist/cjs/db-accordion-item.cjs.entry.js +5 -6
  7. package/dist/cjs/db-accordion-item.cjs.entry.js.map +1 -1
  8. package/dist/cjs/db-accordion-item.entry.cjs.js.map +1 -0
  9. package/dist/cjs/db-accordion.cjs.entry.js +39 -14
  10. package/dist/cjs/db-accordion.cjs.entry.js.map +1 -1
  11. package/dist/cjs/db-accordion.entry.cjs.js.map +1 -0
  12. package/dist/cjs/db-badge.cjs.entry.js +18 -11
  13. package/dist/cjs/db-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/db-badge.entry.cjs.js.map +1 -0
  15. package/dist/cjs/db-brand.cjs.entry.js +4 -5
  16. package/dist/cjs/db-brand.cjs.entry.js.map +1 -1
  17. package/dist/cjs/db-brand.entry.cjs.js.map +1 -0
  18. package/dist/cjs/db-button.cjs.entry.js +4 -5
  19. package/dist/cjs/db-button.cjs.entry.js.map +1 -1
  20. package/dist/cjs/db-button.entry.cjs.js.map +1 -0
  21. package/dist/cjs/db-card.cjs.entry.js +4 -5
  22. package/dist/cjs/db-card.cjs.entry.js.map +1 -1
  23. package/dist/cjs/db-card.entry.cjs.js.map +1 -0
  24. package/dist/cjs/db-checkbox.cjs.entry.js +43 -21
  25. package/dist/cjs/db-checkbox.cjs.entry.js.map +1 -1
  26. package/dist/cjs/db-checkbox.entry.cjs.js.map +1 -0
  27. package/dist/cjs/db-divider.cjs.entry.js +3 -4
  28. package/dist/cjs/db-divider.cjs.entry.js.map +1 -1
  29. package/dist/cjs/db-divider.entry.cjs.js.map +1 -0
  30. package/dist/cjs/db-drawer.cjs.entry.js +18 -12
  31. package/dist/cjs/db-drawer.cjs.entry.js.map +1 -1
  32. package/dist/cjs/db-drawer.entry.cjs.js.map +1 -0
  33. package/dist/cjs/db-header.cjs.entry.js +21 -15
  34. package/dist/cjs/db-header.cjs.entry.js.map +1 -1
  35. package/dist/cjs/db-header.entry.cjs.js.map +1 -0
  36. package/dist/cjs/db-icon.cjs.entry.js +3 -4
  37. package/dist/cjs/db-icon.cjs.entry.js.map +1 -1
  38. package/dist/cjs/db-icon.entry.cjs.js.map +1 -0
  39. package/dist/cjs/db-infotext.cjs.entry.js +3 -4
  40. package/dist/cjs/db-infotext.cjs.entry.js.map +1 -1
  41. package/dist/cjs/db-infotext.entry.cjs.js.map +1 -0
  42. package/dist/cjs/db-input.cjs.entry.js +35 -22
  43. package/dist/cjs/db-input.cjs.entry.js.map +1 -1
  44. package/dist/cjs/db-input.entry.cjs.js.map +1 -0
  45. package/dist/cjs/db-link.cjs.entry.js +4 -5
  46. package/dist/cjs/db-link.cjs.entry.js.map +1 -1
  47. package/dist/cjs/db-link.entry.cjs.js.map +1 -0
  48. package/dist/cjs/db-navigation-item.cjs.entry.js +36 -14
  49. package/dist/cjs/db-navigation-item.cjs.entry.js.map +1 -1
  50. package/dist/cjs/db-navigation-item.entry.cjs.js.map +1 -0
  51. package/dist/cjs/db-navigation.cjs.entry.js +4 -5
  52. package/dist/cjs/db-navigation.cjs.entry.js.map +1 -1
  53. package/dist/cjs/db-navigation.entry.cjs.js.map +1 -0
  54. package/dist/cjs/db-notification.cjs.entry.js +5 -6
  55. package/dist/cjs/db-notification.cjs.entry.js.map +1 -1
  56. package/dist/cjs/db-notification.entry.cjs.js.map +1 -0
  57. package/dist/cjs/db-page.cjs.entry.js +5 -6
  58. package/dist/cjs/db-page.cjs.entry.js.map +1 -1
  59. package/dist/cjs/db-page.entry.cjs.js.map +1 -0
  60. package/dist/cjs/db-popover.cjs.entry.js +25 -11
  61. package/dist/cjs/db-popover.cjs.entry.js.map +1 -1
  62. package/dist/cjs/db-popover.entry.cjs.js.map +1 -0
  63. package/dist/cjs/db-radio.cjs.entry.js +21 -13
  64. package/dist/cjs/db-radio.cjs.entry.js.map +1 -1
  65. package/dist/cjs/db-radio.entry.cjs.js.map +1 -0
  66. package/dist/cjs/db-section.cjs.entry.js +4 -5
  67. package/dist/cjs/db-section.cjs.entry.js.map +1 -1
  68. package/dist/cjs/db-section.entry.cjs.js.map +1 -0
  69. package/dist/cjs/db-select.cjs.entry.js +39 -25
  70. package/dist/cjs/db-select.cjs.entry.js.map +1 -1
  71. package/dist/cjs/db-select.entry.cjs.js.map +1 -0
  72. package/dist/cjs/db-stack.cjs.entry.js +3 -4
  73. package/dist/cjs/db-stack.cjs.entry.js.map +1 -1
  74. package/dist/cjs/db-stack.entry.cjs.js.map +1 -0
  75. package/dist/cjs/db-switch.cjs.entry.js +19 -13
  76. package/dist/cjs/db-switch.cjs.entry.js.map +1 -1
  77. package/dist/cjs/db-switch.entry.cjs.js.map +1 -0
  78. package/dist/cjs/db-tab-item.db-tab-list.db-tab-panel.entry.cjs.js.map +1 -0
  79. package/dist/cjs/db-tab-item_3.cjs.entry.js +20 -13
  80. package/dist/cjs/db-tab-item_3.cjs.entry.js.map +1 -1
  81. package/dist/cjs/db-tabs.cjs.entry.js +22 -15
  82. package/dist/cjs/db-tabs.cjs.entry.js.map +1 -1
  83. package/dist/cjs/db-tabs.entry.cjs.js.map +1 -0
  84. package/dist/cjs/db-tag.cjs.entry.js +19 -11
  85. package/dist/cjs/db-tag.cjs.entry.js.map +1 -1
  86. package/dist/cjs/db-tag.entry.cjs.js.map +1 -0
  87. package/dist/cjs/db-textarea.cjs.entry.js +34 -21
  88. package/dist/cjs/db-textarea.cjs.entry.js.map +1 -1
  89. package/dist/cjs/db-textarea.entry.cjs.js.map +1 -0
  90. package/dist/cjs/db-tooltip.cjs.entry.js +20 -13
  91. package/dist/cjs/db-tooltip.cjs.entry.js.map +1 -1
  92. package/dist/cjs/db-tooltip.entry.cjs.js.map +1 -0
  93. package/dist/cjs/db-ux.cjs.js +8 -7
  94. package/dist/cjs/db-ux.cjs.js.map +1 -1
  95. package/dist/cjs/{index-3d093f06.js → index-DBEtsnky.js} +223 -142
  96. package/dist/cjs/index-DBEtsnky.js.map +1 -0
  97. package/dist/cjs/{index-403366c7.js → index-sPDBdc1s.js} +2 -1
  98. package/dist/cjs/index-sPDBdc1s.js.map +1 -0
  99. package/dist/cjs/index.cjs.js +13 -22
  100. package/dist/cjs/index.cjs.js.map +1 -1
  101. package/dist/cjs/loader.cjs.js +4 -5
  102. package/dist/cjs/loader.cjs.js.map +1 -1
  103. package/dist/cjs/{navigation-5586b826.js → navigation-l4Ce-Ems.js} +3 -2
  104. package/dist/cjs/navigation-l4Ce-Ems.js.map +1 -0
  105. package/dist/collection/collection-manifest.json +1 -1
  106. package/dist/collection/components/accordion/accordion.js +55 -9
  107. package/dist/collection/components/accordion/accordion.js.map +1 -1
  108. package/dist/collection/components/accordion/model.js.map +1 -1
  109. package/dist/collection/components/badge/badge.js +19 -6
  110. package/dist/collection/components/badge/badge.js.map +1 -1
  111. package/dist/collection/components/badge/model.js.map +1 -1
  112. package/dist/collection/components/button/button.js +1 -1
  113. package/dist/collection/components/button/model.js.map +1 -1
  114. package/dist/collection/components/card/card.js +1 -1
  115. package/dist/collection/components/card/model.js.map +1 -1
  116. package/dist/collection/components/checkbox/checkbox.js +54 -14
  117. package/dist/collection/components/checkbox/checkbox.js.map +1 -1
  118. package/dist/collection/components/divider/divider.js +1 -1
  119. package/dist/collection/components/divider/model.js.map +1 -1
  120. package/dist/collection/components/drawer/drawer.js +18 -8
  121. package/dist/collection/components/drawer/drawer.js.map +1 -1
  122. package/dist/collection/components/drawer/model.js.map +1 -1
  123. package/dist/collection/components/header/header.js +19 -9
  124. package/dist/collection/components/header/header.js.map +1 -1
  125. package/dist/collection/components/icon/model.js.map +1 -1
  126. package/dist/collection/components/input/input.js +33 -14
  127. package/dist/collection/components/input/input.js.map +1 -1
  128. package/dist/collection/components/input/model.js.map +1 -1
  129. package/dist/collection/components/link/model.js.map +1 -1
  130. package/dist/collection/components/navigation-item/model.js.map +1 -1
  131. package/dist/collection/components/navigation-item/navigation-item.js +40 -11
  132. package/dist/collection/components/navigation-item/navigation-item.js.map +1 -1
  133. package/dist/collection/components/notification/model.js.map +1 -1
  134. package/dist/collection/components/page/model.js.map +1 -1
  135. package/dist/collection/components/page/page.js +27 -2
  136. package/dist/collection/components/page/page.js.map +1 -1
  137. package/dist/collection/components/popover/popover.js +33 -8
  138. package/dist/collection/components/popover/popover.js.map +1 -1
  139. package/dist/collection/components/radio/radio.js +23 -7
  140. package/dist/collection/components/radio/radio.js.map +1 -1
  141. package/dist/collection/components/section/section.js +1 -1
  142. package/dist/collection/components/select/select.js +38 -16
  143. package/dist/collection/components/select/select.js.map +1 -1
  144. package/dist/collection/components/stack/model.js.map +1 -1
  145. package/dist/collection/components/switch/switch.js +17 -7
  146. package/dist/collection/components/switch/switch.js.map +1 -1
  147. package/dist/collection/components/tab-item/tab-item.js +21 -8
  148. package/dist/collection/components/tab-item/tab-item.js.map +1 -1
  149. package/dist/collection/components/tabs/model.js.map +1 -1
  150. package/dist/collection/components/tabs/tabs.js +25 -12
  151. package/dist/collection/components/tabs/tabs.js.map +1 -1
  152. package/dist/collection/components/tag/model.js.map +1 -1
  153. package/dist/collection/components/tag/tag.js +23 -7
  154. package/dist/collection/components/tag/tag.js.map +1 -1
  155. package/dist/collection/components/textarea/model.js.map +1 -1
  156. package/dist/collection/components/textarea/textarea.js +32 -13
  157. package/dist/collection/components/textarea/textarea.js.map +1 -1
  158. package/dist/collection/components/tooltip/tooltip.js +21 -8
  159. package/dist/collection/components/tooltip/tooltip.js.map +1 -1
  160. package/dist/collection/shared/model.js.map +1 -1
  161. package/dist/collection/utils/navigation.js.map +1 -1
  162. package/dist/custom-elements.json +484 -116
  163. package/dist/db-ux/db-accordion-item.entry.esm.js.map +1 -0
  164. package/dist/db-ux/db-accordion.entry.esm.js.map +1 -0
  165. package/dist/db-ux/db-badge.entry.esm.js.map +1 -0
  166. package/dist/db-ux/db-brand.entry.esm.js.map +1 -0
  167. package/dist/db-ux/db-button.entry.esm.js.map +1 -0
  168. package/dist/db-ux/db-card.entry.esm.js.map +1 -0
  169. package/dist/db-ux/db-checkbox.entry.esm.js.map +1 -0
  170. package/dist/db-ux/db-divider.entry.esm.js.map +1 -0
  171. package/dist/db-ux/db-drawer.entry.esm.js.map +1 -0
  172. package/dist/db-ux/db-header.entry.esm.js.map +1 -0
  173. package/dist/db-ux/db-icon.entry.esm.js.map +1 -0
  174. package/dist/db-ux/db-infotext.entry.esm.js.map +1 -0
  175. package/dist/db-ux/db-input.entry.esm.js.map +1 -0
  176. package/dist/db-ux/db-link.entry.esm.js.map +1 -0
  177. package/dist/db-ux/db-navigation-item.entry.esm.js.map +1 -0
  178. package/dist/db-ux/db-navigation.entry.esm.js.map +1 -0
  179. package/dist/db-ux/db-notification.entry.esm.js.map +1 -0
  180. package/dist/db-ux/db-page.entry.esm.js.map +1 -0
  181. package/dist/db-ux/db-popover.entry.esm.js.map +1 -0
  182. package/dist/db-ux/db-radio.entry.esm.js.map +1 -0
  183. package/dist/db-ux/db-section.entry.esm.js.map +1 -0
  184. package/dist/db-ux/db-select.entry.esm.js.map +1 -0
  185. package/dist/db-ux/db-stack.entry.esm.js.map +1 -0
  186. package/dist/db-ux/db-switch.entry.esm.js.map +1 -0
  187. package/dist/db-ux/db-tab-item.db-tab-list.db-tab-panel.entry.esm.js.map +1 -0
  188. package/dist/db-ux/db-tabs.entry.esm.js.map +1 -0
  189. package/dist/db-ux/db-tag.entry.esm.js.map +1 -0
  190. package/dist/db-ux/db-textarea.entry.esm.js.map +1 -0
  191. package/dist/db-ux/db-tooltip.entry.esm.js.map +1 -0
  192. package/dist/db-ux/db-ux.esm.js +1 -1
  193. package/dist/db-ux/db-ux.esm.js.map +1 -1
  194. package/dist/db-ux/index.esm.js +1 -1
  195. package/dist/db-ux/index.esm.js.map +1 -1
  196. package/dist/db-ux/loader.esm.js.map +1 -0
  197. package/dist/db-ux/{p-f23ca7f6.entry.js → p-13103208.entry.js} +2 -2
  198. package/dist/db-ux/{p-f23ca7f6.entry.js.map → p-13103208.entry.js.map} +1 -1
  199. package/dist/db-ux/p-2e23ff44.entry.js +2 -0
  200. package/dist/db-ux/{p-5c1b65ac.entry.js.map → p-2e23ff44.entry.js.map} +1 -1
  201. package/dist/db-ux/p-3d7843de.entry.js +2 -0
  202. package/dist/db-ux/p-3d7843de.entry.js.map +1 -0
  203. package/dist/db-ux/p-63c7cb8b.entry.js +2 -0
  204. package/dist/db-ux/p-63c7cb8b.entry.js.map +1 -0
  205. package/dist/db-ux/p-6c1ea804.entry.js +2 -0
  206. package/dist/db-ux/{p-1665a1f6.entry.js.map → p-6c1ea804.entry.js.map} +1 -1
  207. package/dist/db-ux/p-720aa9a5.entry.js +2 -0
  208. package/dist/db-ux/{p-cf22eaea.entry.js.map → p-720aa9a5.entry.js.map} +1 -1
  209. package/dist/db-ux/p-77fc7549.entry.js +2 -0
  210. package/dist/db-ux/p-77fc7549.entry.js.map +1 -0
  211. package/dist/db-ux/p-793d7f91.entry.js +2 -0
  212. package/dist/db-ux/p-793d7f91.entry.js.map +1 -0
  213. package/dist/db-ux/p-7f107bca.entry.js +2 -0
  214. package/dist/db-ux/p-7f107bca.entry.js.map +1 -0
  215. package/dist/db-ux/p-80639e12.entry.js +2 -0
  216. package/dist/db-ux/p-80639e12.entry.js.map +1 -0
  217. package/dist/db-ux/p-837442c2.entry.js +2 -0
  218. package/dist/db-ux/p-837442c2.entry.js.map +1 -0
  219. package/dist/db-ux/p-8822e255.entry.js +2 -0
  220. package/dist/db-ux/p-8822e255.entry.js.map +1 -0
  221. package/dist/db-ux/p-8e074bd8.entry.js +2 -0
  222. package/dist/db-ux/{p-300fb4ff.entry.js.map → p-8e074bd8.entry.js.map} +1 -1
  223. package/dist/db-ux/{p-7eb92648.entry.js → p-948a6441.entry.js} +2 -2
  224. package/dist/db-ux/{p-7eb92648.entry.js.map → p-948a6441.entry.js.map} +1 -1
  225. package/dist/db-ux/p-9638c44e.entry.js +2 -0
  226. package/dist/db-ux/p-9638c44e.entry.js.map +1 -0
  227. package/dist/db-ux/{p-45bb9feb.js → p-BJJmGwiD.js} +1 -1
  228. package/dist/db-ux/p-BJJmGwiD.js.map +1 -0
  229. package/dist/db-ux/{p-0cdf053e.js → p-CNYyu0D-.js} +2 -2
  230. package/dist/db-ux/p-CNYyu0D-.js.map +1 -0
  231. package/dist/db-ux/{p-af3834b6.js → p-CNj9Jn9q.js} +1 -1
  232. package/dist/db-ux/p-CNj9Jn9q.js.map +1 -0
  233. package/dist/db-ux/p-D-D8lQAG.js +3 -0
  234. package/dist/db-ux/p-D-D8lQAG.js.map +1 -0
  235. package/dist/db-ux/p-DQuL1Twl.js +2 -0
  236. package/dist/db-ux/p-DQuL1Twl.js.map +1 -0
  237. package/dist/db-ux/p-a33ead25.entry.js +2 -0
  238. package/dist/db-ux/p-a33ead25.entry.js.map +1 -0
  239. package/dist/db-ux/p-a7cb5508.entry.js +2 -0
  240. package/dist/db-ux/{p-95e59a69.entry.js.map → p-a7cb5508.entry.js.map} +1 -1
  241. package/dist/db-ux/p-ab698c11.entry.js +2 -0
  242. package/dist/db-ux/p-ab698c11.entry.js.map +1 -0
  243. package/dist/db-ux/p-b34a66b5.entry.js +2 -0
  244. package/dist/db-ux/p-b34a66b5.entry.js.map +1 -0
  245. package/dist/db-ux/p-b7ea60d8.entry.js +2 -0
  246. package/dist/db-ux/p-b7ea60d8.entry.js.map +1 -0
  247. package/dist/db-ux/{p-b4eefd78.entry.js → p-b8250e4a.entry.js} +2 -2
  248. package/dist/db-ux/{p-b4eefd78.entry.js.map → p-b8250e4a.entry.js.map} +1 -1
  249. package/dist/db-ux/p-c1e84446.entry.js +2 -0
  250. package/dist/db-ux/{p-2f695fb2.entry.js.map → p-c1e84446.entry.js.map} +1 -1
  251. package/dist/db-ux/p-d8fa16c3.entry.js +2 -0
  252. package/dist/db-ux/p-d8fa16c3.entry.js.map +1 -0
  253. package/dist/db-ux/p-da8fcf7f.entry.js +2 -0
  254. package/dist/db-ux/{p-b2886d1c.entry.js.map → p-da8fcf7f.entry.js.map} +1 -1
  255. package/dist/db-ux/{p-e6f5c82d.entry.js → p-e1893e40.entry.js} +2 -2
  256. package/dist/db-ux/{p-e6f5c82d.entry.js.map → p-e1893e40.entry.js.map} +1 -1
  257. package/dist/db-ux/p-e7905599.entry.js +2 -0
  258. package/dist/db-ux/p-e7905599.entry.js.map +1 -0
  259. package/dist/db-ux/p-f9804215.entry.js +2 -0
  260. package/dist/db-ux/{p-0d08f973.entry.js.map → p-f9804215.entry.js.map} +1 -1
  261. package/dist/db-ux/p-fa671633.entry.js +2 -0
  262. package/dist/db-ux/p-fa671633.entry.js.map +1 -0
  263. package/dist/db-ux/p-fd672c12.entry.js +2 -0
  264. package/dist/db-ux/p-fd672c12.entry.js.map +1 -0
  265. package/dist/esm/app-globals-DQuL1Twl.js +6 -0
  266. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
  267. package/dist/esm/{constants-745cf8d7.js → constants-CNj9Jn9q.js} +2 -1
  268. package/dist/{db-ux/p-af3834b6.js.map → esm/constants-CNj9Jn9q.js.map} +1 -1
  269. package/dist/esm/db-accordion-item.entry.js +5 -4
  270. package/dist/esm/db-accordion-item.entry.js.map +1 -1
  271. package/dist/esm/db-accordion.entry.js +39 -12
  272. package/dist/esm/db-accordion.entry.js.map +1 -1
  273. package/dist/esm/db-badge.entry.js +18 -9
  274. package/dist/esm/db-badge.entry.js.map +1 -1
  275. package/dist/esm/db-brand.entry.js +4 -3
  276. package/dist/esm/db-brand.entry.js.map +1 -1
  277. package/dist/esm/db-button.entry.js +4 -3
  278. package/dist/esm/db-button.entry.js.map +1 -1
  279. package/dist/esm/db-card.entry.js +4 -3
  280. package/dist/esm/db-card.entry.js.map +1 -1
  281. package/dist/esm/db-checkbox.entry.js +43 -19
  282. package/dist/esm/db-checkbox.entry.js.map +1 -1
  283. package/dist/esm/db-divider.entry.js +3 -2
  284. package/dist/esm/db-divider.entry.js.map +1 -1
  285. package/dist/esm/db-drawer.entry.js +18 -10
  286. package/dist/esm/db-drawer.entry.js.map +1 -1
  287. package/dist/esm/db-header.entry.js +21 -13
  288. package/dist/esm/db-header.entry.js.map +1 -1
  289. package/dist/esm/db-icon.entry.js +3 -2
  290. package/dist/esm/db-icon.entry.js.map +1 -1
  291. package/dist/esm/db-infotext.entry.js +3 -2
  292. package/dist/esm/db-infotext.entry.js.map +1 -1
  293. package/dist/esm/db-input.entry.js +35 -20
  294. package/dist/esm/db-input.entry.js.map +1 -1
  295. package/dist/esm/db-link.entry.js +4 -3
  296. package/dist/esm/db-link.entry.js.map +1 -1
  297. package/dist/esm/db-navigation-item.entry.js +36 -12
  298. package/dist/esm/db-navigation-item.entry.js.map +1 -1
  299. package/dist/esm/db-navigation.entry.js +4 -3
  300. package/dist/esm/db-navigation.entry.js.map +1 -1
  301. package/dist/esm/db-notification.entry.js +5 -4
  302. package/dist/esm/db-notification.entry.js.map +1 -1
  303. package/dist/esm/db-page.entry.js +5 -4
  304. package/dist/esm/db-page.entry.js.map +1 -1
  305. package/dist/esm/db-popover.entry.js +25 -9
  306. package/dist/esm/db-popover.entry.js.map +1 -1
  307. package/dist/esm/db-radio.entry.js +21 -11
  308. package/dist/esm/db-radio.entry.js.map +1 -1
  309. package/dist/esm/db-section.entry.js +4 -3
  310. package/dist/esm/db-section.entry.js.map +1 -1
  311. package/dist/esm/db-select.entry.js +39 -23
  312. package/dist/esm/db-select.entry.js.map +1 -1
  313. package/dist/esm/db-stack.entry.js +3 -2
  314. package/dist/esm/db-stack.entry.js.map +1 -1
  315. package/dist/esm/db-switch.entry.js +19 -11
  316. package/dist/esm/db-switch.entry.js.map +1 -1
  317. package/dist/esm/db-tab-item.db-tab-list.db-tab-panel.entry.js.map +1 -0
  318. package/dist/esm/db-tab-item_3.entry.js +20 -11
  319. package/dist/esm/db-tab-item_3.entry.js.map +1 -1
  320. package/dist/esm/db-tabs.entry.js +22 -13
  321. package/dist/esm/db-tabs.entry.js.map +1 -1
  322. package/dist/esm/db-tag.entry.js +19 -9
  323. package/dist/esm/db-tag.entry.js.map +1 -1
  324. package/dist/esm/db-textarea.entry.js +34 -19
  325. package/dist/esm/db-textarea.entry.js.map +1 -1
  326. package/dist/esm/db-tooltip.entry.js +20 -11
  327. package/dist/esm/db-tooltip.entry.js.map +1 -1
  328. package/dist/esm/db-ux.js +7 -5
  329. package/dist/esm/db-ux.js.map +1 -1
  330. package/dist/esm/{index-7d31752e.js → index-BJJmGwiD.js} +2 -1
  331. package/dist/esm/index-BJJmGwiD.js.map +1 -0
  332. package/dist/esm/{index-5be50117.js → index-D-D8lQAG.js} +221 -120
  333. package/dist/esm/index-D-D8lQAG.js.map +1 -0
  334. package/dist/esm/index.js +5 -4
  335. package/dist/esm/index.js.map +1 -1
  336. package/dist/esm/loader.js +5 -4
  337. package/dist/esm/loader.js.map +1 -1
  338. package/dist/esm/{navigation-09e3ace3.js → navigation-Dg9V7r8H.js} +3 -2
  339. package/dist/esm/navigation-Dg9V7r8H.js.map +1 -0
  340. package/dist/types/components/accordion/accordion.d.ts +6 -1
  341. package/dist/types/components/badge/badge.d.ts +2 -1
  342. package/dist/types/components/checkbox/checkbox.d.ts +6 -1
  343. package/dist/types/components/drawer/drawer.d.ts +2 -1
  344. package/dist/types/components/header/header.d.ts +2 -1
  345. package/dist/types/components/input/input.d.ts +4 -1
  346. package/dist/types/components/navigation-item/model.d.ts +3 -2
  347. package/dist/types/components/navigation-item/navigation-item.d.ts +6 -1
  348. package/dist/types/components/page/model.d.ts +4 -0
  349. package/dist/types/components/page/page.d.ts +1 -0
  350. package/dist/types/components/popover/popover.d.ts +4 -1
  351. package/dist/types/components/radio/radio.d.ts +2 -1
  352. package/dist/types/components/select/select.d.ts +4 -1
  353. package/dist/types/components/switch/switch.d.ts +2 -1
  354. package/dist/types/components/tab-item/tab-item.d.ts +2 -1
  355. package/dist/types/components/tabs/tabs.d.ts +2 -1
  356. package/dist/types/components/tag/tag.d.ts +2 -1
  357. package/dist/types/components/textarea/textarea.d.ts +4 -1
  358. package/dist/types/components/tooltip/tooltip.d.ts +2 -1
  359. package/dist/types/components.d.ts +2 -0
  360. package/dist/types/shared/model.d.ts +5 -5
  361. package/dist/types/stencil-public-runtime.d.ts +1 -0
  362. package/dist/vscode.html-custom-data.json +19 -14
  363. package/dist/web-types.json +90 -79
  364. package/package.json +5 -5
  365. package/dist/cjs/app-globals-3a1e7e63.js +0 -7
  366. package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
  367. package/dist/cjs/constants-89822e5f.js.map +0 -1
  368. package/dist/cjs/index-3d093f06.js.map +0 -1
  369. package/dist/cjs/index-403366c7.js.map +0 -1
  370. package/dist/cjs/navigation-5586b826.js.map +0 -1
  371. package/dist/db-ux/p-0983e297.entry.js +0 -2
  372. package/dist/db-ux/p-0983e297.entry.js.map +0 -1
  373. package/dist/db-ux/p-0cdf053e.js.map +0 -1
  374. package/dist/db-ux/p-0d08f973.entry.js +0 -2
  375. package/dist/db-ux/p-123cb839.entry.js +0 -2
  376. package/dist/db-ux/p-123cb839.entry.js.map +0 -1
  377. package/dist/db-ux/p-1665a1f6.entry.js +0 -2
  378. package/dist/db-ux/p-1efdd41a.entry.js +0 -2
  379. package/dist/db-ux/p-1efdd41a.entry.js.map +0 -1
  380. package/dist/db-ux/p-1feee149.js +0 -3
  381. package/dist/db-ux/p-1feee149.js.map +0 -1
  382. package/dist/db-ux/p-223b1031.entry.js +0 -2
  383. package/dist/db-ux/p-223b1031.entry.js.map +0 -1
  384. package/dist/db-ux/p-2f695fb2.entry.js +0 -2
  385. package/dist/db-ux/p-300fb4ff.entry.js +0 -2
  386. package/dist/db-ux/p-3958b712.entry.js +0 -2
  387. package/dist/db-ux/p-3958b712.entry.js.map +0 -1
  388. package/dist/db-ux/p-398c72a6.entry.js +0 -2
  389. package/dist/db-ux/p-398c72a6.entry.js.map +0 -1
  390. package/dist/db-ux/p-45bb9feb.js.map +0 -1
  391. package/dist/db-ux/p-5c1b65ac.entry.js +0 -2
  392. package/dist/db-ux/p-69948f78.entry.js +0 -2
  393. package/dist/db-ux/p-69948f78.entry.js.map +0 -1
  394. package/dist/db-ux/p-8d9ef330.entry.js +0 -2
  395. package/dist/db-ux/p-8d9ef330.entry.js.map +0 -1
  396. package/dist/db-ux/p-90caefe4.entry.js +0 -2
  397. package/dist/db-ux/p-90caefe4.entry.js.map +0 -1
  398. package/dist/db-ux/p-95e59a69.entry.js +0 -2
  399. package/dist/db-ux/p-ab783af4.entry.js +0 -2
  400. package/dist/db-ux/p-ab783af4.entry.js.map +0 -1
  401. package/dist/db-ux/p-b0b04684.entry.js +0 -2
  402. package/dist/db-ux/p-b0b04684.entry.js.map +0 -1
  403. package/dist/db-ux/p-b2886d1c.entry.js +0 -2
  404. package/dist/db-ux/p-c367b891.entry.js +0 -2
  405. package/dist/db-ux/p-c367b891.entry.js.map +0 -1
  406. package/dist/db-ux/p-cf22eaea.entry.js +0 -2
  407. package/dist/db-ux/p-e1255160.js +0 -2
  408. package/dist/db-ux/p-e1255160.js.map +0 -1
  409. package/dist/db-ux/p-e1788dce.entry.js +0 -2
  410. package/dist/db-ux/p-e1788dce.entry.js.map +0 -1
  411. package/dist/db-ux/p-e24051a3.entry.js +0 -2
  412. package/dist/db-ux/p-e24051a3.entry.js.map +0 -1
  413. package/dist/db-ux/p-f3251c56.entry.js +0 -2
  414. package/dist/db-ux/p-f3251c56.entry.js.map +0 -1
  415. package/dist/db-ux/p-f78c8591.entry.js +0 -2
  416. package/dist/db-ux/p-f78c8591.entry.js.map +0 -1
  417. package/dist/db-ux/p-fa9a7966.entry.js +0 -2
  418. package/dist/db-ux/p-fa9a7966.entry.js.map +0 -1
  419. package/dist/esm/app-globals-0f993ce5.js +0 -5
  420. package/dist/esm/app-globals-0f993ce5.js.map +0 -1
  421. package/dist/esm/constants-745cf8d7.js.map +0 -1
  422. package/dist/esm/index-5be50117.js.map +0 -1
  423. package/dist/esm/index-7d31752e.js.map +0 -1
  424. package/dist/esm/navigation-09e3ace3.js.map +0 -1
  425. package/dist/loader/package.json +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAMxC,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3E;;;GAGG;AAIH,MAAM,OAAO,MAAM;IAHlB;QAmBU,QAAG,GAAG,OAAO,GAAG,IAAI,EAAE,CAAC;QACvB,UAAK,GAAG,EAAE,CAAC;QACX,gBAAW,GAAG,KAAK,CAAC;QACpB,mBAAc,GAAG,KAAK,CAAC;QACvB,oBAAe,GAAG,KAAK,CAAC;QACxB,oBAAe,GAAG,IAAI,CAAC;KAyPjC;IAvPC,WAAW,CAAC,IAAoC;QAC9C,IAAI,CAAC;YACH,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;YACD,OAAO,IAA0B,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,qBAAqB,CAAC,KAAc;QAClC,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAC1D,IAAI,CAAC,cAAc,GAAG,WAAW,IAAI,KAAK,CAAC,UAAU,GAAG,CAAC,CAAC;QAC1D,IAAI,CA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AAC,IAAI,CAAC;mBAAE,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,CAChD,oBACE,GAAG,EAAE,IAAI,CAAC,IAAI,GAAG,WAAW,GAAG,KAAK,EACpC,OAAO,EAAE,GAAG,CAAC,OAAO,IAEnB,GAAG,CAAC,QAAQ,CACA,CAChB,CAAC,CACO,CACZ,CAAC,CAAC,CAAC,IAAI;YACP,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CACtB,iBACE,KAAK,EAAC,mBAAmB,EACzB,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,eAAe,EACpB,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,IAAI,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,mBAGlB,CACb,CAAC,CAAC,CAAC,IAAI;YACR,8DAAa,CACT,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBSimpleTabProps, DBTabsProps, DBTabsState } from \"./model\";\nimport { cls, uuid } from \"../../utils\";\nimport { DBButton } from \"../button/button\";\nimport { DBTabList } from \"../tab-list/tab-list\";\nimport { DBTabItem } from \"../tab-item/tab-item\";\nimport { DBTabPanel } from \"../tab-panel/tab-panel\";\n\nimport { Component, h, Fragment, Event, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-tabs\",\n})\nexport class DBTabs {\n private _ref!: HTMLDivElement | null;\n @Prop() id: DBTabsProps[\"id\"];\n @Prop() name: DBTabsProps[\"name\"];\n @Prop() arrowScrollDistance: DBTabsProps[\"arrowScrollDistance\"];\n @Prop() orientation: DBTabsProps[\"orientation\"];\n @Prop() behavior: DBTabsProps[\"behavior\"];\n @Prop() initialSelectedMode: DBTabsProps[\"initialSelectedMode\"];\n @Prop() initialSelectedIndex: DBTabsProps[\"initialSelectedIndex\"];\n @Event() onIndexChange: any;\n @Event() onTabSelect: any;\n @Prop({attribute: \"classname\"}) className: DBTabsProps[\"className\"];\n @Prop() alignment: DBTabsProps[\"alignment\"];\n @Prop() width: DBTabsProps[\"width\"];\n @Prop() tabs: DBTabsProps[\"tabs\"];\n\n @State() _id = \"tabs-\" + uuid();\n @State() _name = \"\";\n @State() initialized = false;\n @State() showScrollLeft = false;\n @State() showScrollRight = false;\n @State() scrollContainer = null;\n\n convertTabs(tabs: unknown[] | string | undefined) {\n try {\n if (typeof tabs === \"string\") {\n return JSON.parse(tabs);\n }\n return tabs as DBSimpleTabProps[];\n } catch (error) {\n console.error(error);\n }\n return [];\n }\n evaluateScrollButtons(tList: Element) {\n const needsScroll = tList.scrollWidth > tList.clientWidth;\n this.showScrollLeft = needsScroll && tList.scrollLeft > 1;\n this.showScrollRight =\n needsScroll && tList.scrollLeft < tList.scrollWidth - tList.clientWidth;\n }\n scroll(left?: boolean) {\n let step = this.arrowScrollDistance || 100;\n if (left) {\n step *= -1;\n }\n this.scrollContainer?.scrollBy({\n top: 0,\n left: step,\n behavior: \"smooth\",\n });\n }\n initTabList() {\n if (this._ref) {\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const container: HTMLElement | null =\n tabList.querySelector('[role=\"tablist\"]');\n if (container) {\n container.setAttribute(\n \"aria-orientation\",\n this.orientation || \"horizontal\"\n );\n if (this.behavior === \"arrows\") {\n this.scrollContainer = container;\n this.evaluateScrollButtons(container);\n container.addEventListener(\"scroll\", () => {\n this.evaluateScrollButtons(container);\n });\n }\n }\n }\n }\n }\n initTabs(init?: boolean) {\n if (this._ref) {\n const tabItems = Array.from<Element>(\n this._ref.getElementsByClassName(\"db-tab-item\")\n );\n for (const tabItem of tabItems) {\n const index: number = tabItems.indexOf(tabItem);\n const label = tabItem.querySelector(\"label\");\n const input = tabItem.querySelector(\"input\");\n if (input && label) {\n if (!input.id) {\n const tabId = `${this._name}-tab-${index}`;\n label.setAttribute(\"for\", tabId);\n input.setAttribute(\n \"aria-controls\",\n `${this._name}-tab-panel-${index}`\n );\n input.id = tabId;\n input.setAttribute(\"name\", this._name);\n }\n if (init) {\n // Auto select\n const autoSelect =\n !this.initialSelectedMode || this.initialSelectedMode === \"auto\";\n const shouldAutoSelect =\n (this.initialSelectedIndex == null && index === 0) ||\n this.initialSelectedIndex === index;\n if (autoSelect && shouldAutoSelect) {\n input.click();\n }\n }\n }\n }\n const tabPanels = Array.from<Element>(\n this._ref.querySelectorAll(\n \":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)\"\n )\n );\n for (const panel of tabPanels) {\n if (panel.id) continue;\n const index: number = tabPanels.indexOf(panel);\n panel.id = `${this._name}-tab-panel-${index}`;\n panel.setAttribute(\"aria-labelledby\", `${this._name}-tab-${index}`);\n }\n }\n }\n handleChange(event: any) {\n if (this.onIndexChange && event.target) {\n const list = event.target.closest(\"ul\");\n const listItem =\n // db-tab-item for angular and stencil wrapping elements\n event.target.closest(\"db-tab-item\") ?? event.target.closest(\"li\");\n if (list !== null && listItem !== null) {\n this.onIndexChange.emit(Array.from(list.childNodes).indexOf(listItem));\n }\n }\n if (this.onTabSelect) {\n this.onTabSelect.emit(event);\n }\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tabs\");\n this._id = this.id || this._id;\n this._name = `tabs-${this.name || uuid()}`;\n this.initialized = true;\n }\n\n componentDidUpdate() {\n if (this._ref && this.initialized) {\n this.initTabList();\n this.initTabs(true);\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.removedNodes.length || mutation.addedNodes.length) {\n this.initTabList();\n this.initTabs();\n }\n });\n });\n observer.observe(tabList, {\n childList: true,\n subtree: true,\n });\n }\n this.initialized = false;\n }\n }\n\n render() {\n return (\n <div\n class={cls(\"db-tabs\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-orientation={this.orientation}\n data-scroll-behavior={this.behavior}\n data-alignment={this.alignment ?? \"start\"}\n data-width={this.width ?? \"auto\"}\n onChange={(event) => this.handleChange(event)}\n >\n {this.showScrollLeft ? (\n <db-button\n class=\"tabs-scroll-left\"\n variant=\"ghost\"\n icon=\"chevron_left\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll(true)}\n >\n Scroll left\n </db-button>\n ) : null}\n {this.tabs ? (\n <Fragment>\n <db-tab-list>\n {this.convertTabs(this.tabs)?.map((tab, index) => (\n <db-tab-item\n key={this.name + \"tab-item\" + index}\n active={tab.active}\n label={tab.label}\n iconAfter={tab.iconAfter}\n icon={tab.icon}\n noText={tab.noText}\n ></db-tab-item>\n ))}\n </db-tab-list>\n {this.convertTabs(this.tabs)?.map((tab, index) => (\n <db-tab-panel\n key={this.name + \"tab-panel\" + index}\n content={tab.content}\n >\n {tab.children}\n </db-tab-panel>\n ))}\n </Fragment>\n ) : null}\n {this.showScrollRight ? (\n <db-button\n class=\"tabs-scroll-right\"\n variant=\"ghost\"\n icon=\"chevron_right\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll()}\n >\n Scroll right\n </db-button>\n ) : null}\n <slot></slot>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"tabs.js","sourceRoot":"","sources":["../../../src/components/tabs/tabs.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAMxC,OAAO,EACL,SAAS,EACT,CAAC,EACD,QAAQ,EACR,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,MAAM;IAHlB;QAmBU,QAAG,GAAG,OAAO,GAAG,IAAI,EAAE,CAAC;QACvB,UAAK,GAAG,EAAE,CAAC;QACX,gBAAW,GAAG,KAAK,CAAC;QACpB,mBAAc,GAAG,KAAK,CAAC;QACvB,oBAAe,GAAG,KAAK,CAAC;QACxB,oBAAe,GAAG,IAAI,CAAC;KAgQjC;IA9PC,WAAW,CAAC,IAAoC;QAC9C,IAAI,CAAC;YACH,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;gBAC7B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;YACD,OAAO,IAA0B,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBSimpleTabProps, DBTabsProps, DBTabsState } from \"./model\";\nimport { cls, uuid } from \"../../utils\";\nimport { DBButton } from \"../button/button\";\nimport { DBTabList } from \"../tab-list/tab-list\";\nimport { DBTabItem } from \"../tab-item/tab-item\";\nimport { DBTabPanel } from \"../tab-panel/tab-panel\";\n\nimport {\n Component,\n h,\n Fragment,\n Watch,\n Event,\n Prop,\n State,\n} from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-tabs\",\n})\nexport class DBTabs {\n private _ref!: HTMLDivElement | null;\n @Prop() id: DBTabsProps[\"id\"];\n @Prop() name: DBTabsProps[\"name\"];\n @Prop() arrowScrollDistance: DBTabsProps[\"arrowScrollDistance\"];\n @Prop() orientation: DBTabsProps[\"orientation\"];\n @Prop() behavior: DBTabsProps[\"behavior\"];\n @Prop() initialSelectedMode: DBTabsProps[\"initialSelectedMode\"];\n @Prop() initialSelectedIndex: DBTabsProps[\"initialSelectedIndex\"];\n @Event() onIndexChange: any;\n @Event() onTabSelect: any;\n @Prop({attribute: \"classname\"}) className: DBTabsProps[\"className\"];\n @Prop() alignment: DBTabsProps[\"alignment\"];\n @Prop() width: DBTabsProps[\"width\"];\n @Prop() tabs: DBTabsProps[\"tabs\"];\n\n @State() _id = \"tabs-\" + uuid();\n @State() _name = \"\";\n @State() initialized = false;\n @State() showScrollLeft = false;\n @State() showScrollRight = false;\n @State() scrollContainer = null;\n\n convertTabs(tabs: unknown[] | string | undefined) {\n try {\n if (typeof tabs === \"string\") {\n return JSON.parse(tabs);\n }\n return tabs as DBSimpleTabProps[];\n } catch (error) {\n console.error(error);\n }\n return [];\n }\n evaluateScrollButtons(tList: Element) {\n const needsScroll = tList.scrollWidth > tList.clientWidth;\n this.showScrollLeft = needsScroll && tList.scrollLeft > 1;\n this.showScrollRight =\n needsScroll && tList.scrollLeft < tList.scrollWidth - tList.clientWidth;\n }\n scroll(left?: boolean) {\n let step = this.arrowScrollDistance || 100;\n if (left) {\n step *= -1;\n }\n this.scrollContainer?.scrollBy({\n top: 0,\n left: step,\n behavior: \"smooth\",\n });\n }\n initTabList() {\n if (this._ref) {\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const container: HTMLElement | null =\n tabList.querySelector('[role=\"tablist\"]');\n if (container) {\n container.setAttribute(\n \"aria-orientation\",\n this.orientation || \"horizontal\"\n );\n if (this.behavior === \"arrows\") {\n this.scrollContainer = container;\n this.evaluateScrollButtons(container);\n container.addEventListener(\"scroll\", () => {\n this.evaluateScrollButtons(container);\n });\n }\n }\n }\n }\n }\n initTabs(init?: boolean) {\n if (this._ref) {\n const tabItems = Array.from<Element>(\n this._ref.getElementsByClassName(\"db-tab-item\")\n );\n for (const tabItem of tabItems) {\n const index: number = tabItems.indexOf(tabItem);\n const label = tabItem.querySelector(\"label\");\n const input = tabItem.querySelector(\"input\");\n if (input && label) {\n if (!input.id) {\n const tabId = `${this._name}-tab-${index}`;\n label.setAttribute(\"for\", tabId);\n input.setAttribute(\n \"aria-controls\",\n `${this._name}-tab-panel-${index}`\n );\n input.id = tabId;\n input.setAttribute(\"name\", this._name);\n }\n if (init) {\n // Auto select\n const autoSelect =\n !this.initialSelectedMode || this.initialSelectedMode === \"auto\";\n const shouldAutoSelect =\n (this.initialSelectedIndex == null && index === 0) ||\n this.initialSelectedIndex === index;\n if (autoSelect && shouldAutoSelect) {\n input.click();\n }\n }\n }\n }\n const tabPanels = Array.from<Element>(\n this._ref.querySelectorAll(\n \":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)\"\n )\n );\n for (const panel of tabPanels) {\n if (panel.id) continue;\n const index: number = tabPanels.indexOf(panel);\n panel.id = `${this._name}-tab-panel-${index}`;\n panel.setAttribute(\"aria-labelledby\", `${this._name}-tab-${index}`);\n }\n }\n }\n handleChange(event: any) {\n if (this.onIndexChange && event.target) {\n const list = event.target.closest(\"ul\");\n const listItem =\n // db-tab-item for angular and stencil wrapping elements\n event.target.closest(\"db-tab-item\") ?? event.target.closest(\"li\");\n if (list !== null && listItem !== null) {\n this.onIndexChange.emit(Array.from(list.childNodes).indexOf(listItem));\n }\n }\n if (this.onTabSelect) {\n this.onTabSelect.emit(event);\n }\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n watch0Fn() {\n if (this._ref && this.initialized) {\n this.initTabList();\n this.initTabs(true);\n const tabList = this._ref.querySelector(\".db-tab-list\");\n if (tabList) {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.removedNodes.length || mutation.addedNodes.length) {\n this.initTabList();\n this.initTabs();\n }\n });\n });\n observer.observe(tabList, {\n childList: true,\n subtree: true,\n });\n }\n this.initialized = false;\n }\n }\n\n @Watch(\"_ref\")\n @Watch(\"initialized\")\n watch0() {\n this.watch0Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tabs\");\n this._id = this.id || this._id;\n this._name = `tabs-${this.name || uuid()}`;\n this.initialized = true;\n this.watch0Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-tabs\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-orientation={this.orientation}\n data-scroll-behavior={this.behavior}\n data-alignment={this.alignment ?? \"start\"}\n data-width={this.width ?? \"auto\"}\n onChange={(event) => this.handleChange(event)}\n >\n {this.showScrollLeft ? (\n <db-button\n class=\"tabs-scroll-left\"\n variant=\"ghost\"\n icon=\"chevron_left\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll(true)}\n >\n Scroll left\n </db-button>\n ) : null}\n {this.tabs ? (\n <Fragment>\n <db-tab-list>\n {this.convertTabs(this.tabs)?.map((tab, index) => (\n <db-tab-item\n key={this.name + \"tab-item\" + index}\n active={tab.active}\n label={tab.label}\n iconAfter={tab.iconAfter}\n icon={tab.icon}\n noText={tab.noText}\n ></db-tab-item>\n ))}\n </db-tab-list>\n {this.convertTabs(this.tabs)?.map((tab, index) => (\n <db-tab-panel\n key={this.name + \"tab-panel\" + index}\n content={tab.content}\n >\n {tab.children}\n </db-tab-panel>\n ))}\n </Fragment>\n ) : null}\n {this.showScrollRight ? (\n <db-button\n class=\"tabs-scroll-right\"\n variant=\"ghost\"\n icon=\"chevron_right\"\n type=\"button\"\n noText={true}\n onClick={() => this.scroll()}\n >\n Scroll right\n </db-button>\n ) : null}\n <slot></slot>\n </div>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/tag/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,eAAe,GAAI,CAAC,QAAQ,EAAE,WAAW,CAAW,CAAC","sourcesContent":["import { ContentSlotProps, GlobalProps, GlobalState, IconProps, InitializedState, OverflowProps, SemanticProps, ShowIconProps, TagEmphasisProps } from '../../shared/model';\nexport const TagBehaviorList = (['static', 'removable'] as const);\nexport type TagBehaviorType = (typeof TagBehaviorList)[number];\nexport type DBTagDefaultProps = {\n /**\n *\tDefines the behavior of the component:\n *\t- static: default behavior without remove button\n * - removable: add a remove button at the end of the tag\n */\n behavior?: TagBehaviorType | string;\n\n /**\n * @deprecated Disable tag\n */\n disabled?: boolean;\n /**\n * Define the text next to the icon specified via the icon Property to get hidden.\n */\n noText?: boolean;\n /**\n * If \"removeButton\" attribute is set this function will be called when user clicks cancel button inside the tag.\n */\n onRemove?: () => void;\n /**\n * The removeButton attribute shows the cancel button.\n */\n removeButton?: string;\n /**\n * Enable/Disable icon for checkbox/radio inside tag.\n */\n showCheckState?: boolean;\n /**\n * Alternative for children to set content as property.\n */\n text?: string;\n\n /**\n * If \"interactive\" is set to true, you can pass a value to the underlying checkbox or radio input.\n */\n value?: string;\n};\nexport type DBTagProps = DBTagDefaultProps & GlobalProps & IconProps & SemanticProps & OverflowProps & TagEmphasisProps & ShowIconProps & ContentSlotProps;\nexport type DBTagDefaultState = {\n getRemoveButtonText: () => string;\n handleRemove: () => void;\n};\nexport type DBTagState = DBTagDefaultState & GlobalState & InitializedState"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/tag/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAU,CAAC","sourcesContent":["import { ContentSlotProps, GlobalProps, GlobalState, IconProps, InitializedState, OverflowProps, SemanticProps, ShowIconProps, TagEmphasisProps } from '../../shared/model';\nexport const TagBehaviorList = ['static', 'removable'] as const;\nexport type TagBehaviorType = (typeof TagBehaviorList)[number];\nexport type DBTagDefaultProps = {\n /**\n *\tDefines the behavior of the component:\n *\t- static: default behavior without remove button\n * - removable: add a remove button at the end of the tag\n */\n behavior?: TagBehaviorType | string;\n\n /**\n * @deprecated Disable tag\n */\n disabled?: boolean;\n /**\n * Define the text next to the icon specified via the icon Property to get hidden.\n */\n noText?: boolean;\n /**\n * If \"removeButton\" attribute is set this function will be called when user clicks cancel button inside the tag.\n */\n onRemove?: () => void;\n /**\n * The removeButton attribute shows the cancel button.\n */\n removeButton?: string;\n /**\n * Enable/Disable icon for checkbox/radio inside tag.\n */\n showCheckState?: boolean;\n /**\n * Alternative for children to set content as property.\n */\n text?: string;\n\n /**\n * If \"interactive\" is set to true, you can pass a value to the underlying checkbox or radio input.\n */\n value?: string;\n};\nexport type DBTagProps = DBTagDefaultProps & GlobalProps & IconProps & SemanticProps & OverflowProps & TagEmphasisProps & ShowIconProps & ContentSlotProps;\nexport type DBTagDefaultState = {\n getRemoveButtonText: () => string;\n handleRemove: () => void;\n};\nexport type DBTagState = DBTagDefaultState & GlobalState & InitializedState"]}
@@ -1,5 +1,5 @@
1
1
  import { cls, getBooleanAsString, getHideProp } from "../../utils";
2
- import { h } from "@stencil/core";
2
+ import { h, } from "@stencil/core";
3
3
  /**
4
4
  * @slot children - This is a default/unnamed slot
5
5
  * @slot content - TODO: Add description for slotContent
@@ -52,10 +52,7 @@ export class DBTag {
52
52
  }
53
53
  }
54
54
  }
55
- componentDidLoad() {
56
- this.enableAttributePassing(this._ref, "db-tag");
57
- }
58
- componentDidUpdate() {
55
+ watch0Fn() {
59
56
  var _a, _b;
60
57
  if (this.initialized && this._ref && this.disabled !== undefined) {
61
58
  const button = (_a = this._ref) === null || _a === void 0 ? void 0 : _a.querySelector("button:not(.db-tab-remove-button)");
@@ -67,11 +64,18 @@ export class DBTag {
67
64
  }
68
65
  }
69
66
  }
67
+ watch0() {
68
+ this.watch0Fn();
69
+ }
70
+ componentDidLoad() {
71
+ this.enableAttributePassing(this._ref, "db-tag");
72
+ this.watch0Fn();
73
+ }
70
74
  render() {
71
75
  var _a;
72
- return (h("div", { key: 'e6f18da64641446432bbce41af6471d9bb752ec7', class: cls("db-tag", this.className), ref: (el) => {
76
+ return (h("div", { key: '4a5a3df5d160e2111aec79a4294dd4b7bab93bea', class: cls("db-tag", this.className), ref: (el) => {
73
77
  this._ref = el;
74
- }, id: this.id, "data-disabled": getBooleanAsString(this.disabled), "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": getBooleanAsString((_a = this.showCheckState) !== null && _a !== void 0 ? _a : true), "data-hide-icon": getHideProp(this.showIcon), "data-no-text": getBooleanAsString(this.noText), "data-overflow": getBooleanAsString(this.overflow) }, h("slot", { key: 'eae0086cdb3d8b98c1656f6f55fbfa0e96621775', name: "content" }), h("slot", { key: '02475fab45bbab8604543163eec85e6e370e122a' }), this.text ? this.text : null, this.behavior === "removable" ? (h("button", { class: "db-button db-tab-remove-button", "data-icon": "cross", "data-size": "small", "data-no-text": "true", "data-variant": "ghost", onClick: () => this.handleRemove(), title: this.getRemoveButtonText() }, this.getRemoveButtonText())) : null));
78
+ }, id: this.id, "data-disabled": getBooleanAsString(this.disabled), "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": getBooleanAsString((_a = this.showCheckState) !== null && _a !== void 0 ? _a : true), "data-hide-icon": getHideProp(this.showIcon), "data-no-text": getBooleanAsString(this.noText), "data-overflow": getBooleanAsString(this.overflow) }, h("slot", { key: '61f0ecf8f1026f67ddc712eae2aacaeda15f0eec', name: "content" }), h("slot", { key: 'c51fefea79e202c87af9e37a34493adc14571ede' }), this.text ? this.text : null, this.behavior === "removable" ? (h("button", { class: "db-button db-tab-remove-button", "data-icon": "cross", "data-size": "small", "data-no-text": "true", "data-variant": "ghost", onClick: () => this.handleRemove(), title: this.getRemoveButtonText() }, this.getRemoveButtonText())) : null));
75
79
  }
76
80
  static get is() { return "db-tag"; }
77
81
  static get properties() {
@@ -426,5 +430,17 @@ export class DBTag {
426
430
  }
427
431
  }];
428
432
  }
433
+ static get watchers() {
434
+ return [{
435
+ "propName": "initialized",
436
+ "methodName": "watch0"
437
+ }, {
438
+ "propName": "disabled",
439
+ "methodName": "watch0"
440
+ }, {
441
+ "propName": "_ref",
442
+ "methodName": "watch0"
443
+ }];
444
+ }
429
445
  }
430
446
  //# sourceMappingURL=tag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tag.js","sourceRoot":"","sources":["../../../src/components/tag/tag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,SAAS,EAAE,CAAC,EAAY,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3E;;;GAGG;AAIH,MAAM,OAAO,KAAK;IAHjB;QAoBU,gBAAW,GAAG,KAAK,CAAC;KA8G9B;IA5GC,YAAY;QACV,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;IACD,mBAAmB;QACjB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;QAED,6IAA6I;QAC7I,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACK,sBAAsB,CAC5B,OAA2B,EAC3B,qBAA6B;QAE7B,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACvD,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;YACtB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAChC,IACE,IAAI;oBACJ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EA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EAAE,CACpB,CACV,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBTagProps, DBTagState } from \"./model\";\nimport { cls, getBooleanAsString, getHideProp } from \"../../utils\";\n\nimport { Component, h, Fragment, Event, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n * @slot content - TODO: Add description for slotContent\n */\n @Component({\n tag: \"db-tag\",\n})\nexport class DBTag {\n private _ref!: HTMLDivElement | null;\n @Prop() disabled: DBTagProps[\"disabled\"];\n @Event() onRemove: any;\n @Prop() removeButton: DBTagProps[\"removeButton\"];\n @Prop() id: DBTagProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBTagProps[\"className\"];\n @Prop() semantic: DBTagProps[\"semantic\"];\n @Prop() emphasis: DBTagProps[\"emphasis\"];\n @Prop() icon: DBTagProps[\"icon\"];\n @Prop() showCheckState: DBTagProps[\"showCheckState\"];\n @Prop() showIcon: DBTagProps[\"showIcon\"];\n @Prop() noText: DBTagProps[\"noText\"];\n @Prop() overflow: DBTagProps[\"overflow\"];\n\n @Prop() text: DBTagProps[\"text\"];\n @Prop() behavior: DBTagProps[\"behavior\"];\n @State() initialized = false;\n\n handleRemove() {\n if (this.onRemove) {\n this.onRemove.emit();\n }\n }\n getRemoveButtonText() {\n if (this.removeButton) {\n return this.removeButton;\n }\n\n // TODO: We should think this through again, if we would really like to have default and especially english, instead of german labels in here\n return \"Remove tag\";\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tag\");\n }\n\n componentDidUpdate() {\n if (this.initialized && this._ref && this.disabled !== undefined) {\n const button: HTMLButtonElement | null = this._ref?.querySelector(\n \"button:not(.db-tab-remove-button)\"\n );\n const input: HTMLInputElement | null = this._ref?.querySelector(\"input\");\n for (const element of [button, input]) {\n if (element) {\n element.disabled = this.disabled;\n }\n }\n }\n }\n\n render() {\n return (\n <div\n class={cls(\"db-tag\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this.id}\n data-disabled={getBooleanAsString(this.disabled)}\n data-semantic={this.semantic}\n data-emphasis={this.emphasis}\n data-icon={this.icon}\n data-show-check-state={getBooleanAsString(this.showCheckState ?? true)}\n data-hide-icon={getHideProp(this.showIcon)}\n data-no-text={getBooleanAsString(this.noText)}\n data-overflow={getBooleanAsString(this.overflow)}\n >\n <slot name=\"content\"></slot>\n <slot></slot>\n {this.text ? this.text : null}\n {this.behavior === \"removable\" ? (\n <button\n class=\"db-button db-tab-remove-button\"\n data-icon=\"cross\"\n data-size=\"small\"\n data-no-text=\"true\"\n data-variant=\"ghost\"\n onClick={() => this.handleRemove()}\n title={this.getRemoveButtonText()}\n >\n {this.getRemoveButtonText()}\n </button>\n ) : null}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"tag.js","sourceRoot":"","sources":["../../../src/components/tag/tag.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,KAAK;IAHjB;QAoBU,gBAAW,GAAG,KAAK,CAAC;KAuH9B;IArHC,YAAY;QACV,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;IACD,mBAAmB;QACjB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC,YAAY,CAAC;QAC3B,CAAC;QAED,6IAA6I;QAC7I,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;;;OAIG;IACK,sBAAsB,CAC5B,OAA2B,EAC3B,qBAA6B;QAE7B,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACvD,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;YACtB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAA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Z,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;YAC5B,IAAI,CAAC,QAAQ,KAAK,WAAW,CAAC,CAAC,CAAC,CAC/B,cACE,KAAK,EAAC,gCAAgC,eAC5B,OAAO,eACP,OAAO,kBACJ,MAAM,kBACN,OAAO,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,YAAY,EAAE,EAClC,KAAK,EAAE,IAAI,CAAC,mBAAmB,EAAE,IAEhC,IAAI,CAAC,mBAAmB,EAAE,CACpB,CACV,CAAC,CAAC,CAAC,IAAI,CACJ,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBTagProps, DBTagState } from \"./model\";\nimport { cls, getBooleanAsString, getHideProp } from \"../../utils\";\n\nimport {\n Component,\n h,\n Fragment,\n Watch,\n Event,\n Prop,\n State,\n} from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n * @slot content - TODO: Add description for slotContent\n */\n @Component({\n tag: \"db-tag\",\n})\nexport class DBTag {\n private _ref!: HTMLDivElement | null;\n @Prop() disabled: DBTagProps[\"disabled\"];\n @Event() onRemove: any;\n @Prop() removeButton: DBTagProps[\"removeButton\"];\n @Prop() id: DBTagProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBTagProps[\"className\"];\n @Prop() semantic: DBTagProps[\"semantic\"];\n @Prop() emphasis: DBTagProps[\"emphasis\"];\n @Prop() icon: DBTagProps[\"icon\"];\n @Prop() showCheckState: DBTagProps[\"showCheckState\"];\n @Prop() showIcon: DBTagProps[\"showIcon\"];\n @Prop() noText: DBTagProps[\"noText\"];\n @Prop() overflow: DBTagProps[\"overflow\"];\n\n @Prop() text: DBTagProps[\"text\"];\n @Prop() behavior: DBTagProps[\"behavior\"];\n @State() initialized = false;\n\n handleRemove() {\n if (this.onRemove) {\n this.onRemove.emit();\n }\n }\n getRemoveButtonText() {\n if (this.removeButton) {\n return this.removeButton;\n }\n\n // TODO: We should think this through again, if we would really like to have default and especially english, instead of german labels in here\n return \"Remove tag\";\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n watch0Fn() {\n if (this.initialized && this._ref && this.disabled !== undefined) {\n const button: HTMLButtonElement | null = this._ref?.querySelector(\n \"button:not(.db-tab-remove-button)\"\n );\n const input: HTMLInputElement | null = this._ref?.querySelector(\"input\");\n for (const element of [button, input]) {\n if (element) {\n element.disabled = this.disabled;\n }\n }\n }\n }\n\n @Watch(\"initialized\")\n @Watch(\"disabled\")\n @Watch(\"_ref\")\n watch0() {\n this.watch0Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tag\");\n\n this.watch0Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-tag\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this.id}\n data-disabled={getBooleanAsString(this.disabled)}\n data-semantic={this.semantic}\n data-emphasis={this.emphasis}\n data-icon={this.icon}\n data-show-check-state={getBooleanAsString(this.showCheckState ?? true)}\n data-hide-icon={getHideProp(this.showIcon)}\n data-no-text={getBooleanAsString(this.noText)}\n data-overflow={getBooleanAsString(this.overflow)}\n >\n <slot name=\"content\"></slot>\n <slot></slot>\n {this.text ? this.text : null}\n {this.behavior === \"removable\" ? (\n <button\n class=\"db-button db-tab-remove-button\"\n data-icon=\"cross\"\n data-size=\"small\"\n data-no-text=\"true\"\n data-variant=\"ghost\"\n onClick={() => this.handleRemove()}\n title={this.getRemoveButtonText()}\n >\n {this.getRemoveButtonText()}\n </button>\n ) : null}\n </div>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/textarea/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,kBAAkB,GAAI,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAW,CAAC;AAExF,MAAM,CAAC,MAAM,gBAAgB,GAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAW,CAAC","sourcesContent":["import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormState, FormTextProps, GlobalProps, GlobalState, InputEventProps, InputEventState } from '../../shared/model';\nexport const TextareaResizeList = (['none', 'both', 'horizontal', 'vertical'] as const);\nexport type TextareaResizeType = (typeof TextareaResizeList)[number];\nexport const TextareaWrapList = (['hard', 'soft', 'off'] as const);\nexport type TextareaWrapType = (typeof TextareaWrapList)[number];\nexport type DBTextareaDefaultProps = {\n /**\n * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer\n */\n cols?: number;\n /**\n * In most browsers, textareas are resizable — you'll notice the drag handle in the right-hand corner, you can control it with this\n */\n resize?: TextareaResizeType;\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer\n */\n rows?: number;\n /**\n * Specifies whether the textarea is subject to spell checking by the underlying browser/OS\n */\n spellCheck?: boolean;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n */\n wrap?: TextareaWrapType;\n};\nexport type DBTextareaProps = DBTextareaDefaultProps & ChangeEventProps<HTMLTextAreaElement> & InputEventProps<HTMLTextAreaElement> & FocusEventProps<HTMLTextAreaElement> & FormProps & GlobalProps & FormTextProps & FormMessageProps;\nexport type DBTextareaDefaultState = {};\nexport type DBTextareaState = DBTextareaDefaultState & ChangeEventState<HTMLTextAreaElement> & InputEventState<HTMLTextAreaElement> & FocusEventState<HTMLTextAreaElement> & FormState & GlobalState"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/textarea/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAU,CAAC;AAEtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormState, FormTextProps, GlobalProps, GlobalState, InputEventProps, InputEventState } from '../../shared/model';\nexport const TextareaResizeList = ['none', 'both', 'horizontal', 'vertical'] as const;\nexport type TextareaResizeType = (typeof TextareaResizeList)[number];\nexport const TextareaWrapList = ['hard', 'soft', 'off'] as const;\nexport type TextareaWrapType = (typeof TextareaWrapList)[number];\nexport type DBTextareaDefaultProps = {\n /**\n * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer\n */\n cols?: number;\n /**\n * In most browsers, textareas are resizable — you'll notice the drag handle in the right-hand corner, you can control it with this\n */\n resize?: TextareaResizeType;\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer\n */\n rows?: number;\n /**\n * Specifies whether the textarea is subject to spell checking by the underlying browser/OS\n */\n spellCheck?: boolean;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n */\n wrap?: TextareaWrapType;\n};\nexport type DBTextareaProps = DBTextareaDefaultProps & ChangeEventProps<HTMLTextAreaElement> & InputEventProps<HTMLTextAreaElement> & FocusEventProps<HTMLTextAreaElement> & FormProps & GlobalProps & FormTextProps & FormMessageProps;\nexport type DBTextareaDefaultState = {};\nexport type DBTextareaState = DBTextareaDefaultState & ChangeEventState<HTMLTextAreaElement> & InputEventState<HTMLTextAreaElement> & FocusEventState<HTMLTextAreaElement> & FormState & GlobalState"]}
@@ -1,6 +1,6 @@
1
1
  import { cls, delay, getHideProp, hasVoiceOver, stringPropVisible, uuid, } from "../../utils";
2
2
  import { DEFAULT_INVALID_MESSAGE, DEFAULT_INVALID_MESSAGE_ID_SUFFIX, DEFAULT_LABEL, DEFAULT_MESSAGE_ID_SUFFIX, DEFAULT_PLACEHOLDER, DEFAULT_ROWS, DEFAULT_VALID_MESSAGE, DEFAULT_VALID_MESSAGE_ID_SUFFIX, } from "../../shared/constants";
3
- import { h } from "@stencil/core";
3
+ import { h, } from "@stencil/core";
4
4
  /**
5
5
  * @slot children - This is a default/unnamed slot
6
6
 
@@ -104,16 +104,7 @@ export class DBTextarea {
104
104
  }
105
105
  }
106
106
  }
107
- componentDidLoad() {
108
- var _a;
109
- this.enableAttributePassing(this._ref, "db-textarea");
110
- const mId = (_a = this.id) !== null && _a !== void 0 ? _a : `textarea-${uuid()}`;
111
- this._id = mId;
112
- this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
113
- this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
114
- this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
115
- }
116
- componentDidUpdate() {
107
+ watch0Fn() {
117
108
  if (this._id) {
118
109
  const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;
119
110
  this._messageId = messageId;
@@ -123,13 +114,32 @@ export class DBTextarea {
123
114
  this._descByIds = messageId;
124
115
  }
125
116
  }
117
+ }
118
+ watch0() {
119
+ this.watch0Fn();
120
+ }
121
+ watch1Fn() {
126
122
  this._value = this.value;
127
123
  }
124
+ watch1() {
125
+ this.watch1Fn();
126
+ }
127
+ componentDidLoad() {
128
+ var _a;
129
+ this.enableAttributePassing(this._ref, "db-textarea");
130
+ const mId = (_a = this.id) !== null && _a !== void 0 ? _a : `textarea-${uuid()}`;
131
+ this._id = mId;
132
+ this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
133
+ this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
134
+ this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
135
+ this.watch0Fn();
136
+ this.watch1Fn();
137
+ }
128
138
  render() {
129
139
  var _a, _b, _c, _d, _e, _f, _g, _h;
130
- return (h("div", { key: '00e7421cc95291ae0b42e710f7e0dab15abf83f4', class: cls("db-textarea", this.className), "data-variant": this.variant, "data-hide-label": getHideProp(this.showLabel) }, h("label", { key: '038acbf2c0f722961956c4ab35f5ea05aece9f1d', htmlFor: this._id }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL), h("textarea", { key: 'a4cd136c1b4067bbd057c0e1460894c69f398fff', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
140
+ return (h("div", { key: 'e4ef4e666ccb942a36d351bc222778301f19d683', class: cls("db-textarea", this.className), "data-variant": this.variant, "data-hide-label": getHideProp(this.showLabel) }, h("label", { key: 'f6789ed822b101611cc4faa8ab80811f5a28dac1', htmlFor: this._id }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL), h("textarea", { key: '765275e4d10aa51e836709ad88eb4797387f2d90', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
131
141
  this._ref = el;
132
- }, id: this._id, "data-resize": this.resize, disabled: this.disabled, required: this.required, readOnly: this.readOnly, form: this.form, maxLength: this.maxLength, minLength: this.minLength, name: this.name, wrap: this.wrap, spellcheck: this.spellCheck, autocomplete: this.autocomplete, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), value: (_b = this.value) !== null && _b !== void 0 ? _b : this._value, "aria-describedby": this._descByIds, placeholder: (_c = this.placeholder) !== null && _c !== void 0 ? _c : DEFAULT_PLACEHOLDER, rows: (_d = this.rows) !== null && _d !== void 0 ? _d : DEFAULT_ROWS, cols: this.cols }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, h("db-infotext", { key: 'cd978d641857528de8f5b45e5c835a5e5e40d2f6', size: "small", semantic: "successful", id: this._validMessageId }, (_e = this.validMessage) !== null && _e !== void 0 ? _e : DEFAULT_VALID_MESSAGE), h("db-infotext", { key: '29176035e95cc91274d6ee06384ee4e131af6da3', size: "small", semantic: "critical", id: this._invalidMessageId }, (_h = (_f = this.invalidMessage) !== null && _f !== void 0 ? _f : (_g = this._ref) === null || _g === void 0 ? void 0 : _g.validationMessage) !== null && _h !== void 0 ? _h : DEFAULT_INVALID_MESSAGE), h("span", { key: '42a703d938ea2c635b23372a8dd782a1e1ea34ef', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
142
+ }, id: this._id, "data-resize": this.resize, disabled: this.disabled, required: this.required, readOnly: this.readOnly, form: this.form, maxLength: this.maxLength, minLength: this.minLength, name: this.name, wrap: this.wrap, spellcheck: this.spellCheck, autocomplete: this.autocomplete, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), value: (_b = this.value) !== null && _b !== void 0 ? _b : this._value, "aria-describedby": this._descByIds, placeholder: (_c = this.placeholder) !== null && _c !== void 0 ? _c : DEFAULT_PLACEHOLDER, rows: (_d = this.rows) !== null && _d !== void 0 ? _d : DEFAULT_ROWS, cols: this.cols }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, h("db-infotext", { key: '3bb51e0be90600f665b64caff82e89b5f2adaf07', size: "small", semantic: "successful", id: this._validMessageId }, (_e = this.validMessage) !== null && _e !== void 0 ? _e : DEFAULT_VALID_MESSAGE), h("db-infotext", { key: '7b1a8a41ff41a8fe2a60f00536203ac28a4e10c2', size: "small", semantic: "critical", id: this._invalidMessageId }, (_h = (_f = this.invalidMessage) !== null && _f !== void 0 ? _f : (_g = this._ref) === null || _g === void 0 ? void 0 : _g.validationMessage) !== null && _h !== void 0 ? _h : DEFAULT_INVALID_MESSAGE), h("span", { key: 'ddca5afd8b8555967aabdec9d64240f81ded8de0', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
133
143
  }
134
144
  static get is() { return "db-textarea"; }
135
145
  static get properties() {
@@ -952,5 +962,14 @@ export class DBTextarea {
952
962
  }
953
963
  }];
954
964
  }
965
+ static get watchers() {
966
+ return [{
967
+ "propName": "_id",
968
+ "methodName": "watch0"
969
+ }, {
970
+ "propName": "value",
971
+ "methodName": "watch1"
972
+ }];
973
+ }
955
974
  }
956
975
  //# sourceMappingURL=textarea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,GAAG,EACH,KAAK,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AACr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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBTextareaProps, DBTextareaState } from \"./model\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport {\n cls,\n delay,\n getHideProp,\n hasVoiceOver,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER,\n DEFAULT_ROWS,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport { ChangeEvent, InputEvent, InteractionEvent } from \"../../shared/model\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\n\nimport { Component, h, Fragment, Event, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-textarea\",\n})\nexport class DBTextarea {\n private _ref!: HTMLTextAreaElement | null;\n @Prop() id: DBTextareaProps[\"id\"];\n @Prop() message: DBTextareaProps[\"message\"];\n @Prop() showMessage: DBTextareaProps[\"showMessage\"];\n @Prop() value: DBTextareaProps[\"value\"];\n @Event() onInput: any;\n @Prop() input: DBTextareaProps[\"input\"];\n @Event() onChange: any;\n @Prop() change: DBTextareaProps[\"change\"];\n @Prop() validation: DBTextareaProps[\"validation\"];\n @Prop() invalidMessage: DBTextareaProps[\"invalidMessage\"];\n @Prop() required: DBTextareaProps[\"required\"];\n @Prop() minLength: DBTextareaProps[\"minLength\"];\n @Prop() maxLength: DBTextareaProps[\"maxLength\"];\n @Prop() validMessage: DBTextareaProps[\"validMessage\"];\n @Event() onBlur: any;\n @Prop() blur: DBTextareaProps[\"blur\"];\n @Event() onFocus: any;\n @Prop() focus: DBTextareaProps[\"focus\"];\n @Prop({attribute: \"classname\"}) className: DBTextareaProps[\"className\"];\n @Prop() variant: DBTextareaProps[\"variant\"];\n @Prop() showLabel: DBTextareaProps[\"showLabel\"];\n @Prop() label: DBTextareaProps[\"label\"];\n @Prop() resize: DBTextareaProps[\"resize\"];\n @Prop() disabled: DBTextareaProps[\"disabled\"];\n @Prop() readOnly: DBTextareaProps[\"readOnly\"];\n @Prop() form: DBTextareaProps[\"form\"];\n @Prop() name: DBTextareaProps[\"name\"];\n @Prop() wrap: DBTextareaProps[\"wrap\"];\n @Prop() spellCheck: DBTextareaProps[\"spellCheck\"];\n @Prop() autocomplete: DBTextareaProps[\"autocomplete\"];\n @Prop() placeholder: DBTextareaProps[\"placeholder\"];\n @Prop() rows: DBTextareaProps[\"rows\"];\n @Prop() cols: DBTextareaProps[\"cols\"];\n @Prop() messageIcon: DBTextareaProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _descByIds = \"\";\n @State() _value = \"\";\n @State() _voiceOverFallback = \"\";\n\n handleInput(event: InputEvent<HTMLTextAreaElement>) {\n if (this.onInput) {\n this.onInput.emit(event);\n }\n if (this.input) {\n this.input(event);\n }\n }\n handleChange(event: ChangeEvent<HTMLTextAreaElement>) {\n if (this.onChange) {\n this.onChange.emit(event);\n }\n if (this.change) {\n this.change(event);\n }\n /* For a11y reasons we need to map the correct message with the textarea */\n if (!this._ref?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback =\n this.invalidMessage ??\n this._ref?.validationMessage ??\n DEFAULT_INVALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (\n this.validation === \"valid\" ||\n (this._ref?.validity.valid &&\n (this.required || this.minLength || this.maxLength))\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n } else {\n this._descByIds = \"\";\n }\n }\n handleBlur(event: InteractionEvent<HTMLTextAreaElement>) {\n if (this.onBlur) {\n this.onBlur.emit(event);\n }\n if (this.blur) {\n this.blur(event);\n }\n }\n handleFocus(event: InteractionEvent<HTMLTextAreaElement>) {\n if (this.onFocus) {\n this.onFocus.emit(event);\n }\n if (this.focus) {\n this.focus(event);\n }\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLTextAreaElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-textarea\");\n const mId = this.id ?? `textarea-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n }\n\n componentDidUpdate() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._messageId = messageId;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = messageId;\n }\n }\n this._value = this.value;\n }\n\n render() {\n return (\n <div\n class={cls(\"db-textarea\", this.className)}\n data-variant={this.variant}\n data-hide-label={getHideProp(this.showLabel)}\n >\n <label htmlFor={this._id}>{this.label ?? DEFAULT_LABEL}</label>\n <textarea\n aria-invalid={this.validation === \"invalid\"}\n data-custom-validity={this.validation}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-resize={this.resize}\n disabled={this.disabled}\n required={this.required}\n readOnly={this.readOnly}\n form={this.form}\n maxLength={this.maxLength}\n minLength={this.minLength}\n name={this.name}\n wrap={this.wrap}\n spellcheck={this.spellCheck}\n autocomplete={this.autocomplete}\n onInput={(event) => this.handleInput(event)}\n onChange={(event) => this.handleChange(event)}\n onBlur={(event) => this.handleBlur(event)}\n onFocus={(event) => this.handleFocus(event)}\n value={this.value ?? this._value}\n aria-describedby={this._descByIds}\n placeholder={this.placeholder ?? DEFAULT_PLACEHOLDER}\n rows={this.rows ?? DEFAULT_ROWS}\n cols={this.cols}\n ></textarea>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage ?? DEFAULT_VALID_MESSAGE}\n </db-infotext>\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this.invalidMessage ??\n this._ref?.validationMessage ??\n DEFAULT_INVALID_MESSAGE}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"textarea.js","sourceRoot":"","sources":["../../../src/components/textarea/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,GAAG,EACH,KAAK,EACL,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,yBAAyB,EACzB,mBAAmB,EACnB,YAAY,EACZ,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EACL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBTextareaProps, DBTextareaState } from \"./model\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport {\n cls,\n delay,\n getHideProp,\n hasVoiceOver,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER,\n DEFAULT_ROWS,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport { ChangeEvent, InputEvent, InteractionEvent } from \"../../shared/model\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\n\nimport {\n Component,\n h,\n Fragment,\n Watch,\n Event,\n Prop,\n State,\n} from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-textarea\",\n})\nexport class DBTextarea {\n private _ref!: HTMLTextAreaElement | null;\n @Prop() id: DBTextareaProps[\"id\"];\n @Prop() message: DBTextareaProps[\"message\"];\n @Prop() showMessage: DBTextareaProps[\"showMessage\"];\n @Prop() value: DBTextareaProps[\"value\"];\n @Event() onInput: any;\n @Prop() input: DBTextareaProps[\"input\"];\n @Event() onChange: any;\n @Prop() change: DBTextareaProps[\"change\"];\n @Prop() validation: DBTextareaProps[\"validation\"];\n @Prop() invalidMessage: DBTextareaProps[\"invalidMessage\"];\n @Prop() required: DBTextareaProps[\"required\"];\n @Prop() minLength: DBTextareaProps[\"minLength\"];\n @Prop() maxLength: DBTextareaProps[\"maxLength\"];\n @Prop() validMessage: DBTextareaProps[\"validMessage\"];\n @Event() onBlur: any;\n @Prop() blur: DBTextareaProps[\"blur\"];\n @Event() onFocus: any;\n @Prop() focus: DBTextareaProps[\"focus\"];\n @Prop({attribute: \"classname\"}) className: DBTextareaProps[\"className\"];\n @Prop() variant: DBTextareaProps[\"variant\"];\n @Prop() showLabel: DBTextareaProps[\"showLabel\"];\n @Prop() label: DBTextareaProps[\"label\"];\n @Prop() resize: DBTextareaProps[\"resize\"];\n @Prop() disabled: DBTextareaProps[\"disabled\"];\n @Prop() readOnly: DBTextareaProps[\"readOnly\"];\n @Prop() form: DBTextareaProps[\"form\"];\n @Prop() name: DBTextareaProps[\"name\"];\n @Prop() wrap: DBTextareaProps[\"wrap\"];\n @Prop() spellCheck: DBTextareaProps[\"spellCheck\"];\n @Prop() autocomplete: DBTextareaProps[\"autocomplete\"];\n @Prop() placeholder: DBTextareaProps[\"placeholder\"];\n @Prop() rows: DBTextareaProps[\"rows\"];\n @Prop() cols: DBTextareaProps[\"cols\"];\n @Prop() messageIcon: DBTextareaProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _descByIds = \"\";\n @State() _value = \"\";\n @State() _voiceOverFallback = \"\";\n\n handleInput(event: InputEvent<HTMLTextAreaElement>) {\n if (this.onInput) {\n this.onInput.emit(event);\n }\n if (this.input) {\n this.input(event);\n }\n }\n handleChange(event: ChangeEvent<HTMLTextAreaElement>) {\n if (this.onChange) {\n this.onChange.emit(event);\n }\n if (this.change) {\n this.change(event);\n }\n /* For a11y reasons we need to map the correct message with the textarea */\n if (!this._ref?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback =\n this.invalidMessage ??\n this._ref?.validationMessage ??\n DEFAULT_INVALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (\n this.validation === \"valid\" ||\n (this._ref?.validity.valid &&\n (this.required || this.minLength || this.maxLength))\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n } else {\n this._descByIds = \"\";\n }\n }\n handleBlur(event: InteractionEvent<HTMLTextAreaElement>) {\n if (this.onBlur) {\n this.onBlur.emit(event);\n }\n if (this.blur) {\n this.blur(event);\n }\n }\n handleFocus(event: InteractionEvent<HTMLTextAreaElement>) {\n if (this.onFocus) {\n this.onFocus.emit(event);\n }\n if (this.focus) {\n this.focus(event);\n }\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLTextAreaElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n watch0Fn() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._messageId = messageId;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = messageId;\n }\n }\n }\n\n @Watch(\"_id\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n this._value = this.value;\n }\n\n @Watch(\"value\")\n watch1() {\n this.watch1Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-textarea\");\n const mId = this.id ?? `textarea-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this.watch0Fn();\n this.watch1Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-textarea\", this.className)}\n data-variant={this.variant}\n data-hide-label={getHideProp(this.showLabel)}\n >\n <label htmlFor={this._id}>{this.label ?? DEFAULT_LABEL}</label>\n <textarea\n aria-invalid={this.validation === \"invalid\"}\n data-custom-validity={this.validation}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-resize={this.resize}\n disabled={this.disabled}\n required={this.required}\n readOnly={this.readOnly}\n form={this.form}\n maxLength={this.maxLength}\n minLength={this.minLength}\n name={this.name}\n wrap={this.wrap}\n spellcheck={this.spellCheck}\n autocomplete={this.autocomplete}\n onInput={(event) => this.handleInput(event)}\n onChange={(event) => this.handleChange(event)}\n onBlur={(event) => this.handleBlur(event)}\n onFocus={(event) => this.handleFocus(event)}\n value={this.value ?? this._value}\n aria-describedby={this._descByIds}\n placeholder={this.placeholder ?? DEFAULT_PLACEHOLDER}\n rows={this.rows ?? DEFAULT_ROWS}\n cols={this.cols}\n ></textarea>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage ?? DEFAULT_VALID_MESSAGE}\n </db-infotext>\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this.invalidMessage ??\n this._ref?.validationMessage ??\n DEFAULT_INVALID_MESSAGE}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}
@@ -49,12 +49,7 @@ export class DBTooltip {
49
49
  }
50
50
  }
51
51
  }
52
- componentDidLoad() {
53
- this.enableAttributePassing(this._ref, "db-tooltip");
54
- this._id = this.id || "tooltip-" + uuid();
55
- this.initialized = true;
56
- }
57
- componentDidUpdate() {
52
+ watch0Fn() {
58
53
  if (this._ref && this.initialized && this._id) {
59
54
  let parent = this._ref.parentElement;
60
55
  if (parent && parent.localName.includes("tooltip")) {
@@ -71,11 +66,20 @@ export class DBTooltip {
71
66
  this.initialized = false;
72
67
  }
73
68
  }
69
+ watch0() {
70
+ this.watch0Fn();
71
+ }
72
+ componentDidLoad() {
73
+ this.enableAttributePassing(this._ref, "db-tooltip");
74
+ this._id = this.id || "tooltip-" + uuid();
75
+ this.initialized = true;
76
+ this.watch0Fn();
77
+ }
74
78
  render() {
75
79
  var _a, _b;
76
- return (h("i", { key: '6ffc338ce6bd3a685eeaa74d718377cbcdbcbd61', class: cls("db-tooltip", this.className), role: "tooltip", "aria-hidden": "true", "data-gap": "true", ref: (el) => {
80
+ return (h("i", { key: '515667fd1fe2d97522536c95b0b8ab04ab6d8787', class: cls("db-tooltip", this.className), role: "tooltip", "aria-hidden": "true", "data-gap": "true", ref: (el) => {
77
81
  this._ref = el;
78
- }, id: this._id, "data-emphasis": this.emphasis, "data-animation": getBooleanAsString((_a = this.animation) !== null && _a !== void 0 ? _a : true), "data-delay": this.delay, "data-width": this.width, "data-show-arrow": getBooleanAsString((_b = this.showArrow) !== null && _b !== void 0 ? _b : true), "data-placement": this.placement, onClick: (event) => this.handleClick(event) }, h("slot", { key: '7f70a4a4064efbd8f1df49bcb70e1888cf6188ae' })));
82
+ }, id: this._id, "data-emphasis": this.emphasis, "data-animation": getBooleanAsString((_a = this.animation) !== null && _a !== void 0 ? _a : true), "data-delay": this.delay, "data-width": this.width, "data-show-arrow": getBooleanAsString((_b = this.showArrow) !== null && _b !== void 0 ? _b : true), "data-placement": this.placement, onClick: (event) => this.handleClick(event) }, h("slot", { key: '3adaabba357f9945728c6b8a4bf6b00bfe063a02' })));
79
83
  }
80
84
  static get is() { return "db-tooltip"; }
81
85
  static get properties() {
@@ -288,5 +292,14 @@ export class DBTooltip {
288
292
  "initialized": {}
289
293
  };
290
294
  }
295
+ static get watchers() {
296
+ return [{
297
+ "propName": "_ref",
298
+ "methodName": "watch0"
299
+ }, {
300
+ "propName": "initialized",
301
+ "methodName": "watch0"
302
+ }];
303
+ }
291
304
  }
292
305
  //# sour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,CACX,CACL,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBTooltipProps, DBTooltipState } from \"./model\";\nimport { cls, getBooleanAsString, handleDataOutside, uuid } from \"../../utils\";\nimport { ClickEvent } from \"../../shared/model\";\nimport { DEFAULT_ID } from \"../../shared/constants\";\n\nimport { Component, h, Fragment, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-tooltip\",\n})\nexport class DBTooltip {\n private _ref!: HTMLDivElement | null;\n @Prop() id: DBTooltipProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBTooltipProps[\"className\"];\n @Prop() emphasis: DBTooltipProps[\"emphasis\"];\n @Prop() animation: DBTooltipProps[\"animation\"];\n @Prop() delay: DBTooltipProps[\"delay\"];\n @Prop() width: DBTooltipProps[\"width\"];\n @Prop() showArrow: DBTooltipProps[\"showArrow\"];\n @Prop() placement: DBTooltipProps[\"placement\"];\n\n @State() _id = DEFAULT_ID;\n @State() initialized = false;\n\n handleClick(event: ClickEvent<HTMLElement>) {\n event.stopPropagation();\n }\n handleAutoPlacement() {\n if (this._ref) handleDataOutside(this._ref);\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tooltip\");\n this._id = this.id || \"tooltip-\" + uuid();\n this.initialized = true;\n }\n\n componentDidUpdate() {\n if (this._ref && this.initialized && this._id) {\n let parent = this._ref.parentElement;\n if (parent && parent.localName.includes(\"tooltip\")) {\n // Angular workaround\n parent = parent.parentElement;\n }\n if (parent) {\n [\"mouseenter\", \"focus\"].forEach((event) => {\n parent.addEventListener(event, () => this.handleAutoPlacement());\n });\n parent.setAttribute(\"data-has-tooltip\", \"true\");\n parent.setAttribute(\"aria-describedby\", this._id);\n }\n this.initialized = false;\n }\n }\n\n render() {\n return (\n <i\n class={cls(\"db-tooltip\", this.className)}\n role=\"tooltip\"\n aria-hidden=\"true\"\n data-gap=\"true\"\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-emphasis={this.emphasis}\n data-animation={getBooleanAsString(this.animation ?? true)}\n data-delay={this.delay}\n data-width={this.width}\n data-show-arrow={getBooleanAsString(this.showArrow ?? true)}\n data-placement={this.placement}\n onClick={(event) => this.handleClick(event)}\n >\n <slot></slot>\n </i>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBTooltipProps, DBTooltipState } from \"./model\";\nimport { cls, getBooleanAsString, handleDataOutside, uuid } from \"../../utils\";\nimport { ClickEvent } from \"../../shared/model\";\nimport { DEFAULT_ID } from \"../../shared/constants\";\n\nimport { Component, h, Fragment, Watch, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-tooltip\",\n})\nexport class DBTooltip {\n private _ref!: HTMLDivElement | null;\n @Prop() id: DBTooltipProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBTooltipProps[\"className\"];\n @Prop() emphasis: DBTooltipProps[\"emphasis\"];\n @Prop() animation: DBTooltipProps[\"animation\"];\n @Prop() delay: DBTooltipProps[\"delay\"];\n @Prop() width: DBTooltipProps[\"width\"];\n @Prop() showArrow: DBTooltipProps[\"showArrow\"];\n @Prop() placement: DBTooltipProps[\"placement\"];\n\n @State() _id = DEFAULT_ID;\n @State() initialized = false;\n\n handleClick(event: ClickEvent<HTMLElement>) {\n event.stopPropagation();\n }\n handleAutoPlacement() {\n if (this._ref) handleDataOutside(this._ref);\n }\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n watch0Fn() {\n if (this._ref && this.initialized && this._id) {\n let parent = this._ref.parentElement;\n if (parent && parent.localName.includes(\"tooltip\")) {\n // Angular workaround\n parent = parent.parentElement;\n }\n if (parent) {\n [\"mouseenter\", \"focus\"].forEach((event) => {\n parent.addEventListener(event, () => this.handleAutoPlacement());\n });\n parent.setAttribute(\"data-has-tooltip\", \"true\");\n parent.setAttribute(\"aria-describedby\", this._id);\n }\n this.initialized = false;\n }\n }\n\n @Watch(\"_ref\")\n @Watch(\"initialized\")\n watch0() {\n this.watch0Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-tooltip\");\n this._id = this.id || \"tooltip-\" + uuid();\n this.initialized = true;\n this.watch0Fn();\n }\n\n render() {\n return (\n <i\n class={cls(\"db-tooltip\", this.className)}\n role=\"tooltip\"\n aria-hidden=\"true\"\n data-gap=\"true\"\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-emphasis={this.emphasis}\n data-animation={getBooleanAsString(this.animation ?? true)}\n data-delay={this.delay}\n data-width={this.width}\n data-show-arrow={getBooleanAsString(this.showArrow ?? true)}\n data-placement={this.placement}\n onClick={(event) => this.handleClick(event)}\n >\n <slot></slot>\n </i>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/shared/model.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAsCvD,MAAM,CAAC,MAAM,YAAY,GAAI,CAAC,UAAU,EAAE,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,CAAC,MAAM,sBAAsB,GAAI,CAAC,aAAa,EAAE,4BAA4B,EAAE,QAAQ,EAAE,0BAA0B,EAAE,aAAa,EAAE,eAAe,EAAE,iCAAiC,EAAE,YAAY,CAAW,CAAC;AA6EtN,MAAM,CAAC,MAAM,aAAa,GAAI,CAAC,OAAO,EAAE,QAAQ,CAAW,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { IconTypes } from '@db-ux/core-foundations';\nexport type GlobalProps = {\n /**\n * default slot\n */\n\n children?: any;\n\n /**\n * React specific for adding className to the component.\n */\n className?: string;\n\n /**\n * Workaround for TypeScript using class for all components.\n */\n class?: string | any;\n\n /**\n * [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.\n */\n describedbyid?: string;\n\n /**\n * [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.\n */\n id?: string;\n\n /**\n * Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)\n */\n autofocus?: boolean;\n};\nexport type GlobalState = {\n _id?: string;\n};\nexport const SemanticList = (['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'] as const);\nexport type SemanticType = (typeof SemanticList)[number];\nexport type SemanticProps = {\n /**\n * The semantic defines the default variants for most components.\n */\n semantic?: SemanticType;\n};\nexport type IconProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://db-ux-design-system.github.io/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n icon?: IconTypes;\n};\nexport type ShowIconProps = {\n /**\n * Enables or disables the visibility of the icon. The default value depends on the component.\n * For many components this property is optional to reflect Figma properties.\n */\n showIcon?: boolean;\n};\nexport type IconAfterProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://db-ux-design-system.github.io/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n iconAfter?: IconTypes;\n};\nexport const SpacingList = (['medium', 'small', 'large', 'none'] as const);\nexport type SpacingType = (typeof SpacingList)[number];\nexport type SpacingProps = {\n /**\n * The spacing attribute changes the padding of the component.\n */\n spacing?: SpacingType;\n};\nexport const MarginList = (['medium', 'small', 'large', 'none'] as const);\nexport type MarginType = (typeof MarginList)[number];\nexport type MarginProps = {\n /**\n * The margin attribute changes the margin of the component.\n */\n margin?: MarginType;\n};\nexport const PlacementList = (['left', 'right', 'top', 'bottom', 'left-start', 'left-end', 'right-start', 'right-end', 'top-start', 'top-end', 'bottom-start', 'bottom-end'] as const);\nexport type PlacementType = (typeof PlacementList)[number];\nexport type PlacementProps = {\n /**\n * The `placement` attributes values change the position to absolute and adds a transform based on the placement.\n */\n placement?: PlacementType;\n};\nexport type NavigationBehaviorState = {\n handleNavigationItemClick: (event: unknown) => void;\n};\nexport type GapProps = {\n /**\n * If the absolute element should have a gap between the parent element.\n */\n gap?: boolean;\n};\nexport const GapSpacingList = (['none', '3x-large', '2x-large', 'x-large', 'large', 'medium', 'small', 'x-small', '2x-small', '3x-small'] as const);\nexport type GapSpacingType = (typeof GapSpacingList)[number];\nexport type GapSpacingProps = {\n /**\n * Set the gap/spacing between elements\n */\n gap?: GapSpacingType;\n};\nexport type OverflowProps = {\n /**\n * The overflow attribute sets a max-width and longer text will be dotted.\n */\n overflow?: boolean;\n};\nexport const OrientationList = (['horizontal', 'vertical'] as const);\nexport type OrientationType = (typeof OrientationList)[number];\nexport type OrientationProps = {\n /**\n * Change the orientation. Defaults to horizontal.\n */\n orientation?: OrientationType;\n};\nexport const WidthList = (['full', 'auto'] as const);\nexport type WidthType = (typeof WidthList)[number];\nexport type WidthProps = {\n /**\n * Width of the component. Auto width based on children size, full width based on parent elements width.\n */\n width?: WidthType;\n};\nexport const MaxWidthList = (['full', 'medium', 'large', 'small'] as const);\nexport type MaxWidthType = (typeof MaxWidthList)[number];\nexport type ContainerWidthProps = {\n /**\n * Set max width for the component\n */\n width?: MaxWidthType;\n};\nexport const PopoverDelayList = (['none', 'slow', 'fast'] as const);\nexport type PopoverDelayType = (typeof PopoverDelayList)[number];\nexport const PopoverWidthList = (['auto', 'fixed'] as const);\nexport type PopoverWidthType = (typeof PopoverWidthList)[number];\nexport type PopoverProps = {\n /**\n * Add a delay before showing the tooltip\n */\n delay?: PopoverDelayType;\n /**\n * Disable animation\n */\n animation?: boolean;\n /**\n * Use fixed with for default max-width\n */\n width?: PopoverWidthType;\n};\nexport type PopoverState = {\n handleAutoPlacement: () => void;\n};\nexport type ContentSlotProps = {\n /**\n * Default slot which is used to pass in additional content.\n */\n content?: any;\n};\nexport const SizeList = (['small', 'medium'] as const);\nexport type SizeType = (typeof SizeList)[number];\nexport type SizeProps = {\n /**\n * The size attribute changes the font-size and other related sizes of the component.\n */\n size?: SizeType;\n};\nexport const EmphasisList = (['weak', 'strong'] as const);\nexport type EmphasisType = (typeof EmphasisList)[number];\nexport type EmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak or strong importance.\n */\n emphasis?: EmphasisType;\n};\nexport const TagEmphasisList = ([...EmphasisList, 'origin'] as const);\nexport type TagEmphasisType = (typeof TagEmphasisList)[number];\nexport type TagEmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak, strong or origin appearance.\n */\n emphasis?: TagEmphasisType;\n};\nexport const ValidationList = (['invalid', 'valid', 'no-validation'] as const);\nexport type ValidationType = (typeof ValidationList)[number];\nexport type FormProps = {\n /**\n * Marks an input element as invalid (red) / valid (green) / no-validation (grey). Overwrites the :user-valid selector.\n */\n validation?: ValidationType;\n /**\n * The disabled attribute can be set to keep a user from clicking on the form element.\n */\n disabled?: boolean;\n /**\n * \tAssociates the control with a form element\n */\n form?: string;\n\n /**\n * The label attribute specifies the caption of the form element.\n */\n label?: string;\n\n /**\n * The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.\n */\n name?: string;\n\n /**\n * When the required attribute specified, the user will be required to fill the form element before submitting the form.\n */\n required?: boolean;\n /**\n * Enables/disables the visibility of the label\n */\n showLabel?: boolean;\n /**\n * The value property is to receive results from the native form element.\n */\n value?: any;\n};\nexport type FormTextProps = {\n /**\n * Maximum length (number of characters) of value\n */\n maxLength?: number;\n /**\n * Minimum length (number of characters) of value\n */\n minLength?: number;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readOnly?: boolean;\n};\nexport type FormSizeProps = {\n /**\n * Size of the control\n */\n size?: number;\n};\nexport type FormCheckProps = {\n /**\n * Define the radio or checkbox elements checked state\n */\n checked?: boolean;\n};\nexport const LabelVariantList = (['above', 'floating'] as const);\nexport type LabelVariantType = (typeof LabelVariantList)[number];\nexport const AutoCompleteList = (['off', 'on', 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'email', 'username', 'new-password', 'current-password', 'one-time-code', 'organization-title', 'organization', 'street-address', 'shipping', 'billing', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-extension', 'impp', 'url', 'photo', 'webauthn'] as const);\nexport type AutoCompleteType = (typeof AutoCompleteList)[number];\nexport type FormMessageProps = {\n /**\n * Change the variant of the label to float or hidden\n */\n variant?: LabelVariantType;\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder?: string;\n /**\n * Optional helper message for form components\n */\n message?: string;\n\n /**\n * Helper message for valid form components\n */\n validMessage?: string;\n\n /**\n * Helper message for invalid form components\n */\n invalidMessage?: string;\n\n /**\n * Set/overwrite icon for helper message for form components\n */\n messageIcon?: IconTypes;\n\n /**\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\n */\n autocomplete?: string | AutoCompleteType;\n\n /**\n * Enables or disables the visibility of the message.\n */\n showMessage?: boolean;\n};\nexport type FormState = {\n _messageId?: string;\n _validMessageId?: string;\n _invalidMessageId?: string;\n _descByIds?: string;\n _value?: string;\n\n /**\n * https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html\n * Currently VoiceOver isn't supporting changes from aria-describedby.\n * This is an internal Fallback\n */\n _voiceOverFallback?: string;\n};\nexport type InitializedState = {\n initialized: boolean;\n};\nexport const LinkCurrentList = (['time', 'true', 'false', 'date', 'page', 'step', 'location'] as const);\nexport type LinkCurrentType = (typeof LinkCurrentList)[number];\nexport const LinkTargetList = (['_self', '_blank', '_parent', '_top'] as const);\nexport type LinkTargetType = (typeof LinkTargetList)[number];\nexport const LinkReferrerPolicyList = (['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] as const);\nexport type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];\nexport type LinkProps = {\n /**\n * Sets aria attribute based on [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n current?: boolean | LinkCurrentType;\n /**\n * Disables the link.\n */\n disabled?: boolean;\n /**\n * The [URL that the hyperlink points to](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href).\n */\n href?: string;\n /**\n * Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).\n */\n hreflang?: string;\n /**\n * Sets aria attribute based on [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).\n */\n label?: string;\n /**\n * Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: LinkTargetType;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n rel?: string;\n /**\n * Sets aria role based on [`aria-role`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles).\n */\n role?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n referrerpolicy?: LinkReferrerPolicyType;\n /**\n * Sets aria role based on [`aria-selected`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected).\n */\n selected?: boolean;\n};\nexport type TextProps = {\n /**\n * Alternative for default slot/children.\n */\n text?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type ClickEvent<T> = MouseEvent;\nexport type ClickEventProps<T> = {\n /**\n * React specific onClick to pass to forward ref.\n */\n onClick?: (event: ClickEvent<T>) => void;\n};\nexport type ClickEventState<T> = {\n handleClick: (event: ClickEvent<T>) => void;\n};\nexport type ToggleEventProps = {\n onToggle?: (open: boolean) => void;\n};\nexport type ToggleEventState<T> = {\n toggle: (event?: ClickEvent<T>) => void;\n};\nexport type CloseEventProps = {\n /**\n * Function to handle button click (close).\n */\n onClose?: (event?: any) => void;\n};\nexport type CloseEventState = {\n handleClose: (event: any) => void;\n};\nexport const AlignmentList = (['start', 'center'] as const);\nexport type AlignmentType = (typeof AlignmentList)[number];\nexport type AlignmentProps = {\n /**\n * Define the content alignment in full width\n */\n alignment?: AlignmentType;\n};\nexport type ActiveProps = {\n /**\n * If the tab is checked/active.\n */\n active?: boolean;\n};\nexport type InputEvent<T> = Event;\nexport type InputEventProps<T> = {\n input?: (event: InputEvent<T>) => void;\n onInput?: (event: InputEvent<T>) => void;\n};\nexport type InputEventState<T> = {\n handleInput: (event: InputEvent<T>) => void;\n};\nexport type ChangeEvent<T> = Event;\nexport type ChangeEventProps<T> = {\n change?: (event: ChangeEvent<T>) => void;\n onChange?: (event: ChangeEvent<T>) => void;\n};\nexport type ChangeEventState<T> = {\n handleChange: (event: ChangeEvent<T>) => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type InteractionEvent<T> = FocusEvent;\nexport type FocusEventProps<T> = {\n blur?: (event: InteractionEvent<T>) => void;\n onBlur?: (event: InteractionEvent<T>) => void;\n focus?: (event: InteractionEvent<T>) => void;\n onFocus?: (event: InteractionEvent<T>) => void;\n};\nexport type FocusEventState<T> = {\n handleBlur: (event: InteractionEvent<T>) => void;\n handleFocus: (event: InteractionEvent<T>) => void;\n};\nexport type InnerCloseButtonProps = {\n /**\n * The closeButtonId attribute changes the id inside the close button.\n */\n closeButtonId?: string;\n /**\n * The closeButtonText attribute changes the text inside the close button.\n */\n closeButtonText?: string;\n};\nexport type NavigationBackButtonProps = {\n /**\n * The backButtonId attribute changes the id inside the back button.\n */\n backButtonId?: string;\n /**\n * The backButtonText attribute changes the text inside the back button.\n */\n backButtonText?: string;\n};\nexport type AriaLabelledByProps = {\n /**\n * Pass aria-labelledby to inner element\n */\n labelledBy?: string;\n};\nexport type AriaControlsProps = {\n /**\n * Pass aria-controls to inner element\n */\n controls?: string;\n};\nexport type ValueLabelType = {\n value: string;\n label?: string;\n}"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/shared/model.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAsCvD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC;AA2BnH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAQzE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAQxE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,CAAU,CA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AAgB,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,eAAe,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAU,CAAC;AA0D91B,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAEtG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAU,CAAC;AAE9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,aAAa,EAAE,4BAA4B,EAAE,QAAQ,EAAE,0BAA0B,EAAE,aAAa,EAAE,eAAe,EAAE,iCAAiC,EAAE,YAAY,CAAU,CAAC;AA6EpN,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { IconTypes } from '@db-ux/core-foundations';\nexport type GlobalProps = {\n /**\n * default slot\n */\n\n children?: any;\n\n /**\n * React specific for adding className to the component.\n */\n className?: string;\n\n /**\n * Workaround for TypeScript using class for all components.\n */\n class?: string | any;\n\n /**\n * [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.\n */\n describedbyid?: string;\n\n /**\n * [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.\n */\n id?: string;\n\n /**\n * Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)\n */\n autofocus?: boolean;\n};\nexport type GlobalState = {\n _id?: string;\n};\nexport const SemanticList = ['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'] as const;\nexport type SemanticType = (typeof SemanticList)[number];\nexport type SemanticProps = {\n /**\n * The semantic defines the default variants for most components.\n */\n semantic?: SemanticType;\n};\nexport type IconProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n icon?: IconTypes;\n};\nexport type ShowIconProps = {\n /**\n * Enables or disables the visibility of the icon. The default value depends on the component.\n * For many components this property is optional to reflect Figma properties.\n */\n showIcon?: boolean;\n};\nexport type IconAfterProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n iconAfter?: IconTypes;\n};\nexport const SpacingList = ['medium', 'small', 'large', 'none'] as const;\nexport type SpacingType = (typeof SpacingList)[number];\nexport type SpacingProps = {\n /**\n * The spacing attribute changes the padding of the component.\n */\n spacing?: SpacingType | string;\n};\nexport const MarginList = ['medium', 'small', 'large', 'none'] as const;\nexport type MarginType = (typeof MarginList)[number];\nexport type MarginProps = {\n /**\n * The margin attribute changes the margin of the component.\n */\n margin?: MarginType;\n};\nexport const PlacementList = ['left', 'right', 'top', 'bottom', 'left-start', 'left-end', 'right-start', 'right-end', 'top-start', 'top-end', 'bottom-start', 'bottom-end'] as const;\nexport type PlacementType = (typeof PlacementList)[number];\nexport type PlacementProps = {\n /**\n * The `placement` attributes values change the position to absolute and adds a transform based on the placement.\n */\n placement?: PlacementType;\n};\nexport type NavigationBehaviorState = {\n handleNavigationItemClick: (event: unknown) => void;\n};\nexport type GapProps = {\n /**\n * If the absolute element should have a gap between the parent element.\n */\n gap?: boolean;\n};\nexport const GapSpacingList = ['none', '3x-large', '2x-large', 'x-large', 'large', 'medium', 'small', 'x-small', '2x-small', '3x-small'] as const;\nexport type GapSpacingType = (typeof GapSpacingList)[number];\nexport type GapSpacingProps = {\n /**\n * Set the gap/spacing between elements\n */\n gap?: GapSpacingType;\n};\nexport type OverflowProps = {\n /**\n * The overflow attribute sets a max-width and longer text will be dotted.\n */\n overflow?: boolean;\n};\nexport const OrientationList = ['horizontal', 'vertical'] as const;\nexport type OrientationType = (typeof OrientationList)[number];\nexport type OrientationProps = {\n /**\n * Change the orientation. Defaults to horizontal.\n */\n orientation?: OrientationType;\n};\nexport const WidthList = ['full', 'auto'] as const;\nexport type WidthType = (typeof WidthList)[number];\nexport type WidthProps = {\n /**\n * Width of the component. Auto width based on children size, full width based on parent elements width.\n */\n width?: WidthType | string;\n};\nexport const MaxWidthList = ['full', 'medium', 'large', 'small'] as const;\nexport type MaxWidthType = (typeof MaxWidthList)[number];\nexport type ContainerWidthProps = {\n /**\n * Set max width for the component\n */\n width?: MaxWidthType;\n};\nexport const PopoverDelayList = ['none', 'slow', 'fast'] as const;\nexport type PopoverDelayType = (typeof PopoverDelayList)[number];\nexport const PopoverWidthList = ['auto', 'fixed'] as const;\nexport type PopoverWidthType = (typeof PopoverWidthList)[number];\nexport type PopoverProps = {\n /**\n * Add a delay before showing the tooltip\n */\n delay?: PopoverDelayType;\n /**\n * Disable animation\n */\n animation?: boolean;\n /**\n * Use fixed with for default max-width\n */\n width?: PopoverWidthType;\n};\nexport type PopoverState = {\n handleAutoPlacement: () => void;\n};\nexport type ContentSlotProps = {\n /**\n * Default slot which is used to pass in additional content.\n */\n content?: any;\n};\nexport const SizeList = ['small', 'medium'] as const;\nexport type SizeType = (typeof SizeList)[number];\nexport type SizeProps = {\n /**\n * The size attribute changes the font-size and other related sizes of the component.\n */\n size?: SizeType;\n};\nexport const EmphasisList = ['weak', 'strong'] as const;\nexport type EmphasisType = (typeof EmphasisList)[number];\nexport type EmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak or strong importance.\n */\n emphasis?: EmphasisType;\n};\nexport const TagEmphasisList = [...EmphasisList, 'origin'] as const;\nexport type TagEmphasisType = (typeof TagEmphasisList)[number];\nexport type TagEmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak, strong or origin appearance.\n */\n emphasis?: TagEmphasisType;\n};\nexport const ValidationList = ['invalid', 'valid', 'no-validation'] as const;\nexport type ValidationType = (typeof ValidationList)[number];\nexport type FormProps = {\n /**\n * Marks an input element as invalid (red) / valid (green) / no-validation (grey). Overwrites the :user-valid selector.\n */\n validation?: ValidationType;\n /**\n * The disabled attribute can be set to keep a user from clicking on the form element.\n */\n disabled?: boolean;\n /**\n * \tAssociates the control with a form element\n */\n form?: string;\n\n /**\n * The label attribute specifies the caption of the form element.\n */\n label?: string;\n\n /**\n * The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.\n */\n name?: string;\n\n /**\n * When the required attribute specified, the user will be required to fill the form element before submitting the form.\n */\n required?: boolean;\n /**\n * Enables/disables the visibility of the label\n */\n showLabel?: boolean;\n /**\n * The value property is to receive results from the native form element.\n */\n value?: any;\n};\nexport type FormTextProps = {\n /**\n * Maximum length (number of characters) of value\n */\n maxLength?: number;\n /**\n * Minimum length (number of characters) of value\n */\n minLength?: number;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readOnly?: boolean;\n};\nexport type FormSizeProps = {\n /**\n * Size of the control\n */\n size?: number;\n};\nexport type FormCheckProps = {\n /**\n * Define the radio or checkbox elements checked state\n */\n checked?: boolean;\n};\nexport const LabelVariantList = ['above', 'floating'] as const;\nexport type LabelVariantType = (typeof LabelVariantList)[number];\nexport const AutoCompleteList = ['off', 'on', 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'email', 'username', 'new-password', 'current-password', 'one-time-code', 'organization-title', 'organization', 'street-address', 'shipping', 'billing', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-extension', 'impp', 'url', 'photo', 'webauthn'] as const;\nexport type AutoCompleteType = (typeof AutoCompleteList)[number];\nexport type FormMessageProps = {\n /**\n * Change the variant of the label to float or hidden\n */\n variant?: LabelVariantType;\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder?: string;\n /**\n * Optional helper message for form components\n */\n message?: string;\n\n /**\n * Helper message for valid form components\n */\n validMessage?: string;\n\n /**\n * Helper message for invalid form components\n */\n invalidMessage?: string;\n\n /**\n * Set/overwrite icon for helper message for form components\n */\n messageIcon?: IconTypes;\n\n /**\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\n */\n autocomplete?: string | AutoCompleteType;\n\n /**\n * Enables or disables the visibility of the message.\n */\n showMessage?: boolean;\n};\nexport type FormState = {\n _messageId?: string;\n _validMessageId?: string;\n _invalidMessageId?: string;\n _descByIds?: string;\n _value?: string;\n\n /**\n * https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html\n * Currently VoiceOver isn't supporting changes from aria-describedby.\n * This is an internal Fallback\n */\n _voiceOverFallback?: string;\n};\nexport type InitializedState = {\n initialized: boolean;\n};\nexport const LinkCurrentList = ['time', 'true', 'false', 'date', 'page', 'step', 'location'] as const;\nexport type LinkCurrentType = (typeof LinkCurrentList)[number];\nexport const LinkTargetList = ['_self', '_blank', '_parent', '_top'] as const;\nexport type LinkTargetType = (typeof LinkTargetList)[number];\nexport const LinkReferrerPolicyList = ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] as const;\nexport type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];\nexport type LinkProps = {\n /**\n * Sets aria attribute based on [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n current?: boolean | LinkCurrentType;\n /**\n * Disables the link.\n */\n disabled?: boolean;\n /**\n * The [URL that the hyperlink points to](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href).\n */\n href?: string;\n /**\n * Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).\n */\n hreflang?: string;\n /**\n * Sets aria attribute based on [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).\n */\n label?: string;\n /**\n * Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: LinkTargetType;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n rel?: string;\n /**\n * Sets aria role based on [`aria-role`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles).\n */\n role?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n referrerpolicy?: LinkReferrerPolicyType;\n /**\n * Sets aria role based on [`aria-selected`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected).\n */\n selected?: boolean;\n};\nexport type TextProps = {\n /**\n * Alternative for default slot/children.\n */\n text?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type ClickEvent<T> = MouseEvent;\nexport type ClickEventProps<T> = {\n /**\n * React specific onClick to pass to forward ref.\n */\n onClick?: (event: ClickEvent<T>) => void;\n};\nexport type ClickEventState<T> = {\n handleClick: (event: ClickEvent<T>) => void;\n};\nexport type ToggleEventProps = {\n onToggle?: (open: boolean) => void;\n};\nexport type ToggleEventState<T> = {\n toggle: (event?: ClickEvent<T>) => void;\n};\nexport type CloseEventProps = {\n /**\n * Function to handle button click (close).\n */\n onClose?: (event?: any) => void;\n};\nexport type CloseEventState = {\n handleClose: (event: any) => void;\n};\nexport const AlignmentList = ['start', 'center'] as const;\nexport type AlignmentType = (typeof AlignmentList)[number];\nexport type AlignmentProps = {\n /**\n * Define the content alignment in full width\n */\n alignment?: AlignmentType | string;\n};\nexport type ActiveProps = {\n /**\n * If the tab is checked/active.\n */\n active?: boolean;\n};\nexport type InputEvent<T> = Event;\nexport type InputEventProps<T> = {\n input?: (event: InputEvent<T>) => void;\n onInput?: (event: InputEvent<T>) => void;\n};\nexport type InputEventState<T> = {\n handleInput: (event: InputEvent<T>) => void;\n};\nexport type ChangeEvent<T> = Event;\nexport type ChangeEventProps<T> = {\n change?: (event: ChangeEvent<T>) => void;\n onChange?: (event: ChangeEvent<T>) => void;\n};\nexport type ChangeEventState<T> = {\n handleChange: (event: ChangeEvent<T>) => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type InteractionEvent<T> = FocusEvent;\nexport type FocusEventProps<T> = {\n blur?: (event: InteractionEvent<T>) => void;\n onBlur?: (event: InteractionEvent<T>) => void;\n focus?: (event: InteractionEvent<T>) => void;\n onFocus?: (event: InteractionEvent<T>) => void;\n};\nexport type FocusEventState<T> = {\n handleBlur: (event: InteractionEvent<T>) => void;\n handleFocus: (event: InteractionEvent<T>) => void;\n};\nexport type InnerCloseButtonProps = {\n /**\n * The closeButtonId attribute changes the id inside the close button.\n */\n closeButtonId?: string;\n /**\n * The closeButtonText attribute changes the text inside the close button.\n */\n closeButtonText?: string;\n};\nexport type NavigationBackButtonProps = {\n /**\n * The backButtonId attribute changes the id inside the back button.\n */\n backButtonId?: string;\n /**\n * The backButtonText attribute changes the text inside the back button.\n */\n backButtonText?: string;\n};\nexport type AriaLabelledByProps = {\n /**\n * Pass aria-labelledby to inner element\n */\n labelledBy?: string;\n};\nexport type AriaControlsProps = {\n /**\n * Pass aria-controls to inner element\n */\n controls?: string;\n};\nexport type ValueLabelType = {\n value: string;\n label?: string;\n}"]}