@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(e,r,a,t){function n(e){return e instanceof a?e:new a((function(r){r(e)}))}return new(a||(a=Promise))((function(a,i){function l(e){try{s(t.next(e))}catch(e){i(e)}}function o(e){try{s(t["throw"](e))}catch(e){i(e)}}function s(e){e.done?a(e.value):n(e.value).then(l,o)}s((t=t.apply(e,r||[])).next())}))};var __generator=this&&this.__generator||function(e,r){var a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=o(0),l["throw"]=o(1),l["return"]=o(2),typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(r){return s([e,r])}}function s(o){if(t)throw new TypeError("Generator is already executing.");while(l&&(l=0,o[0]&&(a=0)),a)try{if(t=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:a.label++;return{value:o[1],done:false};case 5:a.label++;n=o[1];o=[0];continue;case 7:o=a.ops.pop();a.trys.pop();continue;default:if(!(i=a.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){a=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(o[0]===6&&a.label<i[1]){a.label=i[1];i=o;break}if(i&&a.label<i[2]){a.label=i[2];a.ops.push(o);break}if(i[2])a.ops.pop();a.trys.pop();continue}o=r.call(e,a)}catch(e){o=[6,e];n=0}finally{t=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[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{D as DateTime}from"./luxon-DbyXf6dF.js";import{p as preferenceStore}from"./preference-C5XjgGCb.js";import{s as sanitizeISO8601Date}from"./date-CACEYk42.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";var miBaselineForwardIos='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M6.23 20.23L8 22l10-10L8 2L6.23 3.77L14.46 12z"/></svg>';var miBaselineBackIosNew='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.77 3.77L16 2L6 12l10 10l1.77-1.77L9.54 12z"/></svg>';var nextMonth$3="Επόμενος μήνας";var nextYears$3="Επόμενα έτη";var previousMonth$3="Προηγούμενος μήνας";var previousYears$3="Προηγούμενα έτη";var localeEl={nextMonth:nextMonth$3,nextYears:nextYears$3,previousMonth:previousMonth$3,previousYears:previousYears$3};var nextMonth$2="Next month";var nextYears$2="Next years";var previousMonth$2="Previous month";var previousYears$2="Previous years";var localeEn={nextMonth:nextMonth$2,nextYears:nextYears$2,previousMonth:previousMonth$2,previousYears:previousYears$2};var nextMonth$1="Mes siguiente";var nextYears$1="Años siguientes";var previousMonth$1="Mes anterior";var previousYears$1="Años anteriores";var localeEs={nextMonth:nextMonth$1,nextYears:nextYears$1,previousMonth:previousMonth$1,previousYears:previousYears$1};var nextMonth="Mese successivo";var nextYears="Anni successivi";var previousMonth="Mese precedente";var previousYears="Anni precedenti";var localeIt={nextMonth:nextMonth,nextYears:nextYears,previousMonth:previousMonth,previousYears:previousYears};var mdsCalendarCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar-cell):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-calendar-day-number-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));--mds-calendar-cell-gap:calc(var(--spacing,.0025rem)*50);--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));--mds-calendar-background:rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248)));--mds-calendar-padding:calc(var(--spacing,.0025rem)*400);--mds-calendar-select-month-or-year-height:calc(var(--spacing,.0025rem)*900);--mds-calendar-select-month-or-year-width:calc(var(--spacing,.0025rem)*5600);--mds-calendar-max-width:calc(var(--spacing,.0025rem)*12000);background-color:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));border-radius:var(--mds-calendar-border-radius,var(--magma-radius-lg,var(--radius-squircle-lg,28px)));corner-shape:var(--magma-corner-shape,squircle);cursor:auto;display:inline-flex;inline-size:100%;max-width:var(--mds-calendar-max-width,calc(var(--spacing,.0025rem)*12000));min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background,rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248))));border-radius:inherit;box-sizing:border-box;corner-shape:inherit;display:grid;flex:auto;width:100%}.calendar-preselection,.calendar-view{padding:var(--mds-calendar-padding,calc(var(--spacing,.0025rem)*400))}.calendar-preselection{display:none;gap:calc(var(--spacing,.0025rem)*50);grid-auto-rows:min-content}.calendar-preselection--has-preselection{display:grid}nav{display:flex;gap:calc(var(--spacing,.0025rem)*200);justify-content:space-between;min-width:0}.action{justify-content:left;min-width:min-content;padding-left:calc(var(--spacing,.0025rem)*200);padding-right:calc(var(--spacing,.0025rem)*200)}.action-back,.action-forward{flex-shrink:0}.select-month-or-year{background-color:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));block-size:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));border-radius:min(var(--mds-calendar-border-radius,var(--magma-radius-lg,var(--radius-squircle-lg,28px))),var(--magma-corner-cap,.5) * var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900)));box-sizing:border-box;corner-shape:var(--magma-corner-shape,squircle);align-items:stretch;display:flex;flex:0 0 var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));height:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));inline-size:var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));justify-content:flex-start;max-block-size:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));max-height:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));max-inline-size:var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));min-block-size:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));min-height:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));min-inline-size:var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));overflow:hidden}.action-month,.action-year{--mds-button-radius:0;align-self:stretch;block-size:100%;box-sizing:border-box;cursor:default;height:100%;max-block-size:100%;max-height:100%;min-block-size:0;min-height:0;padding-left:calc(var(--spacing,.0025rem)*200);padding-right:calc(var(--spacing,.0025rem)*200)}.action-month{flex:auto;min-width:0}.action-year{flex:0 0 calc(var(--spacing,.0025rem)*1800)}.action-month::part(label),.action-year::part(label){overflow:visible;text-overflow:clip;white-space:nowrap}.week-day-name{align-items:center;block-size:calc(var(--spacing,.0025rem)*1200);inline-size:100%;min-height:auto;padding:0}.month-view__cells,.month-view__days-names{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(7,minmax(1px,100%));min-width:0}.month-view{display:grid}.month-view__month-names,.month-view__years{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(3,minmax(1px,100%));min-width:0}"};var MdsCalendar=/** @class */function(){function e(e){var r=this;registerInstance(this,e);this.datesEmitter=createEvent(this,"mdsCalendarChange",7);this.navigationEmitter=createEvent(this,"mdsCalendarNavigate",7);this.hoverEmitter=createEvent(this,"mdsCalendarHover",7);this.checkPreselectionsEmitter=createEvent(this,"mdsCalendarPreselect",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});this.hasPreselection=false;this.currentDate=DateTime.now();this.weekDaysinMonth=[];this.weekdays=[];this.startDateIdentifier=null;this.endDateIdentifier=null;this.isFirstClick=true;this.currentView="calendar";this.selectedYear=this.currentDate.year;
1
+ var __awaiter=this&&this.__awaiter||function(e,a,r,t){function n(e){return e instanceof r?e:new r((function(a){a(e)}))}return new(r||(r=Promise))((function(r,i){function l(e){try{s(t.next(e))}catch(e){i(e)}}function o(e){try{s(t["throw"](e))}catch(e){i(e)}}function s(e){e.done?r(e.value):n(e.value).then(l,o)}s((t=t.apply(e,a||[])).next())}))};var __generator=this&&this.__generator||function(e,a){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,n,i,l=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return l.next=o(0),l["throw"]=o(1),l["return"]=o(2),typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function o(e){return function(a){return s([e,a])}}function s(o){if(t)throw new TypeError("Generator is already executing.");while(l&&(l=0,o[0]&&(r=0)),r)try{if(t=1,n&&(i=o[0]&2?n["return"]:o[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;if(n=0,i)o=[o[0]&2,i.value];switch(o[0]){case 0:case 1:i=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;n=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!i||o[1]>i[0]&&o[1]<i[3])){r.label=o[1];break}if(o[0]===6&&r.label<i[1]){r.label=i[1];i=o;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(o);break}if(i[2])r.ops.pop();r.trys.pop();continue}o=a.call(e,r)}catch(e){o=[6,e];n=0}finally{t=i=0}if(o[0]&5)throw o[1];return{value:o[0]?o[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{D as DateTime}from"./luxon-DbyXf6dF.js";import{p as preferenceStore}from"./preference-C5XjgGCb.js";import{s as sanitizeISO8601Date}from"./date-CACEYk42.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";var miBaselineForwardIos='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M6.23 20.23L8 22l10-10L8 2L6.23 3.77L14.46 12z"/></svg>';var miBaselineBackIosNew='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M17.77 3.77L16 2L6 12l10 10l1.77-1.77L9.54 12z"/></svg>';var nextMonth$3="Επόμενος μήνας";var nextYears$3="Επόμενα έτη";var previousMonth$3="Προηγούμενος μήνας";var previousYears$3="Προηγούμενα έτη";var localeEl={nextMonth:nextMonth$3,nextYears:nextYears$3,previousMonth:previousMonth$3,previousYears:previousYears$3};var nextMonth$2="Next month";var nextYears$2="Next years";var previousMonth$2="Previous month";var previousYears$2="Previous years";var localeEn={nextMonth:nextMonth$2,nextYears:nextYears$2,previousMonth:previousMonth$2,previousYears:previousYears$2};var nextMonth$1="Mes siguiente";var nextYears$1="Años siguientes";var previousMonth$1="Mes anterior";var previousYears$1="Años anteriores";var localeEs={nextMonth:nextMonth$1,nextYears:nextYears$1,previousMonth:previousMonth$1,previousYears:previousYears$1};var nextMonth="Mese successivo";var nextYears="Anni successivi";var previousMonth="Mese precedente";var previousYears="Anni precedenti";var localeIt={nextMonth:nextMonth,nextYears:nextYears,previousMonth:previousMonth,previousYears:previousYears};var mdsCalendarCss=function(){return"@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar-cell):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-calendar-day-number-color:rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)));--mds-calendar-cell-gap:calc(var(--spacing,.0025rem)*50);--mds-calendar-cell-other-month-visibility:visible;--mds-calendar-border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));--mds-calendar-background:rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248)));--mds-calendar-padding:calc(var(--spacing,.0025rem)*400);--mds-calendar-select-month-or-year-height:calc(var(--spacing,.0025rem)*900);--mds-calendar-select-month-or-year-width:calc(var(--spacing,.0025rem)*5600);--mds-calendar-max-width:calc(var(--spacing,.0025rem)*12000);background-color:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));border-radius:var(--mds-calendar-border-radius,var(--magma-radius-lg,var(--radius-squircle-lg,28px)));corner-shape:var(--magma-corner-shape,squircle);cursor:auto;display:inline-flex;inline-size:100%;max-width:var(--mds-calendar-max-width,calc(var(--spacing,.0025rem)*12000));min-width:min-content;overflow:hidden}.calendar-view{background-color:var(--mds-calendar-background,rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248))));border-radius:inherit;box-sizing:border-box;corner-shape:inherit;display:grid;flex:auto;width:100%}.calendar-preselection,.calendar-view{padding:var(--mds-calendar-padding,calc(var(--spacing,.0025rem)*400))}.calendar-preselection{display:none;gap:calc(var(--spacing,.0025rem)*50);grid-auto-rows:min-content}.calendar-preselection--has-preselection{display:grid}nav{display:flex;gap:calc(var(--spacing,.0025rem)*200);justify-content:space-between;min-width:0}.action{justify-content:left;min-width:min-content;padding-left:calc(var(--spacing,.0025rem)*200);padding-right:calc(var(--spacing,.0025rem)*200)}.action-back,.action-forward{flex-shrink:0}.select-month-or-year{background-color:rgb(var(--magma-wash-base,var(--tone-neutral-09,225 225 225)));block-size:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));border-radius:min(var(--mds-calendar-border-radius,var(--magma-radius-lg,var(--radius-squircle-lg,28px))),var(--magma-corner-cap,.5) * var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900)));box-sizing:border-box;corner-shape:var(--magma-corner-shape,squircle);align-items:stretch;display:flex;flex:0 0 var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));height:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));inline-size:var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));justify-content:flex-start;max-block-size:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));max-height:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));max-inline-size:var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));min-block-size:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));min-height:var(--mds-calendar-select-month-or-year-height,calc(var(--spacing,.0025rem)*900));min-inline-size:var(--mds-calendar-select-month-or-year-width,calc(var(--spacing,.0025rem)*5600));overflow:hidden}.action-month,.action-year{--mds-button-radius:0;align-self:stretch;block-size:100%;box-sizing:border-box;cursor:default;height:100%;max-block-size:100%;max-height:100%;min-block-size:0;min-height:0;padding-left:calc(var(--spacing,.0025rem)*200);padding-right:calc(var(--spacing,.0025rem)*200)}.action-month{flex:auto;min-width:0}.action-year{flex:0 0 calc(var(--spacing,.0025rem)*1800)}.action-month::part(label),.action-year::part(label){overflow:visible;text-overflow:clip;white-space:nowrap}.week-day-name{align-items:center;block-size:calc(var(--spacing,.0025rem)*1200);inline-size:100%;min-height:auto;padding:0}.month-view__cells,.month-view__days-names{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(7,minmax(1px,100%));min-width:0}.month-view{display:grid}.month-view__month-names,.month-view__years{display:grid;gap:var(--mds-calendar-cell-gap);grid-template-columns:repeat(3,minmax(1px,100%));min-width:0}"};var MdsCalendar=/** @class */function(){function e(e){var a=this;registerInstance(this,e);this.datesEmitter=createEvent(this,"mdsCalendarChange",7);this.navigationEmitter=createEvent(this,"mdsCalendarNavigate",7);this.hoverEmitter=createEvent(this,"mdsCalendarHover",7);this.checkPreselectionsEmitter=createEvent(this,"mdsCalendarPreselect",7);this.t=new Locale({el:localeEl,en:localeEn,es:localeEs,it:localeIt});this.hasPreselection=false;this.currentDate=DateTime.now();this.weekDaysinMonth=[];this.weekdays=[];this.startDateIdentifier=null;this.endDateIdentifier=null;this.isFirstClick=true;this.currentView="calendar";this.selectedYear=this.currentDate.year;
2
2
  /**
3
3
  * If set, the component selects a single date instead of a date range (start and end date).
4
4
  */this.singlePicker=false;
@@ -51,29 +51,29 @@ var __awaiter=this&&this.__awaiter||function(e,r,a,t){function n(e){return e ins
51
51
  // The area shows what the preselection slot holds, added after load too. It used to wait for a
52
52
  // `date-preselection--has-preselection` marker class, looked up once on load (#826); the class
53
53
  // still shows it, for the pages written that way.
54
- this.updatePreselection=function(){r.hasPreselection=hasChildWithSlot(r.host,"preselection")||r.host.querySelector(".date-preselection--has-preselection")!==null};this.handleMouseOver=function(e){var a=e.target;if(!a.matches("mds-calendar-cell")||r.singlePicker||r.internalStartDate===null||r.internalStartDate===""||r.internalEndDate!==null&&r.internalEndDate!==""){return}var t=a.getAttribute("date");if(t!==null&&t!==""){if(t!==r.internalHoverDate){r.internalHoverDate=t;requestAnimationFrame((function(){return r.setDates()}))}r.hoverEmitter.emit({hoverDate:t})}};this.handleMouseLeave=function(){var e=r.internalHoverDate!==null;r.internalHoverDate=null;if(r.singlePicker||r.internalStartDate===null||r.internalStartDate===""||r.internalEndDate!==null&&r.internalEndDate!==""){return}if(e){requestAnimationFrame((function(){return r.setDates()}))}if(r.hoverDate!==null&&r.hoverDate!==""){r.hoverEmitter.emit({hoverDate:null})}};this.handleMonthActionClick=function(e){e.stopPropagation();if(r.disableMonthYearSelection){e.preventDefault();return}r.currentView=r.currentView==="months"?"calendar":"months";requestAnimationFrame((function(){r.updateCalendar().then((function(){return r.setDates()}))}))};this.handleYearActionClick=function(e){e.stopPropagation();if(r.disableMonthYearSelection){e.preventDefault();return}r.currentView=r.currentView==="years"?"calendar":"years";requestAnimationFrame((function(){r.updateCalendar().then((function(){return r.setDates()}))}))};this.handlePrev=function(e){if(r.currentView==="calendar"){e.stopPropagation();r.changeMonth(-1)}else if(r.currentView==="years"){e.stopPropagation();r.selectedYear-=10}else{e.stopPropagation()}};this.handleNext=function(e){if(r.currentView==="calendar"){e.stopPropagation();r.changeMonth(1)}else if(r.currentView==="years"){e.stopPropagation();r.selectedYear+=10}else{e.stopPropagation()}};this.handleCellClick=function(e){return function(a){a.stopPropagation();var t=a.currentTarget;if(r.singlePicker)r.handleSingleSelection(t,e);else r.handleRange(t,e)}};this.handleMonthSelect=function(e){return function(a){a.stopPropagation();r.currentDate=r.currentDate.set({month:e});r.currentMonth=r.currentDate.toFormat("MMMM");r.currentView="calendar";r.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}))}};this.handleYearSelect=function(e){return function(a){a.stopPropagation();r.currentDate=r.currentDate.set({year:e});r.currentYear=e.toString();r.currentView="calendar";r.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}))}}}e.prototype.handleStartDate=function(e){var r=this.parseDateProp(e,"start-date");if(r!==null){this.internalStartDate=r;this.startDateTime=DateTime.fromISO(r);this.startDateIdentifier=this.startDateTime.toISODate();if(this.internalEndDate!==null&&this.internalEndDate!==""){this.orderRange()}else if(!this.singlePicker){this.isFirstClick=false}this.updateDates()}else{this.internalStartDate=null;this.startDateIdentifier=null;this.startDateTime=null;this.isFirstClick=true;this.updateDates()}};e.prototype.handleEndDate=function(e){if(this.singlePicker){console.warn("singlePicker is enabled, endDate cannot be set");this.internalEndDate=null;return}var r=this.parseDateProp(e,"end-date");if(r!==null){this.internalEndDate=r;this.endDateTime=DateTime.fromISO(r);this.endDateIdentifier=this.endDateTime.toISODate();if(this.internalStartDate!==null&&this.internalStartDate!==""){this.orderRange()}this.updateDates()}else{this.internalEndDate=null;this.endDateIdentifier=null;this.endDateTime=null;this.updateDates()}};e.prototype.handleViewDate=function(e){var r=this;if(e!==null&&e!==""){var a=DateTime.fromISO(e.toString());if(a.isValid){this.currentDate=a;this.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}))}}};e.prototype.handleHoverDate=function(){var e=this;requestAnimationFrame((function(){return e.setDates()}))};
54
+ this.updatePreselection=function(){a.hasPreselection=hasChildWithSlot(a.host,"preselection")||a.host.querySelector(".date-preselection--has-preselection")!==null};this.handleMouseOver=function(e){var r=e.target;if(!r.matches("mds-calendar-cell")||a.singlePicker||a.internalStartDate===null||a.internalStartDate===""||a.internalEndDate!==null&&a.internalEndDate!==""){return}var t=r.getAttribute("date");if(t!==null&&t!==""){if(t!==a.internalHoverDate){a.internalHoverDate=t;requestAnimationFrame((function(){return a.setDates()}))}a.hoverEmitter.emit({hoverDate:t})}};this.handleMouseLeave=function(){var e=a.internalHoverDate!==null;a.internalHoverDate=null;if(a.singlePicker||a.internalStartDate===null||a.internalStartDate===""||a.internalEndDate!==null&&a.internalEndDate!==""){return}if(e){requestAnimationFrame((function(){return a.setDates()}))}if(a.hoverDate!==null&&a.hoverDate!==""){a.hoverEmitter.emit({hoverDate:null})}};this.handleMonthActionClick=function(e){e.stopPropagation();if(a.disableMonthYearSelection){e.preventDefault();return}a.currentView=a.currentView==="months"?"calendar":"months";requestAnimationFrame((function(){a.updateCalendar().then((function(){return a.setDates()}))}))};this.handleYearActionClick=function(e){e.stopPropagation();if(a.disableMonthYearSelection){e.preventDefault();return}a.currentView=a.currentView==="years"?"calendar":"years";requestAnimationFrame((function(){a.updateCalendar().then((function(){return a.setDates()}))}))};this.handlePrev=function(e){if(a.currentView==="calendar"){e.stopPropagation();a.changeMonth(-1)}else if(a.currentView==="years"){e.stopPropagation();a.selectedYear-=10}else{e.stopPropagation()}};this.handleNext=function(e){if(a.currentView==="calendar"){e.stopPropagation();a.changeMonth(1)}else if(a.currentView==="years"){e.stopPropagation();a.selectedYear+=10}else{e.stopPropagation()}};this.handleCellClick=function(e){return function(r){r.stopPropagation();var t=r.currentTarget;if(a.singlePicker)a.handleSingleSelection(t,e);else a.handleRange(t,e)}};this.handleMonthSelect=function(e){return function(r){r.stopPropagation();a.currentDate=a.currentDate.set({month:e});a.currentMonth=a.currentDate.toFormat("MMMM");a.currentView="calendar";a.updateCalendar().then((function(){requestAnimationFrame((function(){return a.setDates()}))}))}};this.handleYearSelect=function(e){return function(r){r.stopPropagation();a.currentDate=a.currentDate.set({year:e});a.currentYear=e.toString();a.currentView="calendar";a.updateCalendar().then((function(){requestAnimationFrame((function(){return a.setDates()}))}))}}}e.prototype.handleStartDate=function(e){var a=this.parseDateProp(e,"start-date");if(a!==null){this.internalStartDate=a;this.startDateTime=DateTime.fromISO(a);this.startDateIdentifier=this.startDateTime.toISODate();if(this.internalEndDate!==null&&this.internalEndDate!==""){this.orderRange()}else if(!this.singlePicker){this.isFirstClick=false}this.updateDates()}else{this.internalStartDate=null;this.startDateIdentifier=null;this.startDateTime=null;this.isFirstClick=true;this.updateDates()}};e.prototype.handleEndDate=function(e){if(this.singlePicker){console.warn("singlePicker is enabled, endDate cannot be set");this.internalEndDate=null;return}var a=this.parseDateProp(e,"end-date");if(a!==null){this.internalEndDate=a;this.endDateTime=DateTime.fromISO(a);this.endDateIdentifier=this.endDateTime.toISODate();if(this.internalStartDate!==null&&this.internalStartDate!==""){this.orderRange()}this.updateDates()}else{this.internalEndDate=null;this.endDateIdentifier=null;this.endDateTime=null;this.updateDates()}};e.prototype.handleViewDate=function(e){var a=this;if(e!==null&&e!==""){var r=DateTime.fromISO(e.toString());if(r.isValid){this.currentDate=r;this.updateCalendar().then((function(){requestAnimationFrame((function(){return a.setDates()}))}))}}};e.prototype.handleHoverDate=function(){var e=this;requestAnimationFrame((function(){return e.setDates()}))};
55
55
  /**
56
56
  * A range given backwards, a start after its end, is put in order. The warning always said
57
57
  * the values were swapped, but the calendar kept the dates it was given and drew nothing new,
58
58
  * and at load the order was not checked at all.
59
- */e.prototype.orderRange=function(){var e;if(this.internalStartDate===null||this.internalEndDate===null)return;var r=DateTime.fromISO(this.internalStartDate);var a=DateTime.fromISO(this.internalEndDate);if(r<=a)return;console.warn("mds-calendar: startDate is after endDate, swapping values");e=[this.internalEndDate,this.internalStartDate],this.internalStartDate=e[0],this.internalEndDate=e[1];this.startDateTime=a;this.endDateTime=r;this.startDateIdentifier=a.toISODate();this.endDateIdentifier=r.toISODate()};
59
+ */e.prototype.orderRange=function(){var e;if(this.internalStartDate===null||this.internalEndDate===null)return;var a=DateTime.fromISO(this.internalStartDate);var r=DateTime.fromISO(this.internalEndDate);if(a<=r)return;console.warn("mds-calendar: startDate is after endDate, swapping values");e=[this.internalEndDate,this.internalStartDate],this.internalStartDate=e[0],this.internalEndDate=e[1];this.startDateTime=r;this.endDateTime=a;this.startDateIdentifier=r.toISODate();this.endDateIdentifier=a.toISODate()};
60
60
  /**
61
61
  * Normalizes a date prop to ISO 8601, treating an empty or invalid value as unset (`null`).
62
62
  * An invalid value is reported with a warning instead of breaking the component lifecycle.
63
- */e.prototype.parseDateProp=function(e,r){if(e===null||e===""){return null}var a=sanitizeISO8601Date(e.toString());if(a===null||!DateTime.fromISO(a).isValid){console.warn("mds-calendar: ignoring the invalid ".concat(r,' "').concat(e,'"'));return null}return a};e.prototype.componentWillLoad=function(){this.internalStartDate=this.parseDateProp(this.internalStartDate,"start-date");this.internalEndDate=this.parseDateProp(this.internalEndDate,"end-date");if(this.singlePicker&&this.internalEndDate!==null){console.warn("singlePicker is enabled, endDate cannot be set");this.internalEndDate=null}this.orderRange();if(this.viewDate!==null&&this.viewDate!==""){var e=DateTime.fromISO(this.viewDate.toString());if(e.isValid){this.currentDate=e}}else if(this.internalStartDate!==null){this.startDateTime=DateTime.fromISO(this.internalStartDate);this.currentDate=this.startDateTime}if(this.internalEndDate!==null){this.endDateTime=DateTime.fromISO(this.internalEndDate)}this.updateCalendar()};e.prototype.componentDidLoad=function(){var e,r,a;this.updatePreselection();(r=(e=this.host)===null||e===void 0?void 0:e.shadowRoot)===null||r===void 0?void 0:r.addEventListener("mouseover",this.handleMouseOver);(a=this.host)===null||a===void 0?void 0:a.addEventListener("mouseleave",this.handleMouseLeave);this.setDates()};e.prototype.disconnectedCallback=function(){var e,r,a;(r=(e=this.host)===null||e===void 0?void 0:e.shadowRoot)===null||r===void 0?void 0:r.removeEventListener("mouseover",this.handleMouseOver);(a=this.host)===null||a===void 0?void 0:a.removeEventListener("mouseleave",this.handleMouseLeave)};
63
+ */e.prototype.parseDateProp=function(e,a){if(e===null||e===""){return null}var r=sanitizeISO8601Date(e.toString());if(r===null||!DateTime.fromISO(r).isValid){console.warn("mds-calendar: ignoring the invalid ".concat(a,' "').concat(e,'"'));return null}return r};e.prototype.componentWillLoad=function(){this.internalStartDate=this.parseDateProp(this.internalStartDate,"start-date");this.internalEndDate=this.parseDateProp(this.internalEndDate,"end-date");if(this.singlePicker&&this.internalEndDate!==null){console.warn("singlePicker is enabled, endDate cannot be set");this.internalEndDate=null}this.orderRange();if(this.viewDate!==null&&this.viewDate!==""){var e=DateTime.fromISO(this.viewDate.toString());if(e.isValid){this.currentDate=e}}else if(this.internalStartDate!==null){this.startDateTime=DateTime.fromISO(this.internalStartDate);this.currentDate=this.startDateTime}if(this.internalEndDate!==null){this.endDateTime=DateTime.fromISO(this.internalEndDate)}this.updateCalendar()};e.prototype.componentDidLoad=function(){var e,a,r;this.updatePreselection();(a=(e=this.host)===null||e===void 0?void 0:e.shadowRoot)===null||a===void 0?void 0:a.addEventListener("mouseover",this.handleMouseOver);(r=this.host)===null||r===void 0?void 0:r.addEventListener("mouseleave",this.handleMouseLeave);this.setDates()};e.prototype.disconnectedCallback=function(){var e,a,r;(a=(e=this.host)===null||e===void 0?void 0:e.shadowRoot)===null||a===void 0?void 0:a.removeEventListener("mouseover",this.handleMouseOver);(r=this.host)===null||r===void 0?void 0:r.removeEventListener("mouseleave",this.handleMouseLeave)};
64
64
  /**
65
65
  * Sets the calendar's current date and re-renders the calendar accordingly.
66
66
  * @param date the date to display, in ISO format (YYYY-MM-DD)
67
- */e.prototype.updateCurrentDate=function(e){return __awaiter(this,void 0,void 0,(function(){var r=this;return __generator(this,(function(a){switch(a.label){case 0:this.currentDate=DateTime.fromISO(e);return[4/*yield*/,this.updateCalendar()];case 1:a.sent();return[4/*yield*/,new Promise((function(e){requestAnimationFrame((function(){r.setDates();e()}))}))];case 2:a.sent();return[2/*return*/,Promise.resolve()]}}))}))};
67
+ */e.prototype.updateCurrentDate=function(e){return __awaiter(this,void 0,void 0,(function(){var a=this;return __generator(this,(function(r){switch(r.label){case 0:this.currentDate=DateTime.fromISO(e);return[4/*yield*/,this.updateCalendar()];case 1:r.sent();return[4/*yield*/,new Promise((function(e){requestAnimationFrame((function(){a.setDates();e()}))}))];case 2:r.sent();return[2/*return*/,Promise.resolve()]}}))}))};
68
68
  /**
69
69
  * The date previewed on hover: a `hover-date` set by a parent wins over the cell hovered in
70
70
  * this calendar, so that the parent can spread the preview across several visible calendars.
71
- */e.prototype.resolveHoverDate=function(){if(this.hoverDate!==null&&this.hoverDate!==""){return this.hoverDate}return this.internalHoverDate};e.prototype.updateDates=function(){var e=this;this.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))};e.prototype.updateCalendar=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){try{e=this.currentDate.startOf("week");this.weekdays=Array.from({length:7}).map((function(r,a){return e.setLocale(preferenceStore.state.language).plus({days:a}).toFormat("ccc")}));this.calculateWeekDaysInMonth();this.currentMonth=this.currentDate.setLocale(preferenceStore.state.language).toFormat("MMMM");this.currentMonthNumber=this.currentDate.month;this.currentYear=this.currentDate.toFormat("yyyy")}catch(e){console.error("Error while updating the calendar:",e)}return[2/*return*/]}))}))};e.prototype.setDates=function(){var e=this.host;if(e==null)return;var r=e.shadowRoot;if(!r)return;var a=r.querySelectorAll("mds-calendar-cell[selection], mds-calendar-cell[preview]");if(!this.singlePicker){var t=this.resolveHoverDate();if(t!==null&&(this.internalEndDate===null||this.internalEndDate==="")){this.setHoverSelection(a,r,t)}else{this.setRangeSelection(a,r)}}else{this.setSingleSelection(a,r)}};e.prototype.clearSelectionState=function(e){e.forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))};e.prototype.setRangeSelection=function(e,r){var a=this;this.clearSelectionState(e);if(this.internalStartDate===null||this.internalStartDate==="")return;this.startDateTime=DateTime.fromISO(this.internalStartDate.toString());if(this.internalEndDate===null||this.internalEndDate===""){this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false;var t=r.querySelectorAll("mds-calendar-cell");t.forEach((function(e){if(e.getAttribute("date")===a.startDateTime.toFormat("yyyy-MM-dd")){e.setAttribute("selection","single");e.setAttribute("preview","true")}}));return}this.endDateTime=DateTime.fromISO(this.internalEndDate.toString());this.startDateIdentifier=this.startDateTime.toISODate();this.endDateIdentifier=this.endDateTime.toISODate();var n=r.querySelectorAll("mds-calendar-cell");if(n!=null){var i=void 0;for(var l=0;l<n.length;l++){var o=n[l].getAttribute("date");if(o!==null&&o!==""){var s=DateTime.fromISO(o);if(s.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){n[l].setAttribute("selection","start")}if(s.toFormat("yyyy-MM-dd")===this.endDateTime.toFormat("yyyy-MM-dd")){if(this.startDateTime.equals(this.endDateTime)){n[l].setAttribute("selection","single")}else{n[l].setAttribute("selection","end")}}i=s>this.startDateTime&&s<this.endDateTime;if(i){n[l].setAttribute("selection","middle")}}}}};e.prototype.setHoverSelection=function(e,r,a){this.clearSelectionState(e);if(this.internalStartDate===null||this.internalStartDate===""){this.setRangeSelection(e,r);return}var t=DateTime.fromISO(this.internalStartDate);var n=DateTime.fromISO(a);if(!t.isValid||!n.isValid){this.setRangeSelection(e,r);return}var i=t<=n;var l=Array.from(r.querySelectorAll("mds-calendar-cell"));l.forEach((function(e){var r=e.getAttribute("date");if(r===null||r==="")return;var a=DateTime.fromISO(r);if(!a.isValid)return;var l=i?a>=t&&a<=n:a>=n&&a<=t;if(!l)return;e.setAttribute("preview","true");var o="middle";if(t.equals(n)&&a.equals(t)){o="single"}else if(a.equals(t)){o=i?"start":"end"}else if(a.equals(n)){o=i?"end":"start"}e.setAttribute("selection",o)}))};e.prototype.setSingleSelection=function(e,r){this.clearSelectionState(e);if(this.internalStartDate===null||this.internalStartDate==="")return;this.startDateTime=DateTime.fromISO(this.internalStartDate.toString());var a=r.querySelectorAll("mds-calendar-cell");if(a!=null){for(var t=0;t<a.length;t++){var n=a[t].getAttribute("date");if(n!==null&&n!==""){var i=DateTime.fromISO(n);if(i.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){a[t].setAttribute("selection","single")}}}}};e.prototype.changeMonth=function(e){var r=this;this.currentDate=this.currentDate.plus({months:e});this.updateCalendar().then((function(){requestAnimationFrame((function(){return r.setDates()}))}));this.navigationEmitter.emit({currentDate:this.currentDate.toISODate(),delta:e})};e.prototype.calculateWeekDaysInMonth=function(){var e=this.currentDate.startOf("month");var r=this.currentDate.endOf("month");var a=[];var t=e.weekday;var n=t-1;var i=e.minus({days:n});for(var l=i;l<e;l=l.plus({days:1})){a.push({date:l,isCurrentMonth:false})}for(var l=e;l<=r;l=l.plus({days:1})){a.push({date:l,isCurrentMonth:true})}var o=r.weekday;var s=7-o;var c=r.plus({days:1});for(var l=c;l<c.plus({days:s});l=l.plus({days:1})){a.push({date:l,isCurrentMonth:false})}this.weekDaysinMonth=a};e.prototype.handleRange=function(e,r){var a=this;if(!this.singlePicker&&(this.endDate===null||this.endDate==="")&&(this.internalEndDate===null||this.internalEndDate==="")&&this.isFirstClick){var t=this.parseDateProp(this.startDate||this.host.getAttribute("start-date"),"start-date");if(t!==null){this.internalStartDate=t;this.startDateTime=DateTime.fromISO(t);this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false}}var n=function(){a.internalStartDate=null;a.internalEndDate=null;a.startDateIdentifier=null;a.startDateTime=null;a.endDateIdentifier=null;a.endDateTime=null;a.isFirstClick=true;var e=a.host;requestAnimationFrame((function(){var r;(r=e===null||e===void 0?void 0:e.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))}))};if(this.startDateIdentifier!==null&&this.startDateIdentifier!==""&&this.endDateIdentifier!==null&&this.endDateIdentifier!==""){n()}if(this.isFirstClick){this.startDateIdentifier=r.toISODate();this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;var i=this.host;requestAnimationFrame((function(){var e;(e=i===null||i===void 0?void 0:i.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}))}));requestAnimationFrame((function(){e.setAttribute("selection","single");e.setAttribute("preview","true")}));this.datesEmitter.emit({startDate:this.internalStartDate});return}if(this.startDateIdentifier!==null&&this.startDateIdentifier!==""&&DateTime.fromISO(this.startDateIdentifier)<DateTime.fromISO(e.getAttribute("date"))){this.endDateIdentifier=e.getAttribute("date");this.endDateTime=r;this.internalEndDate=this.endDateTime.toISO().split("T")[0]}else{this.endDateIdentifier=this.startDateIdentifier;this.endDateTime=this.startDateTime;this.internalEndDate=this.internalStartDate;this.startDateIdentifier=e.getAttribute("date");this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0]}
71
+ */e.prototype.resolveHoverDate=function(){if(this.hoverDate!==null&&this.hoverDate!==""){return this.hoverDate}return this.internalHoverDate};e.prototype.updateDates=function(){var e=this;this.updateCalendar().then((function(){requestAnimationFrame((function(){return e.setDates()}))}))};e.prototype.updateCalendar=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(a){try{e=this.currentDate.startOf("week");this.weekdays=Array.from({length:7}).map((function(a,r){return e.setLocale(preferenceStore.state.language).plus({days:r}).toFormat("ccc")}));this.calculateWeekDaysInMonth();this.currentMonth=this.currentDate.setLocale(preferenceStore.state.language).toFormat("MMMM");this.currentMonthNumber=this.currentDate.month;this.currentYear=this.currentDate.toFormat("yyyy")}catch(e){console.error("Error while updating the calendar:",e)}return[2/*return*/]}))}))};e.prototype.setDates=function(){var e=this.host;if(e==null)return;var a=e.shadowRoot;if(!a)return;var r=a.querySelectorAll("mds-calendar-cell[selection], mds-calendar-cell[preview]");if(!this.singlePicker){var t=this.resolveHoverDate();if(t!==null&&(this.internalEndDate===null||this.internalEndDate==="")){this.setHoverSelection(r,a,t)}else{this.setRangeSelection(r,a)}}else{this.setSingleSelection(r,a)}};e.prototype.clearSelectionState=function(e){e.forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))};e.prototype.setRangeSelection=function(e,a){var r=this;this.clearSelectionState(e);if(this.internalStartDate===null||this.internalStartDate==="")return;this.startDateTime=DateTime.fromISO(this.internalStartDate.toString());if(this.internalEndDate===null||this.internalEndDate===""){this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false;var t=a.querySelectorAll("mds-calendar-cell");t.forEach((function(e){if(e.getAttribute("date")===r.startDateTime.toFormat("yyyy-MM-dd")){e.setAttribute("selection","single");e.setAttribute("preview","true")}}));return}this.endDateTime=DateTime.fromISO(this.internalEndDate.toString());this.startDateIdentifier=this.startDateTime.toISODate();this.endDateIdentifier=this.endDateTime.toISODate();var n=a.querySelectorAll("mds-calendar-cell");if(n!=null){var i=void 0;for(var l=0;l<n.length;l++){var o=n[l].getAttribute("date");if(o!==null&&o!==""){var s=DateTime.fromISO(o);if(s.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){n[l].setAttribute("selection","start")}if(s.toFormat("yyyy-MM-dd")===this.endDateTime.toFormat("yyyy-MM-dd")){if(this.startDateTime.equals(this.endDateTime)){n[l].setAttribute("selection","single")}else{n[l].setAttribute("selection","end")}}i=s>this.startDateTime&&s<this.endDateTime;if(i){n[l].setAttribute("selection","middle")}}}}};e.prototype.setHoverSelection=function(e,a,r){this.clearSelectionState(e);if(this.internalStartDate===null||this.internalStartDate===""){this.setRangeSelection(e,a);return}var t=DateTime.fromISO(this.internalStartDate);var n=DateTime.fromISO(r);if(!t.isValid||!n.isValid){this.setRangeSelection(e,a);return}var i=t<=n;var l=Array.from(a.querySelectorAll("mds-calendar-cell"));l.forEach((function(e){var a=e.getAttribute("date");if(a===null||a==="")return;var r=DateTime.fromISO(a);if(!r.isValid)return;var l=i?r>=t&&r<=n:r>=n&&r<=t;if(!l)return;e.setAttribute("preview","true");var o="middle";if(t.equals(n)&&r.equals(t)){o="single"}else if(r.equals(t)){o=i?"start":"end"}else if(r.equals(n)){o=i?"end":"start"}e.setAttribute("selection",o)}))};e.prototype.setSingleSelection=function(e,a){this.clearSelectionState(e);if(this.internalStartDate===null||this.internalStartDate==="")return;this.startDateTime=DateTime.fromISO(this.internalStartDate.toString());var r=a.querySelectorAll("mds-calendar-cell");if(r!=null){for(var t=0;t<r.length;t++){var n=r[t].getAttribute("date");if(n!==null&&n!==""){var i=DateTime.fromISO(n);if(i.toFormat("yyyy-MM-dd")===this.startDateTime.toFormat("yyyy-MM-dd")){r[t].setAttribute("selection","single")}}}}};e.prototype.changeMonth=function(e){var a=this;this.currentDate=this.currentDate.plus({months:e});this.updateCalendar().then((function(){requestAnimationFrame((function(){return a.setDates()}))}));this.navigationEmitter.emit({currentDate:this.currentDate.toISODate(),delta:e})};e.prototype.calculateWeekDaysInMonth=function(){var e=this.currentDate.startOf("month");var a=this.currentDate.endOf("month");var r=[];var t=e.weekday;var n=t-1;var i=e.minus({days:n});for(var l=i;l<e;l=l.plus({days:1})){r.push({date:l,isCurrentMonth:false})}for(var l=e;l<=a;l=l.plus({days:1})){r.push({date:l,isCurrentMonth:true})}var o=a.weekday;var s=7-o;var c=a.plus({days:1});for(var l=c;l<c.plus({days:s});l=l.plus({days:1})){r.push({date:l,isCurrentMonth:false})}this.weekDaysinMonth=r};e.prototype.handleRange=function(e,a){var r=this;if(!this.singlePicker&&(this.endDate===null||this.endDate==="")&&(this.internalEndDate===null||this.internalEndDate==="")&&this.isFirstClick){var t=this.parseDateProp(this.startDate||this.host.getAttribute("start-date"),"start-date");if(t!==null){this.internalStartDate=t;this.startDateTime=DateTime.fromISO(t);this.startDateIdentifier=this.startDateTime.toISODate();this.isFirstClick=false}}var n=function(){r.internalStartDate=null;r.internalEndDate=null;r.startDateIdentifier=null;r.startDateTime=null;r.endDateIdentifier=null;r.endDateTime=null;r.isFirstClick=true;var e=r.host;requestAnimationFrame((function(){var a;(a=e===null||e===void 0?void 0:e.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection");e.removeAttribute("preview")}))}))};if(this.startDateIdentifier!==null&&this.startDateIdentifier!==""&&this.endDateIdentifier!==null&&this.endDateIdentifier!==""){n()}if(this.isFirstClick){this.startDateIdentifier=a.toISODate();this.startDateTime=a;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;var i=this.host;requestAnimationFrame((function(){var e;(e=i===null||i===void 0?void 0:i.shadowRoot)===null||e===void 0?void 0:e.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}))}));requestAnimationFrame((function(){e.setAttribute("selection","single");e.setAttribute("preview","true")}));this.datesEmitter.emit({startDate:this.internalStartDate});return}if(this.startDateIdentifier!==null&&this.startDateIdentifier!==""&&DateTime.fromISO(this.startDateIdentifier)<DateTime.fromISO(e.getAttribute("date"))){this.endDateIdentifier=e.getAttribute("date");this.endDateTime=a;this.internalEndDate=this.endDateTime.toISO().split("T")[0]}else{this.endDateIdentifier=this.startDateIdentifier;this.endDateTime=this.startDateTime;this.internalEndDate=this.internalStartDate;this.startDateIdentifier=e.getAttribute("date");this.startDateTime=a;this.internalStartDate=this.startDateTime.toISO().split("T")[0]}
72
72
  // Redraw start, middle and end from the internal dates: a standalone calendar has no parent
73
73
  // echoing the range through start-date / end-date, so nothing else would mark the two ends.
74
- requestAnimationFrame((function(){return a.setDates()}));if(this.internalStartDate!==null&&this.internalStartDate!==""&&this.internalEndDate!==null&&this.internalEndDate!==""){this.datesEmitter.emit({startDate:this.internalStartDate,endDate:this.internalEndDate});this.checkPreselectionsEmitter.emit()}};e.prototype.handleSingleSelection=function(e,r){var a;var t=this.host;(a=t===null||t===void 0?void 0:t.shadowRoot)===null||a===void 0?void 0:a.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}));this.startDateIdentifier=e.getAttribute("date");this.startDateTime=r;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;e.setAttribute("selection","single");if(this.internalStartDate!==null&&this.internalStartDate!==""){this.datesEmitter.emit({startDate:this.internalStartDate})}};e.prototype.isDateDisabled=function(e){if(this.min!==null&&this.min!==""&&e<DateTime.fromISO(this.min)){return true}if(this.max!==null&&this.max!==""&&e>DateTime.fromISO(this.max)){return true}return undefined};e.prototype.render=function(){var e=this;return h(Host,{key:"5ece6c00dd42e09020407a839a354c3076565a2f"},h("div",{key:"49f671efc9d432d9c4eb4d28f0c6b33b9873422d",class:clsx("calendar-preselection",this.hasPreselection&&!this.hidePreselection&&"calendar-preselection--has-preselection")},h("slot",{key:"c2a4f2f42dd5e56a5f8f91666d89cae614f56186",name:"preselection",onSlotchange:this.updatePreselection})),h("div",{key:"b6e9ad5d16530969414894ef8b2725d029bc3dff",class:"calendar-view"},h("nav",{key:"d1fb5573c5b47ce8ed9cb47f4ce728b89f87fd5e"},!this.hidePreviousButton&&h("mds-button",{key:"1e65631d9cb3757ee22a6b333828199bcf356d87","aria-label":this.t.get(this.currentView==="years"?"previousYears":"previousMonth"),class:"action-back",
74
+ requestAnimationFrame((function(){return r.setDates()}));if(this.internalStartDate!==null&&this.internalStartDate!==""&&this.internalEndDate!==null&&this.internalEndDate!==""){this.datesEmitter.emit({startDate:this.internalStartDate,endDate:this.internalEndDate});this.checkPreselectionsEmitter.emit()}};e.prototype.handleSingleSelection=function(e,a){var r;var t=this.host;(r=t===null||t===void 0?void 0:t.shadowRoot)===null||r===void 0?void 0:r.querySelectorAll("mds-calendar-cell[selection]").forEach((function(e){e.removeAttribute("selection")}));this.startDateIdentifier=e.getAttribute("date");this.startDateTime=a;this.internalStartDate=this.startDateTime.toISO().split("T")[0];this.isFirstClick=false;e.setAttribute("selection","single");if(this.internalStartDate!==null&&this.internalStartDate!==""){this.datesEmitter.emit({startDate:this.internalStartDate})}};e.prototype.isDateDisabled=function(e){if(this.min!==null&&this.min!==""&&e<DateTime.fromISO(this.min)){return true}if(this.max!==null&&this.max!==""&&e>DateTime.fromISO(this.max)){return true}return undefined};e.prototype.render=function(){var e=this;return h(Host,{key:"5ece6c00dd42e09020407a839a354c3076565a2f"},h("div",{key:"49f671efc9d432d9c4eb4d28f0c6b33b9873422d",class:clsx("calendar-preselection",this.hasPreselection&&!this.hidePreselection&&"calendar-preselection--has-preselection")},h("slot",{key:"c2a4f2f42dd5e56a5f8f91666d89cae614f56186",name:"preselection",onSlotchange:this.updatePreselection})),h("div",{key:"b6e9ad5d16530969414894ef8b2725d029bc3dff",class:"calendar-view"},h("nav",{key:"d1fb5573c5b47ce8ed9cb47f4ce728b89f87fd5e"},!this.hidePreviousButton&&h("mds-button",{key:"1e65631d9cb3757ee22a6b333828199bcf356d87","aria-label":this.t.get(this.currentView==="years"?"previousYears":"previousMonth"),class:"action-back",
75
75
  // the months view has nothing to move back or forward to
76
- disabled:this.currentView==="months",icon:miBaselineBackIosNew,variant:"dark",tone:"text",onClick:this.handlePrev}),h("div",{key:"01a1fc7f777d8dfa4ebac2ef9ed4a46bf7eb67b4",class:"select-month-or-year"},(this.currentView==="calendar"||this.currentView==="months")&&h("mds-button",{key:"c6fe68177bf27cb74a29d687df79a83403d48cb0",class:"action-month",truncate:"none",variant:"dark",tone:"text",label:this.currentMonth,onClick:this.handleMonthActionClick}),(this.currentView==="calendar"||this.currentView==="years")&&h("mds-button",{key:"4370a3e90fa6ecc64f3e6948690627f4271669b2",class:"action-year",truncate:"none",variant:"dark",tone:"text",label:this.currentYear,onClick:this.handleYearActionClick})),!this.hideNextButton&&h("mds-button",{key:"4cea0bf61baf52db367566835856d675a15cbc66","aria-label":this.t.get(this.currentView==="years"?"nextYears":"nextMonth"),class:"action-forward",disabled:this.currentView==="months",icon:miBaselineForwardIos,variant:"dark",tone:"text",onClick:this.handleNext})),this.currentView==="calendar"&&h("section",{key:"23bd1514cd3390ea62c773f0d93ef21002163827",class:"month-view"},h("header",{key:"4d87c57be1eb6f653889775a037947b4e54100fb",class:"month-view__days-names"},this.weekdays.map((function(e){return h("mds-button",{class:"week-day-name",variant:"dark",tone:"text",label:e})}))),h("div",{key:"dc486f4388d2c4052ee05150e9b5eab4c56d26e9",class:"month-view__cells"},this.weekDaysinMonth.map((function(r,a){return h("mds-calendar-cell",{key:a,today:!e.hideToday&&DateTime.now().toFormat("yyyy-MM-dd")===r.date.toFormat("yyyy-MM-dd"),date:r.date.toFormat("yyyy-MM-dd"),month:r.isCurrentMonth?"current":"other",disabled:e.isDateDisabled(r.date),onClick:e.handleCellClick(r.date),title:r.date.setLocale(preferenceStore.state.language).toFormat("cccc d LLLL").replace(/^./,(function(e){return e.toUpperCase()})),label:r.date.toFormat("dd")})})))),this.currentView==="months"&&h("section",{key:"f48bd4d763824ae2becb1f377e51ae9c71454301",class:"month-selection"},h("header",{key:"34cd5dd481b16891bb7987f2b2a5a145636658ea",class:"month-view__month-names"},Array.from({length:12}).map((function(r,a){var t=DateTime.local().set({month:a+1}).setLocale(preferenceStore.state.language).toFormat("MMMM");return h("mds-button",{class:"action",variant:"dark",tone:"text",label:t,onClick:e.handleMonthSelect(a+1)})})))),this.currentView==="years"&&h("section",{key:"f9df821453277ca1e20fe56bb8533768b68e62b0",class:"year-selection"},h("header",{key:"4aa693be77a139bfd8bedf79b0516b17763937ce",class:"month-view__years"},Array.from({length:12}).map((function(r,a){var t=e.selectedYear+a;return h("mds-button",{class:"action",variant:"dark",tone:"text",label:"".concat(t),onClick:e.handleYearSelect(t)})}))))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{startDate:[{handleStartDate:0}],endDate:[{handleEndDate:0}],viewDate:[{handleViewDate:0}],hoverDate:[{handleHoverDate:0}]}},enumerable:false,configurable:true});return e}();MdsCalendar.style=mdsCalendarCss();var mdsCalendarCellCss=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{--private-calendar-cell-background:var(--mds-calendar-cell-background,#0000);--private-calendar-cell-boundaries-padding:var(--mds-calendar-cell-boundaries-padding,calc(var(--spacing,.0025rem)*100));--private-calendar-cell-color:var(--mds-calendar-cell-color,var(--mds-calendar-day-number-color,rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))));--private-calendar-cell-other-month-background:var(--mds-calendar-cell-other-month-background,#0000);--private-calendar-cell-other-month-color:var(--mds-calendar-cell-other-month-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-disabled-background:var(--mds-calendar-cell-disabled-background,#0000);--private-calendar-cell-disabled-color:var(--mds-calendar-cell-disabled-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-weekend-background:var(--mds-calendar-cell-weekend-background,#0000);--private-calendar-cell-weekend-color:var(--mds-calendar-cell-weekend-color,rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99))));--private-calendar-cell-selection-boundaries-border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius,var(--magma-radius-full,var(--radius-full,1000px)));--private-calendar-cell-selection-week-boundaries-border-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius,var(--magma-radius-full,var(--radius-full,1000px)));--private-calendar-cell-preselection-today-background:var(--mds-calendar-cell-preselection-today-background,rgb(var(--magma-accent-surface,var(--variant-primary-09,220 224 231))));--private-calendar-cell-preselection-today-color:var(--mds-calendar-cell-preselection-today-color,rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204))));--private-calendar-cell-preselection-current-month-background:var(--mds-calendar-cell-preselection-current-month-background,rgb(var(--magma-accent-surface-hover,var(--variant-primary-08,204 212 226))));--private-calendar-cell-preselection-current-month-color:var(--mds-calendar-cell-preselection-current-month-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-current-month-boundaries-color:var(--mds-calendar-cell-preselection-current-month-boundaries-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-current-month-boundaries-background:var(--mds-calendar-cell-preselection-current-month-boundaries-background,rgb(var(--magma-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--private-calendar-cell-preselection-other-month-background:var(--mds-calendar-cell-preselection-other-month-background,rgb(var(--magma-accent-surface,var(--variant-primary-09,220 224 231))));--private-calendar-cell-preselection-other-month-color:var(--mds-calendar-cell-preselection-other-month-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-other-month-boundaries-color:var(--mds-calendar-cell-preselection-other-month-boundaries-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-other-month-boundaries-background:var(--mds-calendar-cell-preselection-other-month-boundaries-background,rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248))));--private-calendar-cell-selection-current-month-background:var(--mds-calendar-cell-selection-current-month-background,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--private-calendar-cell-selection-current-month-color:var(--mds-calendar-cell-selection-current-month-color,rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--private-calendar-cell-selection-current-month-boundaries-background:var(--mds-calendar-cell-selection-current-month-boundaries-background,rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248))));--private-calendar-cell-selection-current-month-boundaries-color:var(--mds-calendar-cell-selection-current-month-boundaries-color,rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73))));--private-calendar-cell-selection-current-month-weekend-background:var(--mds-calendar-cell-selection-current-month-weekend-background,rgb(var(--magma-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--private-calendar-cell-selection-current-month-weekend-color:var(--mds-calendar-cell-selection-current-month-weekend-color,rgb(var(--magma-accent-border,var(--variant-primary-06,148 172 218))));--private-calendar-cell-selection-current-month-weekend-boundaries-background:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-background,rgb(var(--magma-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--private-calendar-cell-selection-current-month-weekend-boundaries-color:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-color,rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73))));--private-calendar-cell-selection-other-month-background:var(--mds-calendar-cell-selection-other-month-background,rgb(var(--magma-accent-surface-hover,var(--variant-primary-08,204 212 226))));--private-calendar-cell-selection-other-month-color:var(--mds-calendar-cell-selection-other-month-color,rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99))));--private-calendar-cell-selection-other-month-boundaries-background:var(--mds-calendar-cell-selection-other-month-boundaries-background,rgb(var(--magma-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--private-calendar-cell-selection-other-month-boundaries-color:var(--mds-calendar-cell-selection-other-month-boundaries-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));align-items:center;aspect-ratio:1;display:flex;justify-content:center;padding:var(--private-calendar-cell-boundaries-padding);position:relative}:host([month=other]){visibility:var(--mds-calendar-cell-other-month-visibility,hidden)}.inner-dot{aspect-ratio:1;background-color:var(--private-calendar-cell-inner-background);border-radius:var(--private-calendar-cell-selection-boundaries-border-radius);display:flex;min-height:0;min-width:0;width:100%;z-index:1}.area-background{background-color:var(--private-calendar-cell-background);inset:0;position:absolute;z-index:0}.action,.area-background{color:var(--private-calendar-cell-color)}.action{align-items:center;background-color:#0000;border-radius:0;display:flex;inset:calc(var(--mds-calendar-cell-gap)*-1);justify-content:center;min-height:0;min-width:0;padding:0;place-self:stretch stretch;position:absolute;width:auto;z-index:2}:host([selection]:not(:where([selection=none]))[orientation=horizontal]) .area-background{margin-left:calc(var(--mds-calendar-cell-gap)*-1);margin-right:calc(var(--mds-calendar-cell-gap)*-1)}:host([selection=start][orientation=horizontal]) .area-background{border-bottom-left-radius:var(--private-calendar-cell-selection-boundaries-border-radius);border-top-left-radius:var(--private-calendar-cell-selection-boundaries-border-radius);margin-left:0}:host([selection=end][orientation=horizontal]) .area-background{border-bottom-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius);margin-right:0}:host([selection]:not(:where([selection=none]))[orientation=vertical]) .area-background{margin-bottom:calc(var(--mds-calendar-cell-gap)*-1);margin-top:calc(var(--mds-calendar-cell-gap)*-1)}:host([selection=start][orientation=vertical]) .area-background{border-radius:var(--private-calendar-cell-selection-boundaries-border-radius) var(--private-calendar-cell-selection-boundaries-border-radius) 0 0;margin-top:0}:host([selection=end][orientation=vertical]) .area-background{border-radius:0 0 var(--private-calendar-cell-selection-boundaries-border-radius) var(--private-calendar-cell-selection-boundaries-border-radius);margin-bottom:0}:host([orientation=vertical]:not([selection=start],[selection=end])) .area-background{border-radius:0}:host(:nth-child(7n-6)) .area-background,:host([selection=end][orientation=horizontal]:nth-child(7n-6)) .area-background{border-bottom-left-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius);border-top-left-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius)}:host(:nth-child(7n)) .area-background,:host([selection=end][orientation=horizontal]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius);border-top-right-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius)}:host([selection=end][orientation=horizontal]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius)}:host([selection]:not(:where([selection=none]))[orientation=horizontal]:nth-child(7n-6)) .area-background{margin-left:0}:host([selection]:not(:where([selection=none]))[orientation=horizontal]:nth-child(7n)) .area-background{margin-right:0}:host([selection=single][orientation=horizontal]) .area-background{border-radius:var(--private-calendar-cell-selection-boundaries-border-radius);margin-left:0;margin-right:0}:host(:nth-child(7n)),:host(:nth-child(7n-1)){--private-calendar-cell-color:var(--private-calendar-cell-weekend-color);--private-calendar-cell-background:var(--private-calendar-cell-weekend-background)}:host([month=other]:not([selection]:not(:where([selection=none])))){--private-calendar-cell-color:var(--private-calendar-cell-other-month-color);--private-calendar-cell-background:var(--private-calendar-cell-other-month-background)}:host([disabled]){--private-calendar-cell-color:var(--private-calendar-cell-disabled-color);--private-calendar-cell-background:var(--private-calendar-cell-disabled-background);cursor:auto;pointer-events:none}:host(:not([selection]:not(:where([selection=none])))[today]){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-today-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-today-color)}:host([selection]:not(:where([selection=none]))[month=current]){--private-calendar-cell-background:var(--private-calendar-cell-selection-current-month-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-color)}:host([selection]:not(:where([selection=none]))[month=current]:nth-child(7n)),:host([selection]:not(:where([selection=none]))[month=current]:nth-child(7n-1)){--private-calendar-cell-background:var(--private-calendar-cell-selection-current-month-weekend-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-weekend-color)}:host([selection=end][month=current]:nth-child(7n)),:host([selection=end][month=current]:nth-child(7n-1)),:host([selection=start][month=current]:nth-child(7n)),:host([selection=start][month=current]:nth-child(7n-1)){--private-calendar-cell-background:var(--private-calendar-cell-selection-current-month-weekend-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-weekend-boundaries-color)}:host([selection]:not(:where([selection=none]))[month=other]){--private-calendar-cell-background:var(--private-calendar-cell-selection-other-month-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-other-month-color)}:host([selection=end][month=current]),:host([selection=start][month=current]){--private-calendar-cell-inner-background:var(--private-calendar-cell-selection-current-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-boundaries-color)}:host([selection=end][month=other]),:host([selection=start][month=other]){--private-calendar-cell-inner-background:var(--private-calendar-cell-selection-other-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-other-month-boundaries-color)}:host([selection]:not(:where([selection=none]))[month=current][preview]:not([preview=false])){--private-calendar-cell-background:var(--private-calendar-cell-preselection-current-month-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-current-month-color)}:host([selection]:not(:where([selection=none]))[month=other][preview]:not([preview=false])){--private-calendar-cell-background:var(--private-calendar-cell-preselection-other-month-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-other-month-color)}:host([selection=end][month=current][preview]:not([preview=false])),:host([selection=start][month=current][preview]:not([preview=false])){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-current-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-current-month-boundaries-color)}:host([selection=end][month=other][preview]:not([preview=false])),:host([selection=start][month=other][preview]:not([preview=false])){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-other-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-other-month-boundaries-color)}:host([selection=single][month=current]){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-current-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-current-month-boundaries-color)}:host([selection=single][month=other]){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-other-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-other-month-boundaries-color)}"};var MdsCalendarCell=/** @class */function(){function e(e){registerInstance(this,e);
76
+ disabled:this.currentView==="months",icon:miBaselineBackIosNew,variant:"dark",tone:"text",onClick:this.handlePrev}),h("div",{key:"01a1fc7f777d8dfa4ebac2ef9ed4a46bf7eb67b4",class:"select-month-or-year"},(this.currentView==="calendar"||this.currentView==="months")&&h("mds-button",{key:"c6fe68177bf27cb74a29d687df79a83403d48cb0",class:"action-month",truncate:"none",variant:"dark",tone:"text",label:this.currentMonth,onClick:this.handleMonthActionClick}),(this.currentView==="calendar"||this.currentView==="years")&&h("mds-button",{key:"4370a3e90fa6ecc64f3e6948690627f4271669b2",class:"action-year",truncate:"none",variant:"dark",tone:"text",label:this.currentYear,onClick:this.handleYearActionClick})),!this.hideNextButton&&h("mds-button",{key:"4cea0bf61baf52db367566835856d675a15cbc66","aria-label":this.t.get(this.currentView==="years"?"nextYears":"nextMonth"),class:"action-forward",disabled:this.currentView==="months",icon:miBaselineForwardIos,variant:"dark",tone:"text",onClick:this.handleNext})),this.currentView==="calendar"&&h("section",{key:"23bd1514cd3390ea62c773f0d93ef21002163827",class:"month-view"},h("header",{key:"4d87c57be1eb6f653889775a037947b4e54100fb",class:"month-view__days-names"},this.weekdays.map((function(e){return h("mds-button",{class:"week-day-name",variant:"dark",tone:"text",label:e})}))),h("div",{key:"dc486f4388d2c4052ee05150e9b5eab4c56d26e9",class:"month-view__cells"},this.weekDaysinMonth.map((function(a,r){return h("mds-calendar-cell",{key:r,today:!e.hideToday&&DateTime.now().toFormat("yyyy-MM-dd")===a.date.toFormat("yyyy-MM-dd"),date:a.date.toFormat("yyyy-MM-dd"),month:a.isCurrentMonth?"current":"other",disabled:e.isDateDisabled(a.date),onClick:e.handleCellClick(a.date),title:a.date.setLocale(preferenceStore.state.language).toFormat("cccc d LLLL").replace(/^./,(function(e){return e.toUpperCase()})),label:a.date.toFormat("dd")})})))),this.currentView==="months"&&h("section",{key:"f48bd4d763824ae2becb1f377e51ae9c71454301",class:"month-selection"},h("header",{key:"34cd5dd481b16891bb7987f2b2a5a145636658ea",class:"month-view__month-names"},Array.from({length:12}).map((function(a,r){var t=DateTime.local().set({month:r+1}).setLocale(preferenceStore.state.language).toFormat("MMMM");return h("mds-button",{class:"action",variant:"dark",tone:"text",label:t,onClick:e.handleMonthSelect(r+1)})})))),this.currentView==="years"&&h("section",{key:"f9df821453277ca1e20fe56bb8533768b68e62b0",class:"year-selection"},h("header",{key:"4aa693be77a139bfd8bedf79b0516b17763937ce",class:"month-view__years"},Array.from({length:12}).map((function(a,r){var t=e.selectedYear+r;return h("mds-button",{class:"action",variant:"dark",tone:"text",label:"".concat(t),onClick:e.handleYearSelect(t)})}))))))};Object.defineProperty(e.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{startDate:[{handleStartDate:0}],endDate:[{handleEndDate:0}],viewDate:[{handleViewDate:0}],hoverDate:[{handleHoverDate:0}]}},enumerable:false,configurable:true});return e}();MdsCalendar.style=mdsCalendarCss();var mdsCalendarCellCss=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{--private-calendar-cell-background:var(--mds-calendar-cell-background,#0000);--private-calendar-cell-boundaries-padding:var(--mds-calendar-cell-boundaries-padding,calc(var(--spacing,.0025rem)*100));--private-calendar-cell-color:var(--mds-calendar-cell-color,var(--mds-calendar-day-number-color,rgb(var(--magma-text-default,var(--text-neutral-default,5 5 5)))));--private-calendar-cell-other-month-background:var(--mds-calendar-cell-other-month-background,#0000);--private-calendar-cell-other-month-color:var(--mds-calendar-cell-other-month-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-disabled-background:var(--mds-calendar-cell-disabled-background,#0000);--private-calendar-cell-disabled-color:var(--mds-calendar-cell-disabled-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-weekend-background:var(--mds-calendar-cell-weekend-background,#0000);--private-calendar-cell-weekend-color:var(--mds-calendar-cell-weekend-color,rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99))));--private-calendar-cell-selection-boundaries-border-radius:var(--mds-calendar-cell-selection-boundaries-border-radius,var(--magma-radius-full,var(--radius-full,1000px)));--private-calendar-cell-selection-week-boundaries-border-radius:var(--mds-calendar-cell-selection-week-boundaries-border-radius,var(--magma-radius-full,var(--radius-full,1000px)));--private-calendar-cell-preselection-today-background:var(--mds-calendar-cell-preselection-today-background,rgb(var(--magma-accent-surface,var(--variant-primary-09,220 224 231))));--private-calendar-cell-preselection-today-color:var(--mds-calendar-cell-preselection-today-color,rgb(var(--magma-accent-fg,var(--variant-primary-03,7 76 204))));--private-calendar-cell-preselection-current-month-background:var(--mds-calendar-cell-preselection-current-month-background,rgb(var(--magma-accent-surface-hover,var(--variant-primary-08,204 212 226))));--private-calendar-cell-preselection-current-month-color:var(--mds-calendar-cell-preselection-current-month-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-current-month-boundaries-color:var(--mds-calendar-cell-preselection-current-month-boundaries-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-current-month-boundaries-background:var(--mds-calendar-cell-preselection-current-month-boundaries-background,rgb(var(--magma-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--private-calendar-cell-preselection-other-month-background:var(--mds-calendar-cell-preselection-other-month-background,rgb(var(--magma-accent-surface,var(--variant-primary-09,220 224 231))));--private-calendar-cell-preselection-other-month-color:var(--mds-calendar-cell-preselection-other-month-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-other-month-boundaries-color:var(--mds-calendar-cell-preselection-other-month-boundaries-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));--private-calendar-cell-preselection-other-month-boundaries-background:var(--mds-calendar-cell-preselection-other-month-boundaries-background,rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248))));--private-calendar-cell-selection-current-month-background:var(--mds-calendar-cell-selection-current-month-background,rgb(var(--magma-accent-emphasis,var(--variant-primary-04,36 103 231))));--private-calendar-cell-selection-current-month-color:var(--mds-calendar-cell-selection-current-month-color,rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--private-calendar-cell-selection-current-month-boundaries-background:var(--mds-calendar-cell-selection-current-month-boundaries-background,rgb(var(--magma-surface-raised,var(--surface-neutral-raised,248 248 248))));--private-calendar-cell-selection-current-month-boundaries-color:var(--mds-calendar-cell-selection-current-month-boundaries-color,rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73))));--private-calendar-cell-selection-current-month-weekend-background:var(--mds-calendar-cell-selection-current-month-weekend-background,rgb(var(--magma-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--private-calendar-cell-selection-current-month-weekend-color:var(--mds-calendar-cell-selection-current-month-weekend-color,rgb(var(--magma-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--private-calendar-cell-selection-current-month-weekend-boundaries-background:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-background,rgb(var(--magma-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--private-calendar-cell-selection-current-month-weekend-boundaries-color:var(--mds-calendar-cell-selection-current-month-weekend-boundaries-color,rgb(var(--magma-text-muted,var(--text-neutral-muted,73 73 73))));--private-calendar-cell-selection-other-month-background:var(--mds-calendar-cell-selection-other-month-background,rgb(var(--magma-accent-surface-hover,var(--variant-primary-08,204 212 226))));--private-calendar-cell-selection-other-month-color:var(--mds-calendar-cell-selection-other-month-color,rgb(var(--magma-text-subtle,var(--text-neutral-subtle,99 99 99))));--private-calendar-cell-selection-other-month-boundaries-background:var(--mds-calendar-cell-selection-other-month-boundaries-background,rgb(var(--magma-accent-surface-subtle,var(--variant-primary-10,236 237 240))));--private-calendar-cell-selection-other-month-boundaries-color:var(--mds-calendar-cell-selection-other-month-boundaries-color,rgb(var(--magma-text-disabled,var(--text-neutral-disabled,119 119 119))));align-items:center;aspect-ratio:1;display:flex;justify-content:center;padding:var(--private-calendar-cell-boundaries-padding);position:relative}:host([month=other]){visibility:var(--mds-calendar-cell-other-month-visibility,hidden)}.inner-dot{aspect-ratio:1;background-color:var(--private-calendar-cell-inner-background);border-radius:var(--private-calendar-cell-selection-boundaries-border-radius);display:flex;min-height:0;min-width:0;width:100%;z-index:1}.area-background{background-color:var(--private-calendar-cell-background);inset:0;position:absolute;z-index:0}.action,.area-background{color:var(--private-calendar-cell-color)}.action{align-items:center;background-color:#0000;border-radius:0;display:flex;inset:calc(var(--mds-calendar-cell-gap)*-1);justify-content:center;min-height:0;min-width:0;padding:0;place-self:stretch stretch;position:absolute;width:auto;z-index:2}:host([selection]:not(:where([selection=none]))[orientation=horizontal]) .area-background{margin-left:calc(var(--mds-calendar-cell-gap)*-1);margin-right:calc(var(--mds-calendar-cell-gap)*-1)}:host([selection=start][orientation=horizontal]) .area-background{border-bottom-left-radius:var(--private-calendar-cell-selection-boundaries-border-radius);border-top-left-radius:var(--private-calendar-cell-selection-boundaries-border-radius);margin-left:0}:host([selection=end][orientation=horizontal]) .area-background{border-bottom-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius);margin-right:0}:host([selection]:not(:where([selection=none]))[orientation=vertical]) .area-background{margin-bottom:calc(var(--mds-calendar-cell-gap)*-1);margin-top:calc(var(--mds-calendar-cell-gap)*-1)}:host([selection=start][orientation=vertical]) .area-background{border-radius:var(--private-calendar-cell-selection-boundaries-border-radius) var(--private-calendar-cell-selection-boundaries-border-radius) 0 0;margin-top:0}:host([selection=end][orientation=vertical]) .area-background{border-radius:0 0 var(--private-calendar-cell-selection-boundaries-border-radius) var(--private-calendar-cell-selection-boundaries-border-radius);margin-bottom:0}:host([orientation=vertical]:not([selection=start],[selection=end])) .area-background{border-radius:0}:host(:nth-child(7n-6)) .area-background,:host([selection=end][orientation=horizontal]:nth-child(7n-6)) .area-background{border-bottom-left-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius);border-top-left-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius)}:host(:nth-child(7n)) .area-background,:host([selection=end][orientation=horizontal]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius);border-top-right-radius:var(--private-calendar-cell-selection-week-boundaries-border-radius)}:host([selection=end][orientation=horizontal]:nth-child(7n)) .area-background{border-bottom-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius);border-top-right-radius:var(--private-calendar-cell-selection-boundaries-border-radius)}:host([selection]:not(:where([selection=none]))[orientation=horizontal]:nth-child(7n-6)) .area-background{margin-left:0}:host([selection]:not(:where([selection=none]))[orientation=horizontal]:nth-child(7n)) .area-background{margin-right:0}:host([selection=single][orientation=horizontal]) .area-background{border-radius:var(--private-calendar-cell-selection-boundaries-border-radius);margin-left:0;margin-right:0}:host(:nth-child(7n)),:host(:nth-child(7n-1)){--private-calendar-cell-color:var(--private-calendar-cell-weekend-color);--private-calendar-cell-background:var(--private-calendar-cell-weekend-background)}:host([month=other]:not([selection]:not(:where([selection=none])))){--private-calendar-cell-color:var(--private-calendar-cell-other-month-color);--private-calendar-cell-background:var(--private-calendar-cell-other-month-background)}:host([disabled]){--private-calendar-cell-color:var(--private-calendar-cell-disabled-color);--private-calendar-cell-background:var(--private-calendar-cell-disabled-background);cursor:auto;pointer-events:none}:host(:not([selection]:not(:where([selection=none])))[today]){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-today-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-today-color)}:host([selection]:not(:where([selection=none]))[month=current]){--private-calendar-cell-background:var(--private-calendar-cell-selection-current-month-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-color)}:host([selection]:not(:where([selection=none]))[month=current]:nth-child(7n)),:host([selection]:not(:where([selection=none]))[month=current]:nth-child(7n-1)){--private-calendar-cell-background:var(--private-calendar-cell-selection-current-month-weekend-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-weekend-color)}:host([selection=end][month=current]:nth-child(7n)),:host([selection=end][month=current]:nth-child(7n-1)),:host([selection=start][month=current]:nth-child(7n)),:host([selection=start][month=current]:nth-child(7n-1)){--private-calendar-cell-background:var(--private-calendar-cell-selection-current-month-weekend-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-weekend-boundaries-color)}:host([selection]:not(:where([selection=none]))[month=other]){--private-calendar-cell-background:var(--private-calendar-cell-selection-other-month-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-other-month-color)}:host([selection=end][month=current]),:host([selection=start][month=current]){--private-calendar-cell-inner-background:var(--private-calendar-cell-selection-current-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-current-month-boundaries-color)}:host([selection=end][month=other]),:host([selection=start][month=other]){--private-calendar-cell-inner-background:var(--private-calendar-cell-selection-other-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-selection-other-month-boundaries-color)}:host([selection]:not(:where([selection=none]))[month=current][preview]:not([preview=false])){--private-calendar-cell-background:var(--private-calendar-cell-preselection-current-month-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-current-month-color)}:host([selection]:not(:where([selection=none]))[month=other][preview]:not([preview=false])){--private-calendar-cell-background:var(--private-calendar-cell-preselection-other-month-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-other-month-color)}:host([selection=end][month=current][preview]:not([preview=false])),:host([selection=start][month=current][preview]:not([preview=false])){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-current-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-current-month-boundaries-color)}:host([selection=end][month=other][preview]:not([preview=false])),:host([selection=start][month=other][preview]:not([preview=false])){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-other-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-other-month-boundaries-color)}:host([selection=single][month=current]){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-current-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-current-month-boundaries-color)}:host([selection=single][month=other]){--private-calendar-cell-inner-background:var(--private-calendar-cell-preselection-other-month-boundaries-background);--private-calendar-cell-color:var(--private-calendar-cell-preselection-other-month-boundaries-color)}"};var MdsCalendarCell=/** @class */function(){function e(e){registerInstance(this,e);
77
77
  /**
78
78
  * Specifies if the day belongs to the displayed month, `current`, or to an adjacent one,
79
79
  * `other`. `weekend` is deprecated and does nothing: the weekend days are styled by their