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