@maggioli-design-system/magma 2.0.0-beta.5 → 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 (346) hide show
  1. package/README.md +2 -1
  2. package/dist/cjs/index.cjs.js +64 -22
  3. package/dist/cjs/{locale.it-D-rxNDkm.js → locale.it-CfUV2hxK.js} +13 -10
  4. package/dist/cjs/mds-avatar.cjs.entry.js +27 -32
  5. package/dist/cjs/mds-badge.cjs.entry.js +3 -2
  6. package/dist/cjs/mds-benchmark-bar.cjs.entry.js +3 -2
  7. package/dist/cjs/mds-bibliography.cjs.entry.js +4 -3
  8. package/dist/cjs/mds-button_3.cjs.entry.js +36 -10
  9. package/dist/cjs/mds-dropdown.cjs.entry.js +4 -3
  10. package/dist/cjs/mds-entity.cjs.entry.js +1 -1
  11. package/dist/cjs/mds-file-preview.cjs.entry.js +18 -18
  12. package/dist/cjs/mds-file.cjs.entry.js +1 -1
  13. package/dist/cjs/mds-header.cjs.entry.js +17 -8
  14. package/dist/cjs/mds-img.cjs.entry.js +3 -3
  15. package/dist/cjs/mds-input-date-range.cjs.entry.js +7 -5
  16. package/dist/cjs/mds-input-select.cjs.entry.js +10 -8
  17. package/dist/cjs/mds-input-upload.cjs.entry.js +10 -6
  18. package/dist/cjs/mds-input.cjs.entry.js +4 -4
  19. package/dist/cjs/mds-keyboard-key.cjs.entry.js +8 -5
  20. package/dist/cjs/mds-keyboard.cjs.entry.js +6 -3
  21. package/dist/cjs/mds-mention.cjs.entry.js +3 -2
  22. package/dist/cjs/mds-notification.cjs.entry.js +11 -8
  23. package/dist/cjs/mds-pref-language-item.cjs.entry.js +3 -2
  24. package/dist/cjs/mds-pref-theme-item.cjs.entry.js +3 -2
  25. package/dist/cjs/mds-push-notification-item.cjs.entry.js +1 -1
  26. package/dist/cjs/mds-stepper-bar.cjs.entry.js +5 -3
  27. package/dist/cjs/mds-tab-bar-item.cjs.entry.js +3 -2
  28. package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
  29. package/dist/cjs/mds-text.cjs.entry.js +2 -1
  30. package/dist/cjs/mds-toast.cjs.entry.js +9 -3
  31. package/dist/cjs/mds-tooltip.cjs.entry.js +4 -4
  32. package/dist/collection/common/file.js +13 -10
  33. package/dist/collection/components/mds-avatar/mds-avatar.js +27 -32
  34. package/dist/collection/components/mds-badge/mds-badge.js +3 -2
  35. package/dist/collection/components/mds-benchmark-bar/mds-benchmark-bar.js +3 -2
  36. package/dist/collection/components/mds-bibliography/mds-bibliography.js +4 -3
  37. package/dist/collection/components/mds-button/mds-button.js +7 -6
  38. package/dist/collection/components/mds-dropdown/mds-dropdown.js +4 -3
  39. package/dist/collection/components/mds-file-preview/mds-file-preview.js +6 -7
  40. package/dist/collection/components/mds-header/mds-header.js +17 -8
  41. package/dist/collection/components/mds-icon/mds-icon.js +29 -4
  42. package/dist/collection/components/mds-icon/services/icons-set.service.js +47 -18
  43. package/dist/collection/components/mds-img/mds-img.js +3 -3
  44. package/dist/collection/components/mds-input/mds-input.js +4 -4
  45. package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +7 -5
  46. package/dist/collection/components/mds-input-select/mds-input-select.js +10 -8
  47. package/dist/collection/components/mds-input-upload/mds-input-upload.js +10 -6
  48. package/dist/collection/components/mds-keyboard/mds-keyboard.js +6 -3
  49. package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +8 -5
  50. package/dist/collection/components/mds-mention/mds-mention.js +3 -2
  51. package/dist/collection/components/mds-notification/mds-notification.js +11 -8
  52. package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +3 -2
  53. package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +3 -2
  54. package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +5 -3
  55. package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +3 -2
  56. package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +2 -2
  57. package/dist/collection/components/mds-text/mds-text.js +2 -1
  58. package/dist/collection/components/mds-toast/mds-toast.js +9 -3
  59. package/dist/collection/components/mds-tooltip/mds-tooltip.js +4 -4
  60. package/dist/collection/dictionary/icon.js +1 -1
  61. package/dist/components/index.js +1 -1
  62. package/dist/components/mds-accordion-item.js +1 -1
  63. package/dist/components/mds-accordion-timer-item.js +1 -1
  64. package/dist/components/mds-avatar-stack-item.js +1 -1
  65. package/dist/components/mds-avatar-stack.js +1 -1
  66. package/dist/components/mds-avatar.js +1 -1
  67. package/dist/components/mds-badge.js +1 -1
  68. package/dist/components/mds-banner.js +1 -1
  69. package/dist/components/mds-benchmark-bar.js +1 -1
  70. package/dist/components/mds-bibliography.js +1 -1
  71. package/dist/components/mds-breadcrumb-item.js +1 -1
  72. package/dist/components/mds-breadcrumb.js +1 -1
  73. package/dist/components/mds-button-dropdown.js +1 -1
  74. package/dist/components/mds-button.js +1 -1
  75. package/dist/components/mds-calendar-cell.js +1 -1
  76. package/dist/components/mds-calendar.js +1 -1
  77. package/dist/components/mds-chip.js +1 -1
  78. package/dist/components/mds-dropdown.js +1 -1
  79. package/dist/components/mds-entity.js +1 -1
  80. package/dist/components/mds-file-preview.js +1 -1
  81. package/dist/components/mds-file.js +3 -3
  82. package/dist/components/mds-filter-item.js +1 -1
  83. package/dist/components/mds-filter.js +1 -1
  84. package/dist/components/mds-header-bar.js +1 -1
  85. package/dist/components/mds-header.js +1 -1
  86. package/dist/components/mds-help.js +1 -1
  87. package/dist/components/mds-horizontal-scroll.js +1 -1
  88. package/dist/components/mds-icon.js +1 -1
  89. package/dist/components/mds-img.js +1 -1
  90. package/dist/components/mds-input-date-range-preselection.js +1 -1
  91. package/dist/components/mds-input-date-range.js +1 -1
  92. package/dist/components/mds-input-date.js +1 -1
  93. package/dist/components/mds-input-field.js +1 -1
  94. package/dist/components/mds-input-otp.js +1 -1
  95. package/dist/components/mds-input-range.js +1 -1
  96. package/dist/components/mds-input-select.js +1 -1
  97. package/dist/components/mds-input-switch.js +1 -1
  98. package/dist/components/mds-input-tip-item.js +1 -1
  99. package/dist/components/mds-input-upload.js +1 -1
  100. package/dist/components/mds-input.js +1 -1
  101. package/dist/components/mds-keyboard-key.js +1 -1
  102. package/dist/components/mds-keyboard.js +1 -1
  103. package/dist/components/mds-kpi-item.js +1 -1
  104. package/dist/components/mds-label.js +1 -1
  105. package/dist/components/mds-list-item.js +1 -1
  106. package/dist/components/mds-mention.js +1 -1
  107. package/dist/components/mds-modal.js +1 -1
  108. package/dist/components/mds-note.js +1 -1
  109. package/dist/components/mds-notification.js +1 -1
  110. package/dist/components/mds-paginator-item.js +1 -1
  111. package/dist/components/mds-paginator.js +1 -1
  112. package/dist/components/mds-policy-ai.js +1 -1
  113. package/dist/components/mds-pref-animation.js +1 -1
  114. package/dist/components/mds-pref-consumption.js +1 -1
  115. package/dist/components/mds-pref-contrast.js +1 -1
  116. package/dist/components/mds-pref-language-item.js +1 -1
  117. package/dist/components/mds-pref-language.js +1 -1
  118. package/dist/components/mds-pref-mode.js +1 -1
  119. package/dist/components/mds-pref-theme-item.js +1 -1
  120. package/dist/components/mds-pref-theme.js +1 -1
  121. package/dist/components/mds-pref.js +1 -1
  122. package/dist/components/mds-price-table-features-cell.js +1 -1
  123. package/dist/components/mds-price-table-features.js +1 -1
  124. package/dist/components/mds-price-table-list-item.js +1 -1
  125. package/dist/components/mds-progress.js +1 -1
  126. package/dist/components/mds-push-notification-item.js +1 -1
  127. package/dist/components/mds-push-notification.js +1 -1
  128. package/dist/components/mds-quote.js +1 -1
  129. package/dist/components/mds-radial-menu-item.js +1 -1
  130. package/dist/components/mds-radial-menu.js +1 -1
  131. package/dist/components/mds-radial-progress.js +1 -1
  132. package/dist/components/mds-status-bar.js +1 -1
  133. package/dist/components/mds-stepper-bar-item.js +1 -1
  134. package/dist/components/mds-stepper-bar.js +1 -1
  135. package/dist/components/mds-tab-bar-item.js +1 -1
  136. package/dist/components/mds-tab-item.js +1 -1
  137. package/dist/components/mds-table-header-cell.js +1 -1
  138. package/dist/components/mds-table-header.js +1 -1
  139. package/dist/components/mds-table-row.js +1 -1
  140. package/dist/components/mds-table.js +1 -1
  141. package/dist/components/mds-text.js +1 -1
  142. package/dist/components/mds-toast.js +1 -1
  143. package/dist/components/mds-tooltip.js +1 -1
  144. package/dist/components/mds-tree-item.js +1 -1
  145. package/dist/components/mds-url-view.js +1 -1
  146. package/dist/components/mds-usage.js +1 -1
  147. package/dist/components/{p-D3-GP4KF.js → p-6K9sFzLr.js} +1 -1
  148. package/dist/components/p-BBhbQT2f.js +1 -0
  149. package/dist/components/{p-B2A_hlV2.js → p-BFpRu7yD.js} +1 -1
  150. package/dist/components/p-BL63WAAq.js +8 -0
  151. package/dist/components/{p-Deh5Aia-.js → p-BShLEry5.js} +1 -1
  152. package/dist/components/{p-BJNK4p33.js → p-BYxxgEE_.js} +1 -1
  153. package/dist/components/p-BZFyAX-6.js +1 -0
  154. package/dist/components/p-BtMdmkID.js +1 -0
  155. package/dist/components/{p-Caksrfcd.js → p-ByaUOMp0.js} +1 -1
  156. package/dist/components/p-C1xZO_fq.js +1 -0
  157. package/dist/components/{p-cBZsPiMJ.js → p-C6Q4zFh6.js} +1 -1
  158. package/dist/components/{p-DLE5TNTp.js → p-CUQ7WIXh.js} +1 -1
  159. package/dist/components/p-Cd_8zD_I.js +1 -0
  160. package/dist/components/{p-DtxB7DYE.js → p-CnAeawmf.js} +1 -1
  161. package/dist/components/{p-Bt4xX5ww.js → p-DCrjf0F0.js} +1 -1
  162. package/dist/components/p-DlHJvYE7.js +1 -0
  163. package/dist/components/{p-BH3bWzRT.js → p-DlaJNPdd.js} +1 -1
  164. package/dist/components/{p-sqRs6oj4.js → p-DnrQaRnh.js} +1 -1
  165. package/dist/components/{p-CBLAz3_J.js → p-OPg_Naue.js} +1 -1
  166. package/dist/components/{p-C03KYHGv.js → p-RS4yyl41.js} +1 -1
  167. package/dist/components/{p--8aaJX-p.js → p-gv3eu44S.js} +1 -1
  168. package/dist/components/p-kff6xSdW.js +1 -0
  169. package/dist/components/p-pys1EQ60.js +1 -0
  170. package/dist/components/p-qketFgr0.js +1 -0
  171. package/dist/components/{p-B14Ci2fO.js → p-s2Gu6hY7.js} +1 -1
  172. package/dist/components/p-zml3K7nx.js +1 -0
  173. package/dist/documentation.json +5 -5
  174. package/dist/esm/index.js +64 -22
  175. package/dist/esm/{locale.it-Dj8sWDfj.js → locale.it-Cvxh7La5.js} +13 -10
  176. package/dist/esm/mds-avatar.entry.js +27 -32
  177. package/dist/esm/mds-badge.entry.js +3 -2
  178. package/dist/esm/mds-benchmark-bar.entry.js +3 -2
  179. package/dist/esm/mds-bibliography.entry.js +4 -3
  180. package/dist/esm/mds-button_3.entry.js +36 -10
  181. package/dist/esm/mds-dropdown.entry.js +4 -3
  182. package/dist/esm/mds-entity.entry.js +1 -1
  183. package/dist/esm/mds-file-preview.entry.js +18 -18
  184. package/dist/esm/mds-file.entry.js +1 -1
  185. package/dist/esm/mds-header.entry.js +17 -8
  186. package/dist/esm/mds-img.entry.js +3 -3
  187. package/dist/esm/mds-input-date-range.entry.js +7 -5
  188. package/dist/esm/mds-input-select.entry.js +10 -8
  189. package/dist/esm/mds-input-upload.entry.js +10 -6
  190. package/dist/esm/mds-input.entry.js +4 -4
  191. package/dist/esm/mds-keyboard-key.entry.js +8 -5
  192. package/dist/esm/mds-keyboard.entry.js +6 -3
  193. package/dist/esm/mds-mention.entry.js +3 -2
  194. package/dist/esm/mds-notification.entry.js +11 -8
  195. package/dist/esm/mds-pref-language-item.entry.js +3 -2
  196. package/dist/esm/mds-pref-theme-item.entry.js +3 -2
  197. package/dist/esm/mds-push-notification-item.entry.js +1 -1
  198. package/dist/esm/mds-stepper-bar.entry.js +5 -3
  199. package/dist/esm/mds-tab-bar-item.entry.js +3 -2
  200. package/dist/esm/mds-table-header-cell.entry.js +2 -2
  201. package/dist/esm/mds-text.entry.js +2 -1
  202. package/dist/esm/mds-toast.entry.js +9 -3
  203. package/dist/esm/mds-tooltip.entry.js +4 -4
  204. package/dist/esm-es5/index.js +37 -26
  205. package/dist/esm-es5/locale.it-Cvxh7La5.js +6 -0
  206. package/dist/esm-es5/mds-avatar.entry.js +4 -2
  207. package/dist/esm-es5/mds-badge.entry.js +2 -3
  208. package/dist/esm-es5/mds-benchmark-bar.entry.js +2 -3
  209. package/dist/esm-es5/mds-bibliography.entry.js +1 -1
  210. package/dist/esm-es5/mds-button_3.entry.js +14 -9
  211. package/dist/esm-es5/mds-dropdown.entry.js +2 -2
  212. package/dist/esm-es5/mds-entity.entry.js +1 -1
  213. package/dist/esm-es5/mds-file-preview.entry.js +13 -11
  214. package/dist/esm-es5/mds-file.entry.js +6 -6
  215. package/dist/esm-es5/mds-header.entry.js +8 -6
  216. package/dist/esm-es5/mds-img.entry.js +1 -1
  217. package/dist/esm-es5/mds-input-date-range.entry.js +5 -3
  218. package/dist/esm-es5/mds-input-select.entry.js +8 -6
  219. package/dist/esm-es5/mds-input-upload.entry.js +3 -1
  220. package/dist/esm-es5/mds-input.entry.js +3 -3
  221. package/dist/esm-es5/mds-keyboard-key.entry.js +3 -1
  222. package/dist/esm-es5/mds-keyboard.entry.js +4 -2
  223. package/dist/esm-es5/mds-mention.entry.js +1 -1
  224. package/dist/esm-es5/mds-notification.entry.js +4 -2
  225. package/dist/esm-es5/mds-pref-language-item.entry.js +2 -2
  226. package/dist/esm-es5/mds-pref-theme-item.entry.js +2 -2
  227. package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
  228. package/dist/esm-es5/mds-stepper-bar.entry.js +4 -4
  229. package/dist/esm-es5/mds-tab-bar-item.entry.js +3 -4
  230. package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
  231. package/dist/esm-es5/mds-text.entry.js +1 -1
  232. package/dist/esm-es5/mds-toast.entry.js +4 -2
  233. package/dist/esm-es5/mds-tooltip.entry.js +2 -2
  234. package/dist/hydrate/index.js +283 -174
  235. package/dist/hydrate/index.mjs +283 -174
  236. package/dist/magma-components/index.esm.js +1 -1
  237. package/dist/magma-components/magma-components.esm.js +1 -1
  238. package/dist/magma-components/p-005172ba.entry.js +1 -0
  239. package/dist/magma-components/{p-9ca7932d.system.entry.js → p-05fa40aa.system.entry.js} +5 -3
  240. package/dist/magma-components/p-0827a5bd.entry.js +1 -0
  241. package/dist/magma-components/{p-1a8c5086.system.entry.js → p-15c77a98.system.entry.js} +2 -2
  242. package/dist/magma-components/p-18473d2f.entry.js +1 -0
  243. package/dist/magma-components/{p-f0a168f4.system.entry.js → p-18667ae7.system.entry.js} +3 -3
  244. package/dist/magma-components/p-19adde9d.entry.js +1 -0
  245. package/dist/magma-components/p-2217a7be.entry.js +1 -0
  246. package/dist/magma-components/{p-5a7ead55.system.entry.js → p-2386f0d6.system.entry.js} +2 -2
  247. package/dist/magma-components/p-2b56fc14.entry.js +1 -0
  248. package/dist/magma-components/p-3f747a63.system.entry.js +1 -0
  249. package/dist/magma-components/p-3ff30842.system.entry.js +16 -0
  250. package/dist/magma-components/{p-be692266.system.entry.js → p-49b120cb.system.entry.js} +2 -2
  251. package/dist/magma-components/{p-6cd7cfe3.entry.js → p-4af76eb3.entry.js} +1 -1
  252. package/dist/magma-components/p-4ba6cb3f.entry.js +1 -0
  253. package/dist/magma-components/p-4cadbd49.entry.js +1 -0
  254. package/dist/magma-components/{p-7f2e3b74.system.entry.js → p-4f107cb2.system.entry.js} +31 -31
  255. package/dist/magma-components/p-4oB0woT9.system.js +6 -0
  256. package/dist/magma-components/p-518b55f3.entry.js +1 -0
  257. package/dist/magma-components/{p-960dc9b5.system.entry.js → p-5eec629c.system.entry.js} +4 -2
  258. package/dist/magma-components/{p-a8ec3080.system.entry.js → p-646034cb.system.entry.js} +1 -1
  259. package/dist/magma-components/{p-ce4e1a41.system.entry.js → p-677ab154.system.entry.js} +3 -1
  260. package/dist/magma-components/p-759133b3.entry.js +1 -0
  261. package/dist/magma-components/{p-cd5866c8.entry.js → p-7912f877.entry.js} +1 -1
  262. package/dist/magma-components/{p-3d8e63a2.system.entry.js → p-7d304fd4.system.entry.js} +3 -1
  263. package/dist/magma-components/{p-07fde74d.system.entry.js → p-7f6d708c.system.entry.js} +6 -4
  264. package/dist/magma-components/{p-6edc4f16.system.entry.js → p-88564e9b.system.entry.js} +1 -1
  265. package/dist/magma-components/{p-8103d4d4.system.entry.js → p-8b1abf81.system.entry.js} +12 -10
  266. package/dist/magma-components/p-8bbee38d.entry.js +1 -0
  267. package/dist/magma-components/{p-481008e9.system.entry.js → p-8bf680d6.system.entry.js} +5 -3
  268. package/dist/magma-components/{p-ce0ecc75.system.entry.js → p-8cb3a071.system.entry.js} +2 -2
  269. package/dist/magma-components/p-8f229eaf.entry.js +1 -0
  270. package/dist/magma-components/{p-3f7d3060.system.entry.js → p-94fa3396.system.entry.js} +14 -9
  271. package/dist/magma-components/{p-0ad3b4da.system.entry.js → p-9bbd4193.system.entry.js} +6 -6
  272. package/dist/magma-components/p-9caffe14.entry.js +1 -0
  273. package/dist/magma-components/p-9de1ac7f.entry.js +1 -0
  274. package/dist/magma-components/p-B6mQg6yQ.js +1 -0
  275. package/dist/magma-components/p-CnXBPjmc.system.js +1 -1
  276. package/dist/magma-components/{p-CBam2PI8.system.js → p-DVd2EM-q.system.js} +29 -18
  277. package/dist/magma-components/{p-f1462410.system.entry.js → p-a15da479.system.entry.js} +3 -4
  278. package/dist/magma-components/{p-e05d2df8.system.entry.js → p-ab997243.system.entry.js} +2 -2
  279. package/dist/magma-components/{p-efe8d359.entry.js → p-aea6081f.entry.js} +1 -1
  280. package/dist/magma-components/{p-1c0a7e24.system.entry.js → p-b0539d61.system.entry.js} +7 -5
  281. package/dist/magma-components/{p-9d9a947b.entry.js → p-b35c26f8.entry.js} +2 -2
  282. package/dist/magma-components/p-cc033985.system.entry.js +14 -0
  283. package/dist/magma-components/{p-a3fc2ea4.system.entry.js → p-cd84a264.system.entry.js} +7 -5
  284. package/dist/magma-components/p-d0457835.entry.js +1 -0
  285. package/dist/magma-components/p-d64311e2.entry.js +1 -0
  286. package/dist/magma-components/{p-54b995c2.system.entry.js → p-da4dc390.system.entry.js} +1 -1
  287. package/dist/magma-components/p-dda7a33b.entry.js +1 -0
  288. package/dist/magma-components/p-e375c8b1.entry.js +1 -0
  289. package/dist/magma-components/p-e3fce8ca.entry.js +1 -0
  290. package/dist/magma-components/{p-9626eaff.system.entry.js → p-e9a16f22.system.entry.js} +3 -3
  291. package/dist/magma-components/p-ea0091b6.entry.js +1 -0
  292. package/dist/magma-components/{p-a3279a73.system.entry.js → p-ec00defc.system.entry.js} +6 -4
  293. package/dist/magma-components/p-edfb0d7a.entry.js +1 -0
  294. package/dist/magma-components/{p-0715a2cb.system.entry.js → p-f9d9cf7c.system.entry.js} +2 -3
  295. package/dist/magma-components/p-fa163e86.entry.js +1 -0
  296. package/dist/magma-components/p-fe19080a.entry.js +8 -0
  297. package/dist/magma-components/p-ff49fb35.entry.js +1 -0
  298. package/dist/stats.json +411 -411
  299. package/dist/types/components/mds-avatar/mds-avatar.d.ts +2 -0
  300. package/dist/types/components/mds-header/mds-header.d.ts +1 -0
  301. package/dist/types/components/mds-icon/mds-icon.d.ts +5 -0
  302. package/dist/types/components/mds-icon/services/icons-set.service.d.ts +10 -9
  303. package/dist/types/components/mds-input-select/mds-input-select.d.ts +1 -0
  304. package/dist/types/components/mds-toast/mds-toast.d.ts +1 -0
  305. package/package.json +11 -11
  306. package/dist/components/p-B9DJLgwr.js +0 -1
  307. package/dist/components/p-BouRLCYL.js +0 -1
  308. package/dist/components/p-CVgKDZPF.js +0 -1
  309. package/dist/components/p-CatD1iUY.js +0 -1
  310. package/dist/components/p-CbufYCNj.js +0 -1
  311. package/dist/components/p-Cehcn85x.js +0 -1
  312. package/dist/components/p-D8I1RblC.js +0 -1
  313. package/dist/components/p-DaI5QqNu.js +0 -1
  314. package/dist/components/p-Dj_oN194.js +0 -1
  315. package/dist/components/p-DmELzfvf.js +0 -1
  316. package/dist/components/p-sUKtonkE.js +0 -8
  317. package/dist/esm-es5/locale.it-Dj8sWDfj.js +0 -1
  318. package/dist/magma-components/p-03be5c0c.entry.js +0 -1
  319. package/dist/magma-components/p-0af8d821.entry.js +0 -1
  320. package/dist/magma-components/p-1780b8ba.entry.js +0 -1
  321. package/dist/magma-components/p-1dcfb13e.entry.js +0 -1
  322. package/dist/magma-components/p-241dbf61.entry.js +0 -1
  323. package/dist/magma-components/p-4297da23.system.entry.js +0 -1
  324. package/dist/magma-components/p-454c4774.entry.js +0 -1
  325. package/dist/magma-components/p-59de81ac.entry.js +0 -1
  326. package/dist/magma-components/p-5e43274a.system.entry.js +0 -15
  327. package/dist/magma-components/p-66ce2dee.entry.js +0 -1
  328. package/dist/magma-components/p-69d1b815.entry.js +0 -1
  329. package/dist/magma-components/p-75fcf1a4.entry.js +0 -1
  330. package/dist/magma-components/p-78fef00a.entry.js +0 -1
  331. package/dist/magma-components/p-7d317ff0.entry.js +0 -8
  332. package/dist/magma-components/p-7fc29447.entry.js +0 -1
  333. package/dist/magma-components/p-8b7fa8d7.entry.js +0 -1
  334. package/dist/magma-components/p-9b2ee3fe.entry.js +0 -1
  335. package/dist/magma-components/p-CSb7Iu19.js +0 -1
  336. package/dist/magma-components/p-a5ac5e0b.entry.js +0 -1
  337. package/dist/magma-components/p-a906a02f.system.entry.js +0 -16
  338. package/dist/magma-components/p-ac544ab1.entry.js +0 -1
  339. package/dist/magma-components/p-b23a6c83.entry.js +0 -1
  340. package/dist/magma-components/p-b9fecfd5.entry.js +0 -1
  341. package/dist/magma-components/p-c1fb2eb7.entry.js +0 -1
  342. package/dist/magma-components/p-c70d7159.entry.js +0 -1
  343. package/dist/magma-components/p-ddbdce09.entry.js +0 -1
  344. package/dist/magma-components/p-e3e893c4.entry.js +0 -1
  345. package/dist/magma-components/p-e4868ade.entry.js +0 -1
  346. package/dist/magma-components/p-ihVfCXG4.system.js +0 -1
package/README.md CHANGED
@@ -21,7 +21,8 @@ Use the versions of `@maggioli-design-system/design-tokens` and `@maggioli-desig
21
21
  | magma | design-tokens | styles |
22
22
  | :--- | :--- | :--- |
23
23
  | `1.x` (before Magma 2) | `13.x` (latest `13.7.2`) | `15.x` (latest `15.11.1`) |
24
- | `2.x` and later | `>= 14` | `>= 16` |
24
+ | `2.0.0-alpha.0` to `2.0.0-beta.3` (prereleases) | `14.x` | `16.x` |
25
+ | `2.x` and later | `>= 15` | `>= 17` |
25
26
 
26
27
  #### Tones name changes
27
28
 
@@ -11,10 +11,23 @@ function promisifyRequest(request) {
11
11
  });
12
12
  }
13
13
  function createStore(dbName, storeName) {
14
- const request = indexedDB.open(dbName);
15
- request.onupgradeneeded = () => request.result.createObjectStore(storeName);
16
- const dbp = promisifyRequest(request);
17
- return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
14
+ let dbp;
15
+ const getDB = () => {
16
+ if (dbp)
17
+ return dbp;
18
+ const request = indexedDB.open(dbName);
19
+ request.onupgradeneeded = () => request.result.createObjectStore(storeName);
20
+ dbp = promisifyRequest(request);
21
+ dbp.then((db) => {
22
+ // It seems like Safari sometimes likes to just close the connection.
23
+ // It's supposed to fire this event when that happens. Let's hope it does!
24
+ db.onclose = () => (dbp = undefined);
25
+ }, () => {
26
+ dbp = undefined;
27
+ });
28
+ return dbp;
29
+ };
30
+ return (txMode, callback) => getDB().then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
18
31
  }
19
32
  let defaultGetStoreFunc;
20
33
  function defaultGetStore() {
@@ -98,7 +111,7 @@ class IconsSetController {
98
111
  this._iconsSets = new Map();
99
112
  this._svgPathUpdate = 'mdsIconSvgPathUpdate';
100
113
  this.cacheExp = 60 * 60 * 1000 * 24;
101
- this.listeners = [];
114
+ this.listeners = new Set();
102
115
  this.memoryCache = {};
103
116
  // Try to retrieve svg from cache
104
117
  this.isCacheAvailable = async (url) => {
@@ -177,29 +190,46 @@ class IconsSetController {
177
190
  return { set: this._iconsSets.get(iconName.split('/')[0]) };
178
191
  }
179
192
  /**
180
- * recognize svg path pattern and set host and svgPath variable
193
+ * Sets the directory of the svg files. Query and fragment are dropped: the icon name is
194
+ * appended to the path.
181
195
  *
182
- * input path: https://www.abc.com/svg/path
183
- * svgPath = https://www.abc.com/svg/path
196
+ * input path: https://www.abc.com/svg/path/
197
+ * svgPath = https://www.abc.com/svg/path/
184
198
  *
185
- * input path: localhost:9000/svg/path
186
- * svgPath = localhost:9000/svg/path
199
+ * input path: localhost:9000/svg/path/
200
+ * svgPath = //localhost:9000/svg/path/ (with the protocol of the page)
187
201
  *
188
- * input path: /svg/path
189
- * svgPath = {window.location.host}/svg/path
202
+ * input path: /svg/path/ or svg/path/
203
+ * svgPath = unchanged, resolved by `fetch` against the document base URL on each request
190
204
  *
191
- * input path: svg/path
205
+ * input path: empty or not a URL
192
206
  * throw error
193
- *
194
207
  */
195
208
  setSvgPath(svgPath) {
196
- const reg = /^(((https?:\/\/)?[.\w]+(:\d+)?)|\/)([\w/-]+)*/;
197
- const match = reg.exec(svgPath);
198
- if (!match) {
199
- throw Error(`Svg path not recognize ${svgPath}, ensure is a absolute path starting with '/' or a url`);
209
+ const error = Error(`Svg path not recognize ${svgPath}, ensure is a absolute path starting with '/' or a url`);
210
+ if (typeof svgPath !== 'string' || svgPath.trim() === '') {
211
+ throw error;
212
+ }
213
+ const value = svgPath.trim();
214
+ // a host with a port and no scheme (`localhost:9000/svg/`) would be read as the scheme `localhost:`
215
+ const path = /^[\w.-]+:\d+(\/|$)/.test(value) ? `//${value}` : value;
216
+ let url;
217
+ try {
218
+ // the placeholder base only validates a path, which is kept as it is
219
+ url = new URL(path, 'http://localhost/');
220
+ }
221
+ catch (_a) {
222
+ throw error;
200
223
  }
201
224
  if (typeof window !== 'undefined') {
202
- this._svgPath = match[1] ? match[0] : window.location.origin.concat(match[0]);
225
+ if (/^[a-z][a-z\d+.-]*:/i.test(path)) {
226
+ url.search = '';
227
+ url.hash = '';
228
+ this._svgPath = url.href;
229
+ }
230
+ else {
231
+ this._svgPath = path.replace(/[?#].*$/, '');
232
+ }
203
233
  window.dispatchEvent(new Event(this._svgPathUpdate));
204
234
  }
205
235
  }
@@ -207,7 +237,10 @@ class IconsSetController {
207
237
  return this._svgPath;
208
238
  }
209
239
  registerListener(callback) {
210
- this.listeners.push(callback);
240
+ this.listeners.add(callback);
241
+ }
242
+ unregisterListener(callback) {
243
+ this.listeners.delete(callback);
211
244
  }
212
245
  setUpListener() {
213
246
  if (typeof window !== 'undefined') {
@@ -227,6 +260,10 @@ class IconsSetController {
227
260
  if (index.Build.isServer && !index.Build.isTesting) {
228
261
  return '';
229
262
  }
263
+ // an icon without the attribute passes an undefined (or null) name: there is nothing to load
264
+ if (!name) {
265
+ return '';
266
+ }
230
267
  try {
231
268
  if (!this._svgPath && typeof window === 'undefined') {
232
269
  throw Error('Cant find svgPath, ensure you set it');
@@ -248,9 +285,14 @@ class IconsSetController {
248
285
  }
249
286
  }
250
287
  const src = this._svgPath && !name.startsWith('http') ? this._svgPath.concat(name, '.svg') : name;
288
+ // Memory first: every instance of an icon already loaded skips the IndexedDB round-trip
289
+ if (this.memoryCache[src]) {
290
+ return this.memoryCache[src];
291
+ }
251
292
  const lsCache = await this.isCacheAvailable(src);
252
- if (this.memoryCache[src] || lsCache) {
253
- return this.memoryCache[src] || lsCache;
293
+ if (lsCache) {
294
+ this.memoryCache[src] = lsCache;
295
+ return lsCache;
254
296
  }
255
297
  const response = await fetch(src);
256
298
  if (!response.ok) {
@@ -118,21 +118,24 @@ const sanitizeFilename = (filename, error = 'Attribute "filename" is undefined.'
118
118
  }
119
119
  return filename;
120
120
  };
121
+ /**
122
+ * Index of the dot that separates the name from the extension: the last one, so that the dots
123
+ * inside the name are kept (`report.v2.final.docx`). A leading dot is part of the name
124
+ * (`.env` has no extension). Returns -1 when the filename has no extension.
125
+ */
126
+ const getExtensionSeparator = (filename) => {
127
+ const dot = filename.lastIndexOf('.');
128
+ return dot > 0 ? dot : -1;
129
+ };
121
130
  const sanitizeSuffix = (rawFilename) => {
122
- var _a;
123
131
  const filename = sanitizeFilename(rawFilename);
124
- if (filename.includes('.')) {
125
- return (_a = filename.split('.').pop()) !== null && _a !== void 0 ? _a : '';
126
- }
127
- return filename;
132
+ const dot = getExtensionSeparator(filename);
133
+ return dot === -1 ? filename : filename.slice(dot + 1);
128
134
  };
129
135
  const getName = (rawFilename) => {
130
- var _a;
131
136
  const filename = sanitizeFilename(rawFilename);
132
- if (filename.includes('.')) {
133
- return (_a = filename.split('.')[0]) !== null && _a !== void 0 ? _a : '';
134
- }
135
- return filename;
137
+ const dot = getExtensionSeparator(filename);
138
+ return dot === -1 ? filename : filename.slice(0, dot);
136
139
  };
137
140
  const getSuffix = (rawFilename, suffixOverride) => {
138
141
  const suffix = sanitizeSuffix(rawFilename);
@@ -115,9 +115,25 @@ const MdsAvatar = class {
115
115
  this.handleImgLoadSuccess = () => {
116
116
  this.loaded = true;
117
117
  };
118
+ // a removed attribute or a null bound by a framework counts as not set, like '' or 0
119
+ this.hasCount = () => {
120
+ var _a;
121
+ const count = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
122
+ return count !== 0 && !Number.isNaN(count);
123
+ };
124
+ this.checkTexts = () => {
125
+ var _a;
126
+ const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
127
+ if (initials !== '')
128
+ this.checkText(initials);
129
+ if (this.hasCount())
130
+ this.checkText(String(this.count));
131
+ };
118
132
  this.checkInitialsVariant = () => {
119
- if (this.initials !== undefined && this.initials !== '') {
120
- let cleanedInitials = this.initials
133
+ var _a;
134
+ const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
135
+ if (initials !== '') {
136
+ let cleanedInitials = initials
121
137
  .toLowerCase()
122
138
  .replace(/[^a-zA-Z0-9]+/g, '')
123
139
  .substring(0, 2);
@@ -138,21 +154,13 @@ const MdsAvatar = class {
138
154
  if (this.src !== undefined) {
139
155
  this.loaded = false;
140
156
  }
141
- if (this.initials !== undefined && this.initials !== '') {
142
- this.checkText(this.initials);
143
- }
144
- if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count)) {
145
- this.checkText(this.count.toString());
146
- }
157
+ this.checkTexts();
147
158
  }
148
159
  componentDidRender() {
149
160
  if (this.textChanged) {
150
161
  // placed here becase @Watch('initials') is fired
151
162
  // BEFORE the element .fit is attached on shDOM
152
- if (this.initials !== undefined && this.initials !== '')
153
- this.checkText(this.initials);
154
- if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count))
155
- this.checkText(this.count.toString());
163
+ this.checkTexts();
156
164
  this.textChanged = false;
157
165
  }
158
166
  }
@@ -175,26 +183,13 @@ const MdsAvatar = class {
175
183
  }
176
184
  }
177
185
  render() {
178
- return (index.h(index.Host, { key: '09e30ddb558c31aa23749b4bf3d5190a30b605c7', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast }, index.h("div", { key: '1d99eceedcc2dc604afcd887a2d767d61fced5e1', class: clsx.clsx('avatar', this.initials &&
179
- !this.fallback &&
180
- (this.src === undefined || this.src === '') &&
181
- 'avatar--initials', (this.fallback ||
182
- ((this.icon === undefined || this.icon === '') &&
183
- (this.initials === undefined || this.initials === '') &&
184
- (this.src === undefined || this.src === ''))) &&
185
- 'avatar--fallback', this.icon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, this.initials &&
186
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
187
- !this.fallback &&
188
- (this.src === undefined || this.src === '') && (index.h("div", { key: '08dd0918a258022793f5331a9de7b2460a2e1404', class: "initials-text" }, index.h("span", { key: '69379497bb9096cea56b366c52ba5372adb5506d', class: "fit" }, this.initials.substring(0, 2)))), this.count && !this.fallback && (this.src === undefined || this.src === '') && (index.h("div", { key: '07c1e94db40562b8a2467605591236433fd6af39', class: "initials-text" }, index.h("span", { key: '36c2b72540c03d140f97d64304d46583419d23df', class: "fit" }, "+", this.count))), this.src &&
189
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
190
- !this.fallback &&
191
- (this.icon === undefined || this.icon === '') && (index.h("mds-img", { key: '9d6a6d4a12a5142686aede6e9f9a974f592b674f', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), this.icon &&
192
- (this.initials === undefined || this.initials === '') &&
193
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) && (index.h("mds-icon", { key: 'b37eae32b77654190b14d8b046d2f9a51801ae2a', class: "icon", part: "icon", name: this.icon })), (this.fallback ||
194
- ((this.icon === undefined || this.icon === '') &&
195
- (this.initials === undefined || this.initials === '') &&
196
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
197
- (this.src === undefined || this.src === ''))) && (index.h("i", { key: '18d842d4aea1f73adef926ff74a896a9d8a52bc6', class: "fallback-icon", innerHTML: miBaselinePerson })))));
186
+ var _a, _b, _c, _d;
187
+ const hasCount = this.hasCount();
188
+ const icon = (_a = this.icon) !== null && _a !== void 0 ? _a : '';
189
+ const hasIcon = icon !== '';
190
+ const hasInitials = ((_b = this.initials) !== null && _b !== void 0 ? _b : '') !== '';
191
+ const hasSrc = ((_c = this.src) !== null && _c !== void 0 ? _c : '') !== '';
192
+ return (index.h(index.Host, { key: '87e19218bbfe6e9c79f5edd7b4dd0350572b4f84', "pref-animation": preference.preferenceStore.state.animation, "pref-contrast": preference.preferenceStore.state.contrast }, index.h("div", { key: 'b8775a55b682778312539df8ba0d8107075873e1', class: clsx.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 && (index.h("div", { key: 'acea5faae52d0cfaaa8f03788a22c89c8f0095ad', class: "initials-text" }, index.h("span", { key: 'aedd03f85b197fc6ed24b4a0238804856145aa4c', class: "fit" }, (_d = this.initials) === null || _d === void 0 ? void 0 : _d.substring(0, 2)))), hasCount && !this.fallback && !hasSrc && (index.h("div", { key: 'dd8af02204937c6558ab63b26d5993aa34e4df37', class: "initials-text" }, index.h("span", { key: 'fdf6930557054172bea785b8c6be0decb743887a', class: "fit" }, "+", this.count))), hasSrc && !hasCount && !this.fallback && !hasIcon && (index.h("mds-img", { key: '4519cc0bd3e701abf9d7bdaf0189f2ca3bcd86ed', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), hasIcon && !hasInitials && !hasCount && (index.h("mds-icon", { key: '5958962b68d5797dd46f1322b0e12717bf70c93e', class: "icon", part: "icon", name: icon })), (this.fallback || (!hasIcon && !hasInitials && !hasCount && !hasSrc)) && (index.h("i", { key: 'e6509636da3e20d93144dde5f3ecce6f1cfc5506', class: "fallback-icon", innerHTML: miBaselinePerson })))));
198
193
  }
199
194
  get element() { return index.getElement(this); }
200
195
  static get watchers() { return {
@@ -22,8 +22,9 @@ const MdsBadge = class {
22
22
  */
23
23
  this.typography = 'option';
24
24
  this.onSlotChangeHandler = () => {
25
+ var _a;
25
26
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
26
- if (this.label !== undefined && this.label !== '')
27
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
27
28
  return;
28
29
  this.label = slot.readSlottedLabel(this.host);
29
30
  };
@@ -32,7 +33,7 @@ const MdsBadge = class {
32
33
  this.label = slot.sanitizeLabel(newValue);
33
34
  }
34
35
  render() {
35
- return (index.h(index.Host, { key: '86aa308e28dc28decde0195a23c8551084c36ed1', "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("mds-text", { key: '32566dfede9c11a1de5ba48051cc5e2dffe4f35e', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || index.h("slot", { key: 'e7055d4c61bfc4ea0876cc849a829ae0ce77c5d2', onSlotchange: this.onSlotChangeHandler }))));
36
+ return (index.h(index.Host, { key: '30205c3754c77ad904a3a01a695ec9daf058bd81', "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("mds-text", { key: '3a850df57ca87e8efbf505094f3d1e4e309deb42', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || index.h("slot", { key: '99531173211bd788d288b9d20d36d5eb7b2dc95e', onSlotchange: this.onSlotChangeHandler }))));
36
37
  }
37
38
  get host() { return index.getElement(this); }
38
39
  static get watchers() { return {
@@ -25,8 +25,9 @@ const MdsBenchmarkBar = class {
25
25
  */
26
26
  this.size = 'md';
27
27
  this.onSlotChangeHandler = () => {
28
+ var _a;
28
29
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
29
- if (this.label !== undefined && this.label !== '')
30
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
30
31
  return;
31
32
  this.label = slot.readSlottedLabel(this.host);
32
33
  };
@@ -36,7 +37,7 @@ const MdsBenchmarkBar = class {
36
37
  }
37
38
  render() {
38
39
  var _a;
39
- return (index.h(index.Host, { key: '1c2d9a434915c3bd3487e3accddc100cb457178b' }, index.h("div", { key: '809bfc18d2042c97685adb031b65f3444a1ba3c4', class: "infos" }, index.h("mds-text", { key: 'f328a5c085a268ac48839e9553fe48a0d57873f8', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || index.h("slot", { key: 'd61cde55186ab7d8aa186fb740b35fb9e5e964f4', onSlotchange: this.onSlotChangeHandler })), index.h("mds-text", { key: '2f0145a1c718cb646fb28e05e6f828c196c8902e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), index.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" })));
40
+ return (index.h(index.Host, { key: 'e07ff600bed598dc0d97144ef596c2a2010efbbd' }, index.h("div", { key: 'd3493800ec6d4f20e36d38132f10a3b67f565006', class: "infos" }, index.h("mds-text", { key: '07423f38822e314059dcee2cda38abffbea3bb62', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || index.h("slot", { key: 'e4aff25b3be0d2f87aefb2a88dd6050715c74d56', onSlotchange: this.onSlotChangeHandler })), index.h("mds-text", { key: '8b1ec4a01389199b881f46a69ccee96c8867446e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), index.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" })));
40
41
  }
41
42
  get host() { return index.getElement(this); }
42
43
  static get watchers() { return {
@@ -87,7 +87,7 @@ const MdsBibliography = class {
87
87
  return `${lastName}${lastName !== '' ? ',' : ''} ${formattedFirstName}`;
88
88
  };
89
89
  this.formatAuthors = (author) => {
90
- var _a;
90
+ var _a, _b;
91
91
  const authorName = author.replace(/"/g, "'");
92
92
  const splitNames = new RegExp(/([A-Za-z ]{2,})/g);
93
93
  const fullName = (_a = authorName.match(splitNames)) !== null && _a !== void 0 ? _a : authorName;
@@ -103,7 +103,7 @@ const MdsBibliography = class {
103
103
  };
104
104
  }
105
105
  const firstName = fullName[0].split(' ')[0].trim();
106
- const lastName = fullName[0].split(' ')[1] !== '' ? fullName[0].split(' ')[1].trim() : '';
106
+ const lastName = ((_b = fullName[0].split(' ')[1]) !== null && _b !== void 0 ? _b : '').trim();
107
107
  return {
108
108
  apa: this.fullNameAPA(firstName, lastName),
109
109
  firstName,
@@ -136,7 +136,8 @@ const MdsBibliography = class {
136
136
  };
137
137
  }
138
138
  render() {
139
- return (index.h(index.Host, { key: '23f59847854d7d9a89b7dd2750e436d8f02e3d14' }, index.h("mds-text", { key: 'b894fe2efb2a5fcb6efed4e71efc21bd226e05fe', typography: this.typography, variant: this.variant }, this.author && index.h("span", { key: 'c4643d727585acf555ddd35a75b899694e5c9402' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (index.h("span", { key: '6dbda3e1aaeac89017d1fed6d8ff2cd832693199' }, this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, this.name, ".")))) : (index.h("b", null, index.h("i", null, this.name, "."))), this.location && (index.h("span", { key: '340b4ecae707224b88baf69235b669ecee608e28' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (index.h("span", { key: '54d44315bbf6859e10136f0cbd73d5a56cbd3af9' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && index.h("time", { key: '642f54d9348dd05fe0867ef2259c1ed720987b9c', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (index.h("span", { key: '1a6caf7ae4b454bf05b924e56c9aad6e882efe98' }, this.date && index.h("time", { key: '2dbce299a5459cff5da64ac87925947bcddb2336', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, " ", this.name, ".")))) : (index.h("b", null, index.h("i", null, " ", this.name, "."))), this.location && (index.h("span", { key: 'c9f7127424939df3e352479e48a298e964ec4d06' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && index.h("span", { key: 'abb5252ecfb00b5b00c37c1e8063a2c00ea03cc2' }, " ", this.publisher, "."))), this.format === 'turabian' && (index.h("span", { key: '91cebf4a49774b5f09f5947378b08c54150c6768' }, this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, " ", this.name, ".")))) : (index.h("b", null, index.h("i", null, " ", this.name, "."))), this.location && (index.h("span", { key: '102f8ccc46702f490624d0de0e0dfc1b69a1ce66' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (index.h("span", { key: 'f263f731ce15c53982f10273a9918854e9e14564' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && index.h("time", { key: 'fcb9f7211479b4f78a056117f81589d4011ac0fc', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
139
+ var _a, _b, _c;
140
+ return (index.h(index.Host, { key: '4fe352d77a5ceea45f9b82d11fbb4ffe2d887aef' }, index.h("mds-text", { key: '30052872c829ff3b2c142cd54cb64eebcd558f76', typography: this.typography, variant: this.variant }, this.author && index.h("span", { key: '14d5043a19e193f34a4502029d7dc21fe2ae8083' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (index.h("span", { key: '7b903d623a57baf664c7cd425e78d7a17fca8331' }, this.name && ' ', ((_a = this.name) !== null && _a !== void 0 ? _a : '') !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, this.name, ".")))) : (index.h("b", null, index.h("i", null, this.name, "."))), this.location && (index.h("span", { key: '9c52f22dd20cafb9eb7df4835c2f5a99ca71a1a6' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (index.h("span", { key: '3ff1124122ef8d52079fa7337ed51f116fa1f266' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && index.h("time", { key: 'ac4e6e1506bbca2633c95593d44df61622b6e040', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (index.h("span", { key: '71558449f856a09fda8b02f2808c93b1dd72c532' }, this.date && index.h("time", { key: 'f952a6c0f8be0cbf83a8d04ff13e08b3221cbdc4', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', ((_b = this.name) !== null && _b !== void 0 ? _b : '') !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, " ", this.name, ".")))) : (index.h("b", null, index.h("i", null, " ", this.name, "."))), this.location && (index.h("span", { key: 'ecead881a08e1f08ebe0c08f5016414238b0c0aa' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && index.h("span", { key: '7f5caaaecb02bdda257974de0439d0c15e4ebd71' }, " ", this.publisher, "."))), this.format === 'turabian' && (index.h("span", { key: 'e2869b0cbf35ddb64020edfb9aeab7a5bd94e56d' }, this.name && ' ', ((_c = this.name) !== null && _c !== void 0 ? _c : '') !== '' && this.url !== null ? (index.h("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, index.h("b", null, index.h("i", null, " ", this.name, ".")))) : (index.h("b", null, index.h("i", null, " ", this.name, "."))), this.location && (index.h("span", { key: '1de156ae83032c28eef77b059c52beed6f7bb8a8' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (index.h("span", { key: 'c82b2387e90227b129d5078561c60492901fb9e3' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && index.h("time", { key: 'fe9da6c7294ee249a0d892cf882a387ba0196159', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
140
141
  }
141
142
  };
142
143
  MdsBibliography.style = mdsBibliographyCss();
@@ -103,8 +103,9 @@ const MdsButton = class {
103
103
  throw Error('Object window is not defined');
104
104
  };
105
105
  this.onSlotChangeHandler = () => {
106
+ var _a;
106
107
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
107
- if (this.label !== undefined && this.label !== '')
108
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
108
109
  return;
109
110
  this.label = slot.readSlottedLabel(this.host);
110
111
  };
@@ -161,8 +162,9 @@ const MdsButton = class {
161
162
  }
162
163
  }
163
164
  componentWillLoad() {
165
+ var _a;
164
166
  this.handleVariantChange(this.variant);
165
- if (this.href !== undefined && this.href !== '') {
167
+ if (((_a = this.href) !== null && _a !== void 0 ? _a : '') !== '') {
166
168
  this.host.addEventListener('click', (e) => {
167
169
  var _a;
168
170
  e.preventDefault();
@@ -185,6 +187,7 @@ const MdsButton = class {
185
187
  }
186
188
  }
187
189
  componentDidLoad() {
190
+ var _a;
188
191
  this.km.addElement(this.host);
189
192
  if (!this.await) {
190
193
  this.km.attachClickBehavior();
@@ -202,9 +205,7 @@ const MdsButton = class {
202
205
  if (this.label === '') {
203
206
  this.label = undefined;
204
207
  }
205
- if ((this.label === undefined || this.label === '') &&
206
- this.icon !== undefined &&
207
- this.icon !== '') {
208
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') === '' && this.icon != null && this.icon !== '') {
208
209
  const iconTitle = aria.unslugName(this.icon);
209
210
  if (!this.host.hasAttribute('aria-label')) {
210
211
  aria.setAttributeIfEmpty(this.host, 'title', iconTitle);
@@ -233,7 +234,7 @@ const MdsButton = class {
233
234
  render() {
234
235
  var _a;
235
236
  this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
236
- return (index.h(index.Host, { key: 'b78ea9e82edc7fb1e05d3fb3f7d9c9d08589ec2b', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preference.preferenceStore.state.animation, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '6e93d60b23f794a489b2ce2b55d51c000008aef4', class: "await" }, index.h("mds-spinner", { key: 'ae40c10546682ad904552560c4a0a5ab95af8f48', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (index.h("mds-icon", { key: 'b44d109ca1c92f9d9680c1ae5b36a3e08347008a', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), index.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 || index.h("slot", { key: '856dede502b5a35d80b77c6ddb39b7e9c4d4b4f3', onSlotchange: this.onSlotChangeHandler })), index.h("slot", { key: 'bf4ee1f6ecf7c9a4cab0797aba08c97e55751b2d', name: "notification" }), this.icon && this.iconPosition === 'right' && (index.h("mds-icon", { key: '6e5dfeb55023770a487dead1300cad6813e08694', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
237
+ return (index.h(index.Host, { key: '3d7db80d99477ad9e4ff34c97d0cb0e04160a041', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preference.preferenceStore.state.animation, "pref-mode": preference.preferenceStore.state.mode, "pref-theme-scheme": preference.preferenceStore.state['theme-scheme'] }, index.h("div", { key: '133053ee2566972bbbaf1f47faa87c1f9c30b841', class: "await" }, index.h("mds-spinner", { key: 'ce67aa6522a2c646b1efebf51dcc51d3a987b5c9', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (index.h("mds-icon", { key: '81d183d185387f2e6113869e14cb274a57f44f3b', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), index.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 || index.h("slot", { key: 'a56c6946ed59d9b9fe481955027015d7f46bcab1', onSlotchange: this.onSlotChangeHandler })), index.h("slot", { key: '1f0a279dd9e57ba7510c879e72d1f815adb76b6b', name: "notification" }), this.icon && this.iconPosition === 'right' && (index.h("mds-icon", { key: 'eb2f6eff668e5195d5725360ba30cb99a6e7a054', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
237
238
  }
238
239
  static get formAssociated() { return true; }
239
240
  get host() { return index.getElement(this); }
@@ -264,14 +265,31 @@ const mdsIconCss = () => `@layer reset,vendor,theme,base,components,utilities;:h
264
265
  const MdsIcon = class {
265
266
  constructor(hostRef) {
266
267
  index.registerInstance(this, hostRef);
268
+ // Each update supersedes the ones still loading: only the latest one sets the svg
269
+ this.lastUpdate = 0;
270
+ this.wasDisconnected = false;
271
+ this.onSvgPathUpdate = () => {
272
+ this.updateIcon();
273
+ };
267
274
  this.convertBase64ToSvg = () => {
268
275
  const svgBase64 = this.name.replace(BASE64_SVG_ICON, '').replace(/=/i, '');
269
276
  return atob(svgBase64);
270
277
  };
271
278
  }
279
+ connectedCallback() {
280
+ index$1.IconsSetService.registerListener(this.onSvgPathUpdate);
281
+ // the svg path may have changed while the icon was out of the page
282
+ if (this.wasDisconnected) {
283
+ this.wasDisconnected = false;
284
+ this.updateIcon();
285
+ }
286
+ }
287
+ disconnectedCallback() {
288
+ index$1.IconsSetService.unregisterListener(this.onSvgPathUpdate);
289
+ this.wasDisconnected = true;
290
+ }
272
291
  componentWillLoad() {
273
292
  this.updateIcon();
274
- index$1.IconsSetService.registerListener(() => this.updateIcon());
275
293
  }
276
294
  /**
277
295
  * Set the path to the directory of svg files
@@ -282,8 +300,13 @@ const MdsIcon = class {
282
300
  return Promise.resolve();
283
301
  }
284
302
  async updateIcon() {
285
- if (this.name === '')
303
+ var _a;
304
+ const update = ++this.lastUpdate;
305
+ // `name` is undefined (or null) at runtime when the attribute is missing or removed
306
+ if (((_a = this.name) !== null && _a !== void 0 ? _a : '') === '') {
307
+ this.svgHTML = '';
286
308
  return Promise.resolve();
309
+ }
287
310
  if (isIconFormatIsBase64(this.name)) {
288
311
  this.svgHTML = this.convertBase64ToSvg();
289
312
  return Promise.resolve();
@@ -292,10 +315,13 @@ const MdsIcon = class {
292
315
  this.svgHTML = this.name;
293
316
  return Promise.resolve();
294
317
  }
295
- this.svgHTML = await index$1.IconsSetService.fetchSvg(this.name);
318
+ const svgHTML = await index$1.IconsSetService.fetchSvg(this.name);
319
+ if (update === this.lastUpdate) {
320
+ this.svgHTML = svgHTML;
321
+ }
296
322
  }
297
323
  render() {
298
- return (index.h(index.Host, { key: '8d95b94dbe7f22e136567cb681e44479f5c1be7a' }, this.svgHTML && index.h("i", { key: 'e9808177023e9521abf570b85302b65e43f9e0d8', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
324
+ return (index.h(index.Host, { key: '9544b1ca2b153e95f6710e0bbed762048676fb48' }, this.svgHTML && index.h("i", { key: '745b56492d69be55e449b94633b09391972e3d79', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
299
325
  }
300
326
  get hostElement() { return index.getElement(this); }
301
327
  static get watchers() { return {
@@ -295,7 +295,8 @@ const MdsDropdown = class {
295
295
  this.floatingController.updatePosition();
296
296
  }
297
297
  targetChanged() {
298
- if (this.target === '' || this.floatingController == null)
298
+ var _a;
299
+ if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '' || this.floatingController == null)
299
300
  return;
300
301
  const caller = this.floatingController.updateCaller(this.target);
301
302
  if (!caller)
@@ -364,9 +365,9 @@ const MdsDropdown = class {
364
365
  this.km.detachEscapeBehavior();
365
366
  }
366
367
  render() {
367
- return (index.h(index.Host, { key: '909529db1b7f90da7fef23235ac276e133aef6cf', style: {
368
+ return (index.h(index.Host, { key: '42bb1259088a7cc15869cd0cbf007ce9f34331cb', style: {
368
369
  zIndex: `${this.zIndex}`,
369
- }, "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: 'fe65713f1e3f849a57f05ad7e3be0eede40198d4', class: "arrow", innerHTML: arrowSvg }), index.h("slot", { key: '2c438ff28af51844e5e399e07b31773edf745447' })));
370
+ }, "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: '6a2caa47a6dca50fe6ae209229daddcd7791473d', class: "arrow", innerHTML: arrowSvg }), index.h("slot", { key: '656a32363daa94dc4433cd5fb86d689d80502221' })));
370
371
  }
371
372
  get host() { return index.getElement(this); }
372
373
  static get watchers() { return {
@@ -5,7 +5,7 @@ var slot = require('./slot-RmXfgH4P.js');
5
5
  var clsx = require('./clsx-BtxeOLZW.js');
6
6
  var preference = require('./preference-eJcbLLAn.js');
7
7
 
8
- const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-spinner):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:calc(var(--spacing,.0025rem)*0);justify-content:center;min-width:0;white-space:nowrap}.details{align-items:baseline;color:var(--mds-entity-detail-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));display:flex;gap:calc(var(--spacing,.0025rem)*100)}.details--hidden{display:none}.actions{align-items:center;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.actions--hidden{display:none}::slotted([slot=action]){aspect-ratio:var(--aspect-square,1/1);height:auto;width:calc(var(--spacing,.0025rem)*1100)}::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title{display:flex;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([pref-contrast=more]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}}`;
8
+ const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-spinner):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:0;justify-content:center;min-width:0;white-space:nowrap}.details{align-items:baseline;color:var(--mds-entity-detail-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));display:flex;gap:calc(var(--spacing,.0025rem)*100)}.details--hidden{display:none}.actions{align-items:center;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.actions--hidden{display:none}::slotted([slot=action]){aspect-ratio:var(--aspect-square,1/1);height:auto;width:calc(var(--spacing,.0025rem)*1100)}::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title{display:flex;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([pref-contrast=more]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}}`;
9
9
 
10
10
  const MdsEntity = class {
11
11
  constructor(hostRef) {
@@ -3,19 +3,19 @@
3
3
  var index = require('./index--6wz7eWi.js');
4
4
  var cancel = require('./cancel-_rS5f5_p.js');
5
5
  var clsx = require('./clsx-BtxeOLZW.js');
6
- var locale_it = require('./locale.it-D-rxNDkm.js');
6
+ var locale_it = require('./locale.it-CfUV2hxK.js');
7
7
  var locale = require('./locale-CB5_Z7PE.js');
8
8
  var preference = require('./preference-eJcbLLAn.js');
9
9
  require('./file-extensions-D_heujEX.js');
10
10
  require('./panorama-Bl9xY7e1.js');
11
11
 
12
- /**
13
- * filesize
14
- *
15
- * @copyright 2023 Jason Mulligan <jason.mulligan@avoidwork.com>
16
- * @license BSD-3-Clause
17
- * @version 10.1.0
18
- */
12
+ /**
13
+ * filesize
14
+ *
15
+ * @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
16
+ * @license BSD-3-Clause
17
+ * @version 10.1.6
18
+ */
19
19
  const ARRAY = "array";
20
20
  const BIT = "bit";
21
21
  const BITS = "bits";
@@ -178,9 +178,10 @@ const STRINGS = {
178
178
  result[0] = result[0].toString().replace(PERIOD, separator);
179
179
  }
180
180
 
181
- if (pad && Number.isInteger(result[0]) === false && round > 0) {
182
- const x = separator || PERIOD,
183
- tmp = result[0].toString().split(x),
181
+ if (pad && round > 0) {
182
+ const i = result[0].toString(),
183
+ x = separator || ((i.match(/(\D)/g) || []).pop() || PERIOD),
184
+ tmp = i.toString().split(x),
184
185
  s = tmp[1] || EMPTY,
185
186
  l = s.length,
186
187
  n = round - l;
@@ -275,13 +276,12 @@ const MdsFilePreview = class {
275
276
  card === null || card === void 0 ? void 0 : card.removeEventListener('click', this.onClickDownloadEvent);
276
277
  }
277
278
  render() {
278
- var _a, _b, _c;
279
- return (index.h(index.Host, { key: '389451c485ded68d3d3d99e950ec2e2ad08f4ac9', "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'] }, this.deletable && (index.h("mds-button", { key: 'e04b3974185c09a3d9407b74168a37afce9d23de', title: this.t.get('remove'), class: "action-delete", icon: cancel.miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), index.h("div", { key: 'f899421ec875a83f2593890e0a736759b903b24f', class: "card", part: "card", onClick: this.onClickDownloadEvent }, this.src !== undefined &&
280
- this.src !== '' &&
281
- (this.message === undefined || this.message === '') &&
282
- locale_it.getExtensionInfos(this.filename, this.suffix).preview ? (index.h("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (index.h("div", { class: clsx.clsx('preview', this.message === undefined || this.message === ''
283
- ? 'preview--icon'
284
- : 'preview--status') }, this.icon !== undefined && this.icon !== '' ? (index.h("mds-icon", { class: "icon", name: this.icon })) : (index.h("mds-icon", { class: "icon", name: locale_it.getFormatsVariant(this.filename, this.suffix).icon })), this.message && (index.h("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), index.h("mds-text", { key: '32d3359b9c41a845001e17987ce703219ba29843', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), index.h("div", { key: '79e555cedfc5d35b2d54ec6a3aee7591cc0edf2e', class: clsx.clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (index.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() && (index.h("mds-text", { key: '8945ff2c6224b7a4803390eae2fc12474903a3dd', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), locale_it.getSuffix(this.filename, this.suffix) && (index.h("mds-badge", { key: '5581cb1f4d13f6f15f28c0957094dcd5982f0a0f', variant: locale_it.getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_a = this.description) !== null && _a !== void 0 ? _a : this.t.get(this.getDefaultKeyDescription()) }, locale_it.getSuffix(this.filename, this.suffix))), (this.filesize === undefined || this.filesize === '') && (index.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())))))));
279
+ var _a, _b, _c, _d, _e, _f, _g;
280
+ // a removed attribute or a null bound by a framework counts as not set, like an empty value
281
+ const hasMessage = ((_a = this.message) !== null && _a !== void 0 ? _a : '') !== '';
282
+ return (index.h(index.Host, { key: '4450e7351e840c4b0f7d72c9b1bc441d9087ad7e', "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'] }, this.deletable && (index.h("mds-button", { key: '8f1d4ced62f8c479a5e1c324b5ce940cf7aa2d84', title: this.t.get('remove'), class: "action-delete", icon: cancel.miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), index.h("div", { key: '45d38745f7466b0da5b8f2724879ef46d6826bfd', class: "card", part: "card", onClick: this.onClickDownloadEvent }, ((_b = this.src) !== null && _b !== void 0 ? _b : '') !== '' &&
283
+ !hasMessage &&
284
+ locale_it.getExtensionInfos(this.filename, this.suffix).preview ? (index.h("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (index.h("div", { class: clsx.clsx('preview', hasMessage ? 'preview--status' : 'preview--icon') }, ((_c = this.icon) !== null && _c !== void 0 ? _c : '') !== '' ? (index.h("mds-icon", { class: "icon", name: this.icon })) : (index.h("mds-icon", { class: "icon", name: locale_it.getFormatsVariant(this.filename, this.suffix).icon })), this.message && (index.h("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), index.h("mds-text", { key: 'e87d673948267ccf70636d4c2940fb8885f2fb96', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), index.h("div", { key: '25e05eb7f5bef19a392b87401f2e780bd8e605cd', class: clsx.clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (index.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() && (index.h("mds-text", { key: '381998bfae5b4d76fed78c70f38ef2aab5d13f9e', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), locale_it.getSuffix(this.filename, this.suffix) && (index.h("mds-badge", { key: '89f980cf0ec10d220c83f5a6e8ded4a4d9491a0c', variant: locale_it.getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_d = this.description) !== null && _d !== void 0 ? _d : this.t.get(this.getDefaultKeyDescription()) }, locale_it.getSuffix(this.filename, this.suffix))), ((_e = this.filesize) !== null && _e !== void 0 ? _e : '') === '' && (index.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())))))));
285
285
  }
286
286
  get host() { return index.getElement(this); }
287
287
  static get watchers() { return {
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index--6wz7eWi.js');
4
4
  var _commonjsHelpers = require('./_commonjsHelpers-B83fTs8d.js');
5
- var locale_it = require('./locale.it-D-rxNDkm.js');
5
+ var locale_it = require('./locale.it-CfUV2hxK.js');
6
6
  var locale = require('./locale-CB5_Z7PE.js');
7
7
  var preference = require('./preference-eJcbLLAn.js');
8
8
  require('./file-extensions-D_heujEX.js');