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