@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
@@ -6,6 +6,27 @@ var index$1 = require('./index-spuu3sXz.js');
6
6
  const DBInfotext = 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-infotext");
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-infotext");
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 DBInfotext = 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 DBInfotext = 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,12 +77,17 @@ const DBInfotext = class {
51
77
  }
52
78
  }
53
79
  this.enableAttributePassing(this._ref, "db-infotext");
80
+ this.setupObserver(this._ref);
81
+ }
82
+ disconnectedCallback() {
83
+ var _a;
84
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
54
85
  }
55
86
  render() {
56
87
  var _a, _b, _c;
57
- return (index.h("span", { key: '982cd72ca8f9c42855a6aa704216bd21ebac6bb8', class: index$1.cls("db-infotext", this.className), ref: (el) => {
88
+ return (index.h("span", { key: 'e1a06bb9c2d0f88953a7281cdda505b392db609c', class: index$1.cls("db-infotext", this.className), ref: (el) => {
58
89
  this._ref = el;
59
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-icon": this.icon, "data-semantic": this.semantic, "data-size": this.size, "data-wrap": index$1.getBooleanAsString(this.wrap, "wrap"), "data-show-icon-leading": index$1.getBooleanAsString((_c = this.showIcon) !== null && _c !== void 0 ? _c : true, "showIcon") }, this.text ? this.text : null, index.h("slot", { key: 'cee3af0341d217dcd43068e5a5759b0964b132bd' })));
90
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-icon": this.icon, "data-semantic": this.semantic, "data-size": this.size, "data-wrap": index$1.getBooleanAsString(this.wrap, "wrap"), "data-show-icon-leading": index$1.getBooleanAsString((_c = this.showIcon) !== null && _c !== void 0 ? _c : true, "showIcon") }, this.text ? this.text : null, index.h("slot", { key: '68b5e9bc974cf49e25470cba30b142495e06c72f' })));
60
91
  }
61
92
  get rootElement() { return index.getElement(this); }
62
93
  };
@@ -6,6 +6,27 @@ var index$1 = require('./index-spuu3sXz.js');
6
6
  const DBLink = 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-link");
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-link");
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 DBLink = 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 DBLink = 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,12 +77,17 @@ const DBLink = class {
51
77
  }
52
78
  }
53
79
  this.enableAttributePassing(this._ref, "db-link");
80
+ this.setupObserver(this._ref);
81
+ }
82
+ disconnectedCallback() {
83
+ var _a;
84
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
54
85
  }
55
86
  render() {
56
87
  var _a, _b, _c, _d;
57
- return (index.h("a", { key: '1c032471cbf6facd4f851aaf0ebab4e2697432a2', class: index$1.cls("db-link", this.className), ref: (el) => {
88
+ return (index.h("a", { key: 'a5c2e75c4243fa0d64c60b974c522347469e75b3', class: index$1.cls("db-link", this.className), ref: (el) => {
58
89
  this._ref = el;
59
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, href: this.href, target: this.target, rel: this.rel, role: this.role, referrerPolicy: (_c = this.referrerpolicy) !== null && _c !== void 0 ? _c : this.referrerPolicy, hrefLang: this.hreflang, "aria-disabled": index$1.getBooleanAsString(this.disabled, "disabled"), tabIndex: this.disabled ? -1 : 0, "data-size": this.size, "data-show-icon-trailing": index$1.getBooleanAsString((_d = this.showIcon) !== null && _d !== void 0 ? _d : true, "showIcon"), "data-variant": this.variant, "data-content": this.content || "internal", "data-wrap": index$1.getBooleanAsString(this.wrap, "wrap") }, this.text ? this.text : null, index.h("slot", { key: '5045a3ef849265f0719db1d8bbe5e141bb415eef' })));
90
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, href: this.href, target: this.target, rel: this.rel, role: this.role, referrerPolicy: (_c = this.referrerpolicy) !== null && _c !== void 0 ? _c : this.referrerPolicy, hrefLang: this.hreflang, "aria-disabled": index$1.getBooleanAsString(this.disabled, "disabled"), tabIndex: this.disabled ? -1 : 0, "data-size": this.size, "data-show-icon-trailing": index$1.getBooleanAsString((_d = this.showIcon) !== null && _d !== void 0 ? _d : true, "showIcon"), "data-variant": this.variant, "data-content": this.content || "internal", "data-wrap": index$1.getBooleanAsString(this.wrap, "wrap") }, this.text ? this.text : null, index.h("slot", { key: '7cac380bf21256a51a3815e922687ddf4ad7b425' })));
60
91
  }
61
92
  get rootElement() { return index.getElement(this); }
62
93
  };
@@ -78,10 +109,15 @@ const DBTableDataCell = class {
78
109
  const attr = attributes.item(i);
79
110
  if (attr && attr.name !== 'data-density' &&
80
111
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
81
- element.setAttribute(attr.name, attr.value);
112
+ if (attr.value) {
113
+ element.setAttribute(attr.name, attr.value);
114
+ }
115
+ else {
116
+ element.removeAttribute(attr.name);
117
+ }
82
118
  parent.removeAttribute(attr.name);
83
119
  }
84
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
120
+ else if (attr && ["style"].includes(attr.name)) {
85
121
  element.setAttribute(attr.name, attr.value);
86
122
  parent.removeAttribute(attr.name);
87
123
  }
@@ -89,7 +125,7 @@ const DBTableDataCell = class {
89
125
  const isWebComponent = attr.value.includes("hydrated");
90
126
  const value = attr.value.replace("hydrated", "").trim();
91
127
  const currentClass = element.getAttribute("class");
92
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
128
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
93
129
  if (isWebComponent) {
94
130
  // Stencil is using this class for lazy loading component
95
131
  parent.setAttribute("class", "hydrated");
@@ -111,9 +147,9 @@ const DBTableDataCell = class {
111
147
  this.enableAttributePassing(this._ref, "db-table-data-cell");
112
148
  }
113
149
  render() {
114
- return (index.h("td", { key: '9f67b2926bd9e418572aa855b1dba754bddd8297', class: index$1.cls("db-table-data-cell", this.className), ref: (el) => {
150
+ return (index.h("td", { key: 'e6614ac09ac484540ad119f807bea075521419cd', class: index$1.cls("db-table-data-cell", this.className), ref: (el) => {
115
151
  this._ref = el;
116
- }, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, colSpan: index$1.getNumber(this.colSpan, this.colspan), rowSpan: index$1.getNumber(this.rowSpan, this.rowspan), headers: this.headers }, index.h("slot", { key: '73553f85f1a5ccb0d8b59b06760fd19318a2e19c' })));
152
+ }, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, colSpan: index$1.getNumber(this.colSpan, this.colspan), rowSpan: index$1.getNumber(this.rowSpan, this.rowspan), headers: this.headers }, index.h("slot", { key: 'bd353375cc862b5d5adea84545a5b5a63f1517e1' })));
117
153
  }
118
154
  get rootElement() { return index.getElement(this); }
119
155
  };
@@ -135,10 +171,15 @@ const DBTableHeaderCell = class {
135
171
  const attr = attributes.item(i);
136
172
  if (attr && attr.name !== 'data-density' &&
137
173
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
138
- element.setAttribute(attr.name, attr.value);
174
+ if (attr.value) {
175
+ element.setAttribute(attr.name, attr.value);
176
+ }
177
+ else {
178
+ element.removeAttribute(attr.name);
179
+ }
139
180
  parent.removeAttribute(attr.name);
140
181
  }
141
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
182
+ else if (attr && ["style"].includes(attr.name)) {
142
183
  element.setAttribute(attr.name, attr.value);
143
184
  parent.removeAttribute(attr.name);
144
185
  }
@@ -146,7 +187,7 @@ const DBTableHeaderCell = class {
146
187
  const isWebComponent = attr.value.includes("hydrated");
147
188
  const value = attr.value.replace("hydrated", "").trim();
148
189
  const currentClass = element.getAttribute("class");
149
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
190
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
150
191
  if (isWebComponent) {
151
192
  // Stencil is using this class for lazy loading component
152
193
  parent.setAttribute("class", "hydrated");
@@ -168,9 +209,9 @@ const DBTableHeaderCell = class {
168
209
  this.enableAttributePassing(this._ref, "db-table-header-cell");
169
210
  }
170
211
  render() {
171
- return (index.h("th", { key: '422fa622eecd8ffb509c415c6bfdd1ed31f3ecc8', class: index$1.cls("db-table-header-cell", this.className), ref: (el) => {
212
+ return (index.h("th", { key: 'b459f2e2ea9b4dda6909d1c8f02e1cd22b16a712', class: index$1.cls("db-table-header-cell", this.className), ref: (el) => {
172
213
  this._ref = el;
173
- }, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, "data-no-text": index$1.getBooleanAsString(this.noText), scope: this.scope, colSpan: index$1.getNumber(this.colSpan, this.colspan), rowSpan: index$1.getNumber(this.rowSpan, this.rowspan), headers: this.headers, abbr: this.abbr }, index.h("slot", { key: '7fc0e393fa95a6ea5c0e927fa971da7d825c7736' })));
214
+ }, id: this.id, "data-horizontal-alignment": this.horizontalAlignment, "data-vertical-alignment": this.verticalAlignment, "data-no-text": index$1.getBooleanAsString(this.noText), scope: this.scope, colSpan: index$1.getNumber(this.colSpan, this.colspan), rowSpan: index$1.getNumber(this.rowSpan, this.rowspan), headers: this.headers, abbr: this.abbr }, index.h("slot", { key: 'ec650ba68a8623b9729985f27822d94087327d74' })));
174
215
  }
175
216
  get rootElement() { return index.getElement(this); }
176
217
  };
@@ -198,10 +239,15 @@ const DBTableRow = class {
198
239
  const attr = attributes.item(i);
199
240
  if (attr && attr.name !== 'data-density' &&
200
241
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
201
- element.setAttribute(attr.name, attr.value);
242
+ if (attr.value) {
243
+ element.setAttribute(attr.name, attr.value);
244
+ }
245
+ else {
246
+ element.removeAttribute(attr.name);
247
+ }
202
248
  parent.removeAttribute(attr.name);
203
249
  }
204
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
250
+ else if (attr && ["style"].includes(attr.name)) {
205
251
  element.setAttribute(attr.name, attr.value);
206
252
  parent.removeAttribute(attr.name);
207
253
  }
@@ -209,7 +255,7 @@ const DBTableRow = class {
209
255
  const isWebComponent = attr.value.includes("hydrated");
210
256
  const value = attr.value.replace("hydrated", "").trim();
211
257
  const currentClass = element.getAttribute("class");
212
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
258
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
213
259
  if (isWebComponent) {
214
260
  // Stencil is using this class for lazy loading component
215
261
  parent.setAttribute("class", "hydrated");
@@ -232,7 +278,7 @@ const DBTableRow = class {
232
278
  }
233
279
  render() {
234
280
  var _a;
235
- return (index.h("tr", { key: '41fb15318069880e679a929ee5d4fcf59c7c1b63', class: index$1.cls("db-table-row", this.className), ref: (el) => {
281
+ return (index.h("tr", { key: 'd9ca9f14117c8cf3974110eb1a36cb7352c06c24', class: index$1.cls("db-table-row", this.className), ref: (el) => {
236
282
  this._ref = el;
237
283
  }, id: this.id, "data-interactive": index$1.getBooleanAsString(this.interactive), "data-sub-header-emphasis": this.subHeaderEmphasis }, this.cells ? ((_a = this.cells) === null || _a === void 0 ? void 0 : _a.map((cell, index$2) => {
238
284
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
@@ -18,6 +18,7 @@ const DBNavigationItem = class {
18
18
  this.navigationItemSafeTriangle = undefined;
19
19
  this.subNavigationId = undefined;
20
20
  this.subNavigationToggleId = undefined;
21
+ this.observer = undefined;
21
22
  }
22
23
  handleNavigationItemClick(event) {
23
24
  var _a;
@@ -41,6 +42,26 @@ const DBNavigationItem = class {
41
42
  event.stopPropagation();
42
43
  this.isSubNavigationExpanded = false;
43
44
  }
45
+ setupObserver(element) {
46
+ if (!element)
47
+ return;
48
+ const parent = element.closest("db-navigation-item");
49
+ if (!parent || this.observer)
50
+ return;
51
+ this.observer = new MutationObserver((mutations) => {
52
+ if (mutations.some((mutation) => {
53
+ var _a;
54
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
55
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
56
+ })) {
57
+ this.enableAttributePassing(element, "db-navigation-item");
58
+ }
59
+ });
60
+ this.observer.observe(parent, {
61
+ attributes: true,
62
+ attributeOldValue: true,
63
+ });
64
+ }
44
65
  /**
45
66
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
46
67
  * @param element the ref for the component
@@ -54,10 +75,15 @@ const DBNavigationItem = class {
54
75
  const attr = attributes.item(i);
55
76
  if (attr && attr.name !== 'data-density' &&
56
77
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
57
- element.setAttribute(attr.name, attr.value);
78
+ if (attr.value) {
79
+ element.setAttribute(attr.name, attr.value);
80
+ }
81
+ else {
82
+ element.removeAttribute(attr.name);
83
+ }
58
84
  parent.removeAttribute(attr.name);
59
85
  }
60
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
86
+ else if (attr && ["style"].includes(attr.name)) {
61
87
  element.setAttribute(attr.name, attr.value);
62
88
  parent.removeAttribute(attr.name);
63
89
  }
@@ -65,7 +91,7 @@ const DBNavigationItem = class {
65
91
  const isWebComponent = attr.value.includes("hydrated");
66
92
  const value = attr.value.replace("hydrated", "").trim();
67
93
  const currentClass = element.getAttribute("class");
68
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
94
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
69
95
  if (isWebComponent) {
70
96
  // Stencil is using this class for lazy loading component
71
97
  parent.setAttribute("class", "hydrated");
@@ -106,7 +132,6 @@ const DBNavigationItem = class {
106
132
  this.watch1Fn();
107
133
  }
108
134
  componentDidLoad() {
109
- var _a;
110
135
  if (typeof document !== "undefined" && this.rootElement && this.rootElement.dataset.connect) {
111
136
  const connectedElement = document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);
112
137
  if (connectedElement) {
@@ -114,16 +139,28 @@ const DBNavigationItem = class {
114
139
  }
115
140
  }
116
141
  this.enableAttributePassing(this._ref, "db-navigation-item");
117
- this.initialized = true;
118
- const subNavId = `sub-nav-${(_a = this.id) !== null && _a !== void 0 ? _a : index$1.uuid()}`;
119
- this.subNavigationId = subNavId;
120
- this.subNavigationToggleId = `${subNavId}-toggle`;
142
+ const onMountHook_0 = () => {
143
+ var _a;
144
+ this.initialized = true;
145
+ const subNavId = `sub-nav-${(_a = this.id) !== null && _a !== void 0 ? _a : index$1.uuid()}`;
146
+ this.subNavigationId = subNavId;
147
+ this.subNavigationToggleId = `${subNavId}-toggle`;
148
+ };
149
+ onMountHook_0();
150
+ const onMountHook_1 = () => {
151
+ this.setupObserver(this._ref);
152
+ };
153
+ onMountHook_1();
121
154
  this.watch0Fn();
122
155
  this.watch1Fn();
123
156
  }
157
+ disconnectedCallback() {
158
+ var _a;
159
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
160
+ }
124
161
  render() {
125
162
  var _a, _b, _c;
126
- return (index.h("li", { key: '3260e2400d47c705ac8438ecb762ee1a28fad47d', class: index$1.cls("db-navigation-item", this.className), ref: (el) => {
163
+ return (index.h("li", { key: '0c375eaa62e5b989c6c891d46e5a66fa8c11eed3', class: index$1.cls("db-navigation-item", this.className), ref: (el) => {
127
164
  this._ref = el;
128
165
  }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, onMouseOver: () => { var _a; return (_a = this.navigationItemSafeTriangle) === null || _a === void 0 ? void 0 : _a.enableFollow(); }, onMouseLeave: () => { var _a; return (_a = this.navigationItemSafeTriangle) === null || _a === void 0 ? void 0 : _a.disableFollow(); }, onMouseMove: (event) => { var _a; return (_a = this.navigationItemSafeTriangle) === null || _a === void 0 ? void 0 : _a.followByMouseEvent(event); }, "data-width": this.width, "data-icon": this.icon, "data-show-icon": index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-active": this.active, "data-wrap": index$1.getBooleanAsString(this.wrap, "wrap"), "aria-disabled": index$1.getBooleanAsString(this.disabled, "disabled") }, !index$1.getBoolean(this.hideSubNavigation, "hideSubNavigation") &&
129
166
  this.hasSubNavigation ? (index.h(index.Fragment, null, index.h("button", { class: "db-navigation-item-expand-button", id: this.subNavigationToggleId, "aria-haspopup": this.hasAreaPopup ? "true" : undefined, "aria-expanded": this.isSubNavigationExpanded, "aria-controls": this.subNavigationId, disabled: index$1.getBoolean(this.disabled, "disabled"), onClick: (event) => this.handleClick(event) }, this.text ? this.text : index.h("slot", { name: "expandButton" })), index.h("menu", { class: "db-sub-navigation", id: this.subNavigationId, "aria-labelledby": this.subNavigationToggleId, "data-force-close": this.autoClose, onClick: (event) => this.handleNavigationItemClick(event) }, this.hasAreaPopup ? (index.h("div", { class: "db-mobile-navigation-back" }, index.h("db-button", { icon: "arrow_left", variant: "ghost", id: this.backButtonId, onClick: (event) => this.handleBackClick(event) }, (_c = this.backButtonText) !== null && _c !== void 0 ? _c : constants.DEFAULT_BACK))) : null, index.h("slot", { name: "subNavigation" })))) : this.text ? (this.text) : (index.h("slot", null))));
@@ -6,6 +6,27 @@ var index$1 = require('./index-spuu3sXz.js');
6
6
  const DBNavigation = 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-navigation");
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-navigation");
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 DBNavigation = 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 DBNavigation = 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,12 +77,17 @@ const DBNavigation = class {
51
77
  }
52
78
  }
53
79
  this.enableAttributePassing(this._ref, "db-navigation");
80
+ this.setupObserver(this._ref);
81
+ }
82
+ disconnectedCallback() {
83
+ var _a;
84
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
54
85
  }
55
86
  render() {
56
87
  var _a, _b;
57
- return (index.h("nav", { key: 'fc6cc35b50d30498abfd5496f4e806b9ce94573d', class: index$1.cls("db-navigation", this.className), ref: (el) => {
88
+ return (index.h("nav", { key: '9ab5982a120092e6df3de4b17d1750950d2e1667', class: index$1.cls("db-navigation", this.className), ref: (el) => {
58
89
  this._ref = el;
59
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, index.h("menu", { key: 'da64193d61844f23632c1f71377f620af951e998' }, index.h("slot", { key: '81269b82ae46ec9305e12e38c83592a9415bc7e8' }))));
90
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, index.h("menu", { key: 'c23027e91896d0cce880bb7527dcf576ba58b513' }, index.h("slot", { key: '0f7aa08fca229cbceae8bb4c1e91ab4fc5608242' }))));
60
91
  }
61
92
  get rootElement() { return index.getElement(this); }
62
93
  };
@@ -8,6 +8,7 @@ const DBNotification = class {
8
8
  constructor(hostRef) {
9
9
  index.registerInstance(this, hostRef);
10
10
  this.close = index.createEvent(this, "close");
11
+ this.observer = undefined;
11
12
  }
12
13
  handleClose(event) {
13
14
  if (!event)
@@ -17,6 +18,26 @@ const DBNotification = class {
17
18
  this.close.emit(event);
18
19
  }
19
20
  }
21
+ setupObserver(element) {
22
+ if (!element)
23
+ return;
24
+ const parent = element.closest("db-notification");
25
+ if (!parent || this.observer)
26
+ return;
27
+ this.observer = new MutationObserver((mutations) => {
28
+ if (mutations.some((mutation) => {
29
+ var _a;
30
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
31
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
32
+ })) {
33
+ this.enableAttributePassing(element, "db-notification");
34
+ }
35
+ });
36
+ this.observer.observe(parent, {
37
+ attributes: true,
38
+ attributeOldValue: true,
39
+ });
40
+ }
20
41
  /**
21
42
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
22
43
  * @param element the ref for the component
@@ -30,10 +51,15 @@ const DBNotification = class {
30
51
  const attr = attributes.item(i);
31
52
  if (attr && attr.name !== 'data-density' &&
32
53
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
33
- element.setAttribute(attr.name, attr.value);
54
+ if (attr.value) {
55
+ element.setAttribute(attr.name, attr.value);
56
+ }
57
+ else {
58
+ element.removeAttribute(attr.name);
59
+ }
34
60
  parent.removeAttribute(attr.name);
35
61
  }
36
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
62
+ else if (attr && ["style"].includes(attr.name)) {
37
63
  element.setAttribute(attr.name, attr.value);
38
64
  parent.removeAttribute(attr.name);
39
65
  }
@@ -41,7 +67,7 @@ const DBNotification = class {
41
67
  const isWebComponent = attr.value.includes("hydrated");
42
68
  const value = attr.value.replace("hydrated", "").trim();
43
69
  const currentClass = element.getAttribute("class");
44
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
70
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
45
71
  if (isWebComponent) {
46
72
  // Stencil is using this class for lazy loading component
47
73
  parent.setAttribute("class", "hydrated");
@@ -61,16 +87,21 @@ const DBNotification = class {
61
87
  }
62
88
  }
63
89
  this.enableAttributePassing(this._ref, "db-notification");
90
+ this.setupObserver(this._ref);
91
+ }
92
+ disconnectedCallback() {
93
+ var _a;
94
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
64
95
  }
65
96
  render() {
66
97
  var _a, _b, _c;
67
- return (index.h("div", { key: '01a531f51b65c8cc55c739c4f18ee220e0e9701e', class: index$1.cls("db-notification", this.className), ref: (el) => {
98
+ return (index.h("div", { key: '6700e43e45a2c0c18a0216fb12afd5d31820dcf9', class: index$1.cls("db-notification", this.className), ref: (el) => {
68
99
  this._ref = el;
69
100
  }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, role: index$1.getNotificationRole({
70
101
  semantic: this.semantic,
71
102
  role: this.role,
72
103
  ariaLive: this.ariaLive,
73
- }), "aria-live": this.ariaLive, "data-semantic": this.semantic, "data-variant": this.variant, "data-icon": index$1.getBoolean(this.showIcon) !== false ? this.icon : undefined, "data-show-icon": index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-link-variant": this.linkVariant }, index.h("slot", { key: '3e6e28cb42a9c7adb3663d01464930681e69c51d', name: "image" }), index$1.stringPropVisible(this.headline, this.showHeadline) ? (index.h("header", { "data-area": "head" }, this.headline)) : null, index.h("div", { key: 'd9f344fd4af06caa446ea4b9ad7f761466fcecdc', "data-area": "content" }, this.text ? this.text : null, index.h("slot", { key: '2521549fee945b4a4c6040f360986c233af46c67' })), index$1.stringPropVisible(this.timestamp, this.showTimestamp) ? (index.h("time", { "data-area": "timestamp", dateTime: this.timestampDatetime }, this.timestamp)) : null, index.h("slot", { key: 'c96fb1c687e20ddb28be8b55f3218b6abd984f27', name: "link" }), index$1.getBoolean(this.closeable, "closeable") ? (index.h("db-button", { icon: "cross", variant: "ghost", size: "small", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event) }, (_c = this.closeButtonText) !== null && _c !== void 0 ? _c : constants.DEFAULT_CLOSE_BUTTON)) : null));
104
+ }), "aria-live": this.ariaLive, "data-semantic": this.semantic, "data-variant": this.variant, "data-icon": index$1.getBoolean(this.showIcon) !== false ? this.icon : undefined, "data-show-icon": index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-link-variant": this.linkVariant }, index.h("slot", { key: '9ea4d9427f7e34dbf5fd9b187f4dce5df9b39d34', name: "image" }), index$1.stringPropVisible(this.headline, this.showHeadline) ? (index.h("header", { "data-area": "head" }, this.headline)) : null, index.h("div", { key: '4f9c9a95f7c6bd8f4b5bfb0acf69f02dbc789856', "data-area": "content" }, this.text ? this.text : null, index.h("slot", { key: '2d9007bdc99c163fd6af4b12cc7210b60ab11319' })), index$1.stringPropVisible(this.timestamp, this.showTimestamp) ? (index.h("time", { "data-area": "timestamp", dateTime: this.timestampDatetime }, this.timestamp)) : null, index.h("slot", { key: 'f5505f81bdf36d9dd1aeb825a2af06dcd0214372', name: "link" }), index$1.getBoolean(this.closeable, "closeable") ? (index.h("db-button", { icon: "cross", variant: "ghost", size: "small", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event) }, (_c = this.closeButtonText) !== null && _c !== void 0 ? _c : constants.DEFAULT_CLOSE_BUTTON)) : null));
74
105
  }
75
106
  get rootElement() { return index.getElement(this); }
76
107
  };
@@ -7,6 +7,27 @@ const DBPage = class {
7
7
  constructor(hostRef) {
8
8
  index.registerInstance(this, hostRef);
9
9
  this.fontsLoaded = false;
10
+ this.observer = undefined;
11
+ }
12
+ setupObserver(element) {
13
+ if (!element)
14
+ return;
15
+ const parent = element.closest("db-page");
16
+ if (!parent || this.observer)
17
+ return;
18
+ this.observer = new MutationObserver((mutations) => {
19
+ if (mutations.some((mutation) => {
20
+ var _a;
21
+ const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
22
+ return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
23
+ })) {
24
+ this.enableAttributePassing(element, "db-page");
25
+ }
26
+ });
27
+ this.observer.observe(parent, {
28
+ attributes: true,
29
+ attributeOldValue: true,
30
+ });
10
31
  }
11
32
  /**
12
33
  * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
@@ -21,10 +42,15 @@ const DBPage = class {
21
42
  const attr = attributes.item(i);
22
43
  if (attr && attr.name !== 'data-density' &&
23
44
  (attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
24
- element.setAttribute(attr.name, attr.value);
45
+ if (attr.value) {
46
+ element.setAttribute(attr.name, attr.value);
47
+ }
48
+ else {
49
+ element.removeAttribute(attr.name);
50
+ }
25
51
  parent.removeAttribute(attr.name);
26
52
  }
27
- else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
53
+ else if (attr && ["style"].includes(attr.name)) {
28
54
  element.setAttribute(attr.name, attr.value);
29
55
  parent.removeAttribute(attr.name);
30
56
  }
@@ -32,7 +58,7 @@ const DBPage = class {
32
58
  const isWebComponent = attr.value.includes("hydrated");
33
59
  const value = attr.value.replace("hydrated", "").trim();
34
60
  const currentClass = element.getAttribute("class");
35
- element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
61
+ element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
36
62
  if (isWebComponent) {
37
63
  // Stencil is using this class for lazy loading component
38
64
  parent.setAttribute("class", "hydrated");
@@ -52,28 +78,37 @@ const DBPage = class {
52
78
  }
53
79
  }
54
80
  this.enableAttributePassing(this._ref, "db-page");
55
- this.fontsLoaded = !this.fadeIn;
56
- if (document && this.fadeIn) {
57
- document.fonts.ready.then(() => {
81
+ const onMountHook_0 = () => {
82
+ this.fontsLoaded = !this.fadeIn;
83
+ if (document && this.fadeIn) {
84
+ document.fonts.ready.then(() => {
85
+ this.fontsLoaded = true;
86
+ });
87
+ }
88
+ else {
58
89
  this.fontsLoaded = true;
59
- });
60
- }
61
- else {
62
- this.fontsLoaded = true;
63
- }
90
+ }
91
+ };
92
+ onMountHook_0();
93
+ const onMountHook_1 = () => {
94
+ this.setupObserver(this._ref);
95
+ };
96
+ onMountHook_1();
64
97
  }
65
98
  disconnectedCallback() {
99
+ var _a;
66
100
  if (typeof window !== "undefined" &&
67
101
  document.documentElement.classList.contains("db-page-document")) {
68
102
  // remove document styles set by this
69
103
  document.documentElement.classList.remove("db-page-document");
70
104
  }
105
+ (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
71
106
  }
72
107
  render() {
73
108
  var _a, _b;
74
- return (index.h("div", { key: '3ffaa674adbf9b46c5b5b0e38014549932005dd3', class: index$1.cls("db-page", this.className), ref: (el) => {
109
+ return (index.h("div", { key: '0d09488c8caa9ca9fbd1fa55e9ba913b10510b2a', class: index$1.cls("db-page", this.className), ref: (el) => {
75
110
  this._ref = el;
76
- }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-variant": this.variant, "data-fade-in": index$1.getBooleanAsString(this.fadeIn, "fadeIn"), "data-fonts-loaded": index$1.getBooleanAsString(this.fontsLoaded, "fontsLoaded") }, index.h("slot", { key: '2b96c66752fde23b9e81a91efd4a90474d0b68f5', name: "header" }), index.h("main", { key: 'da246f1f15735b54940857f19832ccd216a2c769', class: index$1.cls("db-main", this.mainClass) }, index.h("slot", { key: '21a10349a9f9bfd75b8c29fc5dcd159b3c22bef5' })), index.h("slot", { key: '7a349e75b1b03cc540ee940c6d3647e742825e34', name: "footer" })));
111
+ }, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-variant": this.variant, "data-fade-in": index$1.getBooleanAsString(this.fadeIn, "fadeIn"), "data-fonts-loaded": index$1.getBooleanAsString(this.fontsLoaded, "fontsLoaded") }, index.h("slot", { key: '667a0153fca3111a897356f90110aa6d5e068171', name: "header" }), index.h("main", { key: '92184cba49dc26836ed103d2254b5c319df29832', class: index$1.cls("db-main", this.mainClass) }, index.h("slot", { key: '2d4d37de47023d7fc1dfb321f64d92c90c9b80b8' })), index.h("slot", { key: 'fb7fb41cbdfdf8e722aa9dde7080379a8083cf45', name: "footer" })));
77
112
  }
78
113
  get rootElement() { return index.getElement(this); }
79
114
  };