@maggioli-design-system/magma 2.0.0 → 2.0.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 (330) hide show
  1. package/dist/cjs/index.cjs.js +64 -22
  2. package/dist/cjs/mds-avatar.cjs.entry.js +27 -32
  3. package/dist/cjs/mds-badge.cjs.entry.js +3 -2
  4. package/dist/cjs/mds-benchmark-bar.cjs.entry.js +3 -2
  5. package/dist/cjs/mds-bibliography.cjs.entry.js +4 -3
  6. package/dist/cjs/mds-button_3.cjs.entry.js +36 -10
  7. package/dist/cjs/mds-dropdown.cjs.entry.js +4 -3
  8. package/dist/cjs/mds-entity.cjs.entry.js +1 -1
  9. package/dist/cjs/mds-file-preview.cjs.entry.js +17 -17
  10. package/dist/cjs/mds-header.cjs.entry.js +17 -8
  11. package/dist/cjs/mds-img.cjs.entry.js +3 -3
  12. package/dist/cjs/mds-input-date-range.cjs.entry.js +7 -5
  13. package/dist/cjs/mds-input-select.cjs.entry.js +10 -8
  14. package/dist/cjs/mds-input-upload.cjs.entry.js +10 -6
  15. package/dist/cjs/mds-input.cjs.entry.js +4 -4
  16. package/dist/cjs/mds-keyboard-key.cjs.entry.js +8 -5
  17. package/dist/cjs/mds-keyboard.cjs.entry.js +6 -3
  18. package/dist/cjs/mds-mention.cjs.entry.js +3 -2
  19. package/dist/cjs/mds-notification.cjs.entry.js +11 -8
  20. package/dist/cjs/mds-pref-language-item.cjs.entry.js +3 -2
  21. package/dist/cjs/mds-pref-theme-item.cjs.entry.js +3 -2
  22. package/dist/cjs/mds-push-notification-item.cjs.entry.js +1 -1
  23. package/dist/cjs/mds-stepper-bar.cjs.entry.js +5 -3
  24. package/dist/cjs/mds-tab-bar-item.cjs.entry.js +3 -2
  25. package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
  26. package/dist/cjs/mds-text.cjs.entry.js +2 -1
  27. package/dist/cjs/mds-toast.cjs.entry.js +9 -3
  28. package/dist/cjs/mds-tooltip.cjs.entry.js +4 -4
  29. package/dist/collection/components/mds-avatar/mds-avatar.js +27 -32
  30. package/dist/collection/components/mds-badge/mds-badge.js +3 -2
  31. package/dist/collection/components/mds-benchmark-bar/mds-benchmark-bar.js +3 -2
  32. package/dist/collection/components/mds-bibliography/mds-bibliography.js +4 -3
  33. package/dist/collection/components/mds-button/mds-button.js +7 -6
  34. package/dist/collection/components/mds-dropdown/mds-dropdown.js +4 -3
  35. package/dist/collection/components/mds-file-preview/mds-file-preview.js +6 -7
  36. package/dist/collection/components/mds-header/mds-header.js +17 -8
  37. package/dist/collection/components/mds-icon/mds-icon.js +29 -4
  38. package/dist/collection/components/mds-icon/services/icons-set.service.js +47 -18
  39. package/dist/collection/components/mds-img/mds-img.js +3 -3
  40. package/dist/collection/components/mds-input/mds-input.js +4 -4
  41. package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +7 -5
  42. package/dist/collection/components/mds-input-select/mds-input-select.js +10 -8
  43. package/dist/collection/components/mds-input-upload/mds-input-upload.js +10 -6
  44. package/dist/collection/components/mds-keyboard/mds-keyboard.js +6 -3
  45. package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +8 -5
  46. package/dist/collection/components/mds-mention/mds-mention.js +3 -2
  47. package/dist/collection/components/mds-notification/mds-notification.js +11 -8
  48. package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +3 -2
  49. package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +3 -2
  50. package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +5 -3
  51. package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +3 -2
  52. package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +2 -2
  53. package/dist/collection/components/mds-text/mds-text.js +2 -1
  54. package/dist/collection/components/mds-toast/mds-toast.js +9 -3
  55. package/dist/collection/components/mds-tooltip/mds-tooltip.js +4 -4
  56. package/dist/collection/dictionary/icon.js +1 -1
  57. package/dist/components/index.js +1 -1
  58. package/dist/components/mds-accordion-item.js +1 -1
  59. package/dist/components/mds-accordion-timer-item.js +1 -1
  60. package/dist/components/mds-avatar-stack-item.js +1 -1
  61. package/dist/components/mds-avatar-stack.js +1 -1
  62. package/dist/components/mds-avatar.js +1 -1
  63. package/dist/components/mds-badge.js +1 -1
  64. package/dist/components/mds-banner.js +1 -1
  65. package/dist/components/mds-benchmark-bar.js +1 -1
  66. package/dist/components/mds-bibliography.js +1 -1
  67. package/dist/components/mds-breadcrumb-item.js +1 -1
  68. package/dist/components/mds-breadcrumb.js +1 -1
  69. package/dist/components/mds-button-dropdown.js +1 -1
  70. package/dist/components/mds-button.js +1 -1
  71. package/dist/components/mds-calendar-cell.js +1 -1
  72. package/dist/components/mds-calendar.js +1 -1
  73. package/dist/components/mds-chip.js +1 -1
  74. package/dist/components/mds-dropdown.js +1 -1
  75. package/dist/components/mds-entity.js +1 -1
  76. package/dist/components/mds-file-preview.js +1 -1
  77. package/dist/components/mds-file.js +3 -3
  78. package/dist/components/mds-filter-item.js +1 -1
  79. package/dist/components/mds-filter.js +1 -1
  80. package/dist/components/mds-header-bar.js +1 -1
  81. package/dist/components/mds-header.js +1 -1
  82. package/dist/components/mds-help.js +1 -1
  83. package/dist/components/mds-horizontal-scroll.js +1 -1
  84. package/dist/components/mds-icon.js +1 -1
  85. package/dist/components/mds-img.js +1 -1
  86. package/dist/components/mds-input-date-range-preselection.js +1 -1
  87. package/dist/components/mds-input-date-range.js +1 -1
  88. package/dist/components/mds-input-date.js +1 -1
  89. package/dist/components/mds-input-field.js +1 -1
  90. package/dist/components/mds-input-otp.js +1 -1
  91. package/dist/components/mds-input-range.js +1 -1
  92. package/dist/components/mds-input-select.js +1 -1
  93. package/dist/components/mds-input-switch.js +1 -1
  94. package/dist/components/mds-input-tip-item.js +1 -1
  95. package/dist/components/mds-input-upload.js +1 -1
  96. package/dist/components/mds-input.js +1 -1
  97. package/dist/components/mds-keyboard-key.js +1 -1
  98. package/dist/components/mds-keyboard.js +1 -1
  99. package/dist/components/mds-kpi-item.js +1 -1
  100. package/dist/components/mds-label.js +1 -1
  101. package/dist/components/mds-list-item.js +1 -1
  102. package/dist/components/mds-mention.js +1 -1
  103. package/dist/components/mds-modal.js +1 -1
  104. package/dist/components/mds-note.js +1 -1
  105. package/dist/components/mds-notification.js +1 -1
  106. package/dist/components/mds-paginator-item.js +1 -1
  107. package/dist/components/mds-paginator.js +1 -1
  108. package/dist/components/mds-policy-ai.js +1 -1
  109. package/dist/components/mds-pref-animation.js +1 -1
  110. package/dist/components/mds-pref-consumption.js +1 -1
  111. package/dist/components/mds-pref-contrast.js +1 -1
  112. package/dist/components/mds-pref-language-item.js +1 -1
  113. package/dist/components/mds-pref-language.js +1 -1
  114. package/dist/components/mds-pref-mode.js +1 -1
  115. package/dist/components/mds-pref-theme-item.js +1 -1
  116. package/dist/components/mds-pref-theme.js +1 -1
  117. package/dist/components/mds-pref.js +1 -1
  118. package/dist/components/mds-price-table-features-cell.js +1 -1
  119. package/dist/components/mds-price-table-features.js +1 -1
  120. package/dist/components/mds-price-table-list-item.js +1 -1
  121. package/dist/components/mds-progress.js +1 -1
  122. package/dist/components/mds-push-notification-item.js +1 -1
  123. package/dist/components/mds-push-notification.js +1 -1
  124. package/dist/components/mds-quote.js +1 -1
  125. package/dist/components/mds-radial-menu-item.js +1 -1
  126. package/dist/components/mds-radial-menu.js +1 -1
  127. package/dist/components/mds-radial-progress.js +1 -1
  128. package/dist/components/mds-status-bar.js +1 -1
  129. package/dist/components/mds-stepper-bar-item.js +1 -1
  130. package/dist/components/mds-stepper-bar.js +1 -1
  131. package/dist/components/mds-tab-bar-item.js +1 -1
  132. package/dist/components/mds-tab-item.js +1 -1
  133. package/dist/components/mds-table-header-cell.js +1 -1
  134. package/dist/components/mds-table-header.js +1 -1
  135. package/dist/components/mds-table-row.js +1 -1
  136. package/dist/components/mds-table.js +1 -1
  137. package/dist/components/mds-text.js +1 -1
  138. package/dist/components/mds-toast.js +1 -1
  139. package/dist/components/mds-tooltip.js +1 -1
  140. package/dist/components/mds-tree-item.js +1 -1
  141. package/dist/components/mds-url-view.js +1 -1
  142. package/dist/components/mds-usage.js +1 -1
  143. package/dist/components/{p-D3-GP4KF.js → p-6K9sFzLr.js} +1 -1
  144. package/dist/components/p-BBhbQT2f.js +1 -0
  145. package/dist/components/{p-B2A_hlV2.js → p-BFpRu7yD.js} +1 -1
  146. package/dist/components/p-BL63WAAq.js +8 -0
  147. package/dist/components/{p-Deh5Aia-.js → p-BShLEry5.js} +1 -1
  148. package/dist/components/{p-BJNK4p33.js → p-BYxxgEE_.js} +1 -1
  149. package/dist/components/p-BZFyAX-6.js +1 -0
  150. package/dist/components/p-BtMdmkID.js +1 -0
  151. package/dist/components/{p-Caksrfcd.js → p-ByaUOMp0.js} +1 -1
  152. package/dist/components/p-C1xZO_fq.js +1 -0
  153. package/dist/components/{p-cBZsPiMJ.js → p-C6Q4zFh6.js} +1 -1
  154. package/dist/components/{p-DLE5TNTp.js → p-CUQ7WIXh.js} +1 -1
  155. package/dist/components/p-Cd_8zD_I.js +1 -0
  156. package/dist/components/{p-DtxB7DYE.js → p-CnAeawmf.js} +1 -1
  157. package/dist/components/{p-Bt4xX5ww.js → p-DCrjf0F0.js} +1 -1
  158. package/dist/components/p-DlHJvYE7.js +1 -0
  159. package/dist/components/{p-BH3bWzRT.js → p-DlaJNPdd.js} +1 -1
  160. package/dist/components/{p-sqRs6oj4.js → p-DnrQaRnh.js} +1 -1
  161. package/dist/components/{p-CBLAz3_J.js → p-OPg_Naue.js} +1 -1
  162. package/dist/components/{p-C03KYHGv.js → p-RS4yyl41.js} +1 -1
  163. package/dist/components/{p--8aaJX-p.js → p-gv3eu44S.js} +1 -1
  164. package/dist/components/p-kff6xSdW.js +1 -0
  165. package/dist/components/p-pys1EQ60.js +1 -0
  166. package/dist/components/p-qketFgr0.js +1 -0
  167. package/dist/components/p-zml3K7nx.js +1 -0
  168. package/dist/documentation.json +4 -4
  169. package/dist/esm/index.js +64 -22
  170. package/dist/esm/mds-avatar.entry.js +27 -32
  171. package/dist/esm/mds-badge.entry.js +3 -2
  172. package/dist/esm/mds-benchmark-bar.entry.js +3 -2
  173. package/dist/esm/mds-bibliography.entry.js +4 -3
  174. package/dist/esm/mds-button_3.entry.js +36 -10
  175. package/dist/esm/mds-dropdown.entry.js +4 -3
  176. package/dist/esm/mds-entity.entry.js +1 -1
  177. package/dist/esm/mds-file-preview.entry.js +17 -17
  178. package/dist/esm/mds-header.entry.js +17 -8
  179. package/dist/esm/mds-img.entry.js +3 -3
  180. package/dist/esm/mds-input-date-range.entry.js +7 -5
  181. package/dist/esm/mds-input-select.entry.js +10 -8
  182. package/dist/esm/mds-input-upload.entry.js +10 -6
  183. package/dist/esm/mds-input.entry.js +4 -4
  184. package/dist/esm/mds-keyboard-key.entry.js +8 -5
  185. package/dist/esm/mds-keyboard.entry.js +6 -3
  186. package/dist/esm/mds-mention.entry.js +3 -2
  187. package/dist/esm/mds-notification.entry.js +11 -8
  188. package/dist/esm/mds-pref-language-item.entry.js +3 -2
  189. package/dist/esm/mds-pref-theme-item.entry.js +3 -2
  190. package/dist/esm/mds-push-notification-item.entry.js +1 -1
  191. package/dist/esm/mds-stepper-bar.entry.js +5 -3
  192. package/dist/esm/mds-tab-bar-item.entry.js +3 -2
  193. package/dist/esm/mds-table-header-cell.entry.js +2 -2
  194. package/dist/esm/mds-text.entry.js +2 -1
  195. package/dist/esm/mds-toast.entry.js +9 -3
  196. package/dist/esm/mds-tooltip.entry.js +4 -4
  197. package/dist/esm-es5/index.js +37 -26
  198. package/dist/esm-es5/mds-avatar.entry.js +4 -2
  199. package/dist/esm-es5/mds-badge.entry.js +2 -3
  200. package/dist/esm-es5/mds-benchmark-bar.entry.js +2 -3
  201. package/dist/esm-es5/mds-bibliography.entry.js +1 -1
  202. package/dist/esm-es5/mds-button_3.entry.js +14 -9
  203. package/dist/esm-es5/mds-dropdown.entry.js +2 -2
  204. package/dist/esm-es5/mds-entity.entry.js +1 -1
  205. package/dist/esm-es5/mds-file-preview.entry.js +7 -5
  206. package/dist/esm-es5/mds-header.entry.js +8 -6
  207. package/dist/esm-es5/mds-img.entry.js +1 -1
  208. package/dist/esm-es5/mds-input-date-range.entry.js +5 -3
  209. package/dist/esm-es5/mds-input-select.entry.js +8 -6
  210. package/dist/esm-es5/mds-input-upload.entry.js +3 -1
  211. package/dist/esm-es5/mds-input.entry.js +3 -3
  212. package/dist/esm-es5/mds-keyboard-key.entry.js +3 -1
  213. package/dist/esm-es5/mds-keyboard.entry.js +4 -2
  214. package/dist/esm-es5/mds-mention.entry.js +1 -1
  215. package/dist/esm-es5/mds-notification.entry.js +4 -2
  216. package/dist/esm-es5/mds-pref-language-item.entry.js +2 -2
  217. package/dist/esm-es5/mds-pref-theme-item.entry.js +2 -2
  218. package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
  219. package/dist/esm-es5/mds-stepper-bar.entry.js +4 -4
  220. package/dist/esm-es5/mds-tab-bar-item.entry.js +3 -4
  221. package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
  222. package/dist/esm-es5/mds-text.entry.js +1 -1
  223. package/dist/esm-es5/mds-toast.entry.js +4 -2
  224. package/dist/esm-es5/mds-tooltip.entry.js +2 -2
  225. package/dist/hydrate/index.js +270 -164
  226. package/dist/hydrate/index.mjs +270 -164
  227. package/dist/magma-components/index.esm.js +1 -1
  228. package/dist/magma-components/magma-components.esm.js +1 -1
  229. package/dist/magma-components/p-005172ba.entry.js +1 -0
  230. package/dist/magma-components/{p-9ca7932d.system.entry.js → p-05fa40aa.system.entry.js} +5 -3
  231. package/dist/magma-components/p-0827a5bd.entry.js +1 -0
  232. package/dist/magma-components/{p-1a8c5086.system.entry.js → p-15c77a98.system.entry.js} +2 -2
  233. package/dist/magma-components/p-18473d2f.entry.js +1 -0
  234. package/dist/magma-components/{p-f0a168f4.system.entry.js → p-18667ae7.system.entry.js} +3 -3
  235. package/dist/magma-components/p-19adde9d.entry.js +1 -0
  236. package/dist/magma-components/p-2217a7be.entry.js +1 -0
  237. package/dist/magma-components/{p-5a7ead55.system.entry.js → p-2386f0d6.system.entry.js} +2 -2
  238. package/dist/magma-components/p-2b56fc14.entry.js +1 -0
  239. package/dist/magma-components/p-3f747a63.system.entry.js +1 -0
  240. package/dist/magma-components/p-3ff30842.system.entry.js +16 -0
  241. package/dist/magma-components/{p-be692266.system.entry.js → p-49b120cb.system.entry.js} +2 -2
  242. package/dist/magma-components/{p-6cd7cfe3.entry.js → p-4af76eb3.entry.js} +1 -1
  243. package/dist/magma-components/p-4ba6cb3f.entry.js +1 -0
  244. package/dist/magma-components/p-4cadbd49.entry.js +1 -0
  245. package/dist/magma-components/p-518b55f3.entry.js +1 -0
  246. package/dist/magma-components/{p-960dc9b5.system.entry.js → p-5eec629c.system.entry.js} +4 -2
  247. package/dist/magma-components/{p-a8ec3080.system.entry.js → p-646034cb.system.entry.js} +1 -1
  248. package/dist/magma-components/{p-ce4e1a41.system.entry.js → p-677ab154.system.entry.js} +3 -1
  249. package/dist/magma-components/p-759133b3.entry.js +1 -0
  250. package/dist/magma-components/{p-cd5866c8.entry.js → p-7912f877.entry.js} +1 -1
  251. package/dist/magma-components/{p-3d8e63a2.system.entry.js → p-7d304fd4.system.entry.js} +3 -1
  252. package/dist/magma-components/{p-07fde74d.system.entry.js → p-7f6d708c.system.entry.js} +6 -4
  253. package/dist/magma-components/{p-6edc4f16.system.entry.js → p-88564e9b.system.entry.js} +1 -1
  254. package/dist/magma-components/{p-8c4fb7ec.system.entry.js → p-8b1abf81.system.entry.js} +10 -8
  255. package/dist/magma-components/p-8bbee38d.entry.js +1 -0
  256. package/dist/magma-components/{p-481008e9.system.entry.js → p-8bf680d6.system.entry.js} +5 -3
  257. package/dist/magma-components/{p-ce0ecc75.system.entry.js → p-8cb3a071.system.entry.js} +2 -2
  258. package/dist/magma-components/p-8f229eaf.entry.js +1 -0
  259. package/dist/magma-components/{p-3f7d3060.system.entry.js → p-94fa3396.system.entry.js} +14 -9
  260. package/dist/magma-components/{p-0ad3b4da.system.entry.js → p-9bbd4193.system.entry.js} +6 -6
  261. package/dist/magma-components/p-9caffe14.entry.js +1 -0
  262. package/dist/magma-components/p-9de1ac7f.entry.js +1 -0
  263. package/dist/magma-components/p-CnXBPjmc.system.js +1 -1
  264. package/dist/magma-components/{p-CBam2PI8.system.js → p-DVd2EM-q.system.js} +29 -18
  265. package/dist/magma-components/{p-f1462410.system.entry.js → p-a15da479.system.entry.js} +3 -4
  266. package/dist/magma-components/{p-e05d2df8.system.entry.js → p-ab997243.system.entry.js} +2 -2
  267. package/dist/magma-components/{p-efe8d359.entry.js → p-aea6081f.entry.js} +1 -1
  268. package/dist/magma-components/{p-1c0a7e24.system.entry.js → p-b0539d61.system.entry.js} +7 -5
  269. package/dist/magma-components/p-cc033985.system.entry.js +14 -0
  270. package/dist/magma-components/{p-a3fc2ea4.system.entry.js → p-cd84a264.system.entry.js} +7 -5
  271. package/dist/magma-components/p-d0457835.entry.js +1 -0
  272. package/dist/magma-components/p-d64311e2.entry.js +1 -0
  273. package/dist/magma-components/{p-54b995c2.system.entry.js → p-da4dc390.system.entry.js} +1 -1
  274. package/dist/magma-components/p-dda7a33b.entry.js +1 -0
  275. package/dist/magma-components/p-e375c8b1.entry.js +1 -0
  276. package/dist/magma-components/p-e3fce8ca.entry.js +1 -0
  277. package/dist/magma-components/{p-9626eaff.system.entry.js → p-e9a16f22.system.entry.js} +3 -3
  278. package/dist/magma-components/p-ea0091b6.entry.js +1 -0
  279. package/dist/magma-components/{p-a3279a73.system.entry.js → p-ec00defc.system.entry.js} +6 -4
  280. package/dist/magma-components/p-edfb0d7a.entry.js +1 -0
  281. package/dist/magma-components/{p-0715a2cb.system.entry.js → p-f9d9cf7c.system.entry.js} +2 -3
  282. package/dist/magma-components/p-fa163e86.entry.js +1 -0
  283. package/dist/magma-components/p-fe19080a.entry.js +8 -0
  284. package/dist/magma-components/p-ff49fb35.entry.js +1 -0
  285. package/dist/stats.json +383 -383
  286. package/dist/types/components/mds-avatar/mds-avatar.d.ts +2 -0
  287. package/dist/types/components/mds-header/mds-header.d.ts +1 -0
  288. package/dist/types/components/mds-icon/mds-icon.d.ts +5 -0
  289. package/dist/types/components/mds-icon/services/icons-set.service.d.ts +10 -9
  290. package/dist/types/components/mds-input-select/mds-input-select.d.ts +1 -0
  291. package/dist/types/components/mds-toast/mds-toast.d.ts +1 -0
  292. package/package.json +10 -10
  293. package/dist/components/p-B9DJLgwr.js +0 -1
  294. package/dist/components/p-BouRLCYL.js +0 -1
  295. package/dist/components/p-CVgKDZPF.js +0 -1
  296. package/dist/components/p-CatD1iUY.js +0 -1
  297. package/dist/components/p-CbufYCNj.js +0 -1
  298. package/dist/components/p-Cehcn85x.js +0 -1
  299. package/dist/components/p-ClKNADBg.js +0 -8
  300. package/dist/components/p-D8I1RblC.js +0 -1
  301. package/dist/components/p-DaI5QqNu.js +0 -1
  302. package/dist/components/p-Dj_oN194.js +0 -1
  303. package/dist/components/p-DmELzfvf.js +0 -1
  304. package/dist/magma-components/p-03be5c0c.entry.js +0 -1
  305. package/dist/magma-components/p-0af8d821.entry.js +0 -1
  306. package/dist/magma-components/p-1780b8ba.entry.js +0 -1
  307. package/dist/magma-components/p-1dcfb13e.entry.js +0 -1
  308. package/dist/magma-components/p-241dbf61.entry.js +0 -1
  309. package/dist/magma-components/p-27ea99ee.entry.js +0 -8
  310. package/dist/magma-components/p-4297da23.system.entry.js +0 -1
  311. package/dist/magma-components/p-454c4774.entry.js +0 -1
  312. package/dist/magma-components/p-59de81ac.entry.js +0 -1
  313. package/dist/magma-components/p-5e43274a.system.entry.js +0 -15
  314. package/dist/magma-components/p-66ce2dee.entry.js +0 -1
  315. package/dist/magma-components/p-69d1b815.entry.js +0 -1
  316. package/dist/magma-components/p-75fcf1a4.entry.js +0 -1
  317. package/dist/magma-components/p-78fef00a.entry.js +0 -1
  318. package/dist/magma-components/p-7fc29447.entry.js +0 -1
  319. package/dist/magma-components/p-8b7fa8d7.entry.js +0 -1
  320. package/dist/magma-components/p-9b2ee3fe.entry.js +0 -1
  321. package/dist/magma-components/p-a5ac5e0b.entry.js +0 -1
  322. package/dist/magma-components/p-a906a02f.system.entry.js +0 -16
  323. package/dist/magma-components/p-ac544ab1.entry.js +0 -1
  324. package/dist/magma-components/p-b23a6c83.entry.js +0 -1
  325. package/dist/magma-components/p-b9fecfd5.entry.js +0 -1
  326. package/dist/magma-components/p-c1fb2eb7.entry.js +0 -1
  327. package/dist/magma-components/p-c70d7159.entry.js +0 -1
  328. package/dist/magma-components/p-ddbdce09.entry.js +0 -1
  329. package/dist/magma-components/p-e3e893c4.entry.js +0 -1
  330. package/dist/magma-components/p-e4868ade.entry.js +0 -1
@@ -42,7 +42,7 @@ const MdsTableHeaderCell = class {
42
42
  this.tableRowsDefaultSorted = Array.from(this.tableBody.children);
43
43
  };
44
44
  this.getValue = (element) => {
45
- if (element.value !== undefined &&
45
+ if (element.value != null &&
46
46
  element.value !== '' &&
47
47
  element.value !== 0 &&
48
48
  !Number.isNaN(element.value)) {
@@ -125,7 +125,7 @@ const MdsTableHeaderCell = class {
125
125
  }
126
126
  }
127
127
  render() {
128
- return (index.h(index.Host, { key: 'aa269488717b726ffd93efcc6d863e4b9474bbe8', role: "columnheader", "aria-sort": this.direction, "pref-animation": preference.preferenceStore.state.animation }, this.sortable ? (index.h("mds-button", { class: "action", icon: clsx.clsx(this.direction === 'none' && miBaselineUnfoldMore, this.direction === 'ascending' && keyboardArrowUp.miBaselineKeyboardArrowUp, this.direction === 'descending' && keyboardArrowDown.miBaselineKeyboardArrowDown), "icon-position": "right", onClick: this.sort, tone: "text", variant: "dark", size: "sm", part: "action", label: this.label })) : (index.h("mds-text", { class: "label", typography: "label", part: "label" }, this.label))));
128
+ return (index.h(index.Host, { key: 'e7c077673fa918dfd50f25d7b341881f72eaefe2', role: "columnheader", "aria-sort": this.direction, "pref-animation": preference.preferenceStore.state.animation }, this.sortable ? (index.h("mds-button", { class: "action", icon: clsx.clsx(this.direction === 'none' && miBaselineUnfoldMore, this.direction === 'ascending' && keyboardArrowUp.miBaselineKeyboardArrowUp, this.direction === 'descending' && keyboardArrowDown.miBaselineKeyboardArrowDown), "icon-position": "right", onClick: this.sort, tone: "text", variant: "dark", size: "sm", part: "action", label: this.label })) : (index.h("mds-text", { class: "label", typography: "label", part: "label" }, this.label))));
129
129
  }
130
130
  get element() { return index.getElement(this); }
131
131
  static get watchers() { return {
@@ -313,7 +313,8 @@ const MdsText = class {
313
313
  this.animateText(newValue);
314
314
  }
315
315
  render() {
316
- return (index.h(index.Host, { key: '468c9b04797da9ab100c89474a7a67313aac829b', "pref-animation": preference.preferenceStore.state.animation }, index.h(this.tag, { key: '245ab42bd31cd0cb4be371f074fee956d3c1c13c', class: "text" }, this.text === undefined || this.text === '' ? index.h("slot", null) : this.text)));
316
+ var _a;
317
+ return (index.h(index.Host, { key: '468c9b04797da9ab100c89474a7a67313aac829b', "pref-animation": preference.preferenceStore.state.animation }, index.h(this.tag, { key: '245ab42bd31cd0cb4be371f074fee956d3c1c13c', class: "text" }, ((_a = this.text) !== null && _a !== void 0 ? _a : '') === '' ? index.h("slot", null) : this.text)));
317
318
  }
318
319
  get host() { return index.getElement(this); }
319
320
  static get watchers() { return {
@@ -29,10 +29,16 @@ const MdsToast = class {
29
29
  * Sets position of toast
30
30
  */
31
31
  this.position = 'bottom-center';
32
+ // a removed attribute leaves null, which counts as no duration, like 0
33
+ this.hasDuration = () => {
34
+ var _a;
35
+ const duration = (_a = this.duration) !== null && _a !== void 0 ? _a : 0;
36
+ return duration !== 0 && !Number.isNaN(duration);
37
+ };
32
38
  this.reloadTimeListeners = (visible) => {
33
39
  if (typeof window === 'undefined')
34
40
  return;
35
- if (this.duration === undefined || this.duration === 0 || Number.isNaN(this.duration)) {
41
+ if (!this.hasDuration()) {
36
42
  return;
37
43
  }
38
44
  if (!visible) {
@@ -69,7 +75,7 @@ const MdsToast = class {
69
75
  componentWillLoad() {
70
76
  this.hasText = this.hostElement.innerHTML !== '';
71
77
  this.hasActions = slot.hasChildWithSlot(this.hostElement, 'action');
72
- if (this.duration === undefined || this.duration === 0 || Number.isNaN(this.duration)) {
78
+ if (!this.hasDuration()) {
73
79
  return;
74
80
  }
75
81
  if (this.visible) {
@@ -86,7 +92,7 @@ const MdsToast = class {
86
92
  this.reloadTimeListeners(!!this.visible);
87
93
  }
88
94
  render() {
89
- return (index.h(index.Host, { key: '8bdaf6b4880eade87650f72ad2cf02d8d5be4724', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '9d5d8972d21dbc40e265317256e2f28241af48e3', class: clsx.clsx('dialog', this.position && `to-${this.position}`, this.visible && 'dialog--visible') }, index.h("slot", { key: 'f256f3a18b80991a3d3286310b0cd5df0020f88f', name: "icon" }), this.hasText && (index.h("mds-text", { key: 'f52eba42e9bd4c0c3e3010ea401616bc44b5ac10', typography: "caption" }, index.h("slot", { key: 'f0b92de1ea1fe9227d5f2c04cf2bead2b925a2fd' }))), index.h("div", { key: '56f387b1d634e5703f9f263e3655437d3725d76e', class: clsx.clsx('actions', !this.hasActions && 'actions--hidden') }, index.h("slot", { key: '7bb9ad600b6768b0b3edb21846f6e472825de9c9', name: "action", onSlotchange: this.onActionSlotChange })))));
95
+ return (index.h(index.Host, { key: 'd043662b287519f10abe2a4568d2f3458b89857e', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '5f8945ad6b39700172920d34c405d616c685de61', class: clsx.clsx('dialog', this.position && `to-${this.position}`, this.visible && 'dialog--visible') }, index.h("slot", { key: 'ad778db94450394931cfb554357e91cbf192fe66', name: "icon" }), this.hasText && (index.h("mds-text", { key: '43ac2cbcd4101ade9b03ec137ec36d512b9fd87e', typography: "caption" }, index.h("slot", { key: '4ede3cb3db5c6f096fe66ed87f05a1e2deab2b24' }))), index.h("div", { key: 'd811c95881d28ccba3be66605efb8197235bc1ef', class: clsx.clsx('actions', !this.hasActions && 'actions--hidden') }, index.h("slot", { key: '08e8d1cb3e62bf1eb104a3de3d473ca57a6991e9', name: "action", onSlotchange: this.onActionSlotChange })))));
90
96
  }
91
97
  get hostElement() { return index.getElement(this); }
92
98
  static get watchers() { return {
@@ -98,10 +98,10 @@ const MdsTooltip = class {
98
98
  this.floatingController.dismiss();
99
99
  }
100
100
  targetChanged() {
101
- var _a;
102
- if (this.target === '')
101
+ var _a, _b;
102
+ if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '')
103
103
  return;
104
- const caller = (_a = this.floatingController) === null || _a === void 0 ? void 0 : _a.updateCaller(this.target);
104
+ const caller = (_b = this.floatingController) === null || _b === void 0 ? void 0 : _b.updateCaller(this.target);
105
105
  if (!caller)
106
106
  return;
107
107
  this.caller = caller;
@@ -123,7 +123,7 @@ const MdsTooltip = class {
123
123
  this.floatingController.dismiss();
124
124
  }
125
125
  render() {
126
- return (index.h(index.Host, { key: '02d727ee44214d0a1f463fc6cae454141844af42', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '8401f0adec5b8e074d9d9bd691ec09fdfc31fca3', class: "arrow", innerHTML: arrowSvg }), index.h("mds-text", { key: '9ad6ae17fdf84169c6cd7014038c51b9c0f89ff7', class: "text", typography: this.typography, part: "text" }, index.h("slot", { key: '6c5c19f7780e0849c7940d78a4ca1b6fe64e51d2' }))));
126
+ return (index.h(index.Host, { key: '2031b33e6cc0837318acce18e2298a4bacfc5b0b', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: 'ba0236540eb28111cba583fc346e4d3717ed0385', class: "arrow", innerHTML: arrowSvg }), index.h("mds-text", { key: '8aa8abf3be3b4ab25dc1bf4bf85d9fbdb6470639', class: "text", typography: this.typography, part: "text" }, index.h("slot", { key: '79d6f5b7055890731d8e861985a9de7c5df9c725' }))));
127
127
  }
128
128
  get host() { return index.getElement(this); }
129
129
  static get watchers() { return {
@@ -72,9 +72,25 @@ export class MdsAvatar {
72
72
  this.handleImgLoadSuccess = () => {
73
73
  this.loaded = true;
74
74
  };
75
+ // a removed attribute or a null bound by a framework counts as not set, like '' or 0
76
+ this.hasCount = () => {
77
+ var _a;
78
+ const count = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
79
+ return count !== 0 && !Number.isNaN(count);
80
+ };
81
+ this.checkTexts = () => {
82
+ var _a;
83
+ const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
84
+ if (initials !== '')
85
+ this.checkText(initials);
86
+ if (this.hasCount())
87
+ this.checkText(String(this.count));
88
+ };
75
89
  this.checkInitialsVariant = () => {
76
- if (this.initials !== undefined && this.initials !== '') {
77
- let cleanedInitials = this.initials
90
+ var _a;
91
+ const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
92
+ if (initials !== '') {
93
+ let cleanedInitials = initials
78
94
  .toLowerCase()
79
95
  .replace(/[^a-zA-Z0-9]+/g, '')
80
96
  .substring(0, 2);
@@ -95,21 +111,13 @@ export class MdsAvatar {
95
111
  if (this.src !== undefined) {
96
112
  this.loaded = false;
97
113
  }
98
- if (this.initials !== undefined && this.initials !== '') {
99
- this.checkText(this.initials);
100
- }
101
- if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count)) {
102
- this.checkText(this.count.toString());
103
- }
114
+ this.checkTexts();
104
115
  }
105
116
  componentDidRender() {
106
117
  if (this.textChanged) {
107
118
  // placed here becase @Watch('initials') is fired
108
119
  // BEFORE the element .fit is attached on shDOM
109
- if (this.initials !== undefined && this.initials !== '')
110
- this.checkText(this.initials);
111
- if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count))
112
- this.checkText(this.count.toString());
120
+ this.checkTexts();
113
121
  this.textChanged = false;
114
122
  }
115
123
  }
@@ -132,26 +140,13 @@ export class MdsAvatar {
132
140
  }
133
141
  }
134
142
  render() {
135
- return (h(Host, { key: '09e30ddb558c31aa23749b4bf3d5190a30b605c7', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast }, h("div", { key: '1d99eceedcc2dc604afcd887a2d767d61fced5e1', class: clsx('avatar', this.initials &&
136
- !this.fallback &&
137
- (this.src === undefined || this.src === '') &&
138
- 'avatar--initials', (this.fallback ||
139
- ((this.icon === undefined || this.icon === '') &&
140
- (this.initials === undefined || this.initials === '') &&
141
- (this.src === undefined || this.src === ''))) &&
142
- 'avatar--fallback', this.icon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, this.initials &&
143
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
144
- !this.fallback &&
145
- (this.src === undefined || this.src === '') && (h("div", { key: '08dd0918a258022793f5331a9de7b2460a2e1404', class: "initials-text" }, h("span", { key: '69379497bb9096cea56b366c52ba5372adb5506d', class: "fit" }, this.initials.substring(0, 2)))), this.count && !this.fallback && (this.src === undefined || this.src === '') && (h("div", { key: '07c1e94db40562b8a2467605591236433fd6af39', class: "initials-text" }, h("span", { key: '36c2b72540c03d140f97d64304d46583419d23df', class: "fit" }, "+", this.count))), this.src &&
146
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
147
- !this.fallback &&
148
- (this.icon === undefined || this.icon === '') && (h("mds-img", { key: '9d6a6d4a12a5142686aede6e9f9a974f592b674f', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), this.icon &&
149
- (this.initials === undefined || this.initials === '') &&
150
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) && (h("mds-icon", { key: 'b37eae32b77654190b14d8b046d2f9a51801ae2a', class: "icon", part: "icon", name: this.icon })), (this.fallback ||
151
- ((this.icon === undefined || this.icon === '') &&
152
- (this.initials === undefined || this.initials === '') &&
153
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
154
- (this.src === undefined || this.src === ''))) && (h("i", { key: '18d842d4aea1f73adef926ff74a896a9d8a52bc6', class: "fallback-icon", innerHTML: miBaselinePerson })))));
143
+ var _a, _b, _c, _d;
144
+ const hasCount = this.hasCount();
145
+ const icon = (_a = this.icon) !== null && _a !== void 0 ? _a : '';
146
+ const hasIcon = icon !== '';
147
+ const hasInitials = ((_b = this.initials) !== null && _b !== void 0 ? _b : '') !== '';
148
+ const hasSrc = ((_c = this.src) !== null && _c !== void 0 ? _c : '') !== '';
149
+ return (h(Host, { key: '87e19218bbfe6e9c79f5edd7b4dd0350572b4f84', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast }, h("div", { key: 'b8775a55b682778312539df8ba0d8107075873e1', class: clsx('avatar', hasInitials && !this.fallback && !hasSrc && 'avatar--initials', (this.fallback || (!hasIcon && !hasInitials && !hasSrc)) && 'avatar--fallback', hasIcon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, hasInitials && !hasCount && !this.fallback && !hasSrc && (h("div", { key: 'acea5faae52d0cfaaa8f03788a22c89c8f0095ad', class: "initials-text" }, h("span", { key: 'aedd03f85b197fc6ed24b4a0238804856145aa4c', class: "fit" }, (_d = this.initials) === null || _d === void 0 ? void 0 : _d.substring(0, 2)))), hasCount && !this.fallback && !hasSrc && (h("div", { key: 'dd8af02204937c6558ab63b26d5993aa34e4df37', class: "initials-text" }, h("span", { key: 'fdf6930557054172bea785b8c6be0decb743887a', class: "fit" }, "+", this.count))), hasSrc && !hasCount && !this.fallback && !hasIcon && (h("mds-img", { key: '4519cc0bd3e701abf9d7bdaf0189f2ca3bcd86ed', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), hasIcon && !hasInitials && !hasCount && (h("mds-icon", { key: '5958962b68d5797dd46f1322b0e12717bf70c93e', class: "icon", part: "icon", name: icon })), (this.fallback || (!hasIcon && !hasInitials && !hasCount && !hasSrc)) && (h("i", { key: 'e6509636da3e20d93144dde5f3ecce6f1cfc5506', class: "fallback-icon", innerHTML: miBaselinePerson })))));
155
150
  }
156
151
  static get is() { return "mds-avatar"; }
157
152
  static get encapsulation() { return "shadow"; }
@@ -19,8 +19,9 @@ export class MdsBadge {
19
19
  */
20
20
  this.typography = 'option';
21
21
  this.onSlotChangeHandler = () => {
22
+ var _a;
22
23
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
23
- if (this.label !== undefined && this.label !== '')
24
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
24
25
  return;
25
26
  this.label = readSlottedLabel(this.host);
26
27
  };
@@ -29,7 +30,7 @@ export class MdsBadge {
29
30
  this.label = sanitizeLabel(newValue);
30
31
  }
31
32
  render() {
32
- return (h(Host, { key: '86aa308e28dc28decde0195a23c8551084c36ed1', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("mds-text", { key: '32566dfede9c11a1de5ba48051cc5e2dffe4f35e', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || h("slot", { key: 'e7055d4c61bfc4ea0876cc849a829ae0ce77c5d2', onSlotchange: this.onSlotChangeHandler }))));
33
+ return (h(Host, { key: '30205c3754c77ad904a3a01a695ec9daf058bd81', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("mds-text", { key: '3a850df57ca87e8efbf505094f3d1e4e309deb42', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || h("slot", { key: '99531173211bd788d288b9d20d36d5eb7b2dc95e', onSlotchange: this.onSlotChangeHandler }))));
33
34
  }
34
35
  static get is() { return "mds-badge"; }
35
36
  static get encapsulation() { return "shadow"; }
@@ -23,8 +23,9 @@ export class MdsBenchmarkBar {
23
23
  */
24
24
  this.size = 'md';
25
25
  this.onSlotChangeHandler = () => {
26
+ var _a;
26
27
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
27
- if (this.label !== undefined && this.label !== '')
28
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
28
29
  return;
29
30
  this.label = readSlottedLabel(this.host);
30
31
  };
@@ -34,7 +35,7 @@ export class MdsBenchmarkBar {
34
35
  }
35
36
  render() {
36
37
  var _a;
37
- return (h(Host, { key: '1c2d9a434915c3bd3487e3accddc100cb457178b' }, h("div", { key: '809bfc18d2042c97685adb031b65f3444a1ba3c4', class: "infos" }, h("mds-text", { key: 'f328a5c085a268ac48839e9553fe48a0d57873f8', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || h("slot", { key: 'd61cde55186ab7d8aa186fb740b35fb9e5e964f4', onSlotchange: this.onSlotChangeHandler })), h("mds-text", { key: '2f0145a1c718cb646fb28e05e6f828c196c8902e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), h("mds-progress", { key: 'ad484ee140a19ccde21e5a50df8532c03508350a', "aria-labelledby": "label", "aria-valuetext": this.alias, class: "progress", variant: this.variant, progress: this.value / 100, size: this.size, part: "progress-bar" })));
38
+ return (h(Host, { key: 'e07ff600bed598dc0d97144ef596c2a2010efbbd' }, h("div", { key: 'd3493800ec6d4f20e36d38132f10a3b67f565006', class: "infos" }, h("mds-text", { key: '07423f38822e314059dcee2cda38abffbea3bb62', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || h("slot", { key: 'e4aff25b3be0d2f87aefb2a88dd6050715c74d56', onSlotchange: this.onSlotChangeHandler })), h("mds-text", { key: '8b1ec4a01389199b881f46a69ccee96c8867446e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), h("mds-progress", { key: 'bc44dc2a31dd43599393df1129671da224f45f43', "aria-labelledby": "label", "aria-valuetext": this.alias, class: "progress", variant: this.variant, progress: this.value / 100, size: this.size, part: "progress-bar" })));
38
39
  }
39
40
  static get is() { return "mds-benchmark-bar"; }
40
41
  static get encapsulation() { return "shadow"; }
@@ -81,7 +81,7 @@ export class MdsBibliography {
81
81
  return `${lastName}${lastName !== '' ? ',' : ''} ${formattedFirstName}`;
82
82
  };
83
83
  this.formatAuthors = (author) => {
84
- var _a;
84
+ var _a, _b;
85
85
  const authorName = author.replace(/"/g, "'");
86
86
  const splitNames = new RegExp(/([A-Za-z ]{2,})/g);
87
87
  const fullName = (_a = authorName.match(splitNames)) !== null && _a !== void 0 ? _a : authorName;
@@ -97,7 +97,7 @@ export class MdsBibliography {
97
97
  };
98
98
  }
99
99
  const firstName = fullName[0].split(' ')[0].trim();
100
- const lastName = fullName[0].split(' ')[1] !== '' ? fullName[0].split(' ')[1].trim() : '';
100
+ const lastName = ((_b = fullName[0].split(' ')[1]) !== null && _b !== void 0 ? _b : '').trim();
101
101
  return {
102
102
  apa: this.fullNameAPA(firstName, lastName),
103
103
  firstName,
@@ -130,7 +130,8 @@ export class MdsBibliography {
130
130
  };
131
131
  }
132
132
  render() {
133
- return (h(Host, { key: '23f59847854d7d9a89b7dd2750e436d8f02e3d14' }, h("mds-text", { key: 'b894fe2efb2a5fcb6efed4e71efc21bd226e05fe', typography: this.typography, variant: this.variant }, this.author && h("span", { key: 'c4643d727585acf555ddd35a75b899694e5c9402' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (h("span", { key: '6dbda3e1aaeac89017d1fed6d8ff2cd832693199' }, this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, h("b", null, h("i", null, this.name, ".")))) : (h("b", null, h("i", null, this.name, "."))), this.location && (h("span", { key: '340b4ecae707224b88baf69235b669ecee608e28' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (h("span", { key: '54d44315bbf6859e10136f0cbd73d5a56cbd3af9' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && h("time", { key: '642f54d9348dd05fe0867ef2259c1ed720987b9c', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (h("span", { key: '1a6caf7ae4b454bf05b924e56c9aad6e882efe98' }, this.date && h("time", { key: '2dbce299a5459cff5da64ac87925947bcddb2336', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, h("b", null, h("i", null, " ", this.name, ".")))) : (h("b", null, h("i", null, " ", this.name, "."))), this.location && (h("span", { key: 'c9f7127424939df3e352479e48a298e964ec4d06' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && h("span", { key: 'abb5252ecfb00b5b00c37c1e8063a2c00ea03cc2' }, " ", this.publisher, "."))), this.format === 'turabian' && (h("span", { key: '91cebf4a49774b5f09f5947378b08c54150c6768' }, this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, h("b", null, h("i", null, " ", this.name, ".")))) : (h("b", null, h("i", null, " ", this.name, "."))), this.location && (h("span", { key: '102f8ccc46702f490624d0de0e0dfc1b69a1ce66' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (h("span", { key: 'f263f731ce15c53982f10273a9918854e9e14564' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && h("time", { key: 'fcb9f7211479b4f78a056117f81589d4011ac0fc', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
133
+ var _a, _b, _c;
134
+ return (h(Host, { key: '4fe352d77a5ceea45f9b82d11fbb4ffe2d887aef' }, h("mds-text", { key: '30052872c829ff3b2c142cd54cb64eebcd558f76', typography: this.typography, variant: this.variant }, this.author && h("span", { key: '14d5043a19e193f34a4502029d7dc21fe2ae8083' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (h("span", { key: '7b903d623a57baf664c7cd425e78d7a17fca8331' }, this.name && ' ', ((_a = this.name) !== null && _a !== void 0 ? _a : '') !== '' && this.url !== null ? (h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, h("b", null, h("i", null, this.name, ".")))) : (h("b", null, h("i", null, this.name, "."))), this.location && (h("span", { key: '9c52f22dd20cafb9eb7df4835c2f5a99ca71a1a6' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (h("span", { key: '3ff1124122ef8d52079fa7337ed51f116fa1f266' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && h("time", { key: 'ac4e6e1506bbca2633c95593d44df61622b6e040', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (h("span", { key: '71558449f856a09fda8b02f2808c93b1dd72c532' }, this.date && h("time", { key: 'f952a6c0f8be0cbf83a8d04ff13e08b3221cbdc4', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', ((_b = this.name) !== null && _b !== void 0 ? _b : '') !== '' && this.url !== null ? (h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, h("b", null, h("i", null, " ", this.name, ".")))) : (h("b", null, h("i", null, " ", this.name, "."))), this.location && (h("span", { key: 'ecead881a08e1f08ebe0c08f5016414238b0c0aa' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && h("span", { key: '7f5caaaecb02bdda257974de0439d0c15e4ebd71' }, " ", this.publisher, "."))), this.format === 'turabian' && (h("span", { key: 'e2869b0cbf35ddb64020edfb9aeab7a5bd94e56d' }, this.name && ' ', ((_c = this.name) !== null && _c !== void 0 ? _c : '') !== '' && this.url !== null ? (h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, h("b", null, h("i", null, " ", this.name, ".")))) : (h("b", null, h("i", null, " ", this.name, "."))), this.location && (h("span", { key: '1de156ae83032c28eef77b059c52beed6f7bb8a8' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (h("span", { key: 'c82b2387e90227b129d5078561c60492901fb9e3' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && h("time", { key: 'fe9da6c7294ee249a0d892cf882a387ba0196159', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
134
135
  }
135
136
  static get is() { return "mds-bibliography"; }
136
137
  static get encapsulation() { return "shadow"; }
@@ -71,8 +71,9 @@ export class MdsButton {
71
71
  throw Error('Object window is not defined');
72
72
  };
73
73
  this.onSlotChangeHandler = () => {
74
+ var _a;
74
75
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
75
- if (this.label !== undefined && this.label !== '')
76
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
76
77
  return;
77
78
  this.label = readSlottedLabel(this.host);
78
79
  };
@@ -129,8 +130,9 @@ export class MdsButton {
129
130
  }
130
131
  }
131
132
  componentWillLoad() {
133
+ var _a;
132
134
  this.handleVariantChange(this.variant);
133
- if (this.href !== undefined && this.href !== '') {
135
+ if (((_a = this.href) !== null && _a !== void 0 ? _a : '') !== '') {
134
136
  this.host.addEventListener('click', (e) => {
135
137
  var _a;
136
138
  e.preventDefault();
@@ -153,6 +155,7 @@ export class MdsButton {
153
155
  }
154
156
  }
155
157
  componentDidLoad() {
158
+ var _a;
156
159
  this.km.addElement(this.host);
157
160
  if (!this.await) {
158
161
  this.km.attachClickBehavior();
@@ -170,9 +173,7 @@ export class MdsButton {
170
173
  if (this.label === '') {
171
174
  this.label = undefined;
172
175
  }
173
- if ((this.label === undefined || this.label === '') &&
174
- this.icon !== undefined &&
175
- this.icon !== '') {
176
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') === '' && this.icon != null && this.icon !== '') {
176
177
  const iconTitle = unslugName(this.icon);
177
178
  if (!this.host.hasAttribute('aria-label')) {
178
179
  setAttributeIfEmpty(this.host, 'title', iconTitle);
@@ -201,7 +202,7 @@ export class MdsButton {
201
202
  render() {
202
203
  var _a;
203
204
  this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
204
- return (h(Host, { key: 'b78ea9e82edc7fb1e05d3fb3f7d9c9d08589ec2b', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preferenceStore.state.animation, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("div", { key: '6e93d60b23f794a489b2ce2b55d51c000008aef4', class: "await" }, h("mds-spinner", { key: 'ae40c10546682ad904552560c4a0a5ab95af8f48', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (h("mds-icon", { key: 'b44d109ca1c92f9d9680c1ae5b36a3e08347008a', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), h("mds-text", { key: '9e5c7ea8c1985633b22217d2fae8ada8b4b9d02e', class: "text", part: "label", tag: "span", typography: this.typography, truncate: this.truncate, animation: this.animation, text: this.label }, this.label || h("slot", { key: '856dede502b5a35d80b77c6ddb39b7e9c4d4b4f3', onSlotchange: this.onSlotChangeHandler })), h("slot", { key: 'bf4ee1f6ecf7c9a4cab0797aba08c97e55751b2d', name: "notification" }), this.icon && this.iconPosition === 'right' && (h("mds-icon", { key: '6e5dfeb55023770a487dead1300cad6813e08694', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
205
+ return (h(Host, { key: '3d7db80d99477ad9e4ff34c97d0cb0e04160a041', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preferenceStore.state.animation, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("div", { key: '133053ee2566972bbbaf1f47faa87c1f9c30b841', class: "await" }, h("mds-spinner", { key: 'ce67aa6522a2c646b1efebf51dcc51d3a987b5c9', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (h("mds-icon", { key: '81d183d185387f2e6113869e14cb274a57f44f3b', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), h("mds-text", { key: '5ac26dd99519f30bcfe71fcbe0fdd4195055bea2', class: "text", part: "label", tag: "span", typography: this.typography, truncate: this.truncate, animation: this.animation, text: this.label }, this.label || h("slot", { key: 'a56c6946ed59d9b9fe481955027015d7f46bcab1', onSlotchange: this.onSlotChangeHandler })), h("slot", { key: '1f0a279dd9e57ba7510c879e72d1f815adb76b6b', name: "notification" }), this.icon && this.iconPosition === 'right' && (h("mds-icon", { key: 'eb2f6eff668e5195d5725360ba30cb99a6e7a054', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
205
206
  }
206
207
  static get is() { return "mds-button"; }
207
208
  static get encapsulation() { return "shadow"; }
@@ -285,7 +285,8 @@ export class MdsDropdown {
285
285
  this.floatingController.updatePosition();
286
286
  }
287
287
  targetChanged() {
288
- if (this.target === '' || this.floatingController == null)
288
+ var _a;
289
+ if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '' || this.floatingController == null)
289
290
  return;
290
291
  const caller = this.floatingController.updateCaller(this.target);
291
292
  if (!caller)
@@ -354,9 +355,9 @@ export class MdsDropdown {
354
355
  this.km.detachEscapeBehavior();
355
356
  }
356
357
  render() {
357
- return (h(Host, { key: '909529db1b7f90da7fef23235ac276e133aef6cf', style: {
358
+ return (h(Host, { key: '42bb1259088a7cc15869cd0cbf007ce9f34331cb', style: {
358
359
  zIndex: `${this.zIndex}`,
359
- }, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("div", { key: 'fe65713f1e3f849a57f05ad7e3be0eede40198d4', class: "arrow", innerHTML: arrowSvg }), h("slot", { key: '2c438ff28af51844e5e399e07b31773edf745447' })));
360
+ }, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, h("div", { key: '6a2caa47a6dca50fe6ae209229daddcd7791473d', class: "arrow", innerHTML: arrowSvg }), h("slot", { key: '656a32363daa94dc4433cd5fb86d689d80502221' })));
360
361
  }
361
362
  static get is() { return "mds-dropdown"; }
362
363
  static get encapsulation() { return "shadow"; }
@@ -62,13 +62,12 @@ export class MdsFilePreview {
62
62
  card === null || card === void 0 ? void 0 : card.removeEventListener('click', this.onClickDownloadEvent);
63
63
  }
64
64
  render() {
65
- var _a, _b, _c;
66
- return (h(Host, { key: '389451c485ded68d3d3d99e950ec2e2ad08f4ac9', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.deletable && (h("mds-button", { key: 'e04b3974185c09a3d9407b74168a37afce9d23de', title: this.t.get('remove'), class: "action-delete", icon: miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), h("div", { key: 'f899421ec875a83f2593890e0a736759b903b24f', class: "card", part: "card", onClick: this.onClickDownloadEvent }, this.src !== undefined &&
67
- this.src !== '' &&
68
- (this.message === undefined || this.message === '') &&
69
- getExtensionInfos(this.filename, this.suffix).preview ? (h("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (h("div", { class: clsx('preview', this.message === undefined || this.message === ''
70
- ? 'preview--icon'
71
- : 'preview--status') }, this.icon !== undefined && this.icon !== '' ? (h("mds-icon", { class: "icon", name: this.icon })) : (h("mds-icon", { class: "icon", name: getFormatsVariant(this.filename, this.suffix).icon })), this.message && (h("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), h("mds-text", { key: '32d3359b9c41a845001e17987ce703219ba29843', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), h("div", { key: '79e555cedfc5d35b2d54ec6a3aee7591cc0edf2e', class: clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (h("mds-text", { key: '84e7d78e1d0639e637173a1c781a61f21e459b6d', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (h("mds-text", { key: '8945ff2c6224b7a4803390eae2fc12474903a3dd', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), getSuffix(this.filename, this.suffix) && (h("mds-badge", { key: '5581cb1f4d13f6f15f28c0957094dcd5982f0a0f', variant: getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_a = this.description) !== null && _a !== void 0 ? _a : this.t.get(this.getDefaultKeyDescription()) }, getSuffix(this.filename, this.suffix))), (this.filesize === undefined || this.filesize === '') && (h("mds-text", { key: 'd743b838cc6fa9fed0f5cdf7914c7652bfc3e1ac', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_b = this.description) !== null && _b !== void 0 ? _b : this.t.get(this.getDefaultKeyDescription()) }, (_c = this.description) !== null && _c !== void 0 ? _c : this.t.get(this.getDefaultKeyDescription())))))));
65
+ var _a, _b, _c, _d, _e, _f, _g;
66
+ // a removed attribute or a null bound by a framework counts as not set, like an empty value
67
+ const hasMessage = ((_a = this.message) !== null && _a !== void 0 ? _a : '') !== '';
68
+ return (h(Host, { key: '4450e7351e840c4b0f7d72c9b1bc441d9087ad7e', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.deletable && (h("mds-button", { key: '8f1d4ced62f8c479a5e1c324b5ce940cf7aa2d84', title: this.t.get('remove'), class: "action-delete", icon: miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), h("div", { key: '45d38745f7466b0da5b8f2724879ef46d6826bfd', class: "card", part: "card", onClick: this.onClickDownloadEvent }, ((_b = this.src) !== null && _b !== void 0 ? _b : '') !== '' &&
69
+ !hasMessage &&
70
+ getExtensionInfos(this.filename, this.suffix).preview ? (h("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (h("div", { class: clsx('preview', hasMessage ? 'preview--status' : 'preview--icon') }, ((_c = this.icon) !== null && _c !== void 0 ? _c : '') !== '' ? (h("mds-icon", { class: "icon", name: this.icon })) : (h("mds-icon", { class: "icon", name: getFormatsVariant(this.filename, this.suffix).icon })), this.message && (h("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), h("mds-text", { key: 'e87d673948267ccf70636d4c2940fb8885f2fb96', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), h("div", { key: '25e05eb7f5bef19a392b87401f2e780bd8e605cd', class: clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (h("mds-text", { key: 'cdd7ebbbc99f90caee0c49d74a4b8f4ce0769a2a', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (h("mds-text", { key: '381998bfae5b4d76fed78c70f38ef2aab5d13f9e', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), getSuffix(this.filename, this.suffix) && (h("mds-badge", { key: '89f980cf0ec10d220c83f5a6e8ded4a4d9491a0c', variant: getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_d = this.description) !== null && _d !== void 0 ? _d : this.t.get(this.getDefaultKeyDescription()) }, getSuffix(this.filename, this.suffix))), ((_e = this.filesize) !== null && _e !== void 0 ? _e : '') === '' && (h("mds-text", { key: 'f29356eb97dbb5bc137d3d278176633ce938111f', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_f = this.description) !== null && _f !== void 0 ? _f : this.t.get(this.getDefaultKeyDescription()) }, (_g = this.description) !== null && _g !== void 0 ? _g : this.t.get(this.getDefaultKeyDescription())))))));
72
71
  }
73
72
  static get is() { return "mds-file-preview"; }
74
73
  static get encapsulation() { return "shadow"; }
@@ -47,12 +47,19 @@ export class MdsHeader {
47
47
  this.closedEvent.emit({ bar: this.headerBar });
48
48
  this.headerBar.setOpened(false);
49
49
  };
50
+ // a removed attribute leaves null, which turns the auto hide off like 0
51
+ this.getAutoHide = () => {
52
+ var _a;
53
+ const autoHide = (_a = this.autoHide) !== null && _a !== void 0 ? _a : 0;
54
+ return Number.isNaN(autoHide) ? 0 : autoHide;
55
+ };
50
56
  this.handleVisibility = () => {
51
- if (this.autoHide === undefined || this.autoHide === 0 || Number.isNaN(this.autoHide)) {
57
+ const autoHide = this.getAutoHide();
58
+ if (autoHide === 0) {
52
59
  return;
53
60
  }
54
61
  // reset var if the page is scrolled to top
55
- if (window.scrollY < this.autoHide) {
62
+ if (window.scrollY < autoHide) {
56
63
  this.visibility = 'visible';
57
64
  this.relativeThresholdUp = 0;
58
65
  this.relativeTresholdDown = 0;
@@ -69,9 +76,9 @@ export class MdsHeader {
69
76
  this.relativePosition = this.relativeThresholdUp;
70
77
  }
71
78
  // set hidden for the first scroll from top
72
- if (this.relativePosition < this.autoHide && this.autoHide - window.scrollY <= 0) {
79
+ if (this.relativePosition < autoHide && autoHide - window.scrollY <= 0) {
73
80
  this.visibility = 'hidden';
74
- this.relativePosition = this.autoHide;
81
+ this.relativePosition = autoHide;
75
82
  }
76
83
  // update respective threshold if page is scrolled up or down
77
84
  if (window.scrollY > this.relativeThresholdUp) {
@@ -82,11 +89,13 @@ export class MdsHeader {
82
89
  }
83
90
  };
84
91
  this.sanitizeAppearance = () => {
85
- if (this.appearanceSet === undefined || this.appearanceSet === '') {
92
+ var _a;
93
+ const appearanceSet = (_a = this.appearanceSet) !== null && _a !== void 0 ? _a : '';
94
+ if (appearanceSet === '') {
86
95
  return [this.appearance];
87
96
  }
88
97
  const regex = /\b(\w+)\b/g;
89
- const matches = this.appearanceSet.match(regex);
98
+ const matches = appearanceSet.match(regex);
90
99
  if (matches) {
91
100
  return matches;
92
101
  }
@@ -103,7 +112,7 @@ export class MdsHeader {
103
112
  this.handleScroll = () => {
104
113
  if (typeof window === 'undefined')
105
114
  return;
106
- if (this.autoHide !== undefined && this.autoHide !== 0 && !Number.isNaN(this.autoHide)) {
115
+ if (this.getAutoHide() !== 0) {
107
116
  this.handleVisibility();
108
117
  }
109
118
  if (this.sanitizedAppearance.length > 1) {
@@ -182,7 +191,7 @@ export class MdsHeader {
182
191
  }
183
192
  }
184
193
  render() {
185
- return (h(Host, { key: 'c6555033c0158d17685d8b7162c45866f8037285', "pref-consumption": preferenceStore.state.consumption, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, !this.hideBackdrop && (h("div", { key: 'fe183e0caf03b46b982bc18efb99ec0919c33f7a', class: "backdrop" }, h("div", { key: '466c441e5e99830a95c2a4042e7f35dcc9e939de', class: "backdrop-blur-item" }), h("div", { key: 'f4908f6ad7b260300bb8e21941c3af23ab922fd1', class: "backdrop-blur-item" }), h("div", { key: 'f303889b90a8e6ea16689c90795890c365f949be', class: "backdrop-blur-item" }), h("div", { key: '8f48b4a5aaeaf05e8631188e2153fbd9da9a5b1b', class: "backdrop-blur-item" }), h("div", { key: '8355bc57ae5af9b902bd58e0ad4a67a492871333', class: "backdrop-blur-item" }), h("div", { key: 'ff5c243df68a4dd26baa862abe2a50050e9ed386', class: "backdrop-blur-item" }), h("div", { key: '0f7c9da08faf5ddc14bd34a098003ebe73911b99', class: "backdrop-blur-item" }), h("div", { key: 'b36c0beab493efd6736294a5a934556107a6fc13', class: "backdrop-blur-item" }), h("div", { key: '9e39753de2c9f661b3d91cca248e4f222a7e09f3', class: "backdrop-blur-item" }), h("div", { key: '2dbec569325d216a9ef2d414f49b44e6da95db37', class: "backdrop-blur-item" }))), h("slot", { key: 'd57ef1616405d7f4fb41b4ab7e948b22fb85f409' }), this.hasMenu && (h("div", { key: '3c252d5e09ae4c93e9909533f2d990d18b31e647', class: "menu", part: "menu" }, h("mds-modal", { key: '2016f4000527a86b15ca0959347dc229db59f2ad', class: "modal", opened: this.isOpened, onMdsModalClose: this.close, position: "right" }, h("slot", { key: 'bb7115881458039e1483caf152901c2d35adc44f', name: "menu" }))))));
194
+ return (h(Host, { key: 'f672f81878e181d21c234188d2ad02ded1bdb039', "pref-consumption": preferenceStore.state.consumption, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, !this.hideBackdrop && (h("div", { key: '6bf87ed021bcdb62c728fbee3818a8ad11895b06', class: "backdrop" }, h("div", { key: '6a3ad84c2e41313c14531b514b2752f972986ec4', class: "backdrop-blur-item" }), h("div", { key: 'b8031f912733bcc01f47ae28e756ae9f9f184bf1', class: "backdrop-blur-item" }), h("div", { key: 'b9fddc9c2c459bc1b16ef7cc4fe0dd62c6ae0357', class: "backdrop-blur-item" }), h("div", { key: 'fb97781789e0773d35b31744a3f28bd23816e9eb', class: "backdrop-blur-item" }), h("div", { key: '1d464ccd4d846ac79d1b0ea303ab66f41af84116', class: "backdrop-blur-item" }), h("div", { key: '7ab61f7f2f21da6ad94408442237b8e2a16d32c1', class: "backdrop-blur-item" }), h("div", { key: '90fb7f3244c8047c6a576288dad756451de07cdf', class: "backdrop-blur-item" }), h("div", { key: '955ff4ac62f6a5e50726fcf5d097202622e760d2', class: "backdrop-blur-item" }), h("div", { key: '49e995993b74ce17e06c3a05004e7411442dd694', class: "backdrop-blur-item" }), h("div", { key: 'd0c693752ed5b8eee3f0c6925e158168b4e06822', class: "backdrop-blur-item" }))), h("slot", { key: '564de9025f4cdc11edb1dadf27c0c3e03be5d06d' }), this.hasMenu && (h("div", { key: 'c6cd25b6e417675a67662bbe4e2a8f0c89e1fd74', class: "menu", part: "menu" }, h("mds-modal", { key: 'cb330659a98adcf88e8af18097450edb71cb1423', class: "modal", opened: this.isOpened, onMdsModalClose: this.close, position: "right" }, h("slot", { key: 'd4f1dbcaee3303ad4c2130d7f7d64be3486bdc19', name: "menu" }))))));
186
195
  }
187
196
  static get is() { return "mds-header"; }
188
197
  static get encapsulation() { return "shadow"; }
@@ -6,14 +6,31 @@ import { isIconFormatIsBase64, isIconFormatIsSVG, BASE64_SVG_ICON } from "../../
6
6
  */
7
7
  export class MdsIcon {
8
8
  constructor() {
9
+ // Each update supersedes the ones still loading: only the latest one sets the svg
10
+ this.lastUpdate = 0;
11
+ this.wasDisconnected = false;
12
+ this.onSvgPathUpdate = () => {
13
+ this.updateIcon();
14
+ };
9
15
  this.convertBase64ToSvg = () => {
10
16
  const svgBase64 = this.name.replace(BASE64_SVG_ICON, '').replace(/=/i, '');
11
17
  return atob(svgBase64);
12
18
  };
13
19
  }
20
+ connectedCallback() {
21
+ IconsSetService.registerListener(this.onSvgPathUpdate);
22
+ // the svg path may have changed while the icon was out of the page
23
+ if (this.wasDisconnected) {
24
+ this.wasDisconnected = false;
25
+ this.updateIcon();
26
+ }
27
+ }
28
+ disconnectedCallback() {
29
+ IconsSetService.unregisterListener(this.onSvgPathUpdate);
30
+ this.wasDisconnected = true;
31
+ }
14
32
  componentWillLoad() {
15
33
  this.updateIcon();
16
- IconsSetService.registerListener(() => this.updateIcon());
17
34
  }
18
35
  /**
19
36
  * Set the path to the directory of svg files
@@ -24,8 +41,13 @@ export class MdsIcon {
24
41
  return Promise.resolve();
25
42
  }
26
43
  async updateIcon() {
27
- if (this.name === '')
44
+ var _a;
45
+ const update = ++this.lastUpdate;
46
+ // `name` is undefined (or null) at runtime when the attribute is missing or removed
47
+ if (((_a = this.name) !== null && _a !== void 0 ? _a : '') === '') {
48
+ this.svgHTML = '';
28
49
  return Promise.resolve();
50
+ }
29
51
  if (isIconFormatIsBase64(this.name)) {
30
52
  this.svgHTML = this.convertBase64ToSvg();
31
53
  return Promise.resolve();
@@ -34,10 +56,13 @@ export class MdsIcon {
34
56
  this.svgHTML = this.name;
35
57
  return Promise.resolve();
36
58
  }
37
- this.svgHTML = await IconsSetService.fetchSvg(this.name);
59
+ const svgHTML = await IconsSetService.fetchSvg(this.name);
60
+ if (update === this.lastUpdate) {
61
+ this.svgHTML = svgHTML;
62
+ }
38
63
  }
39
64
  render() {
40
- return (h(Host, { key: '8d95b94dbe7f22e136567cb681e44479f5c1be7a' }, this.svgHTML && h("i", { key: 'e9808177023e9521abf570b85302b65e43f9e0d8', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
65
+ return (h(Host, { key: '9544b1ca2b153e95f6710e0bbed762048676fb48' }, this.svgHTML && h("i", { key: '745b56492d69be55e449b94633b09391972e3d79', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
41
66
  }
42
67
  static get is() { return "mds-icon"; }
43
68
  static get encapsulation() { return "shadow"; }