@db-ux/wc-core-components 4.11.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/bundle/db-accordion-item.js +1 -1
  3. package/bundle/db-accordion.js +1 -1
  4. package/bundle/db-badge.js +1 -1
  5. package/bundle/db-brand.js +1 -1
  6. package/bundle/db-button.js +1 -1
  7. package/bundle/db-card.js +1 -1
  8. package/bundle/db-checkbox.js +1 -1
  9. package/bundle/db-custom-button.js +1 -1
  10. package/bundle/db-custom-select-dropdown.js +1 -1
  11. package/bundle/db-custom-select-form-field.js +1 -1
  12. package/bundle/db-custom-select-list-item.js +1 -1
  13. package/bundle/db-custom-select-list.js +1 -1
  14. package/bundle/db-custom-select.js +1 -1
  15. package/bundle/db-divider.js +1 -1
  16. package/bundle/db-drawer.js +1 -1
  17. package/bundle/db-header.js +1 -1
  18. package/bundle/db-icon.js +1 -1
  19. package/bundle/db-infotext.js +1 -1
  20. package/bundle/db-input.js +1 -1
  21. package/bundle/db-link.js +1 -1
  22. package/bundle/db-navigation-item.js +1 -1
  23. package/bundle/db-navigation.js +1 -1
  24. package/bundle/db-notification.js +1 -1
  25. package/bundle/db-page.js +1 -1
  26. package/bundle/db-popover.js +1 -1
  27. package/bundle/db-radio.js +1 -1
  28. package/bundle/db-section.js +1 -1
  29. package/bundle/db-select.js +1 -1
  30. package/bundle/db-stack.js +1 -1
  31. package/bundle/db-switch.js +1 -1
  32. package/bundle/db-tab-item.js +1 -1
  33. package/bundle/db-tab-list.js +1 -1
  34. package/bundle/db-tab-panel.js +1 -1
  35. package/bundle/db-table-body.js +1 -1
  36. package/bundle/db-table-caption.js +1 -1
  37. package/bundle/db-table-data-cell.js +1 -1
  38. package/bundle/db-table-footer.js +1 -1
  39. package/bundle/db-table-head.js +1 -1
  40. package/bundle/db-table-header-cell.js +1 -1
  41. package/bundle/db-table-row.js +1 -1
  42. package/bundle/db-table.js +1 -1
  43. package/bundle/db-tabs.js +1 -1
  44. package/bundle/db-tag.js +1 -1
  45. package/bundle/db-textarea.js +1 -1
  46. package/bundle/db-tooltip.js +1 -1
  47. package/bundle/p-3Da4lo5j.js +1 -0
  48. package/bundle/p-BEcb3EOO.js +1 -0
  49. package/bundle/p-BEolc6Da.js +1 -0
  50. package/bundle/p-BekmqY3B.js +1 -0
  51. package/bundle/p-BmRO4X-P.js +1 -0
  52. package/bundle/p-BrQIYm5N.js +1 -0
  53. package/bundle/p-BxZ0zFXf.js +1 -0
  54. package/bundle/p-C2viXF7U.js +1 -0
  55. package/bundle/p-C4iD-won.js +1 -0
  56. package/bundle/p-CHg_VPD9.js +1 -0
  57. package/bundle/p-CZ9SsTOA.js +1 -0
  58. package/bundle/p-CewqZGHg.js +1 -0
  59. package/bundle/p-CotiEHZi.js +1 -0
  60. package/bundle/p-D1orcIJf.js +1 -0
  61. package/bundle/p-D9RSX1St.js +1 -0
  62. package/bundle/p-DbgzEek1.js +1 -0
  63. package/bundle/p-DqNXsduK.js +1 -0
  64. package/bundle/p-Duacd-NX.js +1 -0
  65. package/bundle/p-k5Hci0ok.js +1 -0
  66. package/bundle/p-mk64Fltq.js +1 -0
  67. package/dist/cjs/db-accordion-item.cjs.entry.js +46 -9
  68. package/dist/cjs/db-accordion.cjs.entry.js +43 -6
  69. package/dist/cjs/db-badge.cjs.entry.js +43 -6
  70. package/dist/cjs/db-brand.cjs.entry.js +36 -5
  71. package/dist/cjs/db-button.cjs.entry.js +36 -5
  72. package/dist/cjs/db-card.cjs.entry.js +36 -5
  73. package/dist/cjs/db-checkbox.cjs.entry.js +45 -11
  74. package/dist/cjs/db-custom-button.cjs.entry.js +36 -5
  75. package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +190 -31
  76. package/dist/cjs/db-custom-select-form-field.cjs.entry.js +36 -5
  77. package/dist/cjs/db-custom-select.cjs.entry.js +60 -26
  78. package/dist/cjs/db-divider.cjs.entry.js +35 -4
  79. package/dist/cjs/db-drawer.cjs.entry.js +45 -8
  80. package/dist/cjs/db-header.cjs.entry.js +43 -6
  81. package/dist/cjs/db-icon.cjs.entry.js +36 -5
  82. package/dist/cjs/db-infotext.cjs.entry.js +36 -5
  83. package/dist/cjs/db-link_4.cjs.entry.js +65 -19
  84. package/dist/cjs/db-navigation-item.cjs.entry.js +46 -9
  85. package/dist/cjs/db-navigation.cjs.entry.js +36 -5
  86. package/dist/cjs/db-notification.cjs.entry.js +36 -5
  87. package/dist/cjs/db-page.cjs.entry.js +48 -13
  88. package/dist/cjs/db-popover.cjs.entry.js +43 -6
  89. package/dist/cjs/db-radio.cjs.entry.js +42 -8
  90. package/dist/cjs/db-section.cjs.entry.js +36 -5
  91. package/dist/cjs/db-select.cjs.entry.js +45 -11
  92. package/dist/cjs/db-stack.cjs.entry.js +36 -5
  93. package/dist/cjs/db-switch.cjs.entry.js +45 -11
  94. package/dist/cjs/db-tab-item_3.cjs.entry.js +118 -19
  95. package/dist/cjs/db-table-body_3.cjs.entry.js +53 -12
  96. package/dist/cjs/db-table-caption.cjs.entry.js +36 -5
  97. package/dist/cjs/db-table.cjs.entry.js +35 -4
  98. package/dist/cjs/db-tabs.cjs.entry.js +42 -8
  99. package/dist/cjs/db-textarea.cjs.entry.js +45 -10
  100. package/dist/cjs/db-tooltip.cjs.entry.js +144 -20
  101. package/dist/cjs/db-ux.cjs.js +1 -1
  102. package/dist/cjs/loader.cjs.js +1 -1
  103. package/dist/collection/components/accordion/accordion.js +45 -7
  104. package/dist/collection/components/accordion-item/accordion-item.js +48 -10
  105. package/dist/collection/components/badge/badge.js +45 -7
  106. package/dist/collection/components/brand/brand.js +43 -5
  107. package/dist/collection/components/button/button.js +43 -5
  108. package/dist/collection/components/card/card.js +43 -5
  109. package/dist/collection/components/checkbox/checkbox.js +47 -12
  110. package/dist/collection/components/custom-button/custom-button.js +43 -5
  111. package/dist/collection/components/custom-select/custom-select.js +62 -27
  112. package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +41 -5
  113. package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +43 -5
  114. package/dist/collection/components/custom-select-list/custom-select-list.js +43 -5
  115. package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +37 -5
  116. package/dist/collection/components/divider/divider.js +42 -4
  117. package/dist/collection/components/drawer/drawer.js +47 -9
  118. package/dist/collection/components/header/header.js +45 -7
  119. package/dist/collection/components/icon/icon.js +43 -5
  120. package/dist/collection/components/infotext/infotext.js +43 -5
  121. package/dist/collection/components/input/input.js +49 -13
  122. package/dist/collection/components/link/link.js +43 -5
  123. package/dist/collection/components/navigation/navigation.js +43 -5
  124. package/dist/collection/components/navigation-item/navigation-item.js +48 -10
  125. package/dist/collection/components/notification/notification.js +43 -5
  126. package/dist/collection/components/page/page.js +50 -14
  127. package/dist/collection/components/popover/popover.js +45 -7
  128. package/dist/collection/components/radio/radio.js +44 -9
  129. package/dist/collection/components/section/section.js +43 -5
  130. package/dist/collection/components/select/select.js +47 -12
  131. package/dist/collection/components/stack/stack.js +43 -5
  132. package/dist/collection/components/switch/switch.js +47 -12
  133. package/dist/collection/components/tab-item/tab-item.js +45 -10
  134. package/dist/collection/components/tab-list/tab-list.js +43 -5
  135. package/dist/collection/components/tab-panel/tab-panel.js +48 -5
  136. package/dist/collection/components/table/table.js +37 -5
  137. package/dist/collection/components/table-body/table-body.js +9 -4
  138. package/dist/collection/components/table-caption/table-caption.js +43 -5
  139. package/dist/collection/components/table-data-cell/table-data-cell.js +10 -5
  140. package/dist/collection/components/table-footer/table-footer.js +9 -4
  141. package/dist/collection/components/table-head/table-head.js +42 -4
  142. package/dist/collection/components/table-header-cell/table-header-cell.js +10 -5
  143. package/dist/collection/components/table-row/table-row.js +9 -4
  144. package/dist/collection/components/tabs/tabs.js +44 -9
  145. package/dist/collection/components/tag/tag.js +43 -5
  146. package/dist/collection/components/textarea/textarea.js +47 -11
  147. package/dist/collection/components/tooltip/tooltip.js +150 -21
  148. package/dist/custom-elements.json +710 -0
  149. package/dist/db-ux/db-ux.esm.js +1 -1
  150. package/dist/db-ux/p-0123ee1b.entry.js +1 -0
  151. package/dist/db-ux/p-090b1797.entry.js +1 -0
  152. package/dist/db-ux/p-0e17c5a0.entry.js +1 -0
  153. package/dist/db-ux/p-194e851c.entry.js +1 -0
  154. package/dist/db-ux/p-281f5e3e.entry.js +1 -0
  155. package/dist/db-ux/p-2ae377e6.entry.js +1 -0
  156. package/dist/db-ux/p-2cf4345f.entry.js +1 -0
  157. package/dist/db-ux/p-2e6c8304.entry.js +1 -0
  158. package/dist/db-ux/p-335391d4.entry.js +1 -0
  159. package/dist/db-ux/p-34235204.entry.js +1 -0
  160. package/dist/db-ux/p-3569bb3c.entry.js +1 -0
  161. package/dist/db-ux/p-398f9165.entry.js +1 -0
  162. package/dist/db-ux/p-5070470f.entry.js +1 -0
  163. package/dist/db-ux/p-5e08712d.entry.js +1 -0
  164. package/dist/db-ux/p-63d98f9d.entry.js +1 -0
  165. package/dist/db-ux/p-6aa92091.entry.js +1 -0
  166. package/dist/db-ux/p-78b7e6f6.entry.js +1 -0
  167. package/dist/db-ux/p-7ca4bc82.entry.js +1 -0
  168. package/dist/db-ux/p-8f989150.entry.js +1 -0
  169. package/dist/db-ux/p-8fa7a578.entry.js +1 -0
  170. package/dist/db-ux/p-91052c75.entry.js +1 -0
  171. package/dist/db-ux/p-9ccd42b1.entry.js +1 -0
  172. package/dist/db-ux/p-a4d9f6e2.entry.js +1 -0
  173. package/dist/db-ux/p-af248e57.entry.js +1 -0
  174. package/dist/db-ux/p-ba82a0b0.entry.js +1 -0
  175. package/dist/db-ux/p-c2ce6ecd.entry.js +1 -0
  176. package/dist/db-ux/p-d7b5748d.entry.js +1 -0
  177. package/dist/db-ux/p-dfbbe502.entry.js +1 -0
  178. package/dist/db-ux/p-e7a400a2.entry.js +1 -0
  179. package/dist/db-ux/p-ef1aa878.entry.js +1 -0
  180. package/dist/db-ux/p-f1daaefa.entry.js +1 -0
  181. package/dist/db-ux/p-f6312d2c.entry.js +1 -0
  182. package/dist/db-ux/p-fbf09569.entry.js +1 -0
  183. package/dist/db-ux/p-ff11c071.entry.js +1 -0
  184. package/dist/esm/db-accordion-item.entry.js +46 -9
  185. package/dist/esm/db-accordion.entry.js +43 -6
  186. package/dist/esm/db-badge.entry.js +43 -6
  187. package/dist/esm/db-brand.entry.js +36 -5
  188. package/dist/esm/db-button.entry.js +36 -5
  189. package/dist/esm/db-card.entry.js +36 -5
  190. package/dist/esm/db-checkbox.entry.js +45 -11
  191. package/dist/esm/db-custom-button.entry.js +36 -5
  192. package/dist/esm/db-custom-select-dropdown_5.entry.js +190 -31
  193. package/dist/esm/db-custom-select-form-field.entry.js +36 -5
  194. package/dist/esm/db-custom-select.entry.js +60 -26
  195. package/dist/esm/db-divider.entry.js +35 -4
  196. package/dist/esm/db-drawer.entry.js +45 -8
  197. package/dist/esm/db-header.entry.js +43 -6
  198. package/dist/esm/db-icon.entry.js +36 -5
  199. package/dist/esm/db-infotext.entry.js +36 -5
  200. package/dist/esm/db-link_4.entry.js +65 -19
  201. package/dist/esm/db-navigation-item.entry.js +47 -10
  202. package/dist/esm/db-navigation.entry.js +36 -5
  203. package/dist/esm/db-notification.entry.js +36 -5
  204. package/dist/esm/db-page.entry.js +48 -13
  205. package/dist/esm/db-popover.entry.js +43 -6
  206. package/dist/esm/db-radio.entry.js +42 -8
  207. package/dist/esm/db-section.entry.js +36 -5
  208. package/dist/esm/db-select.entry.js +45 -11
  209. package/dist/esm/db-stack.entry.js +36 -5
  210. package/dist/esm/db-switch.entry.js +45 -11
  211. package/dist/esm/db-tab-item_3.entry.js +118 -19
  212. package/dist/esm/db-table-body_3.entry.js +53 -12
  213. package/dist/esm/db-table-caption.entry.js +36 -5
  214. package/dist/esm/db-table.entry.js +35 -4
  215. package/dist/esm/db-tabs.entry.js +43 -9
  216. package/dist/esm/db-textarea.entry.js +45 -10
  217. package/dist/esm/db-tooltip.entry.js +144 -20
  218. package/dist/esm/db-ux.js +1 -1
  219. package/dist/esm/loader.js +1 -1
  220. package/dist/types/components/accordion/accordion.d.ts +3 -0
  221. package/dist/types/components/accordion-item/accordion-item.d.ts +3 -0
  222. package/dist/types/components/badge/badge.d.ts +3 -0
  223. package/dist/types/components/brand/brand.d.ts +3 -0
  224. package/dist/types/components/button/button.d.ts +3 -0
  225. package/dist/types/components/card/card.d.ts +3 -0
  226. package/dist/types/components/checkbox/checkbox.d.ts +2 -0
  227. package/dist/types/components/custom-button/custom-button.d.ts +3 -0
  228. package/dist/types/components/custom-select/custom-select.d.ts +2 -0
  229. package/dist/types/components/custom-select-dropdown/custom-select-dropdown.d.ts +3 -0
  230. package/dist/types/components/custom-select-form-field/custom-select-form-field.d.ts +3 -0
  231. package/dist/types/components/custom-select-list/custom-select-list.d.ts +3 -0
  232. package/dist/types/components/custom-select-list-item/custom-select-list-item.d.ts +3 -0
  233. package/dist/types/components/divider/divider.d.ts +3 -0
  234. package/dist/types/components/drawer/drawer.d.ts +3 -0
  235. package/dist/types/components/header/header.d.ts +3 -0
  236. package/dist/types/components/icon/icon.d.ts +3 -0
  237. package/dist/types/components/infotext/infotext.d.ts +3 -0
  238. package/dist/types/components/input/input.d.ts +2 -0
  239. package/dist/types/components/link/link.d.ts +3 -0
  240. package/dist/types/components/navigation/navigation.d.ts +3 -0
  241. package/dist/types/components/navigation-item/navigation-item.d.ts +3 -0
  242. package/dist/types/components/notification/notification.d.ts +3 -0
  243. package/dist/types/components/page/page.d.ts +2 -0
  244. package/dist/types/components/popover/popover.d.ts +3 -0
  245. package/dist/types/components/radio/radio.d.ts +2 -0
  246. package/dist/types/components/section/section.d.ts +3 -0
  247. package/dist/types/components/select/select.d.ts +2 -0
  248. package/dist/types/components/stack/stack.d.ts +3 -0
  249. package/dist/types/components/switch/switch.d.ts +2 -0
  250. package/dist/types/components/tab-item/tab-item.d.ts +2 -0
  251. package/dist/types/components/tab-list/tab-list.d.ts +3 -0
  252. package/dist/types/components/tab-panel/tab-panel.d.ts +3 -0
  253. package/dist/types/components/table/table.d.ts +3 -0
  254. package/dist/types/components/table-caption/table-caption.d.ts +3 -0
  255. package/dist/types/components/table-head/table-head.d.ts +3 -0
  256. package/dist/types/components/tabs/tabs.d.ts +2 -0
  257. package/dist/types/components/tag/tag.d.ts +3 -0
  258. package/dist/types/components/textarea/textarea.d.ts +2 -0
  259. package/dist/types/components/tooltip/model.d.ts +9 -0
  260. package/dist/types/components/tooltip/tooltip.d.ts +8 -0
  261. package/dist/web-types.json +84 -40
  262. package/package.json +6 -6
  263. package/bundle/p-B5ANMEnQ.js +0 -1
  264. package/bundle/p-BJwvv-yT.js +0 -1
  265. package/bundle/p-BNiKxu3y.js +0 -1
  266. package/bundle/p-B_bPnncM.js +0 -1
  267. package/bundle/p-BnLhi6Lz.js +0 -1
  268. package/bundle/p-BrBlnLrn.js +0 -1
  269. package/bundle/p-CByFfoSH.js +0 -1
  270. package/bundle/p-CQo0C7QE.js +0 -1
  271. package/bundle/p-CR2ZbfYe.js +0 -1
  272. package/bundle/p-CeDu282h.js +0 -1
  273. package/bundle/p-CfLPOLHz.js +0 -1
  274. package/bundle/p-CoOxyQb2.js +0 -1
  275. package/bundle/p-CqED0CfD.js +0 -1
  276. package/bundle/p-Cr_z1Jfi.js +0 -1
  277. package/bundle/p-D-XzX0R7.js +0 -1
  278. package/bundle/p-DMSIvqcA.js +0 -1
  279. package/bundle/p-DUiroUyR.js +0 -1
  280. package/bundle/p-DdyMClpj.js +0 -1
  281. package/bundle/p-DjVjS2Tb.js +0 -1
  282. package/bundle/p-in4Kv88F.js +0 -1
  283. package/dist/db-ux/p-08271c80.entry.js +0 -1
  284. package/dist/db-ux/p-105ffa74.entry.js +0 -1
  285. package/dist/db-ux/p-15adca91.entry.js +0 -1
  286. package/dist/db-ux/p-1a322a0c.entry.js +0 -1
  287. package/dist/db-ux/p-1f7232c0.entry.js +0 -1
  288. package/dist/db-ux/p-27e2f6f2.entry.js +0 -1
  289. package/dist/db-ux/p-2907f214.entry.js +0 -1
  290. package/dist/db-ux/p-2ff958e4.entry.js +0 -1
  291. package/dist/db-ux/p-3423b7af.entry.js +0 -1
  292. package/dist/db-ux/p-365e6edf.entry.js +0 -1
  293. package/dist/db-ux/p-42516007.entry.js +0 -1
  294. package/dist/db-ux/p-5045182c.entry.js +0 -1
  295. package/dist/db-ux/p-5e1d42e5.entry.js +0 -1
  296. package/dist/db-ux/p-61b28212.entry.js +0 -1
  297. package/dist/db-ux/p-6850a53c.entry.js +0 -1
  298. package/dist/db-ux/p-6bff55b4.entry.js +0 -1
  299. package/dist/db-ux/p-6e7c5e42.entry.js +0 -1
  300. package/dist/db-ux/p-76adf385.entry.js +0 -1
  301. package/dist/db-ux/p-78f7b353.entry.js +0 -1
  302. package/dist/db-ux/p-7fa5d304.entry.js +0 -1
  303. package/dist/db-ux/p-95b69e71.entry.js +0 -1
  304. package/dist/db-ux/p-99ebe6ec.entry.js +0 -1
  305. package/dist/db-ux/p-a5dc355d.entry.js +0 -1
  306. package/dist/db-ux/p-a6113789.entry.js +0 -1
  307. package/dist/db-ux/p-b9c0feaf.entry.js +0 -1
  308. package/dist/db-ux/p-c14fa91a.entry.js +0 -1
  309. package/dist/db-ux/p-c65b807e.entry.js +0 -1
  310. package/dist/db-ux/p-dd9cedbe.entry.js +0 -1
  311. package/dist/db-ux/p-e3f705fd.entry.js +0 -1
  312. package/dist/db-ux/p-e4cddc9f.entry.js +0 -1
  313. package/dist/db-ux/p-e7a8612c.entry.js +0 -1
  314. package/dist/db-ux/p-ee8c3243.entry.js +0 -1
  315. package/dist/db-ux/p-f0d0acfc.entry.js +0 -1
  316. package/dist/db-ux/p-f15748ea.entry.js +0 -1
@@ -20,6 +20,7 @@ const DBCheckbox = class {
20
20
  this._descByIds = undefined;
21
21
  this._voiceOverFallback = "";
22
22
  this.abortController = undefined;
23
+ this.observer = undefined;
23
24
  }
24
25
  hasValidState() {
25
26
  var _a;
@@ -36,7 +37,7 @@ const DBCheckbox = class {
36
37
  constants.DEFAULT_INVALID_MESSAGE;
37
38
  if (index$1.hasVoiceOver()) {
38
39
  this._voiceOverFallback = this._invalidMessage;
39
- index$1.delay(() => (this._voiceOverFallback = ""), 1000);
40
+ void index$1.delay(() => (this._voiceOverFallback = ""), 1000);
40
41
  }
41
42
  }
42
43
  else if (this.hasValidState() &&
@@ -45,7 +46,7 @@ const DBCheckbox = class {
45
46
  this._descByIds = this._validMessageId;
46
47
  if (index$1.hasVoiceOver()) {
47
48
  this._voiceOverFallback = (_d = this.validMessage) !== null && _d !== void 0 ? _d : constants.DEFAULT_VALID_MESSAGE;
48
- index$1.delay(() => (this._voiceOverFallback = ""), 1000);
49
+ void index$1.delay(() => (this._voiceOverFallback = ""), 1000);
49
50
  }
50
51
  }
51
52
  else if (index$1.stringPropVisible(this.message, this.showMessage)) {
@@ -79,6 +80,26 @@ const DBCheckbox = class {
79
80
  this._validMessageId = mId + constants.DEFAULT_VALID_MESSAGE_ID_SUFFIX;
80
81
  this._invalidMessageId = mId + constants.DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
81
82
  }
83
+ setupObserver(element) {
84
+ if (!element)
85
+ return;
86
+ const parent = element.closest("db-checkbox");
87
+ if (!parent || this.observer)
88
+ return;
89
+ this.observer = new MutationObserver((mutations) => {
90
+ if (mutations.some((mutation) => {
91
+ var _a;
92
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
93
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
94
+ })) {
95
+ this.enableAttributePassing(element, "db-checkbox");
96
+ }
97
+ });
98
+ this.observer.observe(parent, {
99
+ attributes: true,
100
+ attributeOldValue: true,
101
+ });
102
+ }
82
103
  /**
83
104
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
84
105
  * @param element the ref for the component
@@ -92,10 +113,15 @@ const DBCheckbox = class {
92
113
  const attr = attributes.item(i);
93
114
  if (attr && attr.name !== 'data-density' &&
94
115
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
95
- element.setAttribute(attr.name, attr.value);
116
+ if (attr.value) {
117
+ element.setAttribute(attr.name, attr.value);
118
+ }
119
+ else {
120
+ element.removeAttribute(attr.name);
121
+ }
96
122
  parent.removeAttribute(attr.name);
97
123
  }
98
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
124
+ else if (attr && ["style"].includes(attr.name)) {
99
125
  element.setAttribute(attr.name, attr.value);
100
126
  parent.removeAttribute(attr.name);
101
127
  }
@@ -103,7 +129,7 @@ const DBCheckbox = class {
103
129
  const isWebComponent = attr.value.includes("hydrated");
104
130
  const value = attr.value.replace("hydrated", "").trim();
105
131
  const currentClass = element.getAttribute("class");
106
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
132
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
107
133
  if (isWebComponent) {
108
134
  // Stencil is using this class for lazy loading component
109
135
  parent.setAttribute("class", "hydrated");
@@ -200,9 +226,16 @@ const DBCheckbox = class {
200
226
  }
201
227
  }
202
228
  this.enableAttributePassing(this._ref, "db-checkbox");
203
- this.initialized = true;
204
- this.resetIds();
205
- this._invalidMessage = this.invalidMessage || constants.DEFAULT_INVALID_MESSAGE;
229
+ const onMountHook_0 = () => {
230
+ this.initialized = true;
231
+ this.resetIds();
232
+ this._invalidMessage = this.invalidMessage || constants.DEFAULT_INVALID_MESSAGE;
233
+ };
234
+ onMountHook_0();
235
+ const onMountHook_1 = () => {
236
+ this.setupObserver(this._ref);
237
+ };
238
+ onMountHook_1();
206
239
  this.watch0Fn();
207
240
  this.watch1Fn();
208
241
  this.watch2Fn();
@@ -211,14 +244,15 @@ const DBCheckbox = class {
211
244
  this.watch5Fn();
212
245
  }
213
246
  disconnectedCallback() {
214
- var _a;
247
+ var _a, _b;
215
248
  (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
249
+ (_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
216
250
  }
217
251
  render() {
218
252
  var _a;
219
- return (index.h("div", { key: '9bead8d138ba6b7f9df456409c54880035d74ca3', class: index$1.cls("db-checkbox", this.className), "data-size": this.size, "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-hide-label": index$1.getHideProp(this.showLabel) }, index.h("label", { key: 'f2d598b2c599ae1fdc61eb8a948b27a13b6059fe', htmlFor: this._id }, index.h("input", { key: '876cfc8632a429764fac5722513dbe418025dfdb', type: "checkbox", "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
253
+ return (index.h("div", { key: '669ca0c9e0f0a21581a88f7d95a2a338f1ac3be3', class: index$1.cls("db-checkbox", this.className), "data-size": this.size, "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-hide-label": index$1.getHideProp(this.showLabel) }, index.h("label", { key: '620ffa05d0288e333ce10b36e21680beeb7956c1', htmlFor: this._id }, index.h("input", { key: 'a06fd7e2f559940d18c869b02e758d3402e67783', type: "checkbox", "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
220
254
  this._ref = el;
221
- }, id: this._id, name: this.name, checked: index$1.getBoolean(this.checked, "checked"), disabled: index$1.getBoolean(this.disabled, "disabled"), value: this.value, required: index$1.getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : null, index.h("slot", { key: '32113165d250fd649d6e94d7721cbc152da104c1' })), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: '459d930b5908b6e61ad7bcc463b5b67e710bddc5', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), index.h("span", { key: 'cfcb23cc6fc53a5f82e56f83b1a9fffb279f0c67', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
255
+ }, id: this._id, name: this.name, checked: index$1.getBoolean(this.checked, "checked"), disabled: index$1.getBoolean(this.disabled, "disabled"), value: this.value, required: index$1.getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : null, index.h("slot", { key: '5a02a316cd8a9bd2813ce278e5dfa31f7c8bc57a' })), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: '7ec8ff76655cd5d26413cdad76049696453595ab', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), index.h("span", { key: 'a177359aaca2aa58b9847373bfb197f0a87cf80b', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
222
256
  }
223
257
  get rootElement() { return index.getElement(this); }
224
258
  static get watchers() { return {
@@ -6,6 +6,27 @@ var index$1 = require('./index-spuu3sXz.js');
6
6
  const DBCustomButton = class {
7
7
  constructor(hostRef) {
8
8
  index.registerInstance(this, hostRef);
9
+ this.observer = undefined;
10
+ }
11
+ setupObserver(element) {
12
+ if (!element)
13
+ return;
14
+ const parent = element.closest("db-custom-button");
15
+ if (!parent || this.observer)
16
+ return;
17
+ this.observer = new MutationObserver((mutations) => {
18
+ if (mutations.some((mutation) => {
19
+ var _a;
20
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
21
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
22
+ })) {
23
+ this.enableAttributePassing(element, "db-custom-button");
24
+ }
25
+ });
26
+ this.observer.observe(parent, {
27
+ attributes: true,
28
+ attributeOldValue: true,
29
+ });
9
30
  }
10
31
  /**
11
32
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -20,10 +41,15 @@ const DBCustomButton = class {
20
41
  const attr = attributes.item(i);
21
42
  if (attr && attr.name !== 'data-density' &&
22
43
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
23
- element.setAttribute(attr.name, attr.value);
44
+ if (attr.value) {
45
+ element.setAttribute(attr.name, attr.value);
46
+ }
47
+ else {
48
+ element.removeAttribute(attr.name);
49
+ }
24
50
  parent.removeAttribute(attr.name);
25
51
  }
26
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
52
+ else if (attr && ["style"].includes(attr.name)) {
27
53
  element.setAttribute(attr.name, attr.value);
28
54
  parent.removeAttribute(attr.name);
29
55
  }
@@ -31,7 +57,7 @@ const DBCustomButton = class {
31
57
  const isWebComponent = attr.value.includes("hydrated");
32
58
  const value = attr.value.replace("hydrated", "").trim();
33
59
  const currentClass = element.getAttribute("class");
34
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
60
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
35
61
  if (isWebComponent) {
36
62
  // Stencil is using this class for lazy loading component
37
63
  parent.setAttribute("class", "hydrated");
@@ -51,13 +77,18 @@ const DBCustomButton = class {
51
77
  }
52
78
  }
53
79
  this.enableAttributePassing(this._ref, "db-custom-button");
80
+ this.setupObserver(this._ref);
81
+ }
82
+ disconnectedCallback() {
83
+ var _a;
84
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
54
85
  }
55
86
  render() {
56
87
  var _a, _b, _c;
57
- return (index.h("div", { key: 'e947d7ffe6705c03ca3a1f9b5126c0f0d9449829', class: index$1.cls("db-custom-button", this.className), ref: (el) => {
88
+ return (index.h("div", { key: '6ef84eaa8f553eb89c921a9933fe0203df38f776', class: index$1.cls("db-custom-button", this.className), ref: (el) => {
58
89
  this._ref = el;
59
90
  }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": index$1.getBooleanAsString(this.showIconLeading, "showIconLeading") ||
60
- index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing, "showIconTrailing"), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-no-text": index$1.getBooleanAsString(this.noText, "noText") }, index.h("slot", { key: '126520ddf6d2582fab1a1083c6241f868f3520d2' })));
91
+ index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing, "showIconTrailing"), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-no-text": index$1.getBooleanAsString(this.noText, "noText") }, index.h("slot", { key: 'efb921b78ebebd9b13e33893efedaeb2d0ba5f66' })));
61
92
  }
62
93
  get rootElement() { return index.getElement(this); }
63
94
  };
@@ -9,6 +9,27 @@ const DBCustomSelectDropdown = class {
9
9
  constructor(hostRef) {
10
10
  index.registerInstance(this, hostRef);
11
11
  this.width = "fixed";
12
+ this.observer = undefined;
13
+ }
14
+ setupObserver(element) {
15
+ if (!element)
16
+ return;
17
+ const parent = element.closest("db-custom-select-dropdown");
18
+ if (!parent || this.observer)
19
+ return;
20
+ this.observer = new MutationObserver((mutations) => {
21
+ if (mutations.some((mutation) => {
22
+ var _a;
23
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
24
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
25
+ })) {
26
+ this.enableAttributePassing(element, "db-custom-select-dropdown");
27
+ }
28
+ });
29
+ this.observer.observe(parent, {
30
+ attributes: true,
31
+ attributeOldValue: true,
32
+ });
12
33
  }
13
34
  /**
14
35
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -23,10 +44,15 @@ const DBCustomSelectDropdown = class {
23
44
  const attr = attributes.item(i);
24
45
  if (attr && attr.name !== 'data-density' &&
25
46
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
26
- element.setAttribute(attr.name, attr.value);
47
+ if (attr.value) {
48
+ element.setAttribute(attr.name, attr.value);
49
+ }
50
+ else {
51
+ element.removeAttribute(attr.name);
52
+ }
27
53
  parent.removeAttribute(attr.name);
28
54
  }
29
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
55
+ else if (attr && ["style"].includes(attr.name)) {
30
56
  element.setAttribute(attr.name, attr.value);
31
57
  parent.removeAttribute(attr.name);
32
58
  }
@@ -34,7 +60,7 @@ const DBCustomSelectDropdown = class {
34
60
  const isWebComponent = attr.value.includes("hydrated");
35
61
  const value = attr.value.replace("hydrated", "").trim();
36
62
  const currentClass = element.getAttribute("class");
37
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
63
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
38
64
  if (isWebComponent) {
39
65
  // Stencil is using this class for lazy loading component
40
66
  parent.setAttribute("class", "hydrated");
@@ -54,12 +80,17 @@ const DBCustomSelectDropdown = class {
54
80
  }
55
81
  }
56
82
  this.enableAttributePassing(this._ref, "db-custom-select-dropdown");
83
+ this.setupObserver(this._ref);
84
+ }
85
+ disconnectedCallback() {
86
+ var _a;
87
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
57
88
  }
58
89
  render() {
59
90
  var _a, _b;
60
- return (index.h("article", { key: '13b37b76ab0d131cf2af06244ed304c8c408c9d8', class: index$1.cls("db-custom-select-dropdown db-card", this.className), "data-spacing": "none", ref: (el) => {
91
+ return (index.h("article", { key: '49bd2cef7c2c04b2ae3696fea83057858a59fd9a', class: index$1.cls("db-custom-select-dropdown db-card", this.className), "data-spacing": "none", ref: (el) => {
61
92
  this._ref = el;
62
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-width": this.width }, index.h("slot", { key: '517f62713be2bd021d767e7e2a2eb3817a96856b' })));
93
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-width": this.width }, index.h("slot", { key: '89ceec1851f4ffdb27f99b5f301e70784607c2c8' })));
63
94
  }
64
95
  get rootElement() { return index.getElement(this); }
65
96
  };
@@ -67,6 +98,27 @@ const DBCustomSelectDropdown = class {
67
98
  const DBCustomSelectList = class {
68
99
  constructor(hostRef) {
69
100
  index.registerInstance(this, hostRef);
101
+ this.observer = undefined;
102
+ }
103
+ setupObserver(element) {
104
+ if (!element)
105
+ return;
106
+ const parent = element.closest("db-custom-select-list");
107
+ if (!parent || this.observer)
108
+ return;
109
+ this.observer = new MutationObserver((mutations) => {
110
+ if (mutations.some((mutation) => {
111
+ var _a;
112
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
113
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
114
+ })) {
115
+ this.enableAttributePassing(element, "db-custom-select-list");
116
+ }
117
+ });
118
+ this.observer.observe(parent, {
119
+ attributes: true,
120
+ attributeOldValue: true,
121
+ });
70
122
  }
71
123
  /**
72
124
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -81,10 +133,15 @@ const DBCustomSelectList = class {
81
133
  const attr = attributes.item(i);
82
134
  if (attr && attr.name !== 'data-density' &&
83
135
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
84
- element.setAttribute(attr.name, attr.value);
136
+ if (attr.value) {
137
+ element.setAttribute(attr.name, attr.value);
138
+ }
139
+ else {
140
+ element.removeAttribute(attr.name);
141
+ }
85
142
  parent.removeAttribute(attr.name);
86
143
  }
87
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
144
+ else if (attr && ["style"].includes(attr.name)) {
88
145
  element.setAttribute(attr.name, attr.value);
89
146
  parent.removeAttribute(attr.name);
90
147
  }
@@ -92,7 +149,7 @@ const DBCustomSelectList = class {
92
149
  const isWebComponent = attr.value.includes("hydrated");
93
150
  const value = attr.value.replace("hydrated", "").trim();
94
151
  const currentClass = element.getAttribute("class");
95
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
152
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
96
153
  if (isWebComponent) {
97
154
  // Stencil is using this class for lazy loading component
98
155
  parent.setAttribute("class", "hydrated");
@@ -112,12 +169,17 @@ const DBCustomSelectList = class {
112
169
  }
113
170
  }
114
171
  this.enableAttributePassing(this._ref, "db-custom-select-list");
172
+ this.setupObserver(this._ref);
173
+ }
174
+ disconnectedCallback() {
175
+ var _a;
176
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
115
177
  }
116
178
  render() {
117
179
  var _a, _b;
118
- return (index.h("div", { key: 'd15aae83f167178e808513fd0ba9d35209db0b10', class: index$1.cls("db-custom-select-list", this.className), role: this.multiple ? "group" : "radiogroup", "aria-label": this.label, ref: (el) => {
180
+ return (index.h("div", { key: '2dee04c035ef27c7f398805eee1c77e7a3ad893c', class: index$1.cls("db-custom-select-list", this.className), role: this.multiple ? "group" : "radiogroup", "aria-label": this.label, ref: (el) => {
119
181
  this._ref = el;
120
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, index.h("ul", { key: 'c3ec4c14ca8c857a690c4d51d89654d0e1f49a4f' }, index.h("slot", { key: '663e6a50f1e117b7981a05946fc86f04b5892bb0' }))));
182
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, index.h("ul", { key: '64b6f1efc4344d7e274a5dd3ad78ce80983a8b77' }, index.h("slot", { key: '26e0de28808a85216b9f1dcb8f788928a0c62c15' }))));
121
183
  }
122
184
  get rootElement() { return index.getElement(this); }
123
185
  };
@@ -127,6 +189,7 @@ const DBCustomSelectListItem = class {
127
189
  index.registerInstance(this, hostRef);
128
190
  this.change = index.createEvent(this, "change");
129
191
  this.hasDivider = false;
192
+ this.observer = undefined;
130
193
  }
131
194
  handleChange(event) {
132
195
  event.stopPropagation();
@@ -140,6 +203,26 @@ const DBCustomSelectListItem = class {
140
203
  }
141
204
  return index$1.getBoolean(this.checked, "checked") ? "check" : "x_placeholder";
142
205
  }
206
+ setupObserver(element) {
207
+ if (!element)
208
+ return;
209
+ const parent = element.closest("db-custom-select-list-item");
210
+ if (!parent || this.observer)
211
+ return;
212
+ this.observer = new MutationObserver((mutations) => {
213
+ if (mutations.some((mutation) => {
214
+ var _a;
215
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
216
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
217
+ })) {
218
+ this.enableAttributePassing(element, "db-custom-select-list-item");
219
+ }
220
+ });
221
+ this.observer.observe(parent, {
222
+ attributes: true,
223
+ attributeOldValue: true,
224
+ });
225
+ }
143
226
  /**
144
227
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
145
228
  * @param element the ref for the component
@@ -153,10 +236,15 @@ const DBCustomSelectListItem = class {
153
236
  const attr = attributes.item(i);
154
237
  if (attr && attr.name !== 'data-density' &&
155
238
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
156
- element.setAttribute(attr.name, attr.value);
239
+ if (attr.value) {
240
+ element.setAttribute(attr.name, attr.value);
241
+ }
242
+ else {
243
+ element.removeAttribute(attr.name);
244
+ }
157
245
  parent.removeAttribute(attr.name);
158
246
  }
159
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
247
+ else if (attr && ["style"].includes(attr.name)) {
160
248
  element.setAttribute(attr.name, attr.value);
161
249
  parent.removeAttribute(attr.name);
162
250
  }
@@ -164,7 +252,7 @@ const DBCustomSelectListItem = class {
164
252
  const isWebComponent = attr.value.includes("hydrated");
165
253
  const value = attr.value.replace("hydrated", "").trim();
166
254
  const currentClass = element.getAttribute("class");
167
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
255
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
168
256
  if (isWebComponent) {
169
257
  // Stencil is using this class for lazy loading component
170
258
  parent.setAttribute("class", "hydrated");
@@ -190,11 +278,16 @@ const DBCustomSelectListItem = class {
190
278
  }
191
279
  }
192
280
  this.enableAttributePassing(this._ref, "db-custom-select-list-item");
281
+ this.setupObserver(this._ref);
193
282
  this.watch0Fn();
194
283
  }
284
+ disconnectedCallback() {
285
+ var _a;
286
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
287
+ }
195
288
  render() {
196
289
  var _a, _b;
197
- return (index.h("li", { key: '059526061cdd0b2c8d9e135d0594338e6a5f9579', class: index$1.cls("db-custom-select-list-item", this.className, {
290
+ return (index.h("li", { key: 'cb467f74569cd0505dab2ac02a9b375de8f5a9bc', class: index$1.cls("db-custom-select-list-item", this.className, {
198
291
  "db-checkbox": this.type === "checkbox" && !this.isGroupTitle,
199
292
  "db-radio": this.type !== "checkbox" && !this.isGroupTitle,
200
293
  }), ref: (el) => {
@@ -229,6 +322,7 @@ const DBInput = class {
229
322
  this._value = "";
230
323
  this._voiceOverFallback = "";
231
324
  this.abortController = undefined;
325
+ this.observer = undefined;
232
326
  }
233
327
  hasValidState() {
234
328
  var _a;
@@ -245,7 +339,7 @@ const DBInput = class {
245
339
  constants.DEFAULT_INVALID_MESSAGE;
246
340
  if (index$1.hasVoiceOver()) {
247
341
  this._voiceOverFallback = this._invalidMessage;
248
- index$1.delay(() => (this._voiceOverFallback = ""), 1000);
342
+ void index$1.delay(() => (this._voiceOverFallback = ""), 1000);
249
343
  }
250
344
  }
251
345
  else if (this.hasValidState() &&
@@ -254,7 +348,7 @@ const DBInput = class {
254
348
  this._descByIds = this._validMessageId;
255
349
  if (index$1.hasVoiceOver()) {
256
350
  this._voiceOverFallback = (_d = this.validMessage) !== null && _d !== void 0 ? _d : constants.DEFAULT_VALID_MESSAGE;
257
- index$1.delay(() => (this._voiceOverFallback = ""), 1000);
351
+ void index$1.delay(() => (this._voiceOverFallback = ""), 1000);
258
352
  }
259
353
  }
260
354
  else if (index$1.stringPropVisible(this.message, this.showMessage)) {
@@ -304,6 +398,26 @@ const DBInput = class {
304
398
  this._invalidMessageId = mId + constants.DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
305
399
  this._dataListId = mId + constants.DEFAULT_DATALIST_ID_SUFFIX;
306
400
  }
401
+ setupObserver(element) {
402
+ if (!element)
403
+ return;
404
+ const parent = element.closest("db-input");
405
+ if (!parent || this.observer)
406
+ return;
407
+ this.observer = new MutationObserver((mutations) => {
408
+ if (mutations.some((mutation) => {
409
+ var _a;
410
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
411
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
412
+ })) {
413
+ this.enableAttributePassing(element, "db-input");
414
+ }
415
+ });
416
+ this.observer.observe(parent, {
417
+ attributes: true,
418
+ attributeOldValue: true,
419
+ });
420
+ }
307
421
  /**
308
422
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
309
423
  * @param element the ref for the component
@@ -317,10 +431,15 @@ const DBInput = class {
317
431
  const attr = attributes.item(i);
318
432
  if (attr && attr.name !== 'data-density' &&
319
433
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
320
- element.setAttribute(attr.name, attr.value);
434
+ if (attr.value) {
435
+ element.setAttribute(attr.name, attr.value);
436
+ }
437
+ else {
438
+ element.removeAttribute(attr.name);
439
+ }
321
440
  parent.removeAttribute(attr.name);
322
441
  }
323
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
442
+ else if (attr && ["style"].includes(attr.name)) {
324
443
  element.setAttribute(attr.name, attr.value);
325
444
  parent.removeAttribute(attr.name);
326
445
  }
@@ -328,7 +447,7 @@ const DBInput = class {
328
447
  const isWebComponent = attr.value.includes("hydrated");
329
448
  const value = attr.value.replace("hydrated", "").trim();
330
449
  const currentClass = element.getAttribute("class");
331
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
450
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
332
451
  if (isWebComponent) {
333
452
  // Stencil is using this class for lazy loading component
334
453
  parent.setAttribute("class", "hydrated");
@@ -414,8 +533,15 @@ const DBInput = class {
414
533
  }
415
534
  }
416
535
  this.enableAttributePassing(this._ref, "db-input");
417
- this.resetIds();
418
- this._invalidMessage = this.invalidMessage || constants.DEFAULT_INVALID_MESSAGE;
536
+ const onMountHook_0 = () => {
537
+ this.resetIds();
538
+ this._invalidMessage = this.invalidMessage || constants.DEFAULT_INVALID_MESSAGE;
539
+ };
540
+ onMountHook_0();
541
+ const onMountHook_1 = () => {
542
+ this.setupObserver(this._ref);
543
+ };
544
+ onMountHook_1();
419
545
  this.watch0Fn();
420
546
  this.watch1Fn();
421
547
  this.watch2Fn();
@@ -423,16 +549,18 @@ const DBInput = class {
423
549
  this.watch4Fn();
424
550
  }
425
551
  disconnectedCallback() {
426
- var _a;
552
+ var _a, _b;
427
553
  (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
554
+ (_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
428
555
  }
429
556
  render() {
430
557
  var _a, _b, _c, _d, _e, _f, _g, _h;
431
- return (index.h("div", { key: '64a07c04f43170bf1595b0081713388a216d5fc7', class: index$1.cls("db-input", this.className), "data-variant": this.variant, "data-hide-label": index$1.getHideProp(this.showLabel), "data-show-icon": index$1.getBooleanAsString(this.showIconLeading, "showIconLeading") ||
432
- index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-icon": (_a = this.iconLeading) !== null && _a !== void 0 ? _a : this.icon, "data-icon-trailing": this.iconTrailing, "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing, "showIconTrailing") }, index.h("label", { key: '7a8d23a161226ed00f450b27a761230c29b12594', htmlFor: this._id }, (_b = this.label) !== null && _b !== void 0 ? _b : constants.DEFAULT_LABEL), index.h("input", { key: '1564ed32f96a2b74bdcf3caf559cf2d2d10ec0b9', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
558
+ return (index.h("div", { key: 'c8140e1e7d447fd4d65829dde8090110d0e421dc', class: index$1.cls("db-input", this.className), "data-variant": this.variant, "data-hide-label": index$1.getHideProp(this.showLabel), "data-show-icon": index$1.getBooleanAsString(this.showIconLeading, "showIconLeading") ||
559
+ index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-icon": (_a = this.iconLeading) !== null && _a !== void 0 ? _a : this.icon, "data-icon-trailing": this.iconTrailing, "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing, "showIconTrailing") }, index.h("label", { key: '7ce81ede48602af85d5bf770c01ef0731d1774ec', htmlFor: this._id }, (_b = this.label) !== null && _b !== void 0 ? _b : constants.DEFAULT_LABEL), index.h("input", { key: '880aea669e5decea1d0c865bd27981ab082c9fec', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
433
560
  this._ref = el;
434
561
  }, id: this._id, name: this.name, type: this.type || "text", multiple: index$1.getBoolean(this.multiple, "multiple"), accept: this.accept, placeholder: (_c = this.placeholder) !== null && _c !== void 0 ? _c : constants.DEFAULT_PLACEHOLDER, disabled: index$1.getBoolean(this.disabled, "disabled"), required: index$1.getBoolean(this.required, "required"), step: index$1.getStep(this.step), value: (_e = (_d = this.value) !== null && _d !== void 0 ? _d : this._value) !== null && _e !== void 0 ? _e : "", maxLength: index$1.getNumber(this.maxLength, this.maxlength), minLength: index$1.getNumber(this.minLength, this.minlength), max: index$1.getInputValue(this.max, this.type), min: index$1.getInputValue(this.min, this.type), readOnly: index$1.getBoolean(this.readOnly, "readOnly") ||
435
- index$1.getBoolean(this.readonly, "readonly"), form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: index$1.getBoolean(this.autofocus, "autofocus"), enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (_f = this.ariaDescribedBy) !== null && _f !== void 0 ? _f : this._descByIds, role: [
562
+ index$1.getBoolean(this.readonly, "readonly") ||
563
+ undefined, form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: index$1.getBoolean(this.autofocus, "autofocus"), enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (_f = this.ariaDescribedBy) !== null && _f !== void 0 ? _f : this._descByIds, role: [
436
564
  "datetime-local",
437
565
  "date",
438
566
  "time",
@@ -441,7 +569,7 @@ const DBInput = class {
441
569
  "color",
442
570
  ].includes((_g = this.type) !== null && _g !== void 0 ? _g : "") && index$1.isIOSSafari()
443
571
  ? "textbox"
444
- : undefined }), this.dataList ? (index.h("datalist", { id: this._dataListId }, (_h = this.getDataList()) === null || _h === void 0 ? void 0 : _h.map((option) => (index.h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, index.h("slot", { key: '8af26ede51b91478695480eb1d2b2e2f1da92200' }), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: this.messageSize || "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { semantic: "successful", id: this._validMessageId, size: this.validMessageSize || "small" }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: '752867b52a5abc2bcd4355af5c339e255d1bd36a', semantic: "critical", id: this._invalidMessageId, size: this.invalidMessageSize || "small" }, this._invalidMessage), index.h("span", { key: '49df2802f19e930d5900d9fa639cfc1c5be584de', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
572
+ : undefined }), this.dataList ? (index.h("datalist", { id: this._dataListId }, (_h = this.getDataList()) === null || _h === void 0 ? void 0 : _h.map((option) => (index.h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, index.h("slot", { key: 'c119d0f17fc00de285fba88f3748235b914691ff' }), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: this.messageSize || "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { semantic: "successful", id: this._validMessageId, size: this.validMessageSize || "small" }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: '2ee3dc9555e0a21f6645807077c0b1af6dd08043', semantic: "critical", id: this._invalidMessageId, size: this.invalidMessageSize || "small" }, this._invalidMessage), index.h("span", { key: '5a3a55b62468522a3198957be4b5a72c818316b4', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
445
573
  }
446
574
  get rootElement() { return index.getElement(this); }
447
575
  static get watchers() { return {
@@ -472,6 +600,7 @@ const DBTag = class {
472
600
  constructor(hostRef) {
473
601
  index.registerInstance(this, hostRef);
474
602
  this.remove = index.createEvent(this, "remove");
603
+ this.observer = undefined;
475
604
  }
476
605
  handleRemove(event) {
477
606
  if (!event)
@@ -488,6 +617,26 @@ const DBTag = class {
488
617
  // TODO: We should think this through again, if we would really like to have default and especially english, instead of german labels in here
489
618
  return constants.DEFAULT_REMOVE;
490
619
  }
620
+ setupObserver(element) {
621
+ if (!element)
622
+ return;
623
+ const parent = element.closest("db-tag");
624
+ if (!parent || this.observer)
625
+ return;
626
+ this.observer = new MutationObserver((mutations) => {
627
+ if (mutations.some((mutation) => {
628
+ var _a;
629
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
630
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
631
+ })) {
632
+ this.enableAttributePassing(element, "db-tag");
633
+ }
634
+ });
635
+ this.observer.observe(parent, {
636
+ attributes: true,
637
+ attributeOldValue: true,
638
+ });
639
+ }
491
640
  /**
492
641
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
493
642
  * @param element the ref for the component
@@ -501,10 +650,15 @@ const DBTag = class {
501
650
  const attr = attributes.item(i);
502
651
  if (attr && attr.name !== 'data-density' &&
503
652
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
504
- element.setAttribute(attr.name, attr.value);
653
+ if (attr.value) {
654
+ element.setAttribute(attr.name, attr.value);
655
+ }
656
+ else {
657
+ element.removeAttribute(attr.name);
658
+ }
505
659
  parent.removeAttribute(attr.name);
506
660
  }
507
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
661
+ else if (attr && ["style"].includes(attr.name)) {
508
662
  element.setAttribute(attr.name, attr.value);
509
663
  parent.removeAttribute(attr.name);
510
664
  }
@@ -512,7 +666,7 @@ const DBTag = class {
512
666
  const isWebComponent = attr.value.includes("hydrated");
513
667
  const value = attr.value.replace("hydrated", "").trim();
514
668
  const currentClass = element.getAttribute("class");
515
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
669
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
516
670
  if (isWebComponent) {
517
671
  // Stencil is using this class for lazy loading component
518
672
  parent.setAttribute("class", "hydrated");
@@ -532,12 +686,17 @@ const DBTag = class {
532
686
  }
533
687
  }
534
688
  this.enableAttributePassing(this._ref, "db-tag");
689
+ this.setupObserver(this._ref);
690
+ }
691
+ disconnectedCallback() {
692
+ var _a;
693
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
535
694
  }
536
695
  render() {
537
696
  var _a, _b, _c;
538
- return (index.h("div", { key: '107c28ac3b48e7802773283ed706536b3448f7fd', class: index$1.cls("db-tag", this.className), ref: (el) => {
697
+ return (index.h("div", { key: '22654726ea465c2b07942705dfcf72162c11e314', class: index$1.cls("db-tag", this.className), ref: (el) => {
539
698
  this._ref = el;
540
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": index$1.getBooleanAsString((_c = this.showCheckState) !== null && _c !== void 0 ? _c : true, "showCheckState"), "data-show-icon": index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-no-text": index$1.getBooleanAsString(this.noText, "noText"), "data-overflow": index$1.getBooleanAsString(this.overflow, "overflow") }, index.h("slot", { key: '7a552ce39473ee8f5ab9ff0fa26e1c9cb746141a', name: "content" }), this.text ? this.text : null, index.h("slot", { key: '3ace0ceb3415b63574e959214beb6af40071e1b6' }), this.behavior === "removable" ? (index.h("button", { class: "db-button db-tab-remove-button", "data-icon": "cross", "data-size": "small", "data-no-text": "true", "data-variant": "ghost", type: "button", onClick: (event) => this.handleRemove(event) }, index.h("db-tooltip", { variant: "label" }, this.getRemoveButtonText()))) : null));
699
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": index$1.getBooleanAsString((_c = this.showCheckState) !== null && _c !== void 0 ? _c : true, "showCheckState"), "data-show-icon": index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-no-text": index$1.getBooleanAsString(this.noText, "noText"), "data-overflow": index$1.getBooleanAsString(this.overflow, "overflow") }, index.h("slot", { key: '284aa3b6bce1595939f667e8a511319879545e27', name: "content" }), this.text ? this.text : null, index.h("slot", { key: '7471ead10bf5f95654444020e6b76d0b2f64486b' }), this.behavior === "removable" ? (index.h("button", { class: "db-button db-tab-remove-button", "data-icon": "cross", "data-size": "small", "data-no-text": "true", "data-variant": "ghost", type: "button", onClick: (event) => this.handleRemove(event) }, index.h("db-tooltip", { variant: "label" }, this.getRemoveButtonText()))) : null));
541
700
  }
542
701
  get rootElement() { return index.getElement(this); }
543
702
  };