@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
@@ -10,6 +10,7 @@ const DBTabItem = class {
10
10
  this.initialized = false;
11
11
  this._listenerAdded = false;
12
12
  this.boundSetSelectedOnChange = undefined;
13
+ this.observer = undefined;
13
14
  }
14
15
  setSelectedOnChange(event) {
15
16
  event.stopPropagation();
@@ -31,6 +32,26 @@ const DBTabItem = class {
31
32
  this.change.emit(event);
32
33
  }
33
34
  }
35
+ setupObserver(element) {
36
+ if (!element)
37
+ return;
38
+ const parent = element.closest("db-tab-item");
39
+ if (!parent || this.observer)
40
+ return;
41
+ this.observer = new MutationObserver((mutations) => {
42
+ if (mutations.some((mutation) => {
43
+ var _a;
44
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
45
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
46
+ })) {
47
+ this.enableAttributePassing(element, "db-tab-item");
48
+ }
49
+ });
50
+ this.observer.observe(parent, {
51
+ attributes: true,
52
+ attributeOldValue: true,
53
+ });
54
+ }
34
55
  /**
35
56
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
36
57
  * @param element the ref for the component
@@ -44,10 +65,15 @@ const DBTabItem = class {
44
65
  const attr = attributes.item(i);
45
66
  if (attr && attr.name !== 'data-density' &&
46
67
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
47
- element.setAttribute(attr.name, attr.value);
68
+ if (attr.value) {
69
+ element.setAttribute(attr.name, attr.value);
70
+ }
71
+ else {
72
+ element.removeAttribute(attr.name);
73
+ }
48
74
  parent.removeAttribute(attr.name);
49
75
  }
50
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
76
+ else if (attr && ["style"].includes(attr.name)) {
51
77
  element.setAttribute(attr.name, attr.value);
52
78
  parent.removeAttribute(attr.name);
53
79
  }
@@ -55,7 +81,7 @@ const DBTabItem = class {
55
81
  const isWebComponent = attr.value.includes("hydrated");
56
82
  const value = attr.value.replace("hydrated", "").trim();
57
83
  const currentClass = element.getAttribute("class");
58
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
84
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
59
85
  if (isWebComponent) {
60
86
  // Stencil is using this class for lazy loading component
61
87
  parent.setAttribute("class", "hydrated");
@@ -103,25 +129,33 @@ const DBTabItem = class {
103
129
  }
104
130
  }
105
131
  this.enableAttributePassing(this._ref, "db-tab-item");
106
- this.boundSetSelectedOnChange = this.setSelectedOnChange.bind(this);
107
- this.initialized = true;
132
+ const onMountHook_0 = () => {
133
+ this.boundSetSelectedOnChange = this.setSelectedOnChange.bind(this);
134
+ this.initialized = true;
135
+ };
136
+ onMountHook_0();
137
+ const onMountHook_1 = () => {
138
+ this.setupObserver(this._ref);
139
+ };
140
+ onMountHook_1();
108
141
  this.watch0Fn();
109
142
  this.watch1Fn();
110
143
  }
111
144
  disconnectedCallback() {
112
- var _a;
145
+ var _a, _b;
113
146
  if (this._listenerAdded && this._ref && this.boundSetSelectedOnChange) {
114
147
  (_a = this._ref
115
148
  .closest("[role=tablist]")) === null || _a === void 0 ? void 0 : _a.removeEventListener("change", this.boundSetSelectedOnChange);
116
149
  this._listenerAdded = false;
117
150
  }
151
+ (_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
118
152
  }
119
153
  render() {
120
154
  var _a, _b, _c, _d, _e;
121
- return (h("li", { key: '8189c400a6ac975657082338dd31d96a2d0c38d9', class: cls("db-tab-item", this.className), role: "none" }, h("label", { key: '08c6f0760a4cc6f5758d22380c94331858f4823d', htmlFor: (_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-icon-trailing": this.iconTrailing, "data-show-icon": getBooleanAsString(this.showIconLeading, "showIconLeading") ||
122
- getBooleanAsString(this.showIcon, "showIcon"), "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing, "showIconTrailing"), "data-no-text": getBooleanAsString(this.noText, "noText") }, h("input", { key: '6729729ae705d60fa25cb49850cc54166b7f56a0', type: "radio", role: "tab", disabled: getBoolean(this.disabled, "disabled"), "aria-selected": this._selected, checked: getBoolean(this.checked, "checked"), ref: (el) => {
155
+ return (h("li", { key: '003e5b968c65ba01df1b97e8f75592aee31125d9', class: cls("db-tab-item", this.className), role: "none" }, h("label", { key: '682e5a3cf7036abcbbbbbba9f42ce534d7a4145d', htmlFor: (_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-icon-trailing": this.iconTrailing, "data-show-icon": getBooleanAsString(this.showIconLeading, "showIconLeading") ||
156
+ getBooleanAsString(this.showIcon, "showIcon"), "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing, "showIconTrailing"), "data-no-text": getBooleanAsString(this.noText, "noText") }, h("input", { key: 'ffb91a8e7248a8e5a2a7a05c6828fc6203e1eb37', type: "radio", role: "tab", disabled: getBoolean(this.disabled, "disabled"), "aria-selected": this._selected, checked: getBoolean(this.checked, "checked"), ref: (el) => {
123
157
  this._ref = el;
124
- }, name: this._name, id: (_d = this.id) !== null && _d !== void 0 ? _d : (_e = this.propOverrides) === null || _e === void 0 ? void 0 : _e.id, onInput: (event) => this.handleChange(event) }), this.label ? this.label : null, h("slot", { key: 'eb4bc6568c4c6d63706d2f5927ea73fd5d40d6ac' }))));
158
+ }, name: this._name, id: (_d = this.id) !== null && _d !== void 0 ? _d : (_e = this.propOverrides) === null || _e === void 0 ? void 0 : _e.id, onInput: (event) => this.handleChange(event) }), this.label ? this.label : null, h("slot", { key: '2d079503cd365448cd054e05bfaec608ff476e04' }))));
125
159
  }
126
160
  get rootElement() { return getElement(this); }
127
161
  static get watchers() { return {
@@ -143,6 +177,27 @@ const DBTabItem = class {
143
177
  const DBTabList = class {
144
178
  constructor(hostRef) {
145
179
  registerInstance(this, hostRef);
180
+ this.observer = undefined;
181
+ }
182
+ setupObserver(element) {
183
+ if (!element)
184
+ return;
185
+ const parent = element.closest("db-tab-list");
186
+ if (!parent || this.observer)
187
+ return;
188
+ this.observer = new MutationObserver((mutations) => {
189
+ if (mutations.some((mutation) => {
190
+ var _a;
191
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
192
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
193
+ })) {
194
+ this.enableAttributePassing(element, "db-tab-list");
195
+ }
196
+ });
197
+ this.observer.observe(parent, {
198
+ attributes: true,
199
+ attributeOldValue: true,
200
+ });
146
201
  }
147
202
  /**
148
203
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -157,10 +212,15 @@ const DBTabList = class {
157
212
  const attr = attributes.item(i);
158
213
  if (attr && attr.name !== 'data-density' &&
159
214
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
160
- element.setAttribute(attr.name, attr.value);
215
+ if (attr.value) {
216
+ element.setAttribute(attr.name, attr.value);
217
+ }
218
+ else {
219
+ element.removeAttribute(attr.name);
220
+ }
161
221
  parent.removeAttribute(attr.name);
162
222
  }
163
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
223
+ else if (attr && ["style"].includes(attr.name)) {
164
224
  element.setAttribute(attr.name, attr.value);
165
225
  parent.removeAttribute(attr.name);
166
226
  }
@@ -168,7 +228,7 @@ const DBTabList = class {
168
228
  const isWebComponent = attr.value.includes("hydrated");
169
229
  const value = attr.value.replace("hydrated", "").trim();
170
230
  const currentClass = element.getAttribute("class");
171
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
231
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
172
232
  if (isWebComponent) {
173
233
  // Stencil is using this class for lazy loading component
174
234
  parent.setAttribute("class", "hydrated");
@@ -188,12 +248,17 @@ const DBTabList = class {
188
248
  }
189
249
  }
190
250
  this.enableAttributePassing(this._ref, "db-tab-list");
251
+ this.setupObserver(this._ref);
252
+ }
253
+ disconnectedCallback() {
254
+ var _a;
255
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
191
256
  }
192
257
  render() {
193
258
  var _a, _b;
194
- return (h("div", { key: '9459e474559fa115dc69cb188e4c490a522d035c', class: cls("db-tab-list", this.className), ref: (el) => {
259
+ return (h("div", { key: '2538ba05ecad54c8c29dda93a08acb61faf02309', class: cls("db-tab-list", this.className), ref: (el) => {
195
260
  this._ref = el;
196
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("ul", { key: '7d2dbddd6ad03047abd8572b6125a53072ff94d0', role: "tablist" }, h("slot", { key: '10079c1b3bbc66157a0603e55ea1f5f48aee0faf' }))));
261
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("ul", { key: '86824302eb2cc92ca45a61d8bdec0f34cd679db6', role: "tablist" }, h("slot", { key: 'b56406b1e0291a29905b599531c0dccd9c035504' }))));
197
262
  }
198
263
  get rootElement() { return getElement(this); }
199
264
  };
@@ -201,6 +266,27 @@ const DBTabList = class {
201
266
  const DBTabPanel = class {
202
267
  constructor(hostRef) {
203
268
  registerInstance(this, hostRef);
269
+ this.observer = undefined;
270
+ }
271
+ setupObserver(element) {
272
+ if (!element)
273
+ return;
274
+ const parent = element.closest("db-tab-panel");
275
+ if (!parent || this.observer)
276
+ return;
277
+ this.observer = new MutationObserver((mutations) => {
278
+ if (mutations.some((mutation) => {
279
+ var _a;
280
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
281
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
282
+ })) {
283
+ this.enableAttributePassing(element, "db-tab-panel");
284
+ }
285
+ });
286
+ this.observer.observe(parent, {
287
+ attributes: true,
288
+ attributeOldValue: true,
289
+ });
204
290
  }
205
291
  /**
206
292
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -215,10 +301,15 @@ const DBTabPanel = class {
215
301
  const attr = attributes.item(i);
216
302
  if (attr && attr.name !== 'data-density' &&
217
303
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
218
- element.setAttribute(attr.name, attr.value);
304
+ if (attr.value) {
305
+ element.setAttribute(attr.name, attr.value);
306
+ }
307
+ else {
308
+ element.removeAttribute(attr.name);
309
+ }
219
310
  parent.removeAttribute(attr.name);
220
311
  }
221
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
312
+ else if (attr && ["style"].includes(attr.name)) {
222
313
  element.setAttribute(attr.name, attr.value);
223
314
  parent.removeAttribute(attr.name);
224
315
  }
@@ -226,7 +317,7 @@ const DBTabPanel = class {
226
317
  const isWebComponent = attr.value.includes("hydrated");
227
318
  const value = attr.value.replace("hydrated", "").trim();
228
319
  const currentClass = element.getAttribute("class");
229
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
320
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
230
321
  if (isWebComponent) {
231
322
  // Stencil is using this class for lazy loading component
232
323
  parent.setAttribute("class", "hydrated");
@@ -246,12 +337,20 @@ const DBTabPanel = class {
246
337
  }
247
338
  }
248
339
  this.enableAttributePassing(this._ref, "db-tab-panel");
340
+ const onMountHook_1 = () => {
341
+ this.setupObserver(this._ref);
342
+ };
343
+ onMountHook_1();
344
+ }
345
+ disconnectedCallback() {
346
+ var _a;
347
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
249
348
  }
250
349
  render() {
251
350
  var _a, _b;
252
- return (h("section", { key: 'c5b52e3d5bce98a32f2dba1956f58d707ae1b89b', class: cls("db-tab-panel", this.className), role: "tabpanel", ref: (el) => {
351
+ return (h("section", { key: 'd7179207343d512194f69f6d99a34897c146c00a', class: cls("db-tab-panel", this.className), role: "tabpanel", ref: (el) => {
253
352
  this._ref = el;
254
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, this.content ? this.content : null, h("slot", { key: 'd64ba9e9cdbb15198934c7069f7e2390c3c443e8' })));
353
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, this.content ? this.content : null, h("slot", { key: 'dc745b430dd17f253cf9403c28f6c2cbd5b59020' })));
255
354
  }
256
355
  get rootElement() { return getElement(this); }
257
356
  };
@@ -18,10 +18,15 @@ const DBTableBody = class {
18
18
  const attr = attributes.item(i);
19
19
  if (attr && attr.name !== 'data-density' &&
20
20
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
21
- element.setAttribute(attr.name, attr.value);
21
+ if (attr.value) {
22
+ element.setAttribute(attr.name, attr.value);
23
+ }
24
+ else {
25
+ element.removeAttribute(attr.name);
26
+ }
22
27
  parent.removeAttribute(attr.name);
23
28
  }
24
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
29
+ else if (attr && ["style"].includes(attr.name)) {
25
30
  element.setAttribute(attr.name, attr.value);
26
31
  parent.removeAttribute(attr.name);
27
32
  }
@@ -29,7 +34,7 @@ const DBTableBody = class {
29
34
  const isWebComponent = attr.value.includes("hydrated");
30
35
  const value = attr.value.replace("hydrated", "").trim();
31
36
  const currentClass = element.getAttribute("class");
32
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
37
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
33
38
  if (isWebComponent) {
34
39
  // Stencil is using this class for lazy loading component
35
40
  parent.setAttribute("class", "hydrated");
@@ -52,7 +57,7 @@ const DBTableBody = class {
52
57
  }
53
58
  render() {
54
59
  var _a;
55
- return (h("tbody", { key: 'c497d5a4be20eda6884e6e04b37ef7c9e211f307', class: cls("db-table-body", this.className), ref: (el) => {
60
+ return (h("tbody", { key: 'b6033bbe9cdcdb6bb9d292f68e980a6737fef9fa', class: cls("db-table-body", this.className), ref: (el) => {
56
61
  this._ref = el;
57
62
  }, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index) => {
58
63
  var _a, _b, _c;
@@ -79,10 +84,15 @@ const DBTableFooter = class {
79
84
  const attr = attributes.item(i);
80
85
  if (attr && attr.name !== 'data-density' &&
81
86
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
82
- element.setAttribute(attr.name, attr.value);
87
+ if (attr.value) {
88
+ element.setAttribute(attr.name, attr.value);
89
+ }
90
+ else {
91
+ element.removeAttribute(attr.name);
92
+ }
83
93
  parent.removeAttribute(attr.name);
84
94
  }
85
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
95
+ else if (attr && ["style"].includes(attr.name)) {
86
96
  element.setAttribute(attr.name, attr.value);
87
97
  parent.removeAttribute(attr.name);
88
98
  }
@@ -90,7 +100,7 @@ const DBTableFooter = class {
90
100
  const isWebComponent = attr.value.includes("hydrated");
91
101
  const value = attr.value.replace("hydrated", "").trim();
92
102
  const currentClass = element.getAttribute("class");
93
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
103
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
94
104
  if (isWebComponent) {
95
105
  // Stencil is using this class for lazy loading component
96
106
  parent.setAttribute("class", "hydrated");
@@ -113,7 +123,7 @@ const DBTableFooter = class {
113
123
  }
114
124
  render() {
115
125
  var _a;
116
- return (h("tfoot", { key: 'ba1fcacfa32d5746615ba0aaaa5580a6c5c92f99', class: cls("db-table-footer", this.className), ref: (el) => {
126
+ return (h("tfoot", { key: '735f3ce4c1d6a3305993a8de60c797e9ce2bcd20', class: cls("db-table-footer", this.className), ref: (el) => {
117
127
  this._ref = el;
118
128
  }, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index) => {
119
129
  var _a, _b, _c;
@@ -126,10 +136,31 @@ const DBTableFooter = class {
126
136
  const DBTableHead = class {
127
137
  constructor(hostRef) {
128
138
  registerInstance(this, hostRef);
139
+ this.observer = undefined;
129
140
  }
130
141
  getCells(cells) {
131
142
  return cells === null || cells === void 0 ? void 0 : cells.map((cell) => (Object.assign(Object.assign({}, cell), { headerCell: true })));
132
143
  }
144
+ setupObserver(element) {
145
+ if (!element)
146
+ return;
147
+ const parent = element.closest("db-table-head");
148
+ if (!parent || this.observer)
149
+ return;
150
+ this.observer = new MutationObserver((mutations) => {
151
+ if (mutations.some((mutation) => {
152
+ var _a;
153
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
154
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
155
+ })) {
156
+ this.enableAttributePassing(element, "db-table-head");
157
+ }
158
+ });
159
+ this.observer.observe(parent, {
160
+ attributes: true,
161
+ attributeOldValue: true,
162
+ });
163
+ }
133
164
  /**
134
165
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
135
166
  * @param element the ref for the component
@@ -143,10 +174,15 @@ const DBTableHead = class {
143
174
  const attr = attributes.item(i);
144
175
  if (attr && attr.name !== 'data-density' &&
145
176
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
146
- element.setAttribute(attr.name, attr.value);
177
+ if (attr.value) {
178
+ element.setAttribute(attr.name, attr.value);
179
+ }
180
+ else {
181
+ element.removeAttribute(attr.name);
182
+ }
147
183
  parent.removeAttribute(attr.name);
148
184
  }
149
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
185
+ else if (attr && ["style"].includes(attr.name)) {
150
186
  element.setAttribute(attr.name, attr.value);
151
187
  parent.removeAttribute(attr.name);
152
188
  }
@@ -154,7 +190,7 @@ const DBTableHead = class {
154
190
  const isWebComponent = attr.value.includes("hydrated");
155
191
  const value = attr.value.replace("hydrated", "").trim();
156
192
  const currentClass = element.getAttribute("class");
157
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
193
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
158
194
  if (isWebComponent) {
159
195
  // Stencil is using this class for lazy loading component
160
196
  parent.setAttribute("class", "hydrated");
@@ -174,10 +210,15 @@ const DBTableHead = class {
174
210
  }
175
211
  }
176
212
  this.enableAttributePassing(this._ref, "db-table-head");
213
+ this.setupObserver(this._ref);
214
+ }
215
+ disconnectedCallback() {
216
+ var _a;
217
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
177
218
  }
178
219
  render() {
179
220
  var _a;
180
- return (h("thead", { key: '1f192104b5b30bb15bc16d68f635382bc9d6817a', class: cls("db-table-head", this.className), ref: (el) => {
221
+ return (h("thead", { key: '340673440fd36e5522f70683bef5a4356f73cb69', class: cls("db-table-head", this.className), ref: (el) => {
181
222
  this._ref = el;
182
223
  }, id: this.id }, this.rows ? ((_a = this.rows) === null || _a === void 0 ? void 0 : _a.map((row, index) => {
183
224
  var _a, _b, _c;
@@ -4,6 +4,27 @@ import { c as cls } from './index-fumiz06Y.js';
4
4
  const DBTableCaption = class {
5
5
  constructor(hostRef) {
6
6
  registerInstance(this, hostRef);
7
+ this.observer = undefined;
8
+ }
9
+ setupObserver(element) {
10
+ if (!element)
11
+ return;
12
+ const parent = element.closest("db-table-caption");
13
+ if (!parent || this.observer)
14
+ return;
15
+ this.observer = new MutationObserver((mutations) => {
16
+ if (mutations.some((mutation) => {
17
+ var _a;
18
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
19
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
20
+ })) {
21
+ this.enableAttributePassing(element, "db-table-caption");
22
+ }
23
+ });
24
+ this.observer.observe(parent, {
25
+ attributes: true,
26
+ attributeOldValue: true,
27
+ });
7
28
  }
8
29
  /**
9
30
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -18,10 +39,15 @@ const DBTableCaption = class {
18
39
  const attr = attributes.item(i);
19
40
  if (attr && attr.name !== 'data-density' &&
20
41
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
21
- element.setAttribute(attr.name, attr.value);
42
+ if (attr.value) {
43
+ element.setAttribute(attr.name, attr.value);
44
+ }
45
+ else {
46
+ element.removeAttribute(attr.name);
47
+ }
22
48
  parent.removeAttribute(attr.name);
23
49
  }
24
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
50
+ else if (attr && ["style"].includes(attr.name)) {
25
51
  element.setAttribute(attr.name, attr.value);
26
52
  parent.removeAttribute(attr.name);
27
53
  }
@@ -29,7 +55,7 @@ const DBTableCaption = class {
29
55
  const isWebComponent = attr.value.includes("hydrated");
30
56
  const value = attr.value.replace("hydrated", "").trim();
31
57
  const currentClass = element.getAttribute("class");
32
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
58
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
33
59
  if (isWebComponent) {
34
60
  // Stencil is using this class for lazy loading component
35
61
  parent.setAttribute("class", "hydrated");
@@ -49,11 +75,16 @@ const DBTableCaption = class {
49
75
  }
50
76
  }
51
77
  this.enableAttributePassing(this._ref, "db-table-caption");
78
+ this.setupObserver(this._ref);
79
+ }
80
+ disconnectedCallback() {
81
+ var _a;
82
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
52
83
  }
53
84
  render() {
54
- return (h("caption", { key: '45129365b814f87e7d337464f8f768fb3d9bd9c8', class: cls("db-table-caption", this.className), ref: (el) => {
85
+ return (h("caption", { key: '5ef3476c6c9879f1fcf8548e11bea82516bd29d1', class: cls("db-table-caption", this.className), ref: (el) => {
55
86
  this._ref = el;
56
- }, id: this.id }, h("slot", { key: '80e7f4789799c755d2a03b55ef8ee7e05939bf96' })));
87
+ }, id: this.id }, h("slot", { key: 'e20d1d699e7ab50422c0d40bdf058c8863ae4991' })));
57
88
  }
58
89
  get rootElement() { return getElement(this); }
59
90
  };
@@ -6,6 +6,7 @@ const DBTable = class {
6
6
  registerInstance(this, hostRef);
7
7
  this._data = undefined;
8
8
  this._style = undefined;
9
+ this.observer = undefined;
9
10
  }
10
11
  convertData() {
11
12
  try {
@@ -19,6 +20,26 @@ const DBTable = class {
19
20
  }
20
21
  return {};
21
22
  }
23
+ setupObserver(element) {
24
+ if (!element)
25
+ return;
26
+ const parent = element.closest("db-table");
27
+ if (!parent || this.observer)
28
+ return;
29
+ this.observer = new MutationObserver((mutations) => {
30
+ if (mutations.some((mutation) => {
31
+ var _a;
32
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
33
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
34
+ })) {
35
+ this.enableAttributePassing(element, "db-table");
36
+ }
37
+ });
38
+ this.observer.observe(parent, {
39
+ attributes: true,
40
+ attributeOldValue: true,
41
+ });
42
+ }
22
43
  /**
23
44
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
24
45
  * @param element the ref for the component
@@ -32,10 +53,15 @@ const DBTable = class {
32
53
  const attr = attributes.item(i);
33
54
  if (attr && attr.name !== 'data-density' &&
34
55
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
35
- element.setAttribute(attr.name, attr.value);
56
+ if (attr.value) {
57
+ element.setAttribute(attr.name, attr.value);
58
+ }
59
+ else {
60
+ element.removeAttribute(attr.name);
61
+ }
36
62
  parent.removeAttribute(attr.name);
37
63
  }
38
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
64
+ else if (attr && ["style"].includes(attr.name)) {
39
65
  element.setAttribute(attr.name, attr.value);
40
66
  parent.removeAttribute(attr.name);
41
67
  }
@@ -43,7 +69,7 @@ const DBTable = class {
43
69
  const isWebComponent = attr.value.includes("hydrated");
44
70
  const value = attr.value.replace("hydrated", "").trim();
45
71
  const currentClass = element.getAttribute("class");
46
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
72
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
47
73
  if (isWebComponent) {
48
74
  // Stencil is using this class for lazy loading component
49
75
  parent.setAttribute("class", "hydrated");
@@ -123,13 +149,18 @@ const DBTable = class {
123
149
  }
124
150
  }
125
151
  this.enableAttributePassing(this._ref, "db-table");
152
+ this.setupObserver(this._ref);
126
153
  this.watch0Fn();
127
154
  this.watch1Fn();
128
155
  this.watch2Fn();
129
156
  }
157
+ disconnectedCallback() {
158
+ var _a;
159
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
160
+ }
130
161
  render() {
131
162
  var _a, _b, _c, _d, _e, _f;
132
- return (h("div", { key: 'd4edb3348e35410ac540499f815e173237e533dc', class: cls("db-table", this.className), style: this._style, "data-width": this.width, "data-size": this.size, "data-divider": this.divider, "data-variant": this.variant, "data-mobile-variant": this.mobileVariant, "data-show-caption": getBooleanAsString(this.showCaption), "data-sticky-header": this.stickyHeader }, h("table", { key: '2eda8c59f2c86a480691a1a4fae4a1fdaa63a6b1', ref: (el) => {
163
+ return (h("div", { key: '7e6ea12b6cb4b2ddcc12262cd28bfec13baa55c0', class: cls("db-table", this.className), style: this._style, "data-width": this.width, "data-size": this.size, "data-divider": this.divider, "data-variant": this.variant, "data-mobile-variant": this.mobileVariant, "data-show-caption": getBooleanAsString(this.showCaption), "data-sticky-header": this.stickyHeader }, h("table", { key: '99fc11d1bb68297550e973293f519ad21f6953a0', ref: (el) => {
133
164
  this._ref = el;
134
165
  }, id: this.id }, this.captionPlain ? (h("caption", null, this.captionPlain)) : (h("slot", { name: "caption" })), this._data ? (h(Fragment, null, ((_a = this._data) === null || _a === void 0 ? void 0 : _a.header) ? (h("db-table-head", { rows: (_b = this._data) === null || _b === void 0 ? void 0 : _b.header })) : null, ((_c = this._data) === null || _c === void 0 ? void 0 : _c.body) ? (h("db-table-body", { rows: (_d = this._data) === null || _d === void 0 ? void 0 : _d.body })) : null, ((_e = this._data) === null || _e === void 0 ? void 0 : _e.footer) ? (h("db-table-footer", { rows: (_f = this._data) === null || _f === void 0 ? void 0 : _f.footer })) : null)) : (h("slot", null)))));
135
166
  }