@maggioli-design-system/magma 2.7.0 → 2.9.0

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 (363) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +45 -0
  3. package/agents/lint.md +20 -2
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/magma-components.cjs.js +1 -1
  6. package/dist/cjs/mds-banner_3.cjs.entry.js +7 -6
  7. package/dist/cjs/mds-book.cjs.entry.js +53 -5
  8. package/dist/cjs/mds-calendar_2.cjs.entry.js +1 -1
  9. package/dist/cjs/mds-emoji.cjs.entry.js +39 -9
  10. package/dist/cjs/mds-filter.cjs.entry.js +1 -1
  11. package/dist/cjs/mds-input-range.cjs.entry.js +1 -1
  12. package/dist/cjs/mds-modal.cjs.entry.js +1 -1
  13. package/dist/cjs/mds-push-notification-item.cjs.entry.js +17 -4
  14. package/dist/cjs/mds-toast.cjs.entry.js +2 -2
  15. package/dist/collection/components/mds-accordion/AGENTS.md +2 -1
  16. package/dist/collection/components/mds-accordion/documentation.json +4 -2
  17. package/dist/collection/components/mds-accordion-item/AGENTS.md +2 -1
  18. package/dist/collection/components/mds-accordion-item/documentation.json +4 -2
  19. package/dist/collection/components/mds-accordion-timer/AGENTS.md +2 -1
  20. package/dist/collection/components/mds-accordion-timer/documentation.json +4 -2
  21. package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +2 -1
  22. package/dist/collection/components/mds-accordion-timer-item/documentation.json +4 -2
  23. package/dist/collection/components/mds-author/AGENTS.md +2 -1
  24. package/dist/collection/components/mds-author/documentation.json +4 -2
  25. package/dist/collection/components/mds-avatar/AGENTS.md +2 -1
  26. package/dist/collection/components/mds-avatar/documentation.json +4 -2
  27. package/dist/collection/components/mds-avatar-stack/AGENTS.md +2 -1
  28. package/dist/collection/components/mds-avatar-stack/documentation.json +4 -2
  29. package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +2 -1
  30. package/dist/collection/components/mds-avatar-stack-item/documentation.json +4 -2
  31. package/dist/collection/components/mds-badge/AGENTS.md +2 -1
  32. package/dist/collection/components/mds-badge/documentation.json +4 -2
  33. package/dist/collection/components/mds-banner/AGENTS.md +7 -4
  34. package/dist/collection/components/mds-banner/antipattern.md +5 -5
  35. package/dist/collection/components/mds-banner/documentation.json +40 -6
  36. package/dist/collection/components/mds-banner/mds-banner.css +7 -10
  37. package/dist/collection/components/mds-banner/mds-banner.js +30 -7
  38. package/dist/collection/components/mds-banner/pattern.md +4 -4
  39. package/dist/collection/components/mds-benchmark-bar/AGENTS.md +2 -1
  40. package/dist/collection/components/mds-benchmark-bar/documentation.json +4 -2
  41. package/dist/collection/components/mds-bibliography/AGENTS.md +2 -1
  42. package/dist/collection/components/mds-bibliography/documentation.json +4 -2
  43. package/dist/collection/components/mds-book/AGENTS.md +9 -4
  44. package/dist/collection/components/mds-book/documentation.json +46 -6
  45. package/dist/collection/components/mds-book/mds-book.css +91 -7
  46. package/dist/collection/components/mds-book/mds-book.js +79 -7
  47. package/dist/collection/components/mds-book/pattern.md +14 -0
  48. package/dist/collection/components/mds-breadcrumb/AGENTS.md +2 -1
  49. package/dist/collection/components/mds-breadcrumb/documentation.json +4 -2
  50. package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +2 -1
  51. package/dist/collection/components/mds-breadcrumb-item/documentation.json +4 -2
  52. package/dist/collection/components/mds-button/AGENTS.md +2 -1
  53. package/dist/collection/components/mds-button/documentation.json +4 -2
  54. package/dist/collection/components/mds-button-dropdown/AGENTS.md +2 -1
  55. package/dist/collection/components/mds-button-dropdown/documentation.json +4 -2
  56. package/dist/collection/components/mds-button-group/AGENTS.md +2 -1
  57. package/dist/collection/components/mds-button-group/documentation.json +4 -2
  58. package/dist/collection/components/mds-calendar/AGENTS.md +2 -1
  59. package/dist/collection/components/mds-calendar/documentation.json +4 -2
  60. package/dist/collection/components/mds-calendar-cell/AGENTS.md +2 -1
  61. package/dist/collection/components/mds-calendar-cell/documentation.json +4 -2
  62. package/dist/collection/components/mds-calendar-cell/mds-calendar-cell.css +4 -1
  63. package/dist/collection/components/mds-card/AGENTS.md +2 -1
  64. package/dist/collection/components/mds-card/documentation.json +4 -2
  65. package/dist/collection/components/mds-card-content/AGENTS.md +2 -1
  66. package/dist/collection/components/mds-card-content/documentation.json +4 -2
  67. package/dist/collection/components/mds-card-footer/AGENTS.md +2 -1
  68. package/dist/collection/components/mds-card-footer/documentation.json +4 -2
  69. package/dist/collection/components/mds-card-header/AGENTS.md +2 -1
  70. package/dist/collection/components/mds-card-header/documentation.json +4 -2
  71. package/dist/collection/components/mds-card-media/AGENTS.md +2 -1
  72. package/dist/collection/components/mds-card-media/documentation.json +4 -2
  73. package/dist/collection/components/mds-chip/AGENTS.md +2 -1
  74. package/dist/collection/components/mds-chip/documentation.json +4 -2
  75. package/dist/collection/components/mds-details/AGENTS.md +2 -1
  76. package/dist/collection/components/mds-details/documentation.json +4 -2
  77. package/dist/collection/components/mds-dropdown/AGENTS.md +2 -1
  78. package/dist/collection/components/mds-dropdown/documentation.json +4 -2
  79. package/dist/collection/components/mds-emoji/AGENTS.md +2 -1
  80. package/dist/collection/components/mds-emoji/asset/simi.svg +1 -1
  81. package/dist/collection/components/mds-emoji/documentation.json +4 -2
  82. package/dist/collection/components/mds-emoji/mds-emoji.js +38 -8
  83. package/dist/collection/components/mds-entity/AGENTS.md +2 -1
  84. package/dist/collection/components/mds-entity/documentation.json +4 -2
  85. package/dist/collection/components/mds-file/AGENTS.md +2 -1
  86. package/dist/collection/components/mds-file/documentation.json +4 -2
  87. package/dist/collection/components/mds-file-preview/AGENTS.md +2 -1
  88. package/dist/collection/components/mds-file-preview/documentation.json +4 -2
  89. package/dist/collection/components/mds-filter/AGENTS.md +3 -2
  90. package/dist/collection/components/mds-filter/documentation.json +10 -2
  91. package/dist/collection/components/mds-filter/mds-filter.css +5 -1
  92. package/dist/collection/components/mds-filter-item/AGENTS.md +2 -1
  93. package/dist/collection/components/mds-filter-item/documentation.json +4 -2
  94. package/dist/collection/components/mds-header/AGENTS.md +2 -1
  95. package/dist/collection/components/mds-header/documentation.json +5 -3
  96. package/dist/collection/components/mds-header/pattern.md +3 -3
  97. package/dist/collection/components/mds-header-bar/AGENTS.md +2 -1
  98. package/dist/collection/components/mds-header-bar/documentation.json +4 -2
  99. package/dist/collection/components/mds-help/AGENTS.md +2 -1
  100. package/dist/collection/components/mds-help/documentation.json +4 -2
  101. package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +2 -1
  102. package/dist/collection/components/mds-horizontal-scroll/documentation.json +4 -2
  103. package/dist/collection/components/mds-hr/AGENTS.md +2 -1
  104. package/dist/collection/components/mds-hr/documentation.json +4 -2
  105. package/dist/collection/components/mds-icon/AGENTS.md +2 -1
  106. package/dist/collection/components/mds-icon/documentation.json +4 -2
  107. package/dist/collection/components/mds-img/AGENTS.md +2 -1
  108. package/dist/collection/components/mds-img/documentation.json +4 -2
  109. package/dist/collection/components/mds-input/AGENTS.md +2 -1
  110. package/dist/collection/components/mds-input/documentation.json +4 -2
  111. package/dist/collection/components/mds-input-date/AGENTS.md +2 -1
  112. package/dist/collection/components/mds-input-date/documentation.json +4 -2
  113. package/dist/collection/components/mds-input-date-range/AGENTS.md +2 -1
  114. package/dist/collection/components/mds-input-date-range/documentation.json +4 -2
  115. package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +2 -1
  116. package/dist/collection/components/mds-input-date-range-preselection/documentation.json +4 -2
  117. package/dist/collection/components/mds-input-field/AGENTS.md +2 -1
  118. package/dist/collection/components/mds-input-field/documentation.json +4 -2
  119. package/dist/collection/components/mds-input-otp/AGENTS.md +2 -1
  120. package/dist/collection/components/mds-input-otp/documentation.json +5 -3
  121. package/dist/collection/components/mds-input-otp/pattern.md +1 -1
  122. package/dist/collection/components/mds-input-range/AGENTS.md +2 -1
  123. package/dist/collection/components/mds-input-range/documentation.json +4 -2
  124. package/dist/collection/components/mds-input-range/mds-input-range.css +7 -5
  125. package/dist/collection/components/mds-input-select/AGENTS.md +2 -1
  126. package/dist/collection/components/mds-input-select/documentation.json +4 -2
  127. package/dist/collection/components/mds-input-switch/AGENTS.md +2 -1
  128. package/dist/collection/components/mds-input-switch/documentation.json +4 -2
  129. package/dist/collection/components/mds-input-tip/AGENTS.md +2 -1
  130. package/dist/collection/components/mds-input-tip/documentation.json +4 -2
  131. package/dist/collection/components/mds-input-tip-item/AGENTS.md +2 -1
  132. package/dist/collection/components/mds-input-tip-item/documentation.json +4 -2
  133. package/dist/collection/components/mds-input-upload/AGENTS.md +2 -1
  134. package/dist/collection/components/mds-input-upload/documentation.json +4 -2
  135. package/dist/collection/components/mds-keyboard/AGENTS.md +2 -1
  136. package/dist/collection/components/mds-keyboard/documentation.json +4 -2
  137. package/dist/collection/components/mds-keyboard-key/AGENTS.md +2 -1
  138. package/dist/collection/components/mds-keyboard-key/documentation.json +4 -2
  139. package/dist/collection/components/mds-kpi/AGENTS.md +2 -1
  140. package/dist/collection/components/mds-kpi/documentation.json +4 -2
  141. package/dist/collection/components/mds-kpi-item/AGENTS.md +2 -1
  142. package/dist/collection/components/mds-kpi-item/documentation.json +4 -2
  143. package/dist/collection/components/mds-label/AGENTS.md +2 -1
  144. package/dist/collection/components/mds-label/documentation.json +4 -2
  145. package/dist/collection/components/mds-link/AGENTS.md +2 -1
  146. package/dist/collection/components/mds-link/documentation.json +4 -2
  147. package/dist/collection/components/mds-list/AGENTS.md +2 -1
  148. package/dist/collection/components/mds-list/documentation.json +4 -2
  149. package/dist/collection/components/mds-list-item/AGENTS.md +2 -1
  150. package/dist/collection/components/mds-list-item/documentation.json +4 -2
  151. package/dist/collection/components/mds-mention/AGENTS.md +2 -1
  152. package/dist/collection/components/mds-mention/documentation.json +4 -2
  153. package/dist/collection/components/mds-modal/AGENTS.md +5 -1
  154. package/dist/collection/components/mds-modal/documentation.json +5 -3
  155. package/dist/collection/components/mds-modal/mds-modal.css +136 -3
  156. package/dist/collection/components/mds-note/AGENTS.md +2 -1
  157. package/dist/collection/components/mds-note/documentation.json +4 -2
  158. package/dist/collection/components/mds-notification/AGENTS.md +2 -1
  159. package/dist/collection/components/mds-notification/documentation.json +4 -2
  160. package/dist/collection/components/mds-paginator/AGENTS.md +2 -1
  161. package/dist/collection/components/mds-paginator/documentation.json +4 -2
  162. package/dist/collection/components/mds-paginator-item/AGENTS.md +2 -1
  163. package/dist/collection/components/mds-paginator-item/documentation.json +4 -2
  164. package/dist/collection/components/mds-policy-ai/AGENTS.md +2 -1
  165. package/dist/collection/components/mds-policy-ai/documentation.json +4 -2
  166. package/dist/collection/components/mds-pref/AGENTS.md +2 -1
  167. package/dist/collection/components/mds-pref/documentation.json +4 -2
  168. package/dist/collection/components/mds-pref-animation/AGENTS.md +2 -1
  169. package/dist/collection/components/mds-pref-animation/documentation.json +4 -2
  170. package/dist/collection/components/mds-pref-consumption/AGENTS.md +2 -1
  171. package/dist/collection/components/mds-pref-consumption/documentation.json +4 -2
  172. package/dist/collection/components/mds-pref-contrast/AGENTS.md +2 -1
  173. package/dist/collection/components/mds-pref-contrast/documentation.json +4 -2
  174. package/dist/collection/components/mds-pref-language/AGENTS.md +2 -1
  175. package/dist/collection/components/mds-pref-language/documentation.json +4 -2
  176. package/dist/collection/components/mds-pref-language-item/AGENTS.md +2 -1
  177. package/dist/collection/components/mds-pref-language-item/documentation.json +4 -2
  178. package/dist/collection/components/mds-pref-mode/AGENTS.md +2 -1
  179. package/dist/collection/components/mds-pref-mode/documentation.json +4 -2
  180. package/dist/collection/components/mds-pref-theme/AGENTS.md +2 -1
  181. package/dist/collection/components/mds-pref-theme/documentation.json +4 -2
  182. package/dist/collection/components/mds-pref-theme-item/AGENTS.md +2 -1
  183. package/dist/collection/components/mds-pref-theme-item/documentation.json +4 -2
  184. package/dist/collection/components/mds-price-table/AGENTS.md +2 -1
  185. package/dist/collection/components/mds-price-table/documentation.json +4 -2
  186. package/dist/collection/components/mds-price-table-features/AGENTS.md +2 -1
  187. package/dist/collection/components/mds-price-table-features/documentation.json +4 -2
  188. package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +2 -1
  189. package/dist/collection/components/mds-price-table-features-cell/documentation.json +4 -2
  190. package/dist/collection/components/mds-price-table-features-row/AGENTS.md +2 -1
  191. package/dist/collection/components/mds-price-table-features-row/documentation.json +4 -2
  192. package/dist/collection/components/mds-price-table-header/AGENTS.md +2 -1
  193. package/dist/collection/components/mds-price-table-header/documentation.json +4 -2
  194. package/dist/collection/components/mds-price-table-list/AGENTS.md +2 -1
  195. package/dist/collection/components/mds-price-table-list/documentation.json +4 -2
  196. package/dist/collection/components/mds-price-table-list-item/AGENTS.md +2 -1
  197. package/dist/collection/components/mds-price-table-list-item/documentation.json +4 -2
  198. package/dist/collection/components/mds-progress/AGENTS.md +2 -1
  199. package/dist/collection/components/mds-progress/documentation.json +4 -2
  200. package/dist/collection/components/mds-push-notification/AGENTS.md +3 -2
  201. package/dist/collection/components/mds-push-notification/documentation.json +6 -4
  202. package/dist/collection/components/mds-push-notification/pattern.md +2 -2
  203. package/dist/collection/components/mds-push-notification-item/AGENTS.md +6 -3
  204. package/dist/collection/components/mds-push-notification-item/documentation.json +38 -5
  205. package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.css +1 -0
  206. package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +40 -5
  207. package/dist/collection/components/mds-push-notification-item/pattern.md +3 -3
  208. package/dist/collection/components/mds-quote/AGENTS.md +2 -1
  209. package/dist/collection/components/mds-quote/documentation.json +4 -2
  210. package/dist/collection/components/mds-radial-menu/AGENTS.md +2 -1
  211. package/dist/collection/components/mds-radial-menu/documentation.json +4 -2
  212. package/dist/collection/components/mds-radial-menu-item/AGENTS.md +2 -1
  213. package/dist/collection/components/mds-radial-menu-item/documentation.json +4 -2
  214. package/dist/collection/components/mds-radial-progress/AGENTS.md +2 -1
  215. package/dist/collection/components/mds-radial-progress/documentation.json +4 -2
  216. package/dist/collection/components/mds-separator/AGENTS.md +2 -1
  217. package/dist/collection/components/mds-separator/documentation.json +4 -2
  218. package/dist/collection/components/mds-spinner/AGENTS.md +2 -1
  219. package/dist/collection/components/mds-spinner/documentation.json +5 -3
  220. package/dist/collection/components/mds-spinner/pattern.md +9 -6
  221. package/dist/collection/components/mds-status-bar/AGENTS.md +2 -1
  222. package/dist/collection/components/mds-status-bar/documentation.json +4 -2
  223. package/dist/collection/components/mds-stepper-bar/AGENTS.md +2 -1
  224. package/dist/collection/components/mds-stepper-bar/documentation.json +4 -2
  225. package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +2 -1
  226. package/dist/collection/components/mds-stepper-bar-item/documentation.json +4 -2
  227. package/dist/collection/components/mds-tab/AGENTS.md +2 -1
  228. package/dist/collection/components/mds-tab/documentation.json +4 -2
  229. package/dist/collection/components/mds-tab-bar/AGENTS.md +2 -1
  230. package/dist/collection/components/mds-tab-bar/documentation.json +4 -2
  231. package/dist/collection/components/mds-tab-bar-item/AGENTS.md +2 -1
  232. package/dist/collection/components/mds-tab-bar-item/documentation.json +4 -2
  233. package/dist/collection/components/mds-tab-item/AGENTS.md +2 -1
  234. package/dist/collection/components/mds-tab-item/documentation.json +4 -2
  235. package/dist/collection/components/mds-table/AGENTS.md +2 -1
  236. package/dist/collection/components/mds-table/documentation.json +4 -2
  237. package/dist/collection/components/mds-table-body/AGENTS.md +2 -1
  238. package/dist/collection/components/mds-table-body/documentation.json +4 -2
  239. package/dist/collection/components/mds-table-cell/AGENTS.md +2 -1
  240. package/dist/collection/components/mds-table-cell/documentation.json +4 -2
  241. package/dist/collection/components/mds-table-footer/AGENTS.md +2 -1
  242. package/dist/collection/components/mds-table-footer/documentation.json +4 -2
  243. package/dist/collection/components/mds-table-header/AGENTS.md +2 -1
  244. package/dist/collection/components/mds-table-header/documentation.json +4 -2
  245. package/dist/collection/components/mds-table-header-cell/AGENTS.md +2 -1
  246. package/dist/collection/components/mds-table-header-cell/documentation.json +4 -2
  247. package/dist/collection/components/mds-table-row/AGENTS.md +7 -2
  248. package/dist/collection/components/mds-table-row/documentation.json +11 -3
  249. package/dist/collection/components/mds-table-row/mds-table-row.css +1 -0
  250. package/dist/collection/components/mds-table-row/pattern.md +14 -1
  251. package/dist/collection/components/mds-text/AGENTS.md +2 -1
  252. package/dist/collection/components/mds-text/documentation.json +4 -2
  253. package/dist/collection/components/mds-toast/AGENTS.md +8 -5
  254. package/dist/collection/components/mds-toast/antipattern.md +2 -2
  255. package/dist/collection/components/mds-toast/documentation.json +40 -6
  256. package/dist/collection/components/mds-toast/mds-toast.js +26 -4
  257. package/dist/collection/components/mds-toast/pattern.md +2 -2
  258. package/dist/collection/components/mds-toast-region/AGENTS.md +2 -1
  259. package/dist/collection/components/mds-toast-region/documentation.json +5 -3
  260. package/dist/collection/components/mds-toast-region/pattern.md +10 -2
  261. package/dist/collection/components/mds-tooltip/AGENTS.md +2 -1
  262. package/dist/collection/components/mds-tooltip/documentation.json +4 -2
  263. package/dist/collection/components/mds-tree/AGENTS.md +3 -2
  264. package/dist/collection/components/mds-tree/documentation.json +5 -3
  265. package/dist/collection/components/mds-tree/pattern.md +13 -13
  266. package/dist/collection/components/mds-tree-item/AGENTS.md +2 -1
  267. package/dist/collection/components/mds-tree-item/documentation.json +4 -2
  268. package/dist/collection/components/mds-url-view/AGENTS.md +2 -1
  269. package/dist/collection/components/mds-url-view/documentation.json +4 -2
  270. package/dist/collection/components/mds-usage/AGENTS.md +2 -1
  271. package/dist/collection/components/mds-usage/documentation.json +4 -2
  272. package/dist/collection/components/mds-video-wall/AGENTS.md +2 -1
  273. package/dist/collection/components/mds-video-wall/documentation.json +4 -2
  274. package/dist/collection/components/mds-zero/AGENTS.md +2 -1
  275. package/dist/collection/components/mds-zero/documentation.json +4 -2
  276. package/dist/components/mds-banner.js +1 -1
  277. package/dist/components/mds-book.js +1 -1
  278. package/dist/components/mds-calendar-cell.js +1 -1
  279. package/dist/components/mds-calendar.js +1 -1
  280. package/dist/components/mds-emoji.js +1 -1
  281. package/dist/components/mds-filter.js +1 -1
  282. package/dist/components/mds-header.js +1 -1
  283. package/dist/components/mds-input-date-range.js +1 -1
  284. package/dist/components/mds-input-date.js +1 -1
  285. package/dist/components/mds-input-range.js +1 -1
  286. package/dist/components/mds-modal.js +1 -1
  287. package/dist/components/mds-policy-ai.js +1 -1
  288. package/dist/components/mds-push-notification-item.js +1 -1
  289. package/dist/components/mds-status-bar.js +1 -1
  290. package/dist/components/mds-toast.js +1 -1
  291. package/dist/components/p-BeZGLnJJ.js +1 -0
  292. package/dist/components/p-Chk4rI7N.js +1 -0
  293. package/dist/components/{p-CNpL55c-.js → p-Cwg4vtOr.js} +1 -1
  294. package/dist/components/p-Dzkiu-es.js +1 -0
  295. package/dist/documentation.json +406 -143
  296. package/dist/esm/loader.js +1 -1
  297. package/dist/esm/magma-components.js +1 -1
  298. package/dist/esm/mds-banner_3.entry.js +7 -6
  299. package/dist/esm/mds-book.entry.js +53 -5
  300. package/dist/esm/mds-calendar_2.entry.js +1 -1
  301. package/dist/esm/mds-emoji.entry.js +39 -9
  302. package/dist/esm/mds-filter.entry.js +1 -1
  303. package/dist/esm/mds-input-range.entry.js +1 -1
  304. package/dist/esm/mds-modal.entry.js +1 -1
  305. package/dist/esm/mds-push-notification-item.entry.js +17 -4
  306. package/dist/esm/mds-toast.entry.js +2 -2
  307. package/dist/esm-es5/loader.js +1 -1
  308. package/dist/esm-es5/magma-components.js +1 -1
  309. package/dist/esm-es5/mds-banner_3.entry.js +2 -2
  310. package/dist/esm-es5/mds-book.entry.js +33 -26
  311. package/dist/esm-es5/mds-calendar_2.entry.js +8 -8
  312. package/dist/esm-es5/mds-emoji.entry.js +40 -31
  313. package/dist/esm-es5/mds-filter.entry.js +1 -1
  314. package/dist/esm-es5/mds-input-range.entry.js +7 -7
  315. package/dist/esm-es5/mds-modal.entry.js +15 -15
  316. package/dist/esm-es5/mds-push-notification-item.entry.js +7 -3
  317. package/dist/esm-es5/mds-toast.entry.js +2 -2
  318. package/dist/hydrate/index.js +130 -32
  319. package/dist/hydrate/index.mjs +130 -32
  320. package/dist/lint/core/checks.d.ts +5 -0
  321. package/dist/lint/core/checks.js +17 -0
  322. package/dist/lint/core/data.d.ts +4 -1
  323. package/dist/lint/core/data.js +3 -1
  324. package/dist/lint/eslint/index.js +6 -4
  325. package/dist/magma-components/magma-components.esm.js +1 -1
  326. package/dist/magma-components/{p-354a5b47.entry.js → p-02b106c2.entry.js} +1 -1
  327. package/dist/magma-components/{p-17ccfc01.system.entry.js → p-3bc65166.system.entry.js} +55 -48
  328. package/dist/magma-components/p-425ca155.entry.js +1 -0
  329. package/dist/magma-components/p-523f0c30.system.entry.js +80 -0
  330. package/dist/magma-components/{p-07d35da6.entry.js → p-5306606b.entry.js} +1 -1
  331. package/dist/magma-components/{p-1b67b149.system.entry.js → p-798f460b.system.entry.js} +1 -1
  332. package/dist/magma-components/{p-e5f893f9.system.entry.js → p-7db14777.system.entry.js} +1 -1
  333. package/dist/magma-components/{p-e8452cce.entry.js → p-8641b7b2.entry.js} +1 -1
  334. package/dist/magma-components/{p-3a7c4314.system.entry.js → p-95ccf46d.system.entry.js} +4 -4
  335. package/dist/magma-components/p-968a2237.entry.js +1 -0
  336. package/dist/magma-components/p-9dd9eadd.entry.js +1 -0
  337. package/dist/magma-components/p-B8zYiZQY.system.js +1 -1
  338. package/dist/magma-components/{p-160cd923.entry.js → p-a25327a1.entry.js} +1 -1
  339. package/dist/magma-components/p-a67381bf.entry.js +1 -0
  340. package/dist/magma-components/{p-c2c693ed.system.entry.js → p-b27cb1ac.system.entry.js} +14 -5
  341. package/dist/magma-components/{p-6df26141.system.entry.js → p-c0286dc3.system.entry.js} +1 -1
  342. package/dist/magma-components/p-c89060ec.system.entry.js +41 -0
  343. package/dist/magma-components/p-eb12be86.system.entry.js +24 -0
  344. package/dist/magma-components/p-ebeb3fff.entry.js +1 -0
  345. package/dist/stats.json +383 -139
  346. package/dist/types/components/mds-banner/mds-banner.d.ts +9 -2
  347. package/dist/types/components/mds-book/mds-book.d.ts +19 -2
  348. package/dist/types/components/mds-emoji/mds-emoji.d.ts +1 -0
  349. package/dist/types/components/mds-push-notification-item/mds-push-notification-item.d.ts +10 -1
  350. package/dist/types/components/mds-toast/mds-toast.d.ts +7 -1
  351. package/dist/types/components.d.ts +56 -12
  352. package/package.json +8 -8
  353. package/dist/components/p-B8hgyXdE.js +0 -1
  354. package/dist/components/p-CYK2Xr_v.js +0 -1
  355. package/dist/components/p-DbVGGhs_.js +0 -1
  356. package/dist/magma-components/p-14b13850.entry.js +0 -1
  357. package/dist/magma-components/p-386bb24e.system.entry.js +0 -41
  358. package/dist/magma-components/p-6d96d223.entry.js +0 -1
  359. package/dist/magma-components/p-79fd07e7.system.entry.js +0 -80
  360. package/dist/magma-components/p-7e7391fd.entry.js +0 -1
  361. package/dist/magma-components/p-df387755.entry.js +0 -1
  362. package/dist/magma-components/p-ee780f82.system.entry.js +0 -20
  363. package/dist/magma-components/p-f2211b1f.entry.js +0 -1
@@ -1,4 +1,4 @@
1
- var __awaiter=this&&this.__awaiter||function(t,o,i,a){function n(t){return t instanceof i?t:new i((function(o){o(t)}))}return new(i||(i=Promise))((function(i,e){function r(t){try{d(a.next(t))}catch(t){e(t)}}function s(t){try{d(a["throw"](t))}catch(t){e(t)}}function d(t){t.done?i(t.value):n(t.value).then(r,s)}d((a=a.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var i={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},a,n,e,r=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return r.next=s(0),r["throw"]=s(1),r["return"]=s(2),typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(t){return function(o){return d([t,o])}}function d(s){if(a)throw new TypeError("Generator is already executing.");while(r&&(r=0,s[0]&&(i=0)),i)try{if(a=1,n&&(e=s[0]&2?n["return"]:s[0]?n["throw"]||((e=n["return"])&&e.call(n),0):n.next)&&!(e=e.call(n,s[1])).done)return e;if(n=0,e)s=[s[0]&2,e.value];switch(s[0]){case 0:case 1:e=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;n=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(e=i.trys,e=e.length>0&&e[e.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!e||s[1]>e[0]&&s[1]<e[3])){i.label=s[1];break}if(s[0]===6&&i.label<e[1]){i.label=e[1];e=s;break}if(e&&i.label<e[2]){i.label=e[2];i.ops.push(s);break}if(e[2])i.ops.pop();i.trys.pop();continue}s=o.call(t,i)}catch(t){s=[6,t];n=0}finally{a=e=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-CvLLN-QH.js";import{c as clsx}from"./clsx-ChV9xqsO.js";import{h as hasChildWithSlot}from"./slot-AEckDMXh.js";import{c as cssDurationToMilliseconds}from"./unit-CWk1SCJg.js";import{p as preferenceStore}from"./preference-C5XjgGCb.js";import{m as miBaselineClose}from"./close-J-ikDhyq.js";import{L as Locale}from"./locale-B6cOkl4I.js";var close$3="Κλείσιμο";var localeEl={close:close$3};var close$2="Close";var localeEn={close:close$2};var close$1="Cerrar";var localeEs={close:close$1};var close="Chiudi";var localeIt={close:close};var mdsModalCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button: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-modal-custom-closed-transform:rotateX(10deg) rotateY(0) scale(1.25) translateY(10%);--mds-modal-custom-window-distance:calc(var(--spacing,.0025rem)*600);--mds-modal-overlay-color:var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0));--mds-modal-overlay-opacity:var(--magma-overlay-opacity,.5);--mds-modal-transition-duration:var(--duration-500,.5s);--mds-modal-transition-timing-function:var(--mds-modal-transition-timing-funciton,var(--ease-in-out-quint,cubic-bezier(.86,0,.07,1)));--mds-modal-window-background:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));--mds-modal-window-distance:0;--mds-modal-window-height:calc(100dvh - var(--mds-modal-window-distance,0)*2);--mds-modal-window-max-height:calc(100dvh - var(--mds-modal-window-distance,0)*2);--mds-modal-window-overflow:auto;--mds-modal-window-radius:0;--mds-modal-window-shadow:var(--shadow-2xl,0 25px 50px -12px #00000040);--mds-modal-window-max-width:33%;--mds-modal-window-min-width:calc(var(--spacing,.0025rem)*10000);--mds-modal-z-index:var(--magma-modal-z-index,3000);--private-modal-transition-duration:var(--mds-modal-transition-duration,var(--duration-500,.5s));--private-modal-width:calc(100vw - var(--private-modal-window-close-margin));--private-modal-custom-opened-transform:translate(0);--private-modal-opened-transform:none;--private-modal-transition-window-transform:translate(0);--private-modal-window-close-margin:calc(var(--spacing,.0025rem)*2000);display:contents}.dialog{align-items:center;background-color:#0000;border:0;box-sizing:border-box;color:inherit;display:none;fill:rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));height:auto;inset:0;justify-content:center;margin:0;max-height:none;max-width:none;overflow:clip;padding:0;perspective:calc(var(--spacing,.0025rem)*15000);position:fixed;transition-behavior:allow-discrete;transition-duration:var(--private-modal-transition-duration);transition-property:overlay,display;transition-timing-function:var(--mds-modal-transition-timing-function);width:auto;z-index:var(--mds-modal-z-index,1000)}.dialog[open]{display:flex}.dialog::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/0);transition-behavior:allow-discrete;transition-duration:var(--private-modal-transition-duration);transition-property:background-color,overlay,display;transition-timing-function:var(--mds-modal-transition-timing-function)}:host([hide-backdrop]) .dialog{pointer-events:none}.action-close{--mds-button-color:rgb(var(--magma-on-backdrop,252 252 252));opacity:0;pointer-events:none;position:absolute;transition-duration:var(--private-modal-transition-duration);transition-property:background-color,bottom,color,fill,opacity,top,transform;transition-timing-function:var(--mds-modal-transition-timing-function)}.action-close::part(icon){height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}:host([position=top-left][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(.5) translate(-80%,80%)}:host([position=top][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(0) scale(.5) translateY(-80%)}:host([position=top-right][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(.5) translate(80%,80%)}:host([position=left][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(22deg) rotate(0) scale(.5) translate(-100%)}:host([position=center][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(22deg) scale(.5) translateY(40%)}:host([position=right][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(-22deg) rotate(0) scale(.5) translate(100%)}:host([position=bottom-left][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(.5) translate(-80%,80%)}:host([position=bottom][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(0) scale(.5) translateY(80%)}:host([position=bottom-right][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(.5) translate(80%,80%)}:host([animation=custom]){--private-modal-opened-transform:var(--private-modal-custom-opened-transform);--private-modal-transition-window-transform:var(--mds-modal-custom-closed-transform,rotateX(10deg) rotateY(0) scale(1.25) translate(0,10%))}:host([position=top-left][animation=slide]){--private-modal-transition-window-transform:translate(-50%,-100%)}:host([position=top][animation=slide]){--private-modal-transition-window-transform:translateY(-100%)}:host([position=top-right][animation=slide]){--private-modal-transition-window-transform:translate(50%,-100%)}:host([position=left][animation=slide]){--private-modal-transition-window-transform:translate(-100%)}:host([position=center][animation=slide]){--private-modal-transition-window-transform:translateY(25%)}:host([position=right][animation=slide]){--private-modal-transition-window-transform:translate(100%)}:host([position=bottom-left][animation=slide]){--private-modal-transition-window-transform:translate(-50%,100%)}:host([position=bottom][animation=slide]){--private-modal-transition-window-transform:translateY(50%)}:host([position=bottom-right][animation=slide]){--private-modal-transition-window-transform:translate(50%,100%)}.dialog[open]::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/var(--mds-modal-overlay-opacity,var(--magma-overlay-opacity,.5)))}@starting-style{.dialog[open]::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/0)}}:host ::slotted([slot=window]){margin:var(--mds-modal-custom-window-distance,calc(var(--spacing,.0025rem)*600))}.window{background-color:var(--mds-modal-window-background,rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255))));border-radius:var(--mds-modal-window-radius,0);box-shadow:var(--mds-modal-window-shadow);box-sizing:border-box;display:grid;gap:0;grid-template-columns:repeat(1,minmax(0,100%));height:var(--mds-modal-window-height);margin:var(--mds-modal-window-distance,0);max-height:var(--mds-modal-window-max-height);max-width:var(--private-modal-width);min-width:var(--mds-modal-window-min-width,calc(var(--spacing,.0025rem)*10000));overflow:var(--mds-modal-window-overflow,auto);position:relative;width:100%}.window-content--empty{display:none}.window-content-wrapper{max-height:calc(100dvh - var(--mds-modal-window-distance,0)*2);overflow:hidden}.window-footer,.window-header{box-sizing:border-box;position:absolute}.window-header{inset:0 0 auto}.window-footer{inset:auto 0 0}.dialog .window,.dialog ::slotted([slot=window]){opacity:0;transform:var(--private-modal-transition-window-transform);transition-duration:var(--private-modal-transition-duration);transition-property:transform,opacity;transition-timing-function:var(--mds-modal-transition-timing-function)}.dialog[open] .window,.dialog[open] ::slotted([slot=window]){opacity:1;pointer-events:auto;transform:var(--private-modal-opened-transform)}@starting-style{.dialog[open] .window,.dialog[open] ::slotted([slot=window]){opacity:0;transform:var(--private-modal-transition-window-transform)}.window-content-wrapper{overflow:hidden}}:host([position=top-left]) .dialog,:host([position=top-right]) .dialog,:host([position=top]) .dialog{align-items:flex-start}:host([position=center]) .dialog,:host([position=left]) .dialog,:host([position=right]) .dialog{align-items:center}:host([position=bottom-left]) .dialog,:host([position=bottom-right]) .dialog,:host([position=bottom]) .dialog{align-items:flex-end}:host([position=bottom-left]) .dialog,:host([position=left]) .dialog,:host([position=top-left]) .dialog{justify-content:flex-start}:host([position=bottom]) .dialog,:host([position=center]) .dialog,:host([position=top]) .dialog{justify-content:center}:host([position=bottom-right]) .dialog,:host([position=right]) .dialog,:host([position=top-right]) .dialog{justify-content:flex-end}:host([position=top]){--mds-modal-window-height:auto;align-items:flex-start;justify-content:center}:host([position=top]) .window{--mds-modal-window-max-width:100vw;--mds-modal-window-height:auto}:host([position=left]),:host([position=right]){--mds-modal-window-height:100%;--mds-modal-window-max-height:calc(100dvh - var(--mds-modal-window-distance,0)*2)}:host([position=top-left]){align-items:flex-start;justify-content:flex-start}:host([position=top-right]){align-items:flex-start;justify-content:flex-end}:host([position=left]){align-items:center;justify-content:flex-start}:host([position=left]) .action-close{right:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=left][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=left]:not([opened])) .action-close{transform:translate(-120%)rotate(-45deg)}:host([position=center]){align-items:center;justify-content:center}:host([position=right]){align-items:center;justify-content:flex-end}:host([position=right]) .action-close{left:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=right]:not([opened])) .action-close{transform:translate(120%)rotate(45deg)}:host([position=right][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=bottom-left]){align-items:flex-end;justify-content:flex-start}:host([position=bottom]){--mds-modal-window-height:auto;align-items:flex-end;justify-content:center}:host([position=bottom-right]){align-items:flex-end;justify-content:flex-end}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-modal-transition-duration:0s}:host([pref-contrast=more]){--mds-modal-window-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)),var(--shadow-2xl,0 25px 50px -12px #00000040)}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .action-close{--mds-button-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}@media (max-width:480px){:host{--mds-modal-window-min-width:0px}:host([position=bottom-left]),:host([position=bottom-right]),:host([position=bottom]),:host([position=center]),:host([position=top-left]),:host([position=top-right]),:host([position=top]){--private-modal-width:100vw}:host([position=left]),:host([position=right]){--private-modal-width:calc(100% - var(--private-modal-window-close-margin))}}@media not all and (max-width:480px){:host([position=bottom-left]),:host([position=bottom-right]),:host([position=bottom]),:host([position=center]),:host([position=top-left]),:host([position=top-right]),:host([position=top]){--mds-modal-window-height:auto}:host([position=left]),:host([position=right]){--private-modal-width:var(--mds-modal-window-max-width,33%)}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-modal-transition-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-modal-window-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)),var(--shadow-2xl,0 25px 50px -12px #00000040)}}@media (prefers-color-scheme:dark){:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .action-close{--mds-button-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}'};var MdsModal=/** @class */function(){function t(t){var o=this;registerInstance(this,t);this.openEvent=createEvent(this,"mdsModalOpen",7);this.showEvent=createEvent(this,"mdsModalShow",7);this.closeEvent=createEvent(this,"mdsModalClose",7);this.hideEvent=createEvent(this,"mdsModalHide",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});
1
+ var __awaiter=this&&this.__awaiter||function(o,t,i,n){function a(o){return o instanceof i?o:new i((function(t){t(o)}))}return new(i||(i=Promise))((function(i,e){function s(o){try{d(n.next(o))}catch(o){e(o)}}function r(o){try{d(n["throw"](o))}catch(o){e(o)}}function d(o){o.done?i(o.value):a(o.value).then(s,r)}d((n=n.apply(o,t||[])).next())}))};var __generator=this&&this.__generator||function(o,t){var i={label:0,sent:function(){if(e[0]&1)throw e[1];return e[1]},trys:[],ops:[]},n,a,e,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=r(0),s["throw"]=r(1),s["return"]=r(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function r(o){return function(t){return d([o,t])}}function d(r){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,r[0]&&(i=0)),i)try{if(n=1,a&&(e=r[0]&2?a["return"]:r[0]?a["throw"]||((e=a["return"])&&e.call(a),0):a.next)&&!(e=e.call(a,r[1])).done)return e;if(a=0,e)r=[r[0]&2,e.value];switch(r[0]){case 0:case 1:e=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;a=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(e=i.trys,e=e.length>0&&e[e.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!e||r[1]>e[0]&&r[1]<e[3])){i.label=r[1];break}if(r[0]===6&&i.label<e[1]){i.label=e[1];e=r;break}if(e&&i.label<e[2]){i.label=e[2];i.ops.push(r);break}if(e[2])i.ops.pop();i.trys.pop();continue}r=t.call(o,i)}catch(o){r=[6,o];a=0}finally{n=e=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,d as createEvent,h,e as Host,g as getElement}from"./index-CvLLN-QH.js";import{c as clsx}from"./clsx-ChV9xqsO.js";import{h as hasChildWithSlot}from"./slot-AEckDMXh.js";import{c as cssDurationToMilliseconds}from"./unit-CWk1SCJg.js";import{p as preferenceStore}from"./preference-C5XjgGCb.js";import{m as miBaselineClose}from"./close-J-ikDhyq.js";import{L as Locale}from"./locale-B6cOkl4I.js";var close$3="Κλείσιμο";var localeEl={close:close$3};var close$2="Close";var localeEn={close:close$2};var close$1="Cerrar";var localeEs={close:close$1};var close="Chiudi";var localeIt={close:close};var mdsModalCss=function(){return'@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-button: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-modal-custom-closed-transform:rotateX(10deg) rotateY(0) scale(1.25) translateY(10%);--mds-modal-custom-window-distance:calc(var(--spacing,.0025rem)*600);--mds-modal-overlay-color:var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0));--mds-modal-overlay-opacity:var(--magma-overlay-opacity,.5);--mds-modal-transition-duration:var(--duration-500,.5s);--mds-modal-transition-timing-function:var(--mds-modal-transition-timing-funciton,var(--ease-in-out-quint,cubic-bezier(.86,0,.07,1)));--mds-modal-window-background:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));--mds-modal-window-distance:0px;--mds-modal-window-height:calc(100dvh - var(--mds-modal-window-distance,0)*2);--mds-modal-window-max-height:calc(100dvh - var(--mds-modal-window-distance,0)*2);--mds-modal-window-overflow:auto;--mds-modal-window-radius:0;--mds-modal-window-shadow:var(--shadow-2xl,0 25px 50px -12px #00000040);--mds-modal-window-max-width:33%;--mds-modal-window-min-width:calc(var(--spacing,.0025rem)*10000);--mds-modal-z-index:var(--magma-modal-z-index,3000);--private-modal-transition-duration:var(--mds-modal-transition-duration,var(--duration-500,.5s));--private-modal-width:calc(100vw - var(--private-modal-window-close-margin));--private-modal-custom-opened-transform:translate(0);--private-modal-opened-transform:none;--private-modal-transition-window-transform:translate(0);--private-modal-window-close-margin:calc(var(--spacing,.0025rem)*2000);display:contents}.dialog{align-items:center;background-color:#0000;border:0;box-sizing:border-box;color:inherit;display:none;fill:rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));height:auto;inset:0;justify-content:center;margin:0;max-height:none;max-width:none;overflow:clip;padding:0;perspective:calc(var(--spacing,.0025rem)*15000);position:fixed;transition-behavior:allow-discrete;transition-duration:var(--private-modal-transition-duration);transition-property:overlay,display;transition-timing-function:var(--mds-modal-transition-timing-function);width:auto;z-index:var(--mds-modal-z-index,1000)}.dialog[open]{display:flex}.dialog::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/0);transition-behavior:allow-discrete;transition-duration:var(--private-modal-transition-duration);transition-property:background-color,overlay,display;transition-timing-function:var(--mds-modal-transition-timing-function)}:host([hide-backdrop]) .dialog{pointer-events:none}.action-close{--mds-button-color:rgb(var(--magma-on-backdrop,252 252 252));opacity:0;pointer-events:none;position:absolute;transition-duration:var(--private-modal-transition-duration);transition-property:background-color,bottom,color,fill,opacity,top,transform;transition-timing-function:var(--mds-modal-transition-timing-function)}.action-close::part(icon){height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}:host([position=top-left][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(.5) translate(-80%,80%)}:host([position=top][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(0) scale(.5) translateY(-80%)}:host([position=top-right][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(.5) translate(80%,80%)}:host([position=left][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(22deg) rotate(0) scale(.5) translate(-100%)}:host([position=center][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(22deg) scale(.5) translateY(40%)}:host([position=right][animation="3d"]){--private-modal-transition-window-transform:rotateX(0) rotateY(-22deg) rotate(0) scale(.5) translate(100%)}:host([position=bottom-left][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(22deg) scale(.5) translate(-80%,80%)}:host([position=bottom][animation="3d"]){--private-modal-transition-window-transform:rotateX(22deg) rotateY(0) scale(.5) translateY(80%)}:host([position=bottom-right][animation="3d"]){--private-modal-transition-window-transform:rotateX(-22deg) rotateY(-22deg) scale(.5) translate(80%,80%)}:host([animation=custom]){--private-modal-opened-transform:var(--private-modal-custom-opened-transform);--private-modal-transition-window-transform:var(--mds-modal-custom-closed-transform,rotateX(10deg) rotateY(0) scale(1.25) translate(0,10%))}:host([position=top-left][animation=slide]){--private-modal-transition-window-transform:translate(-50%,-100%)}:host([position=top][animation=slide]){--private-modal-transition-window-transform:translateY(-100%)}:host([position=top-right][animation=slide]){--private-modal-transition-window-transform:translate(50%,-100%)}:host([position=left][animation=slide]){--private-modal-transition-window-transform:translate(-100%)}:host([position=center][animation=slide]){--private-modal-transition-window-transform:translateY(25%)}:host([position=right][animation=slide]){--private-modal-transition-window-transform:translate(100%)}:host([position=bottom-left][animation=slide]){--private-modal-transition-window-transform:translate(-50%,100%)}:host([position=bottom][animation=slide]){--private-modal-transition-window-transform:translateY(50%)}:host([position=bottom-right][animation=slide]){--private-modal-transition-window-transform:translate(50%,100%)}.dialog[open]::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/var(--mds-modal-overlay-opacity,var(--magma-overlay-opacity,.5)))}@starting-style{.dialog[open]::backdrop{background-color:rgb(var(--mds-modal-overlay-color,var(--magma-overlay-color,var(--magma-backdrop-color,0 0 0)))/0)}}:host ::slotted([slot=window]){margin:var(--mds-modal-custom-window-distance,calc(var(--spacing,.0025rem)*600))}.window{background-color:var(--mds-modal-window-background,rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255))));border-radius:var(--mds-modal-window-radius,0);box-shadow:var(--mds-modal-window-shadow);box-sizing:border-box;display:grid;gap:0;grid-template-columns:repeat(1,minmax(0,100%));height:var(--mds-modal-window-height);margin:var(--mds-modal-window-distance,0);max-height:var(--mds-modal-window-max-height);max-width:var(--private-modal-width);min-width:var(--mds-modal-window-min-width,calc(var(--spacing,.0025rem)*10000));overflow:var(--mds-modal-window-overflow,auto);position:relative;width:100%}.window-content--empty{display:none}.window-content-wrapper{max-height:var(--mds-modal-window-max-height);overflow:hidden}.window-footer,.window-header{box-sizing:border-box;position:absolute}.window-header{inset:0 0 auto}.window-footer{inset:auto 0 0}.dialog .window,.dialog ::slotted([slot=window]){opacity:0;transform:var(--private-modal-transition-window-transform);transition-duration:var(--private-modal-transition-duration);transition-property:transform,opacity;transition-timing-function:var(--mds-modal-transition-timing-function)}.dialog[open] .window,.dialog[open] ::slotted([slot=window]){opacity:1;pointer-events:auto;transform:var(--private-modal-opened-transform)}@starting-style{.dialog[open] .window,.dialog[open] ::slotted([slot=window]){opacity:0;transform:var(--private-modal-transition-window-transform)}.window-content-wrapper{overflow:hidden}}:host([position=top-left]) .dialog,:host([position=top-right]) .dialog,:host([position=top]) .dialog{align-items:flex-start}:host([position=center]) .dialog,:host([position=left]) .dialog,:host([position=right]) .dialog{align-items:center}:host([position=bottom-left]) .dialog,:host([position=bottom-right]) .dialog,:host([position=bottom]) .dialog{align-items:flex-end}:host([position=bottom-left]) .dialog,:host([position=left]) .dialog,:host([position=top-left]) .dialog{justify-content:flex-start}:host([position=bottom]) .dialog,:host([position=center]) .dialog,:host([position=top]) .dialog{justify-content:center}:host([position=bottom-right]) .dialog,:host([position=right]) .dialog,:host([position=top-right]) .dialog{justify-content:flex-end}:host([position=top]){--mds-modal-window-height:auto;align-items:flex-start;justify-content:center}:host([position=top]) .window{--mds-modal-window-max-width:100vw;--mds-modal-window-height:auto}:host([position=left]),:host([position=right]){--mds-modal-window-height:100%;--mds-modal-window-max-height:calc(100dvh - var(--mds-modal-window-distance,0)*2)}:host([position=top-left]){align-items:flex-start;justify-content:flex-start}:host([position=top-right]){align-items:flex-start;justify-content:flex-end}:host([position=left]){align-items:center;justify-content:flex-start}:host([position=left]) .action-close{right:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=left][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=left]:not([opened])) .action-close{transform:translate(-120%)rotate(-45deg)}:host([position=center]){align-items:center;justify-content:center}:host([position=right]){align-items:center;justify-content:flex-end}:host([position=right]) .action-close{left:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=right]:not([opened])) .action-close{transform:translate(120%)rotate(45deg)}:host([position=right][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=bottom-left]){align-items:flex-end;justify-content:flex-start}:host([position=bottom]){--mds-modal-window-height:auto;align-items:flex-end;justify-content:center}:host([position=bottom-right]){align-items:flex-end;justify-content:flex-end}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-modal-transition-duration:0s}:host([pref-contrast=more]){--mds-modal-window-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)),var(--shadow-2xl,0 25px 50px -12px #00000040)}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .action-close{--mds-button-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}@media (max-width:480px){:host{--mds-modal-window-min-width:0px}:host([position=bottom-left]),:host([position=bottom-right]),:host([position=bottom]),:host([position=center]),:host([position=top-left]),:host([position=top-right]),:host([position=top]){--private-modal-width:100vw}:host([position=left]),:host([position=right]){--private-modal-width:calc(100% - var(--private-modal-window-close-margin))}:host([position=bottom-left]),:host([position=bottom-right]),:host([position=center]),:host([position=top-left]),:host([position=top-right]){--mds-modal-window-height:calc(100dvh - var(--private-modal-window-close-margin) - var(--mds-modal-window-distance,0)*2);--mds-modal-window-max-height:var(--mds-modal-window-height)}:host([position=bottom-left]) .dialog,:host([position=bottom-right]) .dialog,:host([position=center]) .dialog,:host([position=top-left]) .dialog,:host([position=top-right]) .dialog{align-items:flex-end}:host([position=bottom]),:host([position=top]){--mds-modal-window-max-height:calc(100dvh - var(--private-modal-window-close-margin) - var(--mds-modal-window-distance,0)*2)}:host([position=bottom-left]) .action-close,:host([position=bottom-right]) .action-close,:host([position=bottom]) .action-close,:host([position=center]) .action-close,:host([position=top-left]) .action-close,:host([position=top-right]) .action-close{right:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=top]) .action-close{bottom:calc(var(--spacing,.0025rem)*300);right:calc(var(--spacing,.0025rem)*300)}:host([position=bottom-left][opened]) .action-close,:host([position=bottom-right][opened]) .action-close,:host([position=bottom][opened]) .action-close,:host([position=center][opened]) .action-close,:host([position=top-left][opened]) .action-close,:host([position=top-right][opened]) .action-close,:host([position=top][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=bottom-left]:not([opened])) .action-close,:host([position=bottom-right]:not([opened])) .action-close,:host([position=bottom]:not([opened])) .action-close,:host([position=center]:not([opened])) .action-close,:host([position=top-left]:not([opened])) .action-close,:host([position=top-right]:not([opened])) .action-close{transform:translateY(-120%)rotate(45deg)}:host([position=top]:not([opened])) .action-close{transform:translateY(120%)rotate(-45deg)}}@media not all and (max-width:480px){:host([position=bottom-left]),:host([position=bottom-right]),:host([position=bottom]),:host([position=center]),:host([position=top-left]),:host([position=top-right]),:host([position=top]){--mds-modal-window-height:auto}:host([position=left]),:host([position=right]){--private-modal-width:var(--mds-modal-window-max-width,33%)}:host([position=bottom]),:host([position=center]),:host([position=top]){--private-modal-width:calc(100vw - var(--private-modal-window-close-margin)*2)}:host([position=bottom-left]) .action-close,:host([position=bottom]) .action-close,:host([position=center]) .action-close,:host([position=top-left]) .action-close,:host([position=top]) .action-close{right:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=bottom-right]) .action-close,:host([position=top-right]) .action-close{left:calc(var(--spacing,.0025rem)*300);top:calc(var(--spacing,.0025rem)*300)}:host([position=bottom-left][opened]) .action-close,:host([position=bottom-right][opened]) .action-close,:host([position=bottom][opened]) .action-close,:host([position=center][opened]) .action-close,:host([position=top-left][opened]) .action-close,:host([position=top-right][opened]) .action-close,:host([position=top][opened]) .action-close{opacity:1;pointer-events:auto}:host([position=bottom-left]:not([opened])) .action-close,:host([position=bottom]:not([opened])) .action-close,:host([position=center]:not([opened])) .action-close,:host([position=top-left]:not([opened])) .action-close,:host([position=top]:not([opened])) .action-close{transform:translateY(-120%)rotate(45deg)}:host([position=bottom-right]:not([opened])) .action-close,:host([position=top-right]:not([opened])) .action-close{transform:translateY(-120%)rotate(-45deg)}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-modal-transition-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-modal-window-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)),var(--shadow-2xl,0 25px 50px -12px #00000040)}}@media (prefers-color-scheme:dark){:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .action-close{--mds-button-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}'};var MdsModal=/** @class */function(){function o(o){var t=this;registerInstance(this,o);this.openEvent=createEvent(this,"mdsModalOpen",7);this.showEvent=createEvent(this,"mdsModalShow",7);this.closeEvent=createEvent(this,"mdsModalClose",7);this.hideEvent=createEvent(this,"mdsModalHide",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});
2
2
  // Initialised on purpose: both readers compare it against '' (the strict boolean
3
3
  // rules forbid the truthiness check this used to be), and an undeclared field is
4
4
  // `undefined`, not ''. See enableOverflow.
@@ -24,57 +24,57 @@ this.openAfterRender=false;this.touchMargin=50;this.hasBottom=false;this.hasTop=
24
24
  * Specifies if the component can be closed with close button, or also if the backdrop background is cliccked.
25
25
  * If `strict` is selected only the close button can dismiss the component via UI.
26
26
  * If `relaxed` is selected the component can be dismissed also by cliccking the backdrop area.
27
- */this.interaction="relaxed";this.updateCSSCustomProps=function(){var t;if(typeof window==="undefined")return;var i=window.getComputedStyle(o.host);o.cssTransitionDuration=(t=i.getPropertyValue("--mds-modal-transition-duration"))!==null&&t!==void 0?t:"500"};this.stopIntroAnimationWindow=function(){o.setContentOverflow("auto");o.showEvent.emit();clearTimeout(o.animationDelayTimeout)};this.stopOutroAnimationWindow=function(){o.hideEvent.emit();clearTimeout(o.animationDelayTimeout)};this.disableOverflow=function(){if(typeof document!=="undefined"){if(document.body.style.overflow!==""){o.bodyOverflow=document.body.style.overflow}document.body.style.overflow="hidden"}};this.enableOverflow=function(){if(typeof document!=="undefined"){if(o.bodyOverflow!==""){document.body.style.overflow=o.bodyOverflow}else{document.body.style.removeProperty("overflow")}}};
27
+ */this.interaction="relaxed";this.updateCSSCustomProps=function(){var o;if(typeof window==="undefined")return;var i=window.getComputedStyle(t.host);t.cssTransitionDuration=(o=i.getPropertyValue("--mds-modal-transition-duration"))!==null&&o!==void 0?o:"500"};this.stopIntroAnimationWindow=function(){t.setContentOverflow("auto");t.showEvent.emit();clearTimeout(t.animationDelayTimeout)};this.stopOutroAnimationWindow=function(){t.hideEvent.emit();clearTimeout(t.animationDelayTimeout)};this.disableOverflow=function(){if(typeof document!=="undefined"){if(document.body.style.overflow!==""){t.bodyOverflow=document.body.style.overflow}document.body.style.overflow="hidden"}};this.enableOverflow=function(){if(typeof document!=="undefined"){if(t.bodyOverflow!==""){document.body.style.overflow=t.bodyOverflow}else{document.body.style.removeProperty("overflow")}}};
28
28
  // Freeze the content scroll container (overflow:hidden) for the whole slide,
29
29
  // re-enabling it only once the window's transform transition has finished. A
30
30
  // live overflow:auto with overflowing content janks the transform. Applied
31
31
  // inline on the element on purpose: toggling it via a host attribute + CSS
32
32
  // selector triggers a shadow-wide style recalc at the settle frame, which is
33
33
  // what caused the visible jump.
34
- this.setContentOverflow=function(t){if(o.windowContentWrapper){o.windowContentWrapper.style.overflow=t}};this.handleWindowTransitionEnd=function(t){if(t.propertyName!=="transform"){return}if(o.opened){o.stopIntroAnimationWindow()}else{o.stopOutroAnimationWindow()}};this.animateOpenWindow=function(){o.setContentOverflow("hidden");clearTimeout(o.animationDelayTimeout);
34
+ this.setContentOverflow=function(o){if(t.windowContentWrapper){t.windowContentWrapper.style.overflow=o}};this.handleWindowTransitionEnd=function(o){if(o.propertyName!=="transform"){return}if(t.opened){t.stopIntroAnimationWindow()}else{t.stopOutroAnimationWindow()}};this.animateOpenWindow=function(){t.setContentOverflow("hidden");clearTimeout(t.animationDelayTimeout);
35
35
  // Fallback only: `handleWindowTransitionEnd` is the primary settle. The
36
36
  // buffer keeps this from firing before the transition actually ends.
37
- o.animationDelayTimeout=setTimeout(o.stopIntroAnimationWindow.bind(o),cssDurationToMilliseconds(o.cssTransitionDuration)+100)};this.animateCloseWindow=function(){o.setContentOverflow("hidden");clearTimeout(o.animationDelayTimeout);o.animationDelayTimeout=setTimeout(o.stopOutroAnimationWindow.bind(o),cssDurationToMilliseconds(o.cssTransitionDuration)+100)};this.setTouchStart=function(t){o.touchStartX=t.touches[0].clientX;o.touchStartY=t.touches[0].clientY};
37
+ t.animationDelayTimeout=setTimeout(t.stopIntroAnimationWindow.bind(t),cssDurationToMilliseconds(t.cssTransitionDuration)+100)};this.animateCloseWindow=function(){t.setContentOverflow("hidden");clearTimeout(t.animationDelayTimeout);t.animationDelayTimeout=setTimeout(t.stopOutroAnimationWindow.bind(t),cssDurationToMilliseconds(t.cssTransitionDuration)+100)};this.setTouchStart=function(o){t.touchStartX=o.touches[0].clientX;t.touchStartY=o.touches[0].clientY};
38
38
  // a swipe is one more way to dismiss the modal: `strict` vetoes it, as it does Esc and the
39
39
  // backdrop
40
- this.setTouchEnd=function(t){if(o.interaction==="strict")return;var i=t.changedTouches[0].clientX;var a=t.changedTouches[0].clientY;var n=o.touchStartX-i;var e=o.touchStartY-a;
40
+ this.setTouchEnd=function(o){if(t.interaction==="strict")return;var i=o.changedTouches[0].clientX;var n=o.changedTouches[0].clientY;var a=t.touchStartX-i;var e=t.touchStartY-n;
41
41
  // if is NOT a diagonal swipe
42
- if(Math.abs(n)>Math.abs(e)){if(o.position==="right"&&n>0)return;if(o.position==="left"&&n<0)return;if(Math.abs(n)>Math.abs(o.touchMargin)){o.opened=undefined}}};this.addMobileEvents=function(){o.windowElement.addEventListener("touchstart",o.setTouchStart);o.windowElement.addEventListener("touchend",o.setTouchEnd)};this.updateSlots=function(){o.hasBottom=hasChildWithSlot(o.host,"bottom");o.hasTop=hasChildWithSlot(o.host,"top");o.hasWindow=hasChildWithSlot(o.host,"window");
42
+ if(Math.abs(a)>Math.abs(e)){if(t.position==="right"&&a>0)return;if(t.position==="left"&&a<0)return;if(Math.abs(a)>Math.abs(t.touchMargin)){t.opened=undefined}}};this.addMobileEvents=function(){t.windowElement.addEventListener("touchstart",t.setTouchStart);t.windowElement.addEventListener("touchend",t.setTouchEnd)};this.updateSlots=function(){t.hasBottom=hasChildWithSlot(t.host,"bottom");t.hasTop=hasChildWithSlot(t.host,"top");t.hasWindow=hasChildWithSlot(t.host,"window");
43
43
  // the slotted window is NOT given a role: the `<dialog>` below is the dialog already,
44
44
  // opened with showModal(), and a second one inside it reads as a second window
45
45
  };
46
46
  /**
47
47
  * Measures the header and the footer to pad the content: the states change
48
48
  * only when a measure differs, so the update pass settles after one render.
49
- */this.updateWindowPaddings=function(){var t,i,a,n;var e=(t=o.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".window-header");var r=(i=o.host.shadowRoot)===null||i===void 0?void 0:i.querySelector(".window-footer");var s=(a=e===null||e===void 0?void 0:e.offsetHeight)!==null&&a!==void 0?a:0;var d=(n=r===null||r===void 0?void 0:r.offsetHeight)!==null&&n!==void 0?n:0;if(s!==o.windowHeaderHeight)o.windowHeaderHeight=s;if(d!==o.windowFooterHeight)o.windowFooterHeight=d};this.showDialog=function(){if(!o.dialogEl||o.dialogEl.open){return}
49
+ */this.updateWindowPaddings=function(){var o,i,n,a;var e=(o=t.host.shadowRoot)===null||o===void 0?void 0:o.querySelector(".window-header");var s=(i=t.host.shadowRoot)===null||i===void 0?void 0:i.querySelector(".window-footer");var r=(n=e===null||e===void 0?void 0:e.offsetHeight)!==null&&n!==void 0?n:0;var d=(a=s===null||s===void 0?void 0:s.offsetHeight)!==null&&a!==void 0?a:0;if(r!==t.windowHeaderHeight)t.windowHeaderHeight=r;if(d!==t.windowFooterHeight)t.windowFooterHeight=d};this.showDialog=function(){if(!t.dialogEl||t.dialogEl.open){return}
50
50
  // `showModal()` promotes the dialog to the top layer, traps focus and inerts
51
51
  // the page. `show()` keeps it non-modal so the page behind stays interactive,
52
52
  // preserving the legacy `hideBackdrop` click-through behaviour.
53
- if(!o.hideBackdrop){o.dialogEl.showModal()}else{o.dialogEl.show()}
53
+ if(!t.hideBackdrop){t.dialogEl.showModal()}else{t.dialogEl.show()}
54
54
  // Measure here, not only in the lifecycle hooks: until this call the dialog is
55
55
  // `display: none`, so a header and a footer measure 0. A modal that mounts
56
56
  // already open never renders again on its own, so that 0 would stay and the
57
57
  // content would sit under both bars.
58
- o.updateWindowPaddings()};this.closeDialog=function(){var t;if((t=o.dialogEl)===null||t===void 0?void 0:t.open){o.dialogEl.close()}};this.handleBackdropClick=function(t){if(o.interaction==="strict"){return}
58
+ t.updateWindowPaddings()};this.closeDialog=function(){var o;if((o=t.dialogEl)===null||o===void 0?void 0:o.open){t.dialogEl.close()}};this.handleBackdropClick=function(o){if(t.interaction==="strict"){return}
59
59
  // A click whose target is the dialog itself (not its window contents) is a
60
60
  // click on the backdrop area.
61
- if(t.target===o.dialogEl){o.opened=undefined}};this.handleCancel=function(t){
61
+ if(o.target===t.dialogEl){t.opened=undefined}};this.handleCancel=function(o){
62
62
  // Take over the native Esc dismissal so `strict` can veto it (and, later, so
63
63
  // the outro animation can play).
64
- t.preventDefault();if(o.interaction==="strict"){return}o.opened=undefined}}t.prototype.componentWillLoad=function(){this.updateSlots();if(this.overflow==="auto"&&this.opened){this.disableOverflow()}};t.prototype.componentDidLoad=function(){var t,o;this.windowElement=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".window");this.windowContentWrapper=(o=this.host.shadowRoot)===null||o===void 0?void 0:o.querySelector(".window-content-wrapper");this.updateWindowPaddings();if(this.windowElement!=null){this.addMobileEvents();this.windowElement.addEventListener("transitionend",this.handleWindowTransitionEnd)}this.updateCSSCustomProps();
64
+ o.preventDefault();if(t.interaction==="strict"){return}t.opened=undefined}}o.prototype.componentWillLoad=function(){this.updateSlots();if(this.overflow==="auto"&&this.opened){this.disableOverflow()}};o.prototype.componentDidLoad=function(){var o,t;this.windowElement=(o=this.host.shadowRoot)===null||o===void 0?void 0:o.querySelector(".window");this.windowContentWrapper=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".window-content-wrapper");this.updateWindowPaddings();if(this.windowElement!=null){this.addMobileEvents();this.windowElement.addEventListener("transitionend",this.handleWindowTransitionEnd)}this.updateCSSCustomProps();
65
65
  // The `opened` watcher does not fire for the initial value, so open the
66
66
  // native dialog here when the component mounts already open.
67
- if(this.opened){this.showDialog();this.animateOpenWindow();this.openEvent.emit()}};t.prototype.componentDidUpdate=function(){if(this.openAfterRender){this.openAfterRender=false;this.showDialog();this.animateOpenWindow();this.openEvent.emit()}
67
+ if(this.opened){this.showDialog();this.animateOpenWindow();this.openEvent.emit()}};o.prototype.componentDidUpdate=function(){if(this.openAfterRender){this.openAfterRender=false;this.showDialog();this.animateOpenWindow();this.openEvent.emit()}
68
68
  // the header and the footer are hidden while their slots are empty: refresh
69
69
  // the paddings of the content once a late `top` or `bottom` child shows them
70
- this.updateWindowPaddings()};t.prototype.disconnectedCallback=function(){this.enableOverflow();clearTimeout(this.animationDelayTimeout);if(this.windowElement){this.windowElement.removeEventListener("touchstart",this.setTouchStart);this.windowElement.removeEventListener("touchend",this.setTouchEnd);this.windowElement.removeEventListener("transitionend",this.handleWindowTransitionEnd)}this.enableOverflow()};t.prototype.handleOpenProp=function(t,o){if(t){if(this.overflow==="auto"){this.disableOverflow()}
70
+ this.updateWindowPaddings()};o.prototype.disconnectedCallback=function(){this.enableOverflow();clearTimeout(this.animationDelayTimeout);if(this.windowElement){this.windowElement.removeEventListener("touchstart",this.setTouchStart);this.windowElement.removeEventListener("touchend",this.setTouchEnd);this.windowElement.removeEventListener("transitionend",this.handleWindowTransitionEnd)}this.enableOverflow()};o.prototype.handleOpenProp=function(o,t){if(o){if(this.overflow==="auto"){this.disableOverflow()}
71
71
  // The dialog is shown by the render that follows, in componentDidUpdate, not here. The
72
72
  // entry starts from the transform the CSS keys on `:host([position])` and
73
73
  // `:host([animation])`, attributes that only that render reflects: a `position` set in the
74
74
  // same task as `opened`, as a framework wrapper sets its props, was still the old one
75
75
  // when showModal() resolved the starting style, and the window slid in from the old
76
76
  // place, already inside the page (#803).
77
- this.openAfterRender=true;return}this.openAfterRender=false;if(!o){return}this.opened=undefined;this.closeDialog();if(this.overflow==="auto"){this.enableOverflow()}this.animateCloseWindow();this.closeEvent.emit()};t.prototype.handleHideBackdropProp=function(t){if(t===false){this.hideBackdrop=undefined}};
77
+ this.openAfterRender=true;return}this.openAfterRender=false;if(!t){return}this.opened=undefined;this.closeDialog();if(this.overflow==="auto"){this.enableOverflow()}this.animateCloseWindow();this.closeEvent.emit()};o.prototype.handleHideBackdropProp=function(o){if(o===false){this.hideBackdrop=undefined}};
78
78
  /**
79
79
  * Closes the modal.
80
- */t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.opened=undefined;return[2/*return*/]}))}))};t.prototype.render=function(){var t=this;return h(Host,{key:"45b3fd950185be51db62a8381caf49d24ec2fa65","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("dialog",{key:"f9d53be4fc42dd300232a4a546e0be7767756d5a","aria-label":this.accessibleName,class:"dialog",part:"dialog",ref:function(o){return t.dialogEl=o},onClick:function(o){t.handleBackdropClick(o)},onCancel:function(o){t.handleCancel(o)}},h("slot",{key:"bd1c2cab3c4cf3db658a72ae8da8e6e73fa09008",name:"window",onSlotchange:this.updateSlots}),!this.hasWindow&&h("div",{key:"54b538559101fe20fdad60795517b1b5d7e0e41c",class:"window",part:"window"},h("div",{key:"1b1e2a732ce6ec50cc10f4bf75abae25b1da78fd",class:clsx("window-header",!this.hasTop&&"window-content--empty")},h("slot",{key:"dd0cd5c7095b9f3c87097a601370dddbadd11050",name:"top",onSlotchange:this.updateSlots})),h("div",{key:"b8409013cc7351c26a1bc62f46b06c1907d845d2",class:"window-content-wrapper"},h("div",{key:"419a03164087739c60c19f1709d4abeef8ef5832",class:"window-content",style:{paddingTop:"".concat(this.windowHeaderHeight,"px"),paddingBottom:"".concat(this.windowFooterHeight,"px")}},h("slot",{key:"765333f16f0fecfc3cfa6582131e62981055f610"}))),h("div",{key:"8ef8bed4acbe89bce2a4a2ae544e1b6e0da421c5",class:clsx("window-footer",!this.hasBottom&&"window-content--empty")},h("slot",{key:"7940e4282ae344c8a92301f21c4cb9b75a8f6028",name:"bottom",onSlotchange:this.updateSlots}))),!this.hasWindow&&h("mds-button",{key:"52ce6a70b25d8a07b4fc5d26fbe43914c363de6e","aria-label":this.t.get("close"),class:"action-close",icon:miBaselineClose,variant:"light",tone:"text",size:"xl",onClick:function(){t.opened=undefined},part:"action-close"})))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{opened:[{handleOpenProp:0}],hideBackdrop:[{handleHideBackdropProp:0}]}},enumerable:false,configurable:true});return t}();MdsModal.style=mdsModalCss();export{MdsModal as mds_modal};
80
+ */o.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(o){this.opened=undefined;return[2/*return*/]}))}))};o.prototype.render=function(){var o=this;return h(Host,{key:"45b3fd950185be51db62a8381caf49d24ec2fa65","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},h("dialog",{key:"f9d53be4fc42dd300232a4a546e0be7767756d5a","aria-label":this.accessibleName,class:"dialog",part:"dialog",ref:function(t){return o.dialogEl=t},onClick:function(t){o.handleBackdropClick(t)},onCancel:function(t){o.handleCancel(t)}},h("slot",{key:"bd1c2cab3c4cf3db658a72ae8da8e6e73fa09008",name:"window",onSlotchange:this.updateSlots}),!this.hasWindow&&h("div",{key:"54b538559101fe20fdad60795517b1b5d7e0e41c",class:"window",part:"window"},h("div",{key:"1b1e2a732ce6ec50cc10f4bf75abae25b1da78fd",class:clsx("window-header",!this.hasTop&&"window-content--empty")},h("slot",{key:"dd0cd5c7095b9f3c87097a601370dddbadd11050",name:"top",onSlotchange:this.updateSlots})),h("div",{key:"b8409013cc7351c26a1bc62f46b06c1907d845d2",class:"window-content-wrapper"},h("div",{key:"419a03164087739c60c19f1709d4abeef8ef5832",class:"window-content",style:{paddingTop:"".concat(this.windowHeaderHeight,"px"),paddingBottom:"".concat(this.windowFooterHeight,"px")}},h("slot",{key:"765333f16f0fecfc3cfa6582131e62981055f610"}))),h("div",{key:"8ef8bed4acbe89bce2a4a2ae544e1b6e0da421c5",class:clsx("window-footer",!this.hasBottom&&"window-content--empty")},h("slot",{key:"7940e4282ae344c8a92301f21c4cb9b75a8f6028",name:"bottom",onSlotchange:this.updateSlots}))),!this.hasWindow&&h("mds-button",{key:"52ce6a70b25d8a07b4fc5d26fbe43914c363de6e","aria-label":this.t.get("close"),class:"action-close",icon:miBaselineClose,variant:"light",tone:"text",size:"xl",onClick:function(){o.opened=undefined},part:"action-close"})))};Object.defineProperty(o.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(o,"watchers",{get:function(){return{opened:[{handleOpenProp:0}],hideBackdrop:[{handleHideBackdropProp:0}]}},enumerable:false,configurable:true});return o}();MdsModal.style=mdsModalCss();export{MdsModal as mds_modal};
@@ -1,11 +1,13 @@
1
- import{r as registerInstance,d as createEvent,h as h$4,e as Host,g as getElement}from"./index-CvLLN-QH.js";import{g as getDefaultExportFromCjs}from"./_commonjsHelpers-B85MJLTf.js";import{m as miBaselineCancel}from"./cancel-BJ8rpzfj.js";import{h as hasChildWithSlot}from"./slot-AEckDMXh.js";import{c as clsx}from"./clsx-ChV9xqsO.js";import{L as Locale}from"./locale-B6cOkl4I.js";import{s as sanitizeISO8601Date}from"./date-CACEYk42.js";import{p as preferenceStore}from"./preference-C5XjgGCb.js";var dayjs_min$1={exports:{}};var dayjs_min=dayjs_min$1.exports;var hasRequiredDayjs_min;function requireDayjs_min(){if(hasRequiredDayjs_min)return dayjs_min$1.exports;hasRequiredDayjs_min=1;(function(t,a){!function(a,r){t.exports=r()}(dayjs_min,(function(){var t=1e3,a=6e4,r=36e5,i="millisecond",e="second",n="minute",o="hour",s="day",c="week",u="month",m="quarter",h="year",d="date",l="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var a=["th","st","nd","rd"],r=t%100;return"["+t+(a[(r-20)%10]||a[r]||a[0])+"]"}},p=function(t,a,r){var i=String(t);return!i||i.length>=a?t:""+Array(a+1-i.length).join(r)+t},b={s:p,z:function(t){var a=-t.utcOffset(),r=Math.abs(a),i=Math.floor(r/60),e=r%60;return(a<=0?"+":"-")+p(i,2,"0")+":"+p(e,2,"0")},m:function t(a,r){if(a.date()<r.date())return-t(r,a);var i=12*(r.year()-a.year())+(r.month()-a.month()),e=a.clone().add(i,u),n=r-e<0,o=a.clone().add(i+(n?-1:1),u);return+(-(i+(r-e)/(n?e-o:o-e))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:h,w:c,d:s,D:d,h:o,m:n,s:e,ms:i,Q:m}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",$={};$[y]=g;var k="$isDayjsObject",w=function(t){return t instanceof _||!(!t||!t[k])},M=function t(a,r,i){var e;if(!a)return y;if("string"==typeof a){var n=a.toLowerCase();$[n]&&(e=n),r&&($[n]=r,e=n);var o=a.split("-");if(!e&&o.length>1)return t(o[0])}else{var s=a.name;$[s]=a,e=s}return!i&&e&&(y=e),e||!i&&y},x=function(t,a){if(w(t))return t.clone();var r="object"==typeof a?a:{};return r.date=t,r.args=arguments,new _(r)},j=b;j.l=M,j.i=w,j.w=function(t,a){return x(t,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var _=function(){function g(t){this.$L=M(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[k]=true}var p=g.prototype;return p.parse=function(t){this.$d=function(t){var a=t.date,r=t.utc;if(null===a)return new Date(NaN);if(j.u(a))return new Date;if(a instanceof Date)return new Date(a);if("string"==typeof a&&!/Z$/i.test(a)){var i=a.match(f);if(i){var e=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(a)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return j},p.isValid=function(){return!(this.$d.toString()===l)},p.isSame=function(t,a){var r=x(t);return this.startOf(a)<=r&&r<=this.endOf(a)},p.isAfter=function(t,a){return x(t)<this.startOf(a)},p.isBefore=function(t,a){return this.endOf(a)<x(t)},p.$g=function(t,a,r){return j.u(t)?this[a]:this.set(r,t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,a){var r=this,i=!!j.u(a)||a,m=j.p(t),l=function(t,a){var e=j.w(r.$u?Date.UTC(r.$y,a,t):new Date(r.$y,a,t),r);return i?e:e.endOf(s)},f=function(t,a){return j.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(a)),r)},v=this.$W,g=this.$M,p=this.$D,b="set"+(this.$u?"UTC":"");switch(m){case h:return i?l(1,0):l(31,11);case u:return i?l(1,g):l(0,g+1);case c:var y=this.$locale().weekStart||0,$=(v<y?v+7:v)-y;return l(i?p-$:p+(6-$),g);case s:case d:return f(b+"Hours",0);case o:return f(b+"Minutes",1);case n:return f(b+"Seconds",2);case e:return f(b+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,false)},p.$set=function(t,a){var r,c=j.p(t),m="set"+(this.$u?"UTC":""),l=(r={},r[s]=m+"Date",r[d]=m+"Date",r[u]=m+"Month",r[h]=m+"FullYear",r[o]=m+"Hours",r[n]=m+"Minutes",r[e]=m+"Seconds",r[i]=m+"Milliseconds",r)[c],f=c===s?this.$D+(a-this.$W):a;if(c===u||c===h){var v=this.clone().set(d,1);v.$d[l](f),v.init(),this.$d=v.set(d,Math.min(this.$D,v.daysInMonth())).$d}else l&&this.$d[l](f);return this.init(),this},p.set=function(t,a){return this.clone().$set(t,a)},p.get=function(t){return this[j.p(t)]()},p.add=function(i,m){var d,l=this;i=Number(i);var f=j.p(m),v=function(t){var a=x(l);return j.w(a.date(a.date()+Math.round(t*i)),l)};if(f===u)return this.set(u,this.$M+i);if(f===h)return this.set(h,this.$y+i);if(f===s)return v(1);if(f===c)return v(7);var g=(d={},d[n]=a,d[o]=r,d[e]=t,d)[f]||1,p=this.$d.getTime()+i*g;return j.w(p,this)},p.subtract=function(t,a){return this.add(-1*t,a)},p.format=function(t){var a=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var i=t||"YYYY-MM-DDTHH:mm:ssZ",e=j.z(this),n=this.$H,o=this.$m,s=this.$M,c=r.weekdays,u=r.months,m=r.meridiem,h=function(t,r,e,n){return t&&(t[r]||t(a,i))||e[r].slice(0,n)},d=function(t){return j.s(n%12||12,t,"0")},f=m||function(t,a,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(v,(function(t,i){return i||function(t){switch(t){case"YY":return String(a.$y).slice(-2);case"YYYY":return j.s(a.$y,4,"0");case"M":return s+1;case"MM":return j.s(s+1,2,"0");case"MMM":return h(r.monthsShort,s,u,3);case"MMMM":return h(u,s);case"D":return a.$D;case"DD":return j.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return h(r.weekdaysMin,a.$W,c,2);case"ddd":return h(r.weekdaysShort,a.$W,c,3);case"dddd":return c[a.$W];case"H":return String(n);case"HH":return j.s(n,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return f(n,o,true);case"A":return f(n,o,false);case"m":return String(o);case"mm":return j.s(o,2,"0");case"s":return String(a.$s);case"ss":return j.s(a.$s,2,"0");case"SSS":return j.s(a.$ms,3,"0");case"Z":return e}return null}(t)||e.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(i,d,l){var f,v=this,g=j.p(d),p=x(i),b=(p.utcOffset()-this.utcOffset())*a,y=this-p,$=function(){return j.m(v,p)};switch(g){case h:f=$()/12;break;case u:f=$();break;case m:f=$()/3;break;case c:f=(y-b)/6048e5;break;case s:f=(y-b)/864e5;break;case o:f=y/r;break;case n:f=y/a;break;case e:f=y/t;break;default:f=y}return l?f:j.a(f)},p.daysInMonth=function(){return this.endOf(u).$D},p.$locale=function(){return $[this.$L]},p.locale=function(t,a){if(!t)return this.$L;var r=this.clone(),i=M(t,a,true);return i&&(r.$L=i),r},p.clone=function(){return j.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},g}(),D=_.prototype;return x.prototype=D,[["$ms",i],["$s",e],["$m",n],["$H",o],["$W",s],["$M",u],["$y",h],["$D",d]].forEach((function(t){D[t[1]]=function(a){return this.$g(a,t[0],t[1])}})),x.extend=function(t,a){return t.$i||(t(a,_,x),t.$i=true),x},x.locale=M,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=$[y],x.Ls=$,x.p={},x}))})(dayjs_min$1);return dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();var dayjs=getDefaultExportFromCjs(dayjs_minExports);var dismiss$3="Κλείσιμο";var future$3="σε %s";var past$3="πριν από %s";var s$3="λίγα δευτ.";var m$3="1 λεπτό";var mm$3="%d λεπτά";var h$3="1 ώρα";var hh$3="%d ώρες";var d$3="1 ημέρα";var dd$3="%d ημέρες";var M$3="1 μήνας";var MM$3="%d μήνες";var y$3="1 έτος";var yy$3="%d έτη";var localeEl={dismiss:dismiss$3,future:future$3,past:past$3,s:s$3,m:m$3,mm:mm$3,h:h$3,hh:hh$3,d:d$3,dd:dd$3,M:M$3,MM:MM$3,y:y$3,yy:yy$3};var dismiss$2="Close";var future$2="in %s";var past$2="%s ago";var s$2="few sec";var m$2="1 min";var mm$2="%d mins";var h$2="1 hour";var hh$2="%d hours";var d$2="1 day";var dd$2="%d days";var M$2="1 month";var MM$2="%d months";var y$2="1 year";var yy$2="%d years";var localeEn={dismiss:dismiss$2,future:future$2,past:past$2,s:s$2,m:m$2,mm:mm$2,h:h$2,hh:hh$2,d:d$2,dd:dd$2,M:M$2,MM:MM$2,y:y$2,yy:yy$2};var dismiss$1="Cerrar";var future$1="en %s";var past$1="hace %s";var s$1="pocos seg";var m$1="1 min";var mm$1="%d mins";var h$1="1 hora";var hh$1="%d horas";var d$1="1 día";var dd$1="%d días";var M$1="1 mes";var MM$1="%d meses";var y$1="1 año";var yy$1="%d años";var localeEs={dismiss:dismiss$1,future:future$1,past:past$1,s:s$1,m:m$1,mm:mm$1,h:h$1,hh:hh$1,d:d$1,dd:dd$1,M:M$1,MM:MM$1,y:y$1,yy:yy$1};var dismiss="Chiudi";var future="tra %s";var past="%s fa";var s="pochi sec";var m="1 min";var mm="%d min";var h="1 ora";var hh="%d ore";var d="1 giorno";var dd="%d giorni";var M="1 mese";var MM="%d mesi";var y="1 anno";var yy="%d anni";var localeIt={dismiss:dismiss,future:future,past:past,s:s,m:m,mm:mm,h:h,hh:hh,d:d,dd:dd,M:M,MM:MM,y:y,yy:yy};var relativeTime$2={exports:{}};var relativeTime$1=relativeTime$2.exports;var hasRequiredRelativeTime;function requireRelativeTime(){if(hasRequiredRelativeTime)return relativeTime$2.exports;hasRequiredRelativeTime=1;(function(t,a){!function(a,r){t.exports=r()}(relativeTime$1,(function(){return function(t,a,r){t=t||{};var i=a.prototype,e={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function n(t,a,r,e){return i.fromToBase(t,a,r,e)}r.en.relativeTime=e,i.fromToBase=function(a,i,n,o,s){for(var c,u,m,h=n.$locale().relativeTime||e,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=d.length,f=0;f<l;f+=1){var v=d[f];v.d&&(c=o?r(a).diff(n,v.d,true):n.diff(a,v.d,true));var g=(t.rounding||Math.round)(Math.abs(c));if(m=c>0,g<=v.r||!v.r){g<=1&&f>0&&(v=d[f-1]);var p=h[v.l];s&&(g=s(""+g)),u="string"==typeof p?p.replace("%d",g):p(g,i,v.l,m);break}}if(i)return u;var b=m?h.future:h.past;return"function"==typeof b?b(u):b.replace("%s",u)},i.to=function(t,a){return n(t,a,this,true)},i.from=function(t,a){return n(t,a,this)};var o=function(t){return t.$u?r.utc():r()};i.toNow=function(t){return this.to(o(this),t)},i.fromNow=function(t){return this.from(o(this),t)}}}))})(relativeTime$2);return relativeTime$2.exports}var relativeTimeExports=requireRelativeTime();var relativeTime=getDefaultExportFromCjs(relativeTimeExports);var mdsPushNotificationItemCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-button,mds-img,mds-text):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-push-notification-item-duration:var(--duration-300,.3s);--private-push-notification-item-duration:var(--mds-push-notification-item-duration,var(--duration-300,.3s));--mds-push-notification-item-icon-background-color:#0000;--mds-push-notification-item-icon-color:rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99)));--mds-push-notification-item-message-line-clamp:2;--mds-push-notification-item-shadow:var(--shadow-sm-sharp,0 0 1px 1px #0000000f,0 1px 3px 0 #0000001a);--mds-push-notification-item-subject-line-clamp:1;--mds-push-notification-item-timing-function:var(--ease-in-out-quint,cubic-bezier(.86,0,.07,1));background-color:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));box-shadow:var(--mds-push-notification-item-shadow);color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));corner-shape:var(--magma-corner-shape,squircle);align-items:flex-start;display:flex;gap:calc(var(--spacing,.0025rem)*400);max-width:calc(var(--spacing,.0025rem)*8000);min-width:calc(var(--spacing,.0025rem)*7200);padding:calc(var(--spacing,.0025rem)*400);pointer-events:auto;position:relative;transition-duration:var(--private-push-notification-item-duration);transition-property:background-color,box-shadow,color,margin,transform;transition-timing-function:var(--mds-push-notification-item-timing-function)}:host([deletable]:not([deletable=false])){padding-right:calc(var(--spacing,.0025rem)*800)}.content{display:grid;flex-grow:1}.actions{display:flex;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*200);min-width:1px;padding-top:calc(var(--spacing,.0025rem)*200)}.actions--hidden,.badge--hidden{display:none}.avatar,.picture{flex-shrink:0}.picture{border-radius:var(--magma-radius-3xs,var(--radius-squircle-3xs,6px));box-shadow:var(--shadow-sm-sharp,0 0 1px 1px #0000000f,0 1px 3px 0 #0000001a);corner-shape:var(--magma-corner-shape,squircle);max-width:calc(var(--spacing,.0025rem)*1200);width:100%}.close-button{opacity:0;padding:calc(var(--spacing,.0025rem)*150);position:absolute;right:0;top:0;transition-duration:var(--default-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,rotate,scale,transform,translate,width;transition-timing-function:var(--default-transition-timing-function)}:host(:hover) .close-button{opacity:1}.close-button:focus-visible,.close-button:hover{fill:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)));opacity:1}.header{align-items:baseline;display:flex;gap:calc(var(--spacing,.0025rem)*100);justify-content:space-between;min-width:0;overflow:hidden;text-overflow:ellipsis}.infos{display:flex;flex-direction:column}.time{flex-shrink:0;margin-right:calc(var(--spacing,.0025rem)*100);white-space:nowrap}.subject{--mds-text-line-clamp:var(--mds-push-notification-item-subject-line-clamp,1);line-height:var(--leading-sm,1.25rem)}.message,.subject{text-overflow:ellipsis}.message{--mds-text-line-clamp:var(--mds-push-notification-item-message-line-clamp,2)}.avatar{background-color:var(--mds-push-notification-item-icon-background-color,#0000);border-radius:var(--magma-radius-full,var(--radius-full,1000px));fill:var(--mds-push-notification-item-icon-color,rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99))));height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.avatar::part(svg){width:calc(var(--spacing,.0025rem)*600)}:host([src]) .avatar{background-color:#0000}:host([icon]) .avatar::part(wrapper){padding:calc(var(--spacing,.0025rem)*150)}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-push-notification-item-duration:0s}:host([pref-contrast=more]){--mds-push-notification-item-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)) inset;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host([variant=primary][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)));--mds-push-notification-item-icon-color:rgb(var(--magma-accent-surface-subtle,var(--variant-primary-10,236 237 240)))}:host([variant=primary]),:host([variant=primary][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-accent-surface,var(--variant-primary-09,220 224 231)));--mds-push-notification-item-icon-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)))}:host([variant=orange][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orange-05,213 90 5));--mds-push-notification-item-icon-color:rgb(var(--label-orange-10,254 233 219))}:host([variant=orange]),:host([variant=orange][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orange-09,253 217 191));--mds-push-notification-item-icon-color:rgb(var(--label-orange-05,213 90 5))}:host([variant=amaranth][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-amaranth-05,242 37 72));--mds-push-notification-item-icon-color:rgb(var(--label-amaranth-10,254 232 236))}:host([variant=amaranth]),:host([variant=amaranth][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-amaranth-09,253 214 221));--mds-push-notification-item-icon-color:rgb(var(--label-amaranth-05,242 37 72))}:host([variant=orchid][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orchid-05,233 44 137));--mds-push-notification-item-icon-color:rgb(var(--label-orchid-10,253 231 242))}:host([variant=orchid]),:host([variant=orchid][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orchid-09,251 213 232));--mds-push-notification-item-icon-color:rgb(var(--label-orchid-05,233 44 137))}:host([variant=purple][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-purple-05,168 86 247));--mds-push-notification-item-icon-color:rgb(var(--label-purple-10,244 233 254))}:host([variant=purple]),:host([variant=purple][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-purple-09,235 216 253));--mds-push-notification-item-icon-color:rgb(var(--label-purple-05,168 86 247))}:host([variant=red][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-red-05,230 66 66));--mds-push-notification-item-icon-color:rgb(var(--label-red-10,252 233 233))}:host([variant=red]),:host([variant=red][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-red-09,250 215 215));--mds-push-notification-item-icon-color:rgb(var(--label-red-05,230 66 66))}:host([variant=violet][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-violet-05,145 100 246));--mds-push-notification-item-icon-color:rgb(var(--label-violet-10,240 234 254))}:host([variant=violet]),:host([variant=violet][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-violet-09,229 218 253));--mds-push-notification-item-icon-color:rgb(var(--label-violet-05,145 100 246))}:host([variant=blue][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-blue-05,90 117 249));--mds-push-notification-item-icon-color:rgb(var(--label-blue-10,233 236 254))}:host([variant=blue]),:host([variant=blue][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-blue-09,216 222 254));--mds-push-notification-item-icon-color:rgb(var(--label-blue-05,90 117 249))}:host([variant=sky][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-sky-05,12 136 193));--mds-push-notification-item-icon-color:rgb(var(--label-sky-10,217 241 253))}:host([variant=sky]),:host([variant=sky][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-sky-09,185 231 251));--mds-push-notification-item-icon-color:rgb(var(--label-sky-05,12 136 193))}:host([variant=aqua][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-aqua-05,5 141 165));--mds-push-notification-item-icon-color:rgb(var(--label-aqua-10,199 245 253))}:host([variant=aqua]),:host([variant=aqua][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-aqua-09,151 237 252));--mds-push-notification-item-icon-color:rgb(var(--label-aqua-05,5 141 165))}:host([variant=green][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-green-05,26 148 71));--mds-push-notification-item-icon-color:rgb(var(--label-green-10,206 247 221))}:host([variant=green]),:host([variant=green][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-green-09,165 240 193));--mds-push-notification-item-icon-color:rgb(var(--label-green-05,26 148 71))}:host([variant=lime][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-lime-05,93 143 15));--mds-push-notification-item-icon-color:rgb(var(--label-lime-10,219 247 178))}:host([variant=lime]),:host([variant=lime][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-lime-09,189 239 111));--mds-push-notification-item-icon-color:rgb(var(--label-lime-05,93 143 15))}:host([variant=yellow][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-yellow-05,161 124 6));--mds-push-notification-item-icon-color:rgb(var(--label-yellow-10,253 236 186))}:host([variant=yellow]),:host([variant=yellow][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-yellow-09,251 221 131));--mds-push-notification-item-icon-color:rgb(var(--label-yellow-05,161 124 6))}:host([variant=error][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-push-notification-item-icon-color:rgb(var(--magma-danger-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=error]),:host([variant=error][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-push-notification-item-icon-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=warning][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-push-notification-item-icon-color:rgb(var(--magma-warning-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=warning]),:host([variant=warning][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-push-notification-item-icon-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=success][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-push-notification-item-icon-color:rgb(var(--magma-success-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=success]),:host([variant=success][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-push-notification-item-icon-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=info][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-push-notification-item-icon-color:rgb(var(--magma-info-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=info]),:host([variant=info][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-push-notification-item-icon-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-push-notification-item-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-push-notification-item-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)) inset;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}"};var MdsPushNotificationItem=/** @class */function(){function t(t){var a=this;registerInstance(this,t);this.closedEvent=createEvent(this,"mdsPushNotificationItemClose",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});
1
+ import{r as registerInstance,d as createEvent,h as h$4,e as Host,g as getElement}from"./index-CvLLN-QH.js";import{g as getDefaultExportFromCjs}from"./_commonjsHelpers-B85MJLTf.js";import{m as miBaselineCancel}from"./cancel-BJ8rpzfj.js";import{h as hasChildWithSlot}from"./slot-AEckDMXh.js";import{c as clsx}from"./clsx-ChV9xqsO.js";import{L as Locale}from"./locale-B6cOkl4I.js";import{s as sanitizeISO8601Date}from"./date-CACEYk42.js";import{p as preferenceStore}from"./preference-C5XjgGCb.js";var dayjs_min$1={exports:{}};var dayjs_min=dayjs_min$1.exports;var hasRequiredDayjs_min;function requireDayjs_min(){if(hasRequiredDayjs_min)return dayjs_min$1.exports;hasRequiredDayjs_min=1;(function(t,a){!function(a,r){t.exports=r()}(dayjs_min,(function(){var t=1e3,a=6e4,r=36e5,i="millisecond",e="second",n="minute",o="hour",s="day",c="week",u="month",m="quarter",d="year",h="date",l="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var a=["th","st","nd","rd"],r=t%100;return"["+t+(a[(r-20)%10]||a[r]||a[0])+"]"}},p=function(t,a,r){var i=String(t);return!i||i.length>=a?t:""+Array(a+1-i.length).join(r)+t},b={s:p,z:function(t){var a=-t.utcOffset(),r=Math.abs(a),i=Math.floor(r/60),e=r%60;return(a<=0?"+":"-")+p(i,2,"0")+":"+p(e,2,"0")},m:function t(a,r){if(a.date()<r.date())return-t(r,a);var i=12*(r.year()-a.year())+(r.month()-a.month()),e=a.clone().add(i,u),n=r-e<0,o=a.clone().add(i+(n?-1:1),u);return+(-(i+(r-e)/(n?e-o:o-e))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:u,y:d,w:c,d:s,D:h,h:o,m:n,s:e,ms:i,Q:m}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",$={};$[y]=g;var k="$isDayjsObject",w=function(t){return t instanceof D||!(!t||!t[k])},M=function t(a,r,i){var e;if(!a)return y;if("string"==typeof a){var n=a.toLowerCase();$[n]&&(e=n),r&&($[n]=r,e=n);var o=a.split("-");if(!e&&o.length>1)return t(o[0])}else{var s=a.name;$[s]=a,e=s}return!i&&e&&(y=e),e||!i&&y},x=function(t,a){if(w(t))return t.clone();var r="object"==typeof a?a:{};return r.date=t,r.args=arguments,new D(r)},j=b;j.l=M,j.i=w,j.w=function(t,a){return x(t,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var D=function(){function g(t){this.$L=M(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[k]=true}var p=g.prototype;return p.parse=function(t){this.$d=function(t){var a=t.date,r=t.utc;if(null===a)return new Date(NaN);if(j.u(a))return new Date;if(a instanceof Date)return new Date(a);if("string"==typeof a&&!/Z$/i.test(a)){var i=a.match(f);if(i){var e=i[2]-1||0,n=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}}return new Date(a)}(t),this.init()},p.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},p.$utils=function(){return j},p.isValid=function(){return!(this.$d.toString()===l)},p.isSame=function(t,a){var r=x(t);return this.startOf(a)<=r&&r<=this.endOf(a)},p.isAfter=function(t,a){return x(t)<this.startOf(a)},p.isBefore=function(t,a){return this.endOf(a)<x(t)},p.$g=function(t,a,r){return j.u(t)?this[a]:this.set(r,t)},p.unix=function(){return Math.floor(this.valueOf()/1e3)},p.valueOf=function(){return this.$d.getTime()},p.startOf=function(t,a){var r=this,i=!!j.u(a)||a,m=j.p(t),l=function(t,a){var e=j.w(r.$u?Date.UTC(r.$y,a,t):new Date(r.$y,a,t),r);return i?e:e.endOf(s)},f=function(t,a){return j.w(r.toDate()[t].apply(r.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(a)),r)},v=this.$W,g=this.$M,p=this.$D,b="set"+(this.$u?"UTC":"");switch(m){case d:return i?l(1,0):l(31,11);case u:return i?l(1,g):l(0,g+1);case c:var y=this.$locale().weekStart||0,$=(v<y?v+7:v)-y;return l(i?p-$:p+(6-$),g);case s:case h:return f(b+"Hours",0);case o:return f(b+"Minutes",1);case n:return f(b+"Seconds",2);case e:return f(b+"Milliseconds",3);default:return this.clone()}},p.endOf=function(t){return this.startOf(t,false)},p.$set=function(t,a){var r,c=j.p(t),m="set"+(this.$u?"UTC":""),l=(r={},r[s]=m+"Date",r[h]=m+"Date",r[u]=m+"Month",r[d]=m+"FullYear",r[o]=m+"Hours",r[n]=m+"Minutes",r[e]=m+"Seconds",r[i]=m+"Milliseconds",r)[c],f=c===s?this.$D+(a-this.$W):a;if(c===u||c===d){var v=this.clone().set(h,1);v.$d[l](f),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else l&&this.$d[l](f);return this.init(),this},p.set=function(t,a){return this.clone().$set(t,a)},p.get=function(t){return this[j.p(t)]()},p.add=function(i,m){var h,l=this;i=Number(i);var f=j.p(m),v=function(t){var a=x(l);return j.w(a.date(a.date()+Math.round(t*i)),l)};if(f===u)return this.set(u,this.$M+i);if(f===d)return this.set(d,this.$y+i);if(f===s)return v(1);if(f===c)return v(7);var g=(h={},h[n]=a,h[o]=r,h[e]=t,h)[f]||1,p=this.$d.getTime()+i*g;return j.w(p,this)},p.subtract=function(t,a){return this.add(-1*t,a)},p.format=function(t){var a=this,r=this.$locale();if(!this.isValid())return r.invalidDate||l;var i=t||"YYYY-MM-DDTHH:mm:ssZ",e=j.z(this),n=this.$H,o=this.$m,s=this.$M,c=r.weekdays,u=r.months,m=r.meridiem,d=function(t,r,e,n){return t&&(t[r]||t(a,i))||e[r].slice(0,n)},h=function(t){return j.s(n%12||12,t,"0")},f=m||function(t,a,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(v,(function(t,i){return i||function(t){switch(t){case"YY":return String(a.$y).slice(-2);case"YYYY":return j.s(a.$y,4,"0");case"M":return s+1;case"MM":return j.s(s+1,2,"0");case"MMM":return d(r.monthsShort,s,u,3);case"MMMM":return d(u,s);case"D":return a.$D;case"DD":return j.s(a.$D,2,"0");case"d":return String(a.$W);case"dd":return d(r.weekdaysMin,a.$W,c,2);case"ddd":return d(r.weekdaysShort,a.$W,c,3);case"dddd":return c[a.$W];case"H":return String(n);case"HH":return j.s(n,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return f(n,o,true);case"A":return f(n,o,false);case"m":return String(o);case"mm":return j.s(o,2,"0");case"s":return String(a.$s);case"ss":return j.s(a.$s,2,"0");case"SSS":return j.s(a.$ms,3,"0");case"Z":return e}return null}(t)||e.replace(":","")}))},p.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},p.diff=function(i,h,l){var f,v=this,g=j.p(h),p=x(i),b=(p.utcOffset()-this.utcOffset())*a,y=this-p,$=function(){return j.m(v,p)};switch(g){case d:f=$()/12;break;case u:f=$();break;case m:f=$()/3;break;case c:f=(y-b)/6048e5;break;case s:f=(y-b)/864e5;break;case o:f=y/r;break;case n:f=y/a;break;case e:f=y/t;break;default:f=y}return l?f:j.a(f)},p.daysInMonth=function(){return this.endOf(u).$D},p.$locale=function(){return $[this.$L]},p.locale=function(t,a){if(!t)return this.$L;var r=this.clone(),i=M(t,a,true);return i&&(r.$L=i),r},p.clone=function(){return j.w(this.$d,this)},p.toDate=function(){return new Date(this.valueOf())},p.toJSON=function(){return this.isValid()?this.toISOString():null},p.toISOString=function(){return this.$d.toISOString()},p.toString=function(){return this.$d.toUTCString()},g}(),_=D.prototype;return x.prototype=_,[["$ms",i],["$s",e],["$m",n],["$H",o],["$W",s],["$M",u],["$y",d],["$D",h]].forEach((function(t){_[t[1]]=function(a){return this.$g(a,t[0],t[1])}})),x.extend=function(t,a){return t.$i||(t(a,D,x),t.$i=true),x},x.locale=M,x.isDayjs=w,x.unix=function(t){return x(1e3*t)},x.en=$[y],x.Ls=$,x.p={},x}))})(dayjs_min$1);return dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();var dayjs=getDefaultExportFromCjs(dayjs_minExports);var dismiss$3="Κλείσιμο";var future$3="σε %s";var past$3="πριν από %s";var s$3="λίγα δευτ.";var m$3="1 λεπτό";var mm$3="%d λεπτά";var h$3="1 ώρα";var hh$3="%d ώρες";var d$3="1 ημέρα";var dd$3="%d ημέρες";var M$3="1 μήνας";var MM$3="%d μήνες";var y$3="1 έτος";var yy$3="%d έτη";var localeEl={dismiss:dismiss$3,future:future$3,past:past$3,s:s$3,m:m$3,mm:mm$3,h:h$3,hh:hh$3,d:d$3,dd:dd$3,M:M$3,MM:MM$3,y:y$3,yy:yy$3};var dismiss$2="Close";var future$2="in %s";var past$2="%s ago";var s$2="few sec";var m$2="1 min";var mm$2="%d mins";var h$2="1 hour";var hh$2="%d hours";var d$2="1 day";var dd$2="%d days";var M$2="1 month";var MM$2="%d months";var y$2="1 year";var yy$2="%d years";var localeEn={dismiss:dismiss$2,future:future$2,past:past$2,s:s$2,m:m$2,mm:mm$2,h:h$2,hh:hh$2,d:d$2,dd:dd$2,M:M$2,MM:MM$2,y:y$2,yy:yy$2};var dismiss$1="Cerrar";var future$1="en %s";var past$1="hace %s";var s$1="pocos seg";var m$1="1 min";var mm$1="%d mins";var h$1="1 hora";var hh$1="%d horas";var d$1="1 día";var dd$1="%d días";var M$1="1 mes";var MM$1="%d meses";var y$1="1 año";var yy$1="%d años";var localeEs={dismiss:dismiss$1,future:future$1,past:past$1,s:s$1,m:m$1,mm:mm$1,h:h$1,hh:hh$1,d:d$1,dd:dd$1,M:M$1,MM:MM$1,y:y$1,yy:yy$1};var dismiss="Chiudi";var future="tra %s";var past="%s fa";var s="pochi sec";var m="1 min";var mm="%d min";var h="1 ora";var hh="%d ore";var d="1 giorno";var dd="%d giorni";var M="1 mese";var MM="%d mesi";var y="1 anno";var yy="%d anni";var localeIt={dismiss:dismiss,future:future,past:past,s:s,m:m,mm:mm,h:h,hh:hh,d:d,dd:dd,M:M,MM:MM,y:y,yy:yy};var relativeTime$2={exports:{}};var relativeTime$1=relativeTime$2.exports;var hasRequiredRelativeTime;function requireRelativeTime(){if(hasRequiredRelativeTime)return relativeTime$2.exports;hasRequiredRelativeTime=1;(function(t,a){!function(a,r){t.exports=r()}(relativeTime$1,(function(){return function(t,a,r){t=t||{};var i=a.prototype,e={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function n(t,a,r,e){return i.fromToBase(t,a,r,e)}r.en.relativeTime=e,i.fromToBase=function(a,i,n,o,s){for(var c,u,m,d=n.$locale().relativeTime||e,h=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=h.length,f=0;f<l;f+=1){var v=h[f];v.d&&(c=o?r(a).diff(n,v.d,true):n.diff(a,v.d,true));var g=(t.rounding||Math.round)(Math.abs(c));if(m=c>0,g<=v.r||!v.r){g<=1&&f>0&&(v=h[f-1]);var p=d[v.l];s&&(g=s(""+g)),u="string"==typeof p?p.replace("%d",g):p(g,i,v.l,m);break}}if(i)return u;var b=m?d.future:d.past;return"function"==typeof b?b(u):b.replace("%s",u)},i.to=function(t,a){return n(t,a,this,true)},i.from=function(t,a){return n(t,a,this)};var o=function(t){return t.$u?r.utc():r()};i.toNow=function(t){return this.to(o(this),t)},i.fromNow=function(t){return this.from(o(this),t)}}}))})(relativeTime$2);return relativeTime$2.exports}var relativeTimeExports=requireRelativeTime();var relativeTime=getDefaultExportFromCjs(relativeTimeExports);var mdsPushNotificationItemCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-button,mds-img,mds-text):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-push-notification-item-duration:var(--duration-300,.3s);--private-push-notification-item-duration:var(--mds-push-notification-item-duration,var(--duration-300,.3s));--mds-push-notification-item-icon-background-color:#0000;--mds-push-notification-item-icon-color:rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99)));--mds-push-notification-item-message-line-clamp:2;--mds-push-notification-item-shadow:var(--shadow-sm-sharp,0 0 1px 1px #0000000f,0 1px 3px 0 #0000001a);--mds-push-notification-item-subject-line-clamp:1;--mds-push-notification-item-timing-function:var(--ease-in-out-quint,cubic-bezier(.86,0,.07,1));background-color:rgb(var(--magma-surface-overlay,var(--surface-neutral-overlay,255 255 255)));border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));box-shadow:var(--mds-push-notification-item-shadow);color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));corner-shape:var(--magma-corner-shape,squircle);align-items:flex-start;display:flex;gap:calc(var(--spacing,.0025rem)*400);max-width:calc(var(--spacing,.0025rem)*8000);min-width:calc(var(--spacing,.0025rem)*7200);padding:calc(var(--spacing,.0025rem)*400);pointer-events:auto;position:relative;transition-duration:var(--private-push-notification-item-duration);transition-property:background-color,box-shadow,color,margin,transform;transition-timing-function:var(--mds-push-notification-item-timing-function)}:host([deletable]:not([deletable=false])),:host([dismissible]:not([dismissible=false])){padding-right:calc(var(--spacing,.0025rem)*800)}.content{display:grid;flex-grow:1}.actions{display:flex;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*200);min-width:1px;padding-top:calc(var(--spacing,.0025rem)*200)}.actions--hidden,.badge--hidden{display:none}.avatar,.picture{flex-shrink:0}.picture{border-radius:var(--magma-radius-3xs,var(--radius-squircle-3xs,6px));box-shadow:var(--shadow-sm-sharp,0 0 1px 1px #0000000f,0 1px 3px 0 #0000001a);corner-shape:var(--magma-corner-shape,squircle);max-width:calc(var(--spacing,.0025rem)*1200);width:100%}.close-button{opacity:0;padding:calc(var(--spacing,.0025rem)*150);position:absolute;right:0;top:0;transition-duration:var(--default-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,rotate,scale,transform,translate,width;transition-timing-function:var(--default-transition-timing-function)}:host(:hover) .close-button{opacity:1}.close-button:focus-visible,.close-button:hover{fill:rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73)));opacity:1}.header{align-items:baseline;display:flex;gap:calc(var(--spacing,.0025rem)*100);justify-content:space-between;min-width:0;overflow:hidden;text-overflow:ellipsis}.infos{display:flex;flex-direction:column}.time{flex-shrink:0;margin-right:calc(var(--spacing,.0025rem)*100);white-space:nowrap}.subject{--mds-text-line-clamp:var(--mds-push-notification-item-subject-line-clamp,1);line-height:var(--leading-sm,1.25rem)}.message,.subject{text-overflow:ellipsis}.message{--mds-text-line-clamp:var(--mds-push-notification-item-message-line-clamp,2)}.avatar{background-color:var(--mds-push-notification-item-icon-background-color,#0000);border-radius:var(--magma-radius-full,var(--radius-full,1000px));fill:var(--mds-push-notification-item-icon-color,rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99))));height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.avatar::part(svg){width:calc(var(--spacing,.0025rem)*600)}:host([src]) .avatar{background-color:#0000}:host([icon]) .avatar::part(wrapper){padding:calc(var(--spacing,.0025rem)*150)}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-push-notification-item-duration:0s}:host([pref-contrast=more]){--mds-push-notification-item-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)) inset;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}:host([variant=primary][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)));--mds-push-notification-item-icon-color:rgb(var(--magma-accent-surface-subtle,var(--variant-primary-10,236 237 240)))}:host([variant=primary]),:host([variant=primary][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-accent-surface,var(--variant-primary-09,220 224 231)));--mds-push-notification-item-icon-color:rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204)))}:host([variant=orange][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orange-05,213 90 5));--mds-push-notification-item-icon-color:rgb(var(--label-orange-10,254 233 219))}:host([variant=orange]),:host([variant=orange][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orange-09,253 217 191));--mds-push-notification-item-icon-color:rgb(var(--label-orange-05,213 90 5))}:host([variant=amaranth][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-amaranth-05,242 37 72));--mds-push-notification-item-icon-color:rgb(var(--label-amaranth-10,254 232 236))}:host([variant=amaranth]),:host([variant=amaranth][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-amaranth-09,253 214 221));--mds-push-notification-item-icon-color:rgb(var(--label-amaranth-05,242 37 72))}:host([variant=orchid][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orchid-05,233 44 137));--mds-push-notification-item-icon-color:rgb(var(--label-orchid-10,253 231 242))}:host([variant=orchid]),:host([variant=orchid][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-orchid-09,251 213 232));--mds-push-notification-item-icon-color:rgb(var(--label-orchid-05,233 44 137))}:host([variant=purple][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-purple-05,168 86 247));--mds-push-notification-item-icon-color:rgb(var(--label-purple-10,244 233 254))}:host([variant=purple]),:host([variant=purple][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-purple-09,235 216 253));--mds-push-notification-item-icon-color:rgb(var(--label-purple-05,168 86 247))}:host([variant=red][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-red-05,230 66 66));--mds-push-notification-item-icon-color:rgb(var(--label-red-10,252 233 233))}:host([variant=red]),:host([variant=red][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-red-09,250 215 215));--mds-push-notification-item-icon-color:rgb(var(--label-red-05,230 66 66))}:host([variant=violet][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-violet-05,145 100 246));--mds-push-notification-item-icon-color:rgb(var(--label-violet-10,240 234 254))}:host([variant=violet]),:host([variant=violet][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-violet-09,229 218 253));--mds-push-notification-item-icon-color:rgb(var(--label-violet-05,145 100 246))}:host([variant=blue][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-blue-05,90 117 249));--mds-push-notification-item-icon-color:rgb(var(--label-blue-10,233 236 254))}:host([variant=blue]),:host([variant=blue][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-blue-09,216 222 254));--mds-push-notification-item-icon-color:rgb(var(--label-blue-05,90 117 249))}:host([variant=sky][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-sky-05,12 136 193));--mds-push-notification-item-icon-color:rgb(var(--label-sky-10,217 241 253))}:host([variant=sky]),:host([variant=sky][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-sky-09,185 231 251));--mds-push-notification-item-icon-color:rgb(var(--label-sky-05,12 136 193))}:host([variant=aqua][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-aqua-05,5 141 165));--mds-push-notification-item-icon-color:rgb(var(--label-aqua-10,199 245 253))}:host([variant=aqua]),:host([variant=aqua][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-aqua-09,151 237 252));--mds-push-notification-item-icon-color:rgb(var(--label-aqua-05,5 141 165))}:host([variant=green][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-green-05,26 148 71));--mds-push-notification-item-icon-color:rgb(var(--label-green-10,206 247 221))}:host([variant=green]),:host([variant=green][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-green-09,165 240 193));--mds-push-notification-item-icon-color:rgb(var(--label-green-05,26 148 71))}:host([variant=lime][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-lime-05,93 143 15));--mds-push-notification-item-icon-color:rgb(var(--label-lime-10,219 247 178))}:host([variant=lime]),:host([variant=lime][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-lime-09,189 239 111));--mds-push-notification-item-icon-color:rgb(var(--label-lime-05,93 143 15))}:host([variant=yellow][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--label-yellow-05,161 124 6));--mds-push-notification-item-icon-color:rgb(var(--label-yellow-10,253 236 186))}:host([variant=yellow]),:host([variant=yellow][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--label-yellow-09,251 221 131));--mds-push-notification-item-icon-color:rgb(var(--label-yellow-05,161 124 6))}:host([variant=error][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-push-notification-item-icon-color:rgb(var(--magma-danger-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=error]),:host([variant=error][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-push-notification-item-icon-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=warning][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-push-notification-item-icon-color:rgb(var(--magma-warning-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=warning]),:host([variant=warning][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-push-notification-item-icon-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=success][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-push-notification-item-icon-color:rgb(var(--magma-success-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=success]),:host([variant=success][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-push-notification-item-icon-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=info][tone=strong]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-push-notification-item-icon-color:rgb(var(--magma-info-on-emphasis,var(--tone-neutral-seed,255 255 255)))}:host([variant=info]),:host([variant=info][tone=weak]){--mds-push-notification-item-icon-background-color:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-push-notification-item-icon-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-push-notification-item-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-push-notification-item-shadow:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6)) inset;color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))}}"};var MdsPushNotificationItem=/** @class */function(){function t(t){var a=this;registerInstance(this,t);this.closedEvent=createEvent(this,"mdsPushNotificationItemClose",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});
2
2
  /**
3
3
  * Specifies how the notification date is written: `timeago` shows the time passed, any other
4
4
  * value is the Day.js format of a static date
5
5
  * @example 'DD/MM/YYYY HH:mm'
6
6
  */this.dateFormat="timeago";
7
7
  /**
8
- * Specifies if the component is dismissable; when set, a dismiss button is shown.
8
+ * Shows the dismiss button, as `dismissible` does.
9
+ * @deprecated Use `dismissible`: the button dismisses the notification, it deletes nothing.
10
+ * Goes in the next major.
9
11
  */this.deletable=false;
10
12
  /**
11
13
  * Specifies the message of the component
@@ -17,4 +19,6 @@ import{r as registerInstance,d as createEvent,h as h$4,e as Host,g as getElement
17
19
  * Specifies the color tone of the component
18
20
  */this.tone="weak";this.onClickClose=function(t){t.stopPropagation();
19
21
  // the detail the event declares: it was emitted empty
20
- a.closedEvent.emit({id:a.host.id})};this.onSlotChange=function(){a.hasActions=hasChildWithSlot(a.host,"action");a.hasBadge=hasChildWithSlot(a.host,"badge")}}t.prototype.componentDidLoad=function(){this.handleDeletableChange(this.deletable)};t.prototype.componentWillLoad=function(){var t;dayjs.extend(relativeTime);this.onSlotChange();if(this.datetime!==undefined&&this.datetime!==""){this.datetime=(t=sanitizeISO8601Date(this.datetime.toString()))!==null&&t!==void 0?t:undefined}var a={future:this.t.get("future"),past:this.t.get("past"),s:this.t.get("s"),m:this.t.get("m"),mm:this.t.get("mm"),h:this.t.get("h"),hh:this.t.get("hh"),d:this.t.get("d"),dd:this.t.get("dd"),M:this.t.get("M"),MM:this.t.get("MM"),y:this.t.get("y"),yy:this.t.get("yy")};dayjs.locale("custom-locale",{relativeTime:a})};t.prototype.handleDeletableChange=function(t){if(t===false){this.deletable=undefined}};t.prototype.render=function(){var t;return h$4(Host,{key:"ea0f478fc8c11382bc9ec24d8f2ef74ae11bd73e","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},((t=this.icon)!==null&&t!==void 0?t:this.preview==="avatar")&&h$4("mds-avatar",{key:"4b2a4fb57a5206608994bf32500a8c73a02ff552",class:"avatar",icon:this.icon,initials:this.initials,part:"avatar",src:this.src,tone:this.tone,variant:this.variant}),this.src&&this.preview!=="avatar"&&h$4("mds-img",{key:"ef82c179702cc9fb5bd5a760fa6c2189bbff7a1d",class:"picture",part:"picture",src:this.src}),h$4("div",{key:"bd10e7bf12d5d505bcbefa22861b7d42b18f947c",class:"content",part:"content"},h$4("div",{key:"d5efa0dd1b57b312d50c8157042fb18e2641f37c",class:"header"},h$4("div",{key:"7f5b3840d188a60dae6f3c04953b3bfa297de2c6",class:"infos"},h$4("div",{key:"cf78827fc08c8781316a8aef3625968ea661cc2d",class:clsx("badge",!this.hasBadge&&"badge--hidden")},h$4("slot",{key:"f5d4a3ae95d8d6fa98db6256885fc667854893ae",name:"badge",onSlotchange:this.onSlotChange})),this.subject&&h$4("mds-text",{key:"e646263fe6413d6ffcfdbbb17289b08e4cc248c1",class:"subject",typography:"h6",variant:"title",truncate:"all"},this.subject)),this.datetime&&h$4("mds-text",{key:"1770b775bfe26a7dfbcff553ff54c3c8d3754856",class:"time",typography:"option"},this.dateFormat==="timeago"?dayjs(this.datetime).fromNow():dayjs(this.datetime).format(this.dateFormat))),h$4("mds-text",{key:"644471525c4110307b394f7977a9e69bb7bd9d03",class:"message",truncate:"all",typography:"caption",variant:"info"},this.message),h$4("div",{key:"524b9ec325028f435d52f0936e36121ec0226583",class:clsx("actions",!this.hasActions&&"actions--hidden"),part:"actions"},h$4("slot",{key:"08607576a386ce00442c81b9bba220df8e39d457",name:"action",onSlotchange:this.onSlotChange}))),this.deletable&&h$4("mds-button",{key:"51553fbf31d28e60bdd81472ba17af853372fe79",class:"close-button",variant:"dark",tone:"text",title:this.t.get("dismiss"),icon:miBaselineCancel,onClick:this.onClickClose}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{deletable:[{handleDeletableChange:0}]}},enumerable:false,configurable:true});return t}();MdsPushNotificationItem.style=mdsPushNotificationItemCss();export{MdsPushNotificationItem as mds_push_notification_item};
22
+ a.closedEvent.emit({id:a.host.id})};this.isDismissible=function(){return a.dismissible===true||a.deletable===true};this.onSlotChange=function(){a.hasActions=hasChildWithSlot(a.host,"action");a.hasBadge=hasChildWithSlot(a.host,"badge")}}t.prototype.componentDidLoad=function(){this.handleDismissibleChange(this.dismissible);this.handleDeletableChange(this.deletable)};t.prototype.componentWillLoad=function(){var t;dayjs.extend(relativeTime);this.onSlotChange();if(this.datetime!==undefined&&this.datetime!==""){this.datetime=(t=sanitizeISO8601Date(this.datetime.toString()))!==null&&t!==void 0?t:undefined}var a={future:this.t.get("future"),past:this.t.get("past"),s:this.t.get("s"),m:this.t.get("m"),mm:this.t.get("mm"),h:this.t.get("h"),hh:this.t.get("hh"),d:this.t.get("d"),dd:this.t.get("dd"),M:this.t.get("M"),MM:this.t.get("MM"),y:this.t.get("y"),yy:this.t.get("yy")};dayjs.locale("custom-locale",{relativeTime:a})};
23
+ // a false boolean is an absent attribute: `dismissible="false"` leaves the host once loaded
24
+ t.prototype.handleDismissibleChange=function(t){if(t===false){this.dismissible=undefined}};t.prototype.handleDeletableChange=function(t){if(t===false){this.deletable=undefined}};t.prototype.render=function(){var t;return h$4(Host,{key:"aaf48c85945480a2a5cefe2fc114d546b40d0897","pref-animation":preferenceStore.state.animation,"pref-contrast":preferenceStore.state.contrast,"pref-mode":preferenceStore.state.mode,"pref-theme-scheme":preferenceStore.state["theme-scheme"]},((t=this.icon)!==null&&t!==void 0?t:this.preview==="avatar")&&h$4("mds-avatar",{key:"f180749e154e9f89f66a0f96f3863fb3118d137e",class:"avatar",icon:this.icon,initials:this.initials,part:"avatar",src:this.src,tone:this.tone,variant:this.variant}),this.src&&this.preview!=="avatar"&&h$4("mds-img",{key:"a0e4feeaac5b4f1cbce24364fbe9b2a22702881a",class:"picture",part:"picture",src:this.src}),h$4("div",{key:"4a3b26dfc42c9de31757b5e9106d205002962282",class:"content",part:"content"},h$4("div",{key:"ddada3cea2bf2d42ace0abe8a5a2de034513b3a8",class:"header"},h$4("div",{key:"7035d2e270443166b3e78ccc41c540acaeadf587",class:"infos"},h$4("div",{key:"6a403603db28998a16d0234f357fc5d4365e395a",class:clsx("badge",!this.hasBadge&&"badge--hidden")},h$4("slot",{key:"dfd6f7aaee176fa23af69056feb65d2b254d5fac",name:"badge",onSlotchange:this.onSlotChange})),this.subject&&h$4("mds-text",{key:"b82737efc27ae0abb6e0ffa67f4dfd94b223fedd",class:"subject",typography:"h6",variant:"title",truncate:"all"},this.subject)),this.datetime&&h$4("mds-text",{key:"6118eb055881ac883e845fb9c7923ac5a115bc8b",class:"time",typography:"option"},this.dateFormat==="timeago"?dayjs(this.datetime).fromNow():dayjs(this.datetime).format(this.dateFormat))),h$4("mds-text",{key:"d25beeb3d0e8342d2154fd5d3161b61d5445ba32",class:"message",truncate:"all",typography:"caption",variant:"info"},this.message),h$4("div",{key:"bb064523c4539d63cf094db5c7099d8d3ad8ca87",class:clsx("actions",!this.hasActions&&"actions--hidden"),part:"actions"},h$4("slot",{key:"8aed1479928b60b81a8973a8b2dd07f2f57f4450",name:"action",onSlotchange:this.onSlotChange}))),this.isDismissible()&&h$4("mds-button",{key:"1f669d8c40d48add6f3013fd0ff3a59d198ae727",class:"close-button",variant:"dark",tone:"text",title:this.t.get("dismiss"),icon:miBaselineCancel,onClick:this.onClickClose}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{dismissible:[{handleDismissibleChange:0}],deletable:[{handleDeletableChange:0}]}},enumerable:false,configurable:true});return t}();MdsPushNotificationItem.style=mdsPushNotificationItemCss();export{MdsPushNotificationItem as mds_push_notification_item};
@@ -6,7 +6,7 @@ this.closeReason="hide";this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,i
6
6
  // inside an mds-toast-region, which places the toast and announces it
7
7
  this.stacked=false;
8
8
  /**
9
- * If set, specifies the visibility duration in milliseconds of the element inside the viewport, when the time is up the visible property will be set to false. The countdown waits while the pointer is over the toast or the focus is inside it. If the duration is set to 0 the toast stays until it is hidden: give it `deletable` so the person can hide it too.
9
+ * If set, specifies the visibility duration in milliseconds of the element inside the viewport, when the time is up the visible property will be set to false. The countdown waits while the pointer is over the toast or the focus is inside it. If the duration is set to 0 the toast stays until it is hidden: give it `dismissible` so the person can hide it too.
10
10
  */this.duration=5e3;
11
11
  /**
12
12
  * Sets the theme variant colours
@@ -51,4 +51,4 @@ window.clearTimeout(this.closeTimer);this.closeTimer=undefined;return}if(!a){ret
51
51
  // focus. The host is the region and stays in the page, so the content that appears inside
52
52
  // it is what a screen reader reads out. Inside an mds-toast-region the region is the live
53
53
  // region, already in the page before any toast: a toast of its own would nest a second one
54
- return h(Host,{key:"78794225496c25083d6c1118325436bd6f78f920",role:this.stacked?undefined:"status",stacked:this.stacked,"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:"e145d6042004ece44479227bda7b71af55231e69",class:clsx("dialog",this.position&&"to-".concat(this.position),this.visible&&"dialog--visible"),onFocusin:this.onFocusIn,onFocusout:this.onFocusOut,onPointerEnter:this.onPointerEnter,onPointerLeave:this.onPointerLeave},h("slot",{key:"ea4143e5d1fa9098ac2b3924a65ab18e78344a21",name:"icon"}),this.hasText&&h("mds-text",{key:"e5ccbb014439671bedc2cd9af71b82934dbb6d04",typography:"caption"},h("slot",{key:"1d0a7c60aafce454fd5e9154a730e3232ac50c41"})),h("div",{key:"6d25fc9ce5d851c23737b92748735f29659ab585",class:clsx("actions",!this.hasActions&&"actions--hidden")},h("slot",{key:"d8c3eadbd31c8512e5e4b1e8ceb442321bd2cb3d",name:"action",onSlotchange:this.onActionSlotChange})),this.deletable&&h("mds-button",{key:"f879cd5d161aa01092d03a265a5d0ad8484c7f8d","aria-label":this.t.get("hide"),class:"hide",icon:((t=this.position)===null||t===void 0?void 0:t.startsWith("top"))?miBaselineArrowUpward:miBaselineArrowDownward,onClick:this.onCloseClick,size:"sm",tone:"text",type:"button",variant:this.closeButtonVariant()})))};Object.defineProperty(t.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{visible:[{visibleChanged:0}],duration:[{durationChanged:0}]}},enumerable:false,configurable:true});return t}();MdsToast.style=mdsToastCss();export{MdsToast as mds_toast};
54
+ return h(Host,{key:"5311d740bc8ea85044462a30d426b03c1ec62cf7",role:this.stacked?undefined:"status",stacked:this.stacked,"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:"fd1c6e5c0536804c36c9823c12d40927531aada3",class:clsx("dialog",this.position&&"to-".concat(this.position),this.visible&&"dialog--visible"),onFocusin:this.onFocusIn,onFocusout:this.onFocusOut,onPointerEnter:this.onPointerEnter,onPointerLeave:this.onPointerLeave},h("slot",{key:"f55e05ae884d631e4711204aacd3d1ffed71089a",name:"icon"}),this.hasText&&h("mds-text",{key:"efbb5965154a3a95bed0405f2fa0a4251154c1e2",typography:"caption"},h("slot",{key:"c5ca29ca96e8292a530f0837b59eaac856b60a76"})),h("div",{key:"225e12ba896919744898d62988ba9c32bfabf032",class:clsx("actions",!this.hasActions&&"actions--hidden")},h("slot",{key:"bbe444eabf9c5abb9422e23b6f6ba9699d2ad241",name:"action",onSlotchange:this.onActionSlotChange})),(this.dismissible||this.deletable)&&h("mds-button",{key:"17b77af297b6ac009564422003bc78b34557bf2a","aria-label":this.t.get("hide"),class:"hide",icon:((t=this.position)===null||t===void 0?void 0:t.startsWith("top"))?miBaselineArrowUpward:miBaselineArrowDownward,onClick:this.onCloseClick,size:"sm",tone:"text",type:"button",variant:this.closeButtonVariant()})))};Object.defineProperty(t.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{visible:[{visibleChanged:0}],duration:[{durationChanged:0}]}},enumerable:false,configurable:true});return t}();MdsToast.style=mdsToastCss();export{MdsToast as mds_toast};