@maggioli-design-system/magma 2.0.1 → 2.1.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 (1512) hide show
  1. package/AGENTS.md +71 -0
  2. package/agents/anti-patterns.md +39 -0
  3. package/agents/assets.md +203 -0
  4. package/agents/color.md +193 -0
  5. package/agents/components.md +129 -0
  6. package/agents/conventions.md +188 -0
  7. package/agents/install.md +152 -0
  8. package/agents/theming.md +140 -0
  9. package/agents/typography.md +32 -0
  10. package/agents/variants.md +112 -0
  11. package/dist/cjs/floating-controller-uOCBLTk2.js +369 -0
  12. package/dist/cjs/form-Bk2OHlHM.js +46 -0
  13. package/dist/cjs/index-MyEb-PfD.js +198 -0
  14. package/dist/cjs/index-UmmmCMIG.js +5184 -0
  15. package/dist/cjs/index.cjs.js +1 -1
  16. package/dist/cjs/loader.cjs.js +2 -2
  17. package/dist/cjs/locale-CnorkBwF.js +816 -0
  18. package/dist/cjs/magma-components.cjs.js +2 -2
  19. package/dist/cjs/mds-accordion-item.cjs.entry.js +2 -2
  20. package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +2 -2
  21. package/dist/cjs/mds-accordion-timer.cjs.entry.js +1 -1
  22. package/dist/cjs/mds-accordion.cjs.entry.js +2 -2
  23. package/dist/cjs/mds-author.cjs.entry.js +1 -1
  24. package/dist/cjs/mds-avatar-stack-item.cjs.entry.js +1 -1
  25. package/dist/cjs/mds-avatar-stack.cjs.entry.js +1 -1
  26. package/dist/cjs/mds-avatar.cjs.entry.js +2 -2
  27. package/dist/cjs/mds-badge.cjs.entry.js +2 -2
  28. package/dist/cjs/mds-banner_3.cjs.entry.js +3 -3
  29. package/dist/cjs/mds-benchmark-bar.cjs.entry.js +1 -1
  30. package/dist/cjs/mds-bibliography.cjs.entry.js +1 -1
  31. package/dist/cjs/mds-breadcrumb-item.cjs.entry.js +1 -1
  32. package/dist/cjs/mds-breadcrumb.cjs.entry.js +3 -3
  33. package/dist/cjs/mds-button-dropdown.cjs.entry.js +38 -4
  34. package/dist/cjs/mds-button-group.cjs.entry.js +1 -1
  35. package/dist/cjs/mds-button_3.cjs.entry.js +7 -6
  36. package/dist/cjs/mds-calendar_2.cjs.entry.js +2 -2
  37. package/dist/cjs/mds-card-content.cjs.entry.js +1 -1
  38. package/dist/cjs/mds-card-footer.cjs.entry.js +1 -1
  39. package/dist/cjs/mds-card-header.cjs.entry.js +1 -1
  40. package/dist/cjs/mds-card-media.cjs.entry.js +1 -1
  41. package/dist/cjs/mds-card.cjs.entry.js +2 -2
  42. package/dist/cjs/mds-details.cjs.entry.js +2 -2
  43. package/dist/cjs/mds-dropdown.cjs.entry.js +3 -3
  44. package/dist/cjs/mds-emoji.cjs.entry.js +2 -2
  45. package/dist/cjs/mds-entity.cjs.entry.js +2 -2
  46. package/dist/cjs/mds-file-preview.cjs.entry.js +3 -3
  47. package/dist/cjs/mds-file.cjs.entry.js +3 -3
  48. package/dist/cjs/mds-filter-item.cjs.entry.js +2 -2
  49. package/dist/cjs/mds-filter.cjs.entry.js +2 -2
  50. package/dist/cjs/mds-header-bar.cjs.entry.js +2 -2
  51. package/dist/cjs/mds-header.cjs.entry.js +2 -2
  52. package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +1 -1
  53. package/dist/cjs/mds-hr.cjs.entry.js +2 -2
  54. package/dist/cjs/mds-img.cjs.entry.js +3 -3
  55. package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +1 -1
  56. package/dist/cjs/mds-input-date-range.cjs.entry.js +89 -9
  57. package/dist/cjs/mds-input-date.cjs.entry.js +124 -27
  58. package/dist/cjs/mds-input-field.cjs.entry.js +1 -1
  59. package/dist/cjs/mds-input-otp.cjs.entry.js +65 -19
  60. package/dist/cjs/mds-input-range.cjs.entry.js +32 -16
  61. package/dist/cjs/mds-input-select.cjs.entry.js +159 -30
  62. package/dist/cjs/mds-input-switch_2.cjs.entry.js +63 -21
  63. package/dist/cjs/mds-input-tip_2.cjs.entry.js +3 -3
  64. package/dist/cjs/mds-input-upload.cjs.entry.js +136 -67
  65. package/dist/cjs/mds-input.cjs.entry.js +320 -36
  66. package/dist/cjs/mds-keyboard-key.cjs.entry.js +3 -3
  67. package/dist/cjs/mds-keyboard.cjs.entry.js +3 -3
  68. package/dist/cjs/mds-kpi-item.cjs.entry.js +2 -2
  69. package/dist/cjs/mds-kpi.cjs.entry.js +1 -1
  70. package/dist/cjs/mds-label.cjs.entry.js +3 -3
  71. package/dist/cjs/mds-list-item.cjs.entry.js +2 -2
  72. package/dist/cjs/mds-list.cjs.entry.js +1 -1
  73. package/dist/cjs/mds-mention.cjs.entry.js +3 -3
  74. package/dist/cjs/mds-modal.cjs.entry.js +2 -2
  75. package/dist/cjs/mds-note.cjs.entry.js +3 -3
  76. package/dist/cjs/mds-notification.cjs.entry.js +2 -2
  77. package/dist/cjs/mds-paginator-item.cjs.entry.js +2 -2
  78. package/dist/cjs/mds-paginator.cjs.entry.js +2 -2
  79. package/dist/cjs/mds-policy-ai.cjs.entry.js +3 -3
  80. package/dist/cjs/mds-pref-animation.cjs.entry.js +29 -5
  81. package/dist/cjs/mds-pref-consumption.cjs.entry.js +29 -5
  82. package/dist/cjs/mds-pref-contrast.cjs.entry.js +27 -6
  83. package/dist/cjs/mds-pref-language-item.cjs.entry.js +3 -3
  84. package/dist/cjs/mds-pref-language.cjs.entry.js +3 -3
  85. package/dist/cjs/mds-pref-mode.cjs.entry.js +30 -7
  86. package/dist/cjs/mds-pref-theme-item.cjs.entry.js +1 -1
  87. package/dist/cjs/mds-pref-theme.cjs.entry.js +3 -3
  88. package/dist/cjs/mds-pref.cjs.entry.js +10 -5
  89. package/dist/cjs/mds-price-table-features-cell.cjs.entry.js +2 -2
  90. package/dist/cjs/mds-price-table-features-row.cjs.entry.js +2 -2
  91. package/dist/cjs/mds-price-table-features.cjs.entry.js +2 -2
  92. package/dist/cjs/mds-price-table-header.cjs.entry.js +1 -1
  93. package/dist/cjs/mds-price-table-list-item.cjs.entry.js +1 -1
  94. package/dist/cjs/mds-price-table-list.cjs.entry.js +2 -2
  95. package/dist/cjs/mds-price-table.cjs.entry.js +1 -1
  96. package/dist/cjs/mds-progress_2.cjs.entry.js +2 -2
  97. package/dist/cjs/mds-push-notification-item.cjs.entry.js +3 -3
  98. package/dist/cjs/mds-push-notification.cjs.entry.js +2 -2
  99. package/dist/cjs/mds-quote.cjs.entry.js +2 -2
  100. package/dist/cjs/mds-radial-menu-item.cjs.entry.js +1 -1
  101. package/dist/cjs/mds-radial-menu.cjs.entry.js +2 -2
  102. package/dist/cjs/mds-separator.cjs.entry.js +2 -2
  103. package/dist/cjs/mds-status-bar.cjs.entry.js +2 -2
  104. package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +3 -3
  105. package/dist/cjs/mds-stepper-bar.cjs.entry.js +1 -1
  106. package/dist/cjs/mds-tab-bar-item.cjs.entry.js +2 -2
  107. package/dist/cjs/mds-tab-bar.cjs.entry.js +2 -2
  108. package/dist/cjs/mds-tab_2.cjs.entry.js +2 -2
  109. package/dist/cjs/mds-table-body.cjs.entry.js +2 -2
  110. package/dist/cjs/mds-table-footer.cjs.entry.js +2 -2
  111. package/dist/cjs/mds-table-header-cell.cjs.entry.js +2 -2
  112. package/dist/cjs/mds-table-header.cjs.entry.js +3 -3
  113. package/dist/cjs/mds-table-row.cjs.entry.js +3 -3
  114. package/dist/cjs/mds-table.cjs.entry.js +3 -3
  115. package/dist/cjs/mds-text.cjs.entry.js +2 -2
  116. package/dist/cjs/mds-toast.cjs.entry.js +2 -2
  117. package/dist/cjs/mds-tooltip.cjs.entry.js +3 -3
  118. package/dist/cjs/mds-tree-item.cjs.entry.js +3 -3
  119. package/dist/cjs/mds-tree.cjs.entry.js +1 -1
  120. package/dist/cjs/mds-url-view.cjs.entry.js +3 -3
  121. package/dist/cjs/mds-usage.cjs.entry.js +3 -3
  122. package/dist/cjs/mds-video-wall.cjs.entry.js +1 -1
  123. package/dist/cjs/mds-zero.cjs.entry.js +2 -2
  124. package/dist/cjs/preference-DRkzNp5a.js +389 -0
  125. package/dist/collection/common/form.js +24 -1
  126. package/dist/collection/common/validity/index.js +42 -0
  127. package/dist/collection/components/mds-accordion/AGENTS.md +65 -0
  128. package/dist/collection/components/mds-accordion/antipattern.md +123 -0
  129. package/dist/collection/components/mds-accordion/documentation.json +172 -0
  130. package/dist/collection/components/mds-accordion/pattern.md +150 -0
  131. package/dist/collection/components/mds-accordion-item/AGENTS.md +76 -0
  132. package/dist/collection/components/mds-accordion-item/antipattern.md +137 -0
  133. package/dist/collection/components/mds-accordion-item/documentation.json +288 -0
  134. package/dist/collection/components/mds-accordion-item/pattern.md +156 -0
  135. package/dist/collection/components/mds-accordion-timer/AGENTS.md +65 -0
  136. package/dist/collection/components/mds-accordion-timer/antipattern.md +133 -0
  137. package/dist/collection/components/mds-accordion-timer/documentation.json +168 -0
  138. package/dist/collection/components/mds-accordion-timer/pattern.md +137 -0
  139. package/dist/collection/components/mds-accordion-timer-item/AGENTS.md +82 -0
  140. package/dist/collection/components/mds-accordion-timer-item/antipattern.md +143 -0
  141. package/dist/collection/components/mds-accordion-timer-item/documentation.json +400 -0
  142. package/dist/collection/components/mds-accordion-timer-item/pattern.md +136 -0
  143. package/dist/collection/components/mds-author/AGENTS.md +40 -0
  144. package/dist/collection/components/mds-author/antipattern.md +106 -0
  145. package/dist/collection/components/mds-author/documentation.json +51 -0
  146. package/dist/collection/components/mds-author/pattern.md +101 -0
  147. package/dist/collection/components/mds-avatar/AGENTS.md +70 -0
  148. package/dist/collection/components/mds-avatar/antipattern.md +96 -0
  149. package/dist/collection/components/mds-avatar/documentation.json +362 -0
  150. package/dist/collection/components/mds-avatar/pattern.md +108 -0
  151. package/dist/collection/components/mds-avatar-stack/AGENTS.md +65 -0
  152. package/dist/collection/components/mds-avatar-stack/antipattern.md +122 -0
  153. package/dist/collection/components/mds-avatar-stack/documentation.json +196 -0
  154. package/dist/collection/components/mds-avatar-stack/pattern.md +125 -0
  155. package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +60 -0
  156. package/dist/collection/components/mds-avatar-stack-item/antipattern.md +113 -0
  157. package/dist/collection/components/mds-avatar-stack-item/documentation.json +315 -0
  158. package/dist/collection/components/mds-avatar-stack-item/pattern.md +105 -0
  159. package/dist/collection/components/mds-badge/AGENTS.md +63 -0
  160. package/dist/collection/components/mds-badge/antipattern.md +104 -0
  161. package/dist/collection/components/mds-badge/documentation.json +316 -0
  162. package/dist/collection/components/mds-badge/pattern.md +130 -0
  163. package/dist/collection/components/mds-banner/AGENTS.md +87 -0
  164. package/dist/collection/components/mds-banner/antipattern.md +141 -0
  165. package/dist/collection/components/mds-banner/documentation.json +378 -0
  166. package/dist/collection/components/mds-banner/pattern.md +176 -0
  167. package/dist/collection/components/mds-benchmark-bar/AGENTS.md +59 -0
  168. package/dist/collection/components/mds-benchmark-bar/antipattern.md +77 -0
  169. package/dist/collection/components/mds-benchmark-bar/documentation.json +313 -0
  170. package/dist/collection/components/mds-benchmark-bar/pattern.md +102 -0
  171. package/dist/collection/components/mds-bibliography/AGENTS.md +61 -0
  172. package/dist/collection/components/mds-bibliography/antipattern.md +130 -0
  173. package/dist/collection/components/mds-bibliography/documentation.json +407 -0
  174. package/dist/collection/components/mds-bibliography/pattern.md +142 -0
  175. package/dist/collection/components/mds-breadcrumb/AGENTS.md +68 -0
  176. package/dist/collection/components/mds-breadcrumb/antipattern.md +112 -0
  177. package/dist/collection/components/mds-breadcrumb/documentation.json +156 -0
  178. package/dist/collection/components/mds-breadcrumb/pattern.md +103 -0
  179. package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +67 -0
  180. package/dist/collection/components/mds-breadcrumb-item/antipattern.md +109 -0
  181. package/dist/collection/components/mds-breadcrumb-item/documentation.json +160 -0
  182. package/dist/collection/components/mds-breadcrumb-item/pattern.md +85 -0
  183. package/dist/collection/components/mds-button/AGENTS.md +102 -0
  184. package/dist/collection/components/mds-button/antipattern.md +126 -0
  185. package/dist/collection/components/mds-button/documentation.json +922 -0
  186. package/dist/collection/components/mds-button/mds-button.css +4 -1
  187. package/dist/collection/components/mds-button/mds-button.js +42 -3
  188. package/dist/collection/components/mds-button/pattern.md +172 -0
  189. package/dist/collection/components/mds-button-dropdown/AGENTS.md +88 -0
  190. package/dist/collection/components/mds-button-dropdown/antipattern.md +158 -0
  191. package/dist/collection/components/mds-button-dropdown/documentation.json +614 -0
  192. package/dist/collection/components/mds-button-dropdown/mds-button-dropdown.js +94 -6
  193. package/dist/collection/components/mds-button-dropdown/pattern.md +164 -0
  194. package/dist/collection/components/mds-button-group/AGENTS.md +33 -0
  195. package/dist/collection/components/mds-button-group/antipattern.md +105 -0
  196. package/dist/collection/components/mds-button-group/documentation.json +43 -0
  197. package/dist/collection/components/mds-button-group/pattern.md +89 -0
  198. package/dist/collection/components/mds-calendar/AGENTS.md +96 -0
  199. package/dist/collection/components/mds-calendar/antipattern.md +113 -0
  200. package/dist/collection/components/mds-calendar/documentation.json +626 -0
  201. package/dist/collection/components/mds-calendar/pattern.md +128 -0
  202. package/dist/collection/components/mds-calendar-cell/AGENTS.md +94 -0
  203. package/dist/collection/components/mds-calendar-cell/antipattern.md +58 -0
  204. package/dist/collection/components/mds-calendar-cell/documentation.json +539 -0
  205. package/dist/collection/components/mds-calendar-cell/pattern.md +82 -0
  206. package/dist/collection/components/mds-card/AGENTS.md +60 -0
  207. package/dist/collection/components/mds-card/antipattern.md +133 -0
  208. package/dist/collection/components/mds-card/documentation.json +117 -0
  209. package/dist/collection/components/mds-card/pattern.md +160 -0
  210. package/dist/collection/components/mds-card-content/AGENTS.md +34 -0
  211. package/dist/collection/components/mds-card-content/antipattern.md +110 -0
  212. package/dist/collection/components/mds-card-content/documentation.json +43 -0
  213. package/dist/collection/components/mds-card-content/pattern.md +91 -0
  214. package/dist/collection/components/mds-card-footer/AGENTS.md +34 -0
  215. package/dist/collection/components/mds-card-footer/antipattern.md +112 -0
  216. package/dist/collection/components/mds-card-footer/documentation.json +43 -0
  217. package/dist/collection/components/mds-card-footer/pattern.md +95 -0
  218. package/dist/collection/components/mds-card-header/AGENTS.md +38 -0
  219. package/dist/collection/components/mds-card-header/antipattern.md +114 -0
  220. package/dist/collection/components/mds-card-header/documentation.json +51 -0
  221. package/dist/collection/components/mds-card-header/pattern.md +143 -0
  222. package/dist/collection/components/mds-card-media/AGENTS.md +46 -0
  223. package/dist/collection/components/mds-card-media/antipattern.md +128 -0
  224. package/dist/collection/components/mds-card-media/documentation.json +56 -0
  225. package/dist/collection/components/mds-card-media/pattern.md +93 -0
  226. package/dist/collection/components/mds-chip/AGENTS.md +84 -0
  227. package/dist/collection/components/mds-chip/antipattern.md +119 -0
  228. package/dist/collection/components/mds-chip/documentation.json +535 -0
  229. package/dist/collection/components/mds-chip/pattern.md +166 -0
  230. package/dist/collection/components/mds-details/AGENTS.md +72 -0
  231. package/dist/collection/components/mds-details/antipattern.md +128 -0
  232. package/dist/collection/components/mds-details/documentation.json +153 -0
  233. package/dist/collection/components/mds-details/pattern.md +138 -0
  234. package/dist/collection/components/mds-dropdown/AGENTS.md +95 -0
  235. package/dist/collection/components/mds-dropdown/antipattern.md +137 -0
  236. package/dist/collection/components/mds-dropdown/documentation.json +701 -0
  237. package/dist/collection/components/mds-dropdown/pattern.md +201 -0
  238. package/dist/collection/components/mds-emoji/AGENTS.md +88 -0
  239. package/dist/collection/components/mds-emoji/antipattern.md +134 -0
  240. package/dist/collection/components/mds-emoji/documentation.json +506 -0
  241. package/dist/collection/components/mds-emoji/pattern.md +219 -0
  242. package/dist/collection/components/mds-entity/AGENTS.md +76 -0
  243. package/dist/collection/components/mds-entity/antipattern.md +112 -0
  244. package/dist/collection/components/mds-entity/documentation.json +365 -0
  245. package/dist/collection/components/mds-entity/pattern.md +125 -0
  246. package/dist/collection/components/mds-file/AGENTS.md +63 -0
  247. package/dist/collection/components/mds-file/antipattern.md +92 -0
  248. package/dist/collection/components/mds-file/documentation.json +484 -0
  249. package/dist/collection/components/mds-file/pattern.md +109 -0
  250. package/dist/collection/components/mds-file-preview/AGENTS.md +88 -0
  251. package/dist/collection/components/mds-file-preview/antipattern.md +129 -0
  252. package/dist/collection/components/mds-file-preview/documentation.json +780 -0
  253. package/dist/collection/components/mds-file-preview/pattern.md +164 -0
  254. package/dist/collection/components/mds-filter/AGENTS.md +72 -0
  255. package/dist/collection/components/mds-filter/antipattern.md +140 -0
  256. package/dist/collection/components/mds-filter/documentation.json +239 -0
  257. package/dist/collection/components/mds-filter/pattern.md +129 -0
  258. package/dist/collection/components/mds-filter-item/AGENTS.md +64 -0
  259. package/dist/collection/components/mds-filter-item/antipattern.md +127 -0
  260. package/dist/collection/components/mds-filter-item/documentation.json +240 -0
  261. package/dist/collection/components/mds-filter-item/pattern.md +125 -0
  262. package/dist/collection/components/mds-header/AGENTS.md +95 -0
  263. package/dist/collection/components/mds-header/antipattern.md +120 -0
  264. package/dist/collection/components/mds-header/documentation.json +491 -0
  265. package/dist/collection/components/mds-header/pattern.md +182 -0
  266. package/dist/collection/components/mds-header-bar/AGENTS.md +80 -0
  267. package/dist/collection/components/mds-header-bar/antipattern.md +119 -0
  268. package/dist/collection/components/mds-header-bar/documentation.json +251 -0
  269. package/dist/collection/components/mds-header-bar/pattern.md +134 -0
  270. package/dist/collection/components/mds-help/AGENTS.md +65 -0
  271. package/dist/collection/components/mds-help/antipattern.md +73 -0
  272. package/dist/collection/components/mds-help/documentation.json +228 -0
  273. package/dist/collection/components/mds-help/pattern.md +106 -0
  274. package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +72 -0
  275. package/dist/collection/components/mds-horizontal-scroll/antipattern.md +120 -0
  276. package/dist/collection/components/mds-horizontal-scroll/documentation.json +279 -0
  277. package/dist/collection/components/mds-horizontal-scroll/pattern.md +154 -0
  278. package/dist/collection/components/mds-hr/AGENTS.md +27 -0
  279. package/dist/collection/components/mds-hr/antipattern.md +84 -0
  280. package/dist/collection/components/mds-hr/documentation.json +33 -0
  281. package/dist/collection/components/mds-hr/pattern.md +88 -0
  282. package/dist/collection/components/mds-icon/AGENTS.md +52 -0
  283. package/dist/collection/components/mds-icon/antipattern.md +118 -0
  284. package/dist/collection/components/mds-icon/documentation.json +205 -0
  285. package/dist/collection/components/mds-icon/pattern.md +135 -0
  286. package/dist/collection/components/mds-img/AGENTS.md +78 -0
  287. package/dist/collection/components/mds-img/antipattern.md +106 -0
  288. package/dist/collection/components/mds-img/documentation.json +470 -0
  289. package/dist/collection/components/mds-img/pattern.md +128 -0
  290. package/dist/collection/components/mds-input/AGENTS.md +138 -0
  291. package/dist/collection/components/mds-input/antipattern.md +128 -0
  292. package/dist/collection/components/mds-input/documentation.json +1574 -0
  293. package/dist/collection/components/mds-input/mds-input.js +185 -30
  294. package/dist/collection/components/mds-input/meta/input-type/InputValidationManager.js +8 -1
  295. package/dist/collection/components/mds-input/meta/validators.js +100 -2
  296. package/dist/collection/components/mds-input/meta/validity.js +35 -0
  297. package/dist/collection/components/mds-input/pattern.md +252 -0
  298. package/dist/collection/components/mds-input-date/AGENTS.md +98 -0
  299. package/dist/collection/components/mds-input-date/antipattern.md +107 -0
  300. package/dist/collection/components/mds-input-date/documentation.json +638 -0
  301. package/dist/collection/components/mds-input-date/mds-input-date.js +130 -24
  302. package/dist/collection/components/mds-input-date/pattern.md +158 -0
  303. package/dist/collection/components/mds-input-date-range/AGENTS.md +90 -0
  304. package/dist/collection/components/mds-input-date-range/antipattern.md +168 -0
  305. package/dist/collection/components/mds-input-date-range/documentation.json +502 -0
  306. package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +13 -0
  307. package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +106 -5
  308. package/dist/collection/components/mds-input-date-range/pattern.md +122 -0
  309. package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +62 -0
  310. package/dist/collection/components/mds-input-date-range-preselection/antipattern.md +147 -0
  311. package/dist/collection/components/mds-input-date-range-preselection/documentation.json +176 -0
  312. package/dist/collection/components/mds-input-date-range-preselection/pattern.md +101 -0
  313. package/dist/collection/components/mds-input-field/AGENTS.md +60 -0
  314. package/dist/collection/components/mds-input-field/antipattern.md +115 -0
  315. package/dist/collection/components/mds-input-field/documentation.json +178 -0
  316. package/dist/collection/components/mds-input-field/pattern.md +95 -0
  317. package/dist/collection/components/mds-input-otp/AGENTS.md +48 -0
  318. package/dist/collection/components/mds-input-otp/antipattern.md +105 -0
  319. package/dist/collection/components/mds-input-otp/documentation.json +203 -0
  320. package/dist/collection/components/mds-input-otp/mds-input-otp.css +4 -1
  321. package/dist/collection/components/mds-input-otp/mds-input-otp.js +88 -15
  322. package/dist/collection/components/mds-input-otp/pattern.md +107 -0
  323. package/dist/collection/components/mds-input-range/AGENTS.md +84 -0
  324. package/dist/collection/components/mds-input-range/antipattern.md +127 -0
  325. package/dist/collection/components/mds-input-range/documentation.json +315 -0
  326. package/dist/collection/components/mds-input-range/mds-input-range.css +6 -2
  327. package/dist/collection/components/mds-input-range/mds-input-range.js +30 -13
  328. package/dist/collection/components/mds-input-range/pattern.md +110 -0
  329. package/dist/collection/components/mds-input-select/AGENTS.md +99 -0
  330. package/dist/collection/components/mds-input-select/antipattern.md +126 -0
  331. package/dist/collection/components/mds-input-select/documentation.json +552 -0
  332. package/dist/collection/components/mds-input-select/mds-input-select.js +164 -35
  333. package/dist/collection/components/mds-input-select/meta/event-detail.js +1 -0
  334. package/dist/collection/components/mds-input-select/pattern.md +168 -0
  335. package/dist/collection/components/mds-input-switch/AGENTS.md +106 -0
  336. package/dist/collection/components/mds-input-switch/antipattern.md +117 -0
  337. package/dist/collection/components/mds-input-switch/documentation.json +638 -0
  338. package/dist/collection/components/mds-input-switch/mds-input-switch.css +4 -1
  339. package/dist/collection/components/mds-input-switch/mds-input-switch.js +59 -16
  340. package/dist/collection/components/mds-input-switch/pattern.md +133 -0
  341. package/dist/collection/components/mds-input-tip/AGENTS.md +56 -0
  342. package/dist/collection/components/mds-input-tip/antipattern.md +108 -0
  343. package/dist/collection/components/mds-input-tip/documentation.json +160 -0
  344. package/dist/collection/components/mds-input-tip/pattern.md +125 -0
  345. package/dist/collection/components/mds-input-tip-item/AGENTS.md +58 -0
  346. package/dist/collection/components/mds-input-tip-item/antipattern.md +98 -0
  347. package/dist/collection/components/mds-input-tip-item/documentation.json +181 -0
  348. package/dist/collection/components/mds-input-tip-item/pattern.md +107 -0
  349. package/dist/collection/components/mds-input-upload/AGENTS.md +78 -0
  350. package/dist/collection/components/mds-input-upload/antipattern.md +144 -0
  351. package/dist/collection/components/mds-input-upload/documentation.json +425 -0
  352. package/dist/collection/components/mds-input-upload/mds-input-upload.css +15 -0
  353. package/dist/collection/components/mds-input-upload/mds-input-upload.js +176 -66
  354. package/dist/collection/components/mds-input-upload/pattern.md +165 -0
  355. package/dist/collection/components/mds-keyboard/AGENTS.md +76 -0
  356. package/dist/collection/components/mds-keyboard/antipattern.md +111 -0
  357. package/dist/collection/components/mds-keyboard/documentation.json +227 -0
  358. package/dist/collection/components/mds-keyboard/pattern.md +129 -0
  359. package/dist/collection/components/mds-keyboard-key/AGENTS.md +55 -0
  360. package/dist/collection/components/mds-keyboard-key/antipattern.md +117 -0
  361. package/dist/collection/components/mds-keyboard-key/documentation.json +450 -0
  362. package/dist/collection/components/mds-keyboard-key/pattern.md +98 -0
  363. package/dist/collection/components/mds-kpi/AGENTS.md +44 -0
  364. package/dist/collection/components/mds-kpi/antipattern.md +93 -0
  365. package/dist/collection/components/mds-kpi/documentation.json +54 -0
  366. package/dist/collection/components/mds-kpi/pattern.md +109 -0
  367. package/dist/collection/components/mds-kpi-item/AGENTS.md +62 -0
  368. package/dist/collection/components/mds-kpi-item/antipattern.md +119 -0
  369. package/dist/collection/components/mds-kpi-item/documentation.json +199 -0
  370. package/dist/collection/components/mds-kpi-item/pattern.md +115 -0
  371. package/dist/collection/components/mds-label/AGENTS.md +71 -0
  372. package/dist/collection/components/mds-label/antipattern.md +92 -0
  373. package/dist/collection/components/mds-label/documentation.json +388 -0
  374. package/dist/collection/components/mds-label/pattern.md +111 -0
  375. package/dist/collection/components/mds-list/AGENTS.md +33 -0
  376. package/dist/collection/components/mds-list/antipattern.md +117 -0
  377. package/dist/collection/components/mds-list/documentation.json +43 -0
  378. package/dist/collection/components/mds-list/pattern.md +104 -0
  379. package/dist/collection/components/mds-list-item/AGENTS.md +60 -0
  380. package/dist/collection/components/mds-list-item/antipattern.md +118 -0
  381. package/dist/collection/components/mds-list-item/documentation.json +200 -0
  382. package/dist/collection/components/mds-list-item/pattern.md +101 -0
  383. package/dist/collection/components/mds-mention/AGENTS.md +55 -0
  384. package/dist/collection/components/mds-mention/antipattern.md +86 -0
  385. package/dist/collection/components/mds-mention/documentation.json +203 -0
  386. package/dist/collection/components/mds-mention/pattern.md +91 -0
  387. package/dist/collection/components/mds-modal/AGENTS.md +107 -0
  388. package/dist/collection/components/mds-modal/antipattern.md +96 -0
  389. package/dist/collection/components/mds-modal/documentation.json +552 -0
  390. package/dist/collection/components/mds-modal/pattern.md +228 -0
  391. package/dist/collection/components/mds-note/AGENTS.md +68 -0
  392. package/dist/collection/components/mds-note/antipattern.md +99 -0
  393. package/dist/collection/components/mds-note/documentation.json +220 -0
  394. package/dist/collection/components/mds-note/pattern.md +108 -0
  395. package/dist/collection/components/mds-notification/AGENTS.md +67 -0
  396. package/dist/collection/components/mds-notification/antipattern.md +86 -0
  397. package/dist/collection/components/mds-notification/documentation.json +253 -0
  398. package/dist/collection/components/mds-notification/pattern.md +98 -0
  399. package/dist/collection/components/mds-paginator/AGENTS.md +57 -0
  400. package/dist/collection/components/mds-paginator/antipattern.md +95 -0
  401. package/dist/collection/components/mds-paginator/documentation.json +135 -0
  402. package/dist/collection/components/mds-paginator/pattern.md +92 -0
  403. package/dist/collection/components/mds-paginator-item/AGENTS.md +74 -0
  404. package/dist/collection/components/mds-paginator-item/antipattern.md +95 -0
  405. package/dist/collection/components/mds-paginator-item/documentation.json +206 -0
  406. package/dist/collection/components/mds-paginator-item/pattern.md +75 -0
  407. package/dist/collection/components/mds-policy-ai/AGENTS.md +58 -0
  408. package/dist/collection/components/mds-policy-ai/antipattern.md +97 -0
  409. package/dist/collection/components/mds-policy-ai/documentation.json +244 -0
  410. package/dist/collection/components/mds-policy-ai/pattern.md +102 -0
  411. package/dist/collection/components/mds-pref/AGENTS.md +50 -0
  412. package/dist/collection/components/mds-pref/antipattern.md +85 -0
  413. package/dist/collection/components/mds-pref/documentation.json +138 -0
  414. package/dist/collection/components/mds-pref/mds-pref.js +7 -2
  415. package/dist/collection/components/mds-pref/pattern.md +93 -0
  416. package/dist/collection/components/mds-pref-animation/AGENTS.md +48 -0
  417. package/dist/collection/components/mds-pref-animation/antipattern.md +67 -0
  418. package/dist/collection/components/mds-pref-animation/documentation.json +154 -0
  419. package/dist/collection/components/mds-pref-animation/mds-pref-animation.js +26 -2
  420. package/dist/collection/components/mds-pref-animation/pattern.md +86 -0
  421. package/dist/collection/components/mds-pref-consumption/AGENTS.md +47 -0
  422. package/dist/collection/components/mds-pref-consumption/antipattern.md +84 -0
  423. package/dist/collection/components/mds-pref-consumption/documentation.json +154 -0
  424. package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +26 -2
  425. package/dist/collection/components/mds-pref-consumption/pattern.md +70 -0
  426. package/dist/collection/components/mds-pref-contrast/AGENTS.md +50 -0
  427. package/dist/collection/components/mds-pref-contrast/antipattern.md +71 -0
  428. package/dist/collection/components/mds-pref-contrast/documentation.json +154 -0
  429. package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +24 -3
  430. package/dist/collection/components/mds-pref-contrast/pattern.md +82 -0
  431. package/dist/collection/components/mds-pref-language/AGENTS.md +56 -0
  432. package/dist/collection/components/mds-pref-language/antipattern.md +130 -0
  433. package/dist/collection/components/mds-pref-language/documentation.json +174 -0
  434. package/dist/collection/components/mds-pref-language/pattern.md +104 -0
  435. package/dist/collection/components/mds-pref-language-item/AGENTS.md +48 -0
  436. package/dist/collection/components/mds-pref-language-item/antipattern.md +99 -0
  437. package/dist/collection/components/mds-pref-language-item/documentation.json +122 -0
  438. package/dist/collection/components/mds-pref-language-item/pattern.md +85 -0
  439. package/dist/collection/components/mds-pref-mode/AGENTS.md +53 -0
  440. package/dist/collection/components/mds-pref-mode/antipattern.md +104 -0
  441. package/dist/collection/components/mds-pref-mode/documentation.json +241 -0
  442. package/dist/collection/components/mds-pref-mode/mds-pref-mode.js +27 -4
  443. package/dist/collection/components/mds-pref-mode/pattern.md +94 -0
  444. package/dist/collection/components/mds-pref-theme/AGENTS.md +60 -0
  445. package/dist/collection/components/mds-pref-theme/antipattern.md +104 -0
  446. package/dist/collection/components/mds-pref-theme/documentation.json +277 -0
  447. package/dist/collection/components/mds-pref-theme/pattern.md +97 -0
  448. package/dist/collection/components/mds-pref-theme-item/AGENTS.md +60 -0
  449. package/dist/collection/components/mds-pref-theme-item/antipattern.md +98 -0
  450. package/dist/collection/components/mds-pref-theme-item/documentation.json +228 -0
  451. package/dist/collection/components/mds-pref-theme-item/pattern.md +98 -0
  452. package/dist/collection/components/mds-price-table/AGENTS.md +34 -0
  453. package/dist/collection/components/mds-price-table/antipattern.md +131 -0
  454. package/dist/collection/components/mds-price-table/documentation.json +43 -0
  455. package/dist/collection/components/mds-price-table/pattern.md +182 -0
  456. package/dist/collection/components/mds-price-table-features/AGENTS.md +61 -0
  457. package/dist/collection/components/mds-price-table-features/antipattern.md +152 -0
  458. package/dist/collection/components/mds-price-table-features/documentation.json +96 -0
  459. package/dist/collection/components/mds-price-table-features/pattern.md +157 -0
  460. package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +69 -0
  461. package/dist/collection/components/mds-price-table-features-cell/antipattern.md +105 -0
  462. package/dist/collection/components/mds-price-table-features-cell/documentation.json +154 -0
  463. package/dist/collection/components/mds-price-table-features-cell/pattern.md +128 -0
  464. package/dist/collection/components/mds-price-table-features-row/AGENTS.md +43 -0
  465. package/dist/collection/components/mds-price-table-features-row/antipattern.md +135 -0
  466. package/dist/collection/components/mds-price-table-features-row/documentation.json +64 -0
  467. package/dist/collection/components/mds-price-table-features-row/pattern.md +125 -0
  468. package/dist/collection/components/mds-price-table-header/AGENTS.md +34 -0
  469. package/dist/collection/components/mds-price-table-header/antipattern.md +133 -0
  470. package/dist/collection/components/mds-price-table-header/documentation.json +43 -0
  471. package/dist/collection/components/mds-price-table-header/pattern.md +176 -0
  472. package/dist/collection/components/mds-price-table-list/AGENTS.md +63 -0
  473. package/dist/collection/components/mds-price-table-list/antipattern.md +133 -0
  474. package/dist/collection/components/mds-price-table-list/documentation.json +104 -0
  475. package/dist/collection/components/mds-price-table-list/pattern.md +134 -0
  476. package/dist/collection/components/mds-price-table-list-item/AGENTS.md +61 -0
  477. package/dist/collection/components/mds-price-table-list-item/antipattern.md +90 -0
  478. package/dist/collection/components/mds-price-table-list-item/documentation.json +145 -0
  479. package/dist/collection/components/mds-price-table-list-item/pattern.md +105 -0
  480. package/dist/collection/components/mds-progress/AGENTS.md +68 -0
  481. package/dist/collection/components/mds-progress/antipattern.md +94 -0
  482. package/dist/collection/components/mds-progress/documentation.json +375 -0
  483. package/dist/collection/components/mds-progress/pattern.md +139 -0
  484. package/dist/collection/components/mds-push-notification/AGENTS.md +88 -0
  485. package/dist/collection/components/mds-push-notification/antipattern.md +154 -0
  486. package/dist/collection/components/mds-push-notification/documentation.json +306 -0
  487. package/dist/collection/components/mds-push-notification/pattern.md +203 -0
  488. package/dist/collection/components/mds-push-notification-item/AGENTS.md +91 -0
  489. package/dist/collection/components/mds-push-notification-item/antipattern.md +129 -0
  490. package/dist/collection/components/mds-push-notification-item/documentation.json +586 -0
  491. package/dist/collection/components/mds-push-notification-item/pattern.md +201 -0
  492. package/dist/collection/components/mds-quote/AGENTS.md +51 -0
  493. package/dist/collection/components/mds-quote/antipattern.md +122 -0
  494. package/dist/collection/components/mds-quote/documentation.json +176 -0
  495. package/dist/collection/components/mds-quote/pattern.md +108 -0
  496. package/dist/collection/components/mds-radial-menu/AGENTS.md +87 -0
  497. package/dist/collection/components/mds-radial-menu/antipattern.md +104 -0
  498. package/dist/collection/components/mds-radial-menu/documentation.json +581 -0
  499. package/dist/collection/components/mds-radial-menu/pattern.md +150 -0
  500. package/dist/collection/components/mds-radial-menu-item/AGENTS.md +51 -0
  501. package/dist/collection/components/mds-radial-menu-item/antipattern.md +106 -0
  502. package/dist/collection/components/mds-radial-menu-item/documentation.json +294 -0
  503. package/dist/collection/components/mds-radial-menu-item/pattern.md +98 -0
  504. package/dist/collection/components/mds-radial-progress/AGENTS.md +58 -0
  505. package/dist/collection/components/mds-radial-progress/antipattern.md +99 -0
  506. package/dist/collection/components/mds-radial-progress/documentation.json +232 -0
  507. package/dist/collection/components/mds-radial-progress/pattern.md +132 -0
  508. package/dist/collection/components/mds-separator/AGENTS.md +39 -0
  509. package/dist/collection/components/mds-separator/antipattern.md +98 -0
  510. package/dist/collection/components/mds-separator/documentation.json +45 -0
  511. package/dist/collection/components/mds-separator/pattern.md +82 -0
  512. package/dist/collection/components/mds-spinner/AGENTS.md +49 -0
  513. package/dist/collection/components/mds-spinner/antipattern.md +93 -0
  514. package/dist/collection/components/mds-spinner/documentation.json +86 -0
  515. package/dist/collection/components/mds-spinner/pattern.md +102 -0
  516. package/dist/collection/components/mds-status-bar/AGENTS.md +75 -0
  517. package/dist/collection/components/mds-status-bar/antipattern.md +128 -0
  518. package/dist/collection/components/mds-status-bar/documentation.json +262 -0
  519. package/dist/collection/components/mds-status-bar/pattern.md +123 -0
  520. package/dist/collection/components/mds-stepper-bar/AGENTS.md +74 -0
  521. package/dist/collection/components/mds-stepper-bar/antipattern.md +123 -0
  522. package/dist/collection/components/mds-stepper-bar/documentation.json +208 -0
  523. package/dist/collection/components/mds-stepper-bar/pattern.md +182 -0
  524. package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +84 -0
  525. package/dist/collection/components/mds-stepper-bar-item/antipattern.md +115 -0
  526. package/dist/collection/components/mds-stepper-bar-item/documentation.json +453 -0
  527. package/dist/collection/components/mds-stepper-bar-item/pattern.md +203 -0
  528. package/dist/collection/components/mds-tab/AGENTS.md +109 -0
  529. package/dist/collection/components/mds-tab/antipattern.md +164 -0
  530. package/dist/collection/components/mds-tab/documentation.json +495 -0
  531. package/dist/collection/components/mds-tab/pattern.md +201 -0
  532. package/dist/collection/components/mds-tab-bar/AGENTS.md +46 -0
  533. package/dist/collection/components/mds-tab-bar/antipattern.md +105 -0
  534. package/dist/collection/components/mds-tab-bar/documentation.json +71 -0
  535. package/dist/collection/components/mds-tab-bar/pattern.md +87 -0
  536. package/dist/collection/components/mds-tab-bar-item/AGENTS.md +67 -0
  537. package/dist/collection/components/mds-tab-bar-item/antipattern.md +116 -0
  538. package/dist/collection/components/mds-tab-bar-item/documentation.json +210 -0
  539. package/dist/collection/components/mds-tab-bar-item/pattern.md +110 -0
  540. package/dist/collection/components/mds-tab-item/AGENTS.md +82 -0
  541. package/dist/collection/components/mds-tab-item/antipattern.md +138 -0
  542. package/dist/collection/components/mds-tab-item/documentation.json +577 -0
  543. package/dist/collection/components/mds-tab-item/pattern.md +155 -0
  544. package/dist/collection/components/mds-table/AGENTS.md +90 -0
  545. package/dist/collection/components/mds-table/antipattern.md +169 -0
  546. package/dist/collection/components/mds-table/documentation.json +304 -0
  547. package/dist/collection/components/mds-table/pattern.md +288 -0
  548. package/dist/collection/components/mds-table-body/AGENTS.md +55 -0
  549. package/dist/collection/components/mds-table-body/antipattern.md +118 -0
  550. package/dist/collection/components/mds-table-body/documentation.json +122 -0
  551. package/dist/collection/components/mds-table-body/pattern.md +154 -0
  552. package/dist/collection/components/mds-table-cell/AGENTS.md +56 -0
  553. package/dist/collection/components/mds-table-cell/antipattern.md +100 -0
  554. package/dist/collection/components/mds-table-cell/documentation.json +104 -0
  555. package/dist/collection/components/mds-table-cell/pattern.md +168 -0
  556. package/dist/collection/components/mds-table-footer/AGENTS.md +33 -0
  557. package/dist/collection/components/mds-table-footer/antipattern.md +114 -0
  558. package/dist/collection/components/mds-table-footer/documentation.json +43 -0
  559. package/dist/collection/components/mds-table-footer/pattern.md +116 -0
  560. package/dist/collection/components/mds-table-header/AGENTS.md +61 -0
  561. package/dist/collection/components/mds-table-header/antipattern.md +157 -0
  562. package/dist/collection/components/mds-table-header/documentation.json +156 -0
  563. package/dist/collection/components/mds-table-header/pattern.md +158 -0
  564. package/dist/collection/components/mds-table-header-cell/AGENTS.md +51 -0
  565. package/dist/collection/components/mds-table-header-cell/antipattern.md +108 -0
  566. package/dist/collection/components/mds-table-header-cell/documentation.json +158 -0
  567. package/dist/collection/components/mds-table-header-cell/pattern.md +145 -0
  568. package/dist/collection/components/mds-table-row/AGENTS.md +68 -0
  569. package/dist/collection/components/mds-table-row/antipattern.md +142 -0
  570. package/dist/collection/components/mds-table-row/documentation.json +252 -0
  571. package/dist/collection/components/mds-table-row/pattern.md +157 -0
  572. package/dist/collection/components/mds-text/AGENTS.md +64 -0
  573. package/dist/collection/components/mds-text/antipattern.md +113 -0
  574. package/dist/collection/components/mds-text/documentation.json +746 -0
  575. package/dist/collection/components/mds-text/pattern.md +139 -0
  576. package/dist/collection/components/mds-toast/AGENTS.md +78 -0
  577. package/dist/collection/components/mds-toast/antipattern.md +131 -0
  578. package/dist/collection/components/mds-toast/documentation.json +339 -0
  579. package/dist/collection/components/mds-toast/pattern.md +161 -0
  580. package/dist/collection/components/mds-tooltip/AGENTS.md +80 -0
  581. package/dist/collection/components/mds-tooltip/antipattern.md +108 -0
  582. package/dist/collection/components/mds-tooltip/documentation.json +483 -0
  583. package/dist/collection/components/mds-tooltip/pattern.md +128 -0
  584. package/dist/collection/components/mds-tree/AGENTS.md +88 -0
  585. package/dist/collection/components/mds-tree/antipattern.md +153 -0
  586. package/dist/collection/components/mds-tree/documentation.json +472 -0
  587. package/dist/collection/components/mds-tree/pattern.md +198 -0
  588. package/dist/collection/components/mds-tree-item/AGENTS.md +119 -0
  589. package/dist/collection/components/mds-tree-item/antipattern.md +152 -0
  590. package/dist/collection/components/mds-tree-item/documentation.json +646 -0
  591. package/dist/collection/components/mds-tree-item/pattern.md +201 -0
  592. package/dist/collection/components/mds-url-view/AGENTS.md +63 -0
  593. package/dist/collection/components/mds-url-view/antipattern.md +107 -0
  594. package/dist/collection/components/mds-url-view/documentation.json +209 -0
  595. package/dist/collection/components/mds-url-view/pattern.md +106 -0
  596. package/dist/collection/components/mds-usage/AGENTS.md +70 -0
  597. package/dist/collection/components/mds-usage/antipattern.md +87 -0
  598. package/dist/collection/components/mds-usage/documentation.json +156 -0
  599. package/dist/collection/components/mds-usage/pattern.md +117 -0
  600. package/dist/collection/components/mds-video-wall/AGENTS.md +65 -0
  601. package/dist/collection/components/mds-video-wall/antipattern.md +97 -0
  602. package/dist/collection/components/mds-video-wall/documentation.json +316 -0
  603. package/dist/collection/components/mds-video-wall/pattern.md +101 -0
  604. package/dist/collection/components/mds-zero/AGENTS.md +55 -0
  605. package/dist/collection/components/mds-zero/antipattern.md +106 -0
  606. package/dist/collection/components/mds-zero/documentation.json +82 -0
  607. package/dist/collection/components/mds-zero/pattern.md +118 -0
  608. package/dist/components/index.js +1 -1
  609. package/dist/components/mds-accordion-item.js +1 -1
  610. package/dist/components/mds-accordion-timer-item.js +1 -1
  611. package/dist/components/mds-accordion-timer.js +1 -1
  612. package/dist/components/mds-accordion.js +1 -1
  613. package/dist/components/mds-author.js +1 -1
  614. package/dist/components/mds-avatar-stack-item.js +1 -1
  615. package/dist/components/mds-avatar-stack.js +1 -1
  616. package/dist/components/mds-avatar.js +1 -1
  617. package/dist/components/mds-badge.js +1 -1
  618. package/dist/components/mds-banner.js +1 -1
  619. package/dist/components/mds-benchmark-bar.js +1 -1
  620. package/dist/components/mds-bibliography.js +1 -1
  621. package/dist/components/mds-breadcrumb-item.js +1 -1
  622. package/dist/components/mds-breadcrumb.js +1 -1
  623. package/dist/components/mds-button-dropdown.js +1 -1
  624. package/dist/components/mds-button-group.js +1 -1
  625. package/dist/components/mds-button.js +1 -1
  626. package/dist/components/mds-calendar-cell.js +1 -1
  627. package/dist/components/mds-calendar.js +1 -1
  628. package/dist/components/mds-card-content.js +1 -1
  629. package/dist/components/mds-card-footer.js +1 -1
  630. package/dist/components/mds-card-header.js +1 -1
  631. package/dist/components/mds-card-media.js +1 -1
  632. package/dist/components/mds-card.js +1 -1
  633. package/dist/components/mds-chip.js +1 -1
  634. package/dist/components/mds-details.js +1 -1
  635. package/dist/components/mds-dropdown.js +1 -1
  636. package/dist/components/mds-emoji.js +3 -3
  637. package/dist/components/mds-entity.js +1 -1
  638. package/dist/components/mds-file-preview.js +1 -1
  639. package/dist/components/mds-file.js +3 -3
  640. package/dist/components/mds-filter-item.js +1 -1
  641. package/dist/components/mds-filter.js +1 -1
  642. package/dist/components/mds-header-bar.js +1 -1
  643. package/dist/components/mds-header.js +1 -1
  644. package/dist/components/mds-help.js +1 -1
  645. package/dist/components/mds-horizontal-scroll.js +1 -1
  646. package/dist/components/mds-hr.js +1 -1
  647. package/dist/components/mds-icon.js +1 -1
  648. package/dist/components/mds-img.js +1 -1
  649. package/dist/components/mds-input-date-range-preselection.js +1 -1
  650. package/dist/components/mds-input-date-range.js +1 -1
  651. package/dist/components/mds-input-date.js +1 -1
  652. package/dist/components/mds-input-field.js +1 -1
  653. package/dist/components/mds-input-otp.js +1 -1
  654. package/dist/components/mds-input-range.js +1 -1
  655. package/dist/components/mds-input-select.js +1 -1
  656. package/dist/components/mds-input-switch.js +1 -1
  657. package/dist/components/mds-input-tip-item.js +1 -1
  658. package/dist/components/mds-input-tip.js +1 -1
  659. package/dist/components/mds-input-upload.js +1 -1
  660. package/dist/components/mds-input.js +1 -1
  661. package/dist/components/mds-keyboard-key.js +1 -1
  662. package/dist/components/mds-keyboard.js +1 -1
  663. package/dist/components/mds-kpi-item.js +1 -1
  664. package/dist/components/mds-kpi.js +1 -1
  665. package/dist/components/mds-label.js +1 -1
  666. package/dist/components/mds-list-item.js +1 -1
  667. package/dist/components/mds-list.js +1 -1
  668. package/dist/components/mds-mention.js +1 -1
  669. package/dist/components/mds-modal.js +1 -1
  670. package/dist/components/mds-note.js +1 -1
  671. package/dist/components/mds-notification.js +1 -1
  672. package/dist/components/mds-paginator-item.js +1 -1
  673. package/dist/components/mds-paginator.js +1 -1
  674. package/dist/components/mds-policy-ai.js +1 -1
  675. package/dist/components/mds-pref-animation.js +1 -1
  676. package/dist/components/mds-pref-consumption.js +1 -1
  677. package/dist/components/mds-pref-contrast.js +1 -1
  678. package/dist/components/mds-pref-language-item.js +1 -1
  679. package/dist/components/mds-pref-language.js +1 -1
  680. package/dist/components/mds-pref-mode.js +1 -1
  681. package/dist/components/mds-pref-theme-item.js +1 -1
  682. package/dist/components/mds-pref-theme.js +1 -1
  683. package/dist/components/mds-pref.js +1 -1
  684. package/dist/components/mds-price-table-features-cell.js +1 -1
  685. package/dist/components/mds-price-table-features-row.js +1 -1
  686. package/dist/components/mds-price-table-features.js +1 -1
  687. package/dist/components/mds-price-table-header.js +1 -1
  688. package/dist/components/mds-price-table-list-item.js +1 -1
  689. package/dist/components/mds-price-table-list.js +1 -1
  690. package/dist/components/mds-price-table.js +1 -1
  691. package/dist/components/mds-progress.js +1 -1
  692. package/dist/components/mds-push-notification-item.js +1 -1
  693. package/dist/components/mds-push-notification.js +1 -1
  694. package/dist/components/mds-quote.js +1 -1
  695. package/dist/components/mds-radial-menu-item.js +1 -1
  696. package/dist/components/mds-radial-menu.js +1 -1
  697. package/dist/components/mds-radial-progress.js +1 -1
  698. package/dist/components/mds-separator.js +1 -1
  699. package/dist/components/mds-spinner.js +1 -1
  700. package/dist/components/mds-status-bar.js +1 -1
  701. package/dist/components/mds-stepper-bar-item.js +1 -1
  702. package/dist/components/mds-stepper-bar.js +1 -1
  703. package/dist/components/mds-tab-bar-item.js +1 -1
  704. package/dist/components/mds-tab-bar.js +1 -1
  705. package/dist/components/mds-tab-item.js +1 -1
  706. package/dist/components/mds-tab.js +1 -1
  707. package/dist/components/mds-table-body.js +1 -1
  708. package/dist/components/mds-table-cell.js +1 -1
  709. package/dist/components/mds-table-footer.js +1 -1
  710. package/dist/components/mds-table-header-cell.js +1 -1
  711. package/dist/components/mds-table-header.js +1 -1
  712. package/dist/components/mds-table-row.js +1 -1
  713. package/dist/components/mds-table.js +1 -1
  714. package/dist/components/mds-text.js +1 -1
  715. package/dist/components/mds-toast.js +1 -1
  716. package/dist/components/mds-tooltip.js +1 -1
  717. package/dist/components/mds-tree-item.js +1 -1
  718. package/dist/components/mds-tree.js +1 -1
  719. package/dist/components/mds-url-view.js +1 -1
  720. package/dist/components/mds-usage.js +1 -1
  721. package/dist/components/mds-video-wall.js +1 -1
  722. package/dist/components/mds-zero.js +1 -1
  723. package/dist/components/p--miH951G.js +5 -0
  724. package/dist/components/p-1aH7xiMs.js +1 -0
  725. package/dist/components/p-B05zwjTY.js +1 -0
  726. package/dist/components/p-BOu_NOgd.js +1 -0
  727. package/dist/components/p-BTpjOy0A.js +1 -0
  728. package/dist/components/p-BVw5aqzn.js +1 -0
  729. package/dist/components/p-BW24ByN-.js +1 -0
  730. package/dist/components/p-BWpSxp3h.js +1 -0
  731. package/dist/components/p-BXPIlPIF.js +1 -0
  732. package/dist/components/p-BzvYQBdf.js +1 -0
  733. package/dist/components/p-C3Sn8bRc.js +1 -0
  734. package/dist/components/p-CGkSDkOY.js +1 -0
  735. package/dist/components/p-CIcshx6K.js +1 -0
  736. package/dist/components/p-CKS4r32k.js +1 -0
  737. package/dist/components/p-COkF_8bh.js +1 -0
  738. package/dist/components/p-CmHMhHMt.js +1 -0
  739. package/dist/components/p-Cnt6G6GK.js +1 -0
  740. package/dist/components/p-CsL9U6eU.js +1 -0
  741. package/dist/components/p-Cyj1BFxx.js +1 -0
  742. package/dist/components/p-DQqUzCGR.js +1 -0
  743. package/dist/components/p-DR46G4-6.js +1 -0
  744. package/dist/components/p-DcW0iRnZ.js +1 -0
  745. package/dist/components/p-DebgFlHq.js +1 -0
  746. package/dist/components/p-DmPLOktp.js +1 -0
  747. package/dist/components/p-Dpf8NWF9.js +1 -0
  748. package/dist/components/p-DwA-5c8G.js +1 -0
  749. package/dist/components/p-Dws02cT2.js +8 -0
  750. package/dist/components/p-K3QNYRhf.js +1 -0
  751. package/dist/components/p-PQ_EO5-U.js +1 -0
  752. package/dist/components/p-akEzGmDD.js +1 -0
  753. package/dist/components/p-bDVBqkn0.js +1 -0
  754. package/dist/components/p-faViX-qz.js +1 -0
  755. package/dist/components/p-pBvN1uAc.js +3 -0
  756. package/dist/components/p-wI0alRSO.js +1 -0
  757. package/dist/components/p-x_c_51aL.js +1 -0
  758. package/dist/components/p-zHpei4x6.js +1 -0
  759. package/dist/documentation.json +618 -360
  760. package/dist/esm/floating-controller-BTYkH_Ih.js +366 -0
  761. package/dist/esm/form-wI0alRSO.js +42 -0
  762. package/dist/esm/index-BhCZiGfL.js +196 -0
  763. package/dist/esm/index-BxPbQB28.js +5149 -0
  764. package/dist/esm/index.js +1 -1
  765. package/dist/esm/loader.js +3 -3
  766. package/dist/esm/locale-CVJm6KFD.js +814 -0
  767. package/dist/esm/magma-components.js +3 -3
  768. package/dist/esm/mds-accordion-item.entry.js +2 -2
  769. package/dist/esm/mds-accordion-timer-item.entry.js +2 -2
  770. package/dist/esm/mds-accordion-timer.entry.js +1 -1
  771. package/dist/esm/mds-accordion.entry.js +2 -2
  772. package/dist/esm/mds-author.entry.js +1 -1
  773. package/dist/esm/mds-avatar-stack-item.entry.js +1 -1
  774. package/dist/esm/mds-avatar-stack.entry.js +1 -1
  775. package/dist/esm/mds-avatar.entry.js +2 -2
  776. package/dist/esm/mds-badge.entry.js +2 -2
  777. package/dist/esm/mds-banner_3.entry.js +3 -3
  778. package/dist/esm/mds-benchmark-bar.entry.js +1 -1
  779. package/dist/esm/mds-bibliography.entry.js +1 -1
  780. package/dist/esm/mds-breadcrumb-item.entry.js +1 -1
  781. package/dist/esm/mds-breadcrumb.entry.js +3 -3
  782. package/dist/esm/mds-button-dropdown.entry.js +38 -4
  783. package/dist/esm/mds-button-group.entry.js +1 -1
  784. package/dist/esm/mds-button_3.entry.js +7 -6
  785. package/dist/esm/mds-calendar_2.entry.js +2 -2
  786. package/dist/esm/mds-card-content.entry.js +1 -1
  787. package/dist/esm/mds-card-footer.entry.js +1 -1
  788. package/dist/esm/mds-card-header.entry.js +1 -1
  789. package/dist/esm/mds-card-media.entry.js +1 -1
  790. package/dist/esm/mds-card.entry.js +2 -2
  791. package/dist/esm/mds-details.entry.js +2 -2
  792. package/dist/esm/mds-dropdown.entry.js +3 -3
  793. package/dist/esm/mds-emoji.entry.js +2 -2
  794. package/dist/esm/mds-entity.entry.js +2 -2
  795. package/dist/esm/mds-file-preview.entry.js +3 -3
  796. package/dist/esm/mds-file.entry.js +3 -3
  797. package/dist/esm/mds-filter-item.entry.js +2 -2
  798. package/dist/esm/mds-filter.entry.js +2 -2
  799. package/dist/esm/mds-header-bar.entry.js +2 -2
  800. package/dist/esm/mds-header.entry.js +2 -2
  801. package/dist/esm/mds-horizontal-scroll.entry.js +1 -1
  802. package/dist/esm/mds-hr.entry.js +2 -2
  803. package/dist/esm/mds-img.entry.js +3 -3
  804. package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
  805. package/dist/esm/mds-input-date-range.entry.js +89 -9
  806. package/dist/esm/mds-input-date.entry.js +124 -27
  807. package/dist/esm/mds-input-field.entry.js +1 -1
  808. package/dist/esm/mds-input-otp.entry.js +65 -19
  809. package/dist/esm/mds-input-range.entry.js +32 -16
  810. package/dist/esm/mds-input-select.entry.js +159 -30
  811. package/dist/esm/mds-input-switch_2.entry.js +63 -21
  812. package/dist/esm/mds-input-tip_2.entry.js +3 -3
  813. package/dist/esm/mds-input-upload.entry.js +136 -67
  814. package/dist/esm/mds-input.entry.js +320 -36
  815. package/dist/esm/mds-keyboard-key.entry.js +3 -3
  816. package/dist/esm/mds-keyboard.entry.js +3 -3
  817. package/dist/esm/mds-kpi-item.entry.js +2 -2
  818. package/dist/esm/mds-kpi.entry.js +1 -1
  819. package/dist/esm/mds-label.entry.js +3 -3
  820. package/dist/esm/mds-list-item.entry.js +2 -2
  821. package/dist/esm/mds-list.entry.js +1 -1
  822. package/dist/esm/mds-mention.entry.js +3 -3
  823. package/dist/esm/mds-modal.entry.js +2 -2
  824. package/dist/esm/mds-note.entry.js +3 -3
  825. package/dist/esm/mds-notification.entry.js +2 -2
  826. package/dist/esm/mds-paginator-item.entry.js +2 -2
  827. package/dist/esm/mds-paginator.entry.js +2 -2
  828. package/dist/esm/mds-policy-ai.entry.js +3 -3
  829. package/dist/esm/mds-pref-animation.entry.js +29 -5
  830. package/dist/esm/mds-pref-consumption.entry.js +29 -5
  831. package/dist/esm/mds-pref-contrast.entry.js +27 -6
  832. package/dist/esm/mds-pref-language-item.entry.js +3 -3
  833. package/dist/esm/mds-pref-language.entry.js +3 -3
  834. package/dist/esm/mds-pref-mode.entry.js +30 -7
  835. package/dist/esm/mds-pref-theme-item.entry.js +1 -1
  836. package/dist/esm/mds-pref-theme.entry.js +3 -3
  837. package/dist/esm/mds-pref.entry.js +10 -5
  838. package/dist/esm/mds-price-table-features-cell.entry.js +2 -2
  839. package/dist/esm/mds-price-table-features-row.entry.js +2 -2
  840. package/dist/esm/mds-price-table-features.entry.js +2 -2
  841. package/dist/esm/mds-price-table-header.entry.js +1 -1
  842. package/dist/esm/mds-price-table-list-item.entry.js +1 -1
  843. package/dist/esm/mds-price-table-list.entry.js +2 -2
  844. package/dist/esm/mds-price-table.entry.js +1 -1
  845. package/dist/esm/mds-progress_2.entry.js +2 -2
  846. package/dist/esm/mds-push-notification-item.entry.js +3 -3
  847. package/dist/esm/mds-push-notification.entry.js +2 -2
  848. package/dist/esm/mds-quote.entry.js +2 -2
  849. package/dist/esm/mds-radial-menu-item.entry.js +1 -1
  850. package/dist/esm/mds-radial-menu.entry.js +2 -2
  851. package/dist/esm/mds-separator.entry.js +2 -2
  852. package/dist/esm/mds-status-bar.entry.js +2 -2
  853. package/dist/esm/mds-stepper-bar-item.entry.js +3 -3
  854. package/dist/esm/mds-stepper-bar.entry.js +1 -1
  855. package/dist/esm/mds-tab-bar-item.entry.js +2 -2
  856. package/dist/esm/mds-tab-bar.entry.js +2 -2
  857. package/dist/esm/mds-tab_2.entry.js +2 -2
  858. package/dist/esm/mds-table-body.entry.js +2 -2
  859. package/dist/esm/mds-table-footer.entry.js +2 -2
  860. package/dist/esm/mds-table-header-cell.entry.js +2 -2
  861. package/dist/esm/mds-table-header.entry.js +3 -3
  862. package/dist/esm/mds-table-row.entry.js +3 -3
  863. package/dist/esm/mds-table.entry.js +3 -3
  864. package/dist/esm/mds-text.entry.js +2 -2
  865. package/dist/esm/mds-toast.entry.js +2 -2
  866. package/dist/esm/mds-tooltip.entry.js +3 -3
  867. package/dist/esm/mds-tree-item.entry.js +3 -3
  868. package/dist/esm/mds-tree.entry.js +1 -1
  869. package/dist/esm/mds-url-view.entry.js +3 -3
  870. package/dist/esm/mds-usage.entry.js +3 -3
  871. package/dist/esm/mds-video-wall.entry.js +1 -1
  872. package/dist/esm/mds-zero.entry.js +2 -2
  873. package/dist/esm/preference-DNNqH7BU.js +385 -0
  874. package/dist/esm-es5/floating-controller-BTYkH_Ih.js +66 -0
  875. package/dist/esm-es5/form-wI0alRSO.js +16 -0
  876. package/dist/esm-es5/index-BhCZiGfL.js +10 -0
  877. package/dist/esm-es5/index-BxPbQB28.js +371 -0
  878. package/dist/esm-es5/index.js +1 -1
  879. package/dist/esm-es5/loader.js +1 -1
  880. package/dist/esm-es5/locale-CVJm6KFD.js +230 -0
  881. package/dist/esm-es5/magma-components.js +2 -2
  882. package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
  883. package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
  884. package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
  885. package/dist/esm-es5/mds-accordion.entry.js +1 -1
  886. package/dist/esm-es5/mds-author.entry.js +1 -1
  887. package/dist/esm-es5/mds-avatar-stack-item.entry.js +1 -1
  888. package/dist/esm-es5/mds-avatar-stack.entry.js +1 -1
  889. package/dist/esm-es5/mds-avatar.entry.js +2 -2
  890. package/dist/esm-es5/mds-badge.entry.js +1 -1
  891. package/dist/esm-es5/mds-banner_3.entry.js +1 -1
  892. package/dist/esm-es5/mds-benchmark-bar.entry.js +1 -1
  893. package/dist/esm-es5/mds-bibliography.entry.js +1 -1
  894. package/dist/esm-es5/mds-breadcrumb-item.entry.js +1 -1
  895. package/dist/esm-es5/mds-breadcrumb.entry.js +2 -2
  896. package/dist/esm-es5/mds-button-dropdown.entry.js +10 -4
  897. package/dist/esm-es5/mds-button-group.entry.js +1 -1
  898. package/dist/esm-es5/mds-button_3.entry.js +3 -3
  899. package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
  900. package/dist/esm-es5/mds-card-content.entry.js +1 -1
  901. package/dist/esm-es5/mds-card-footer.entry.js +1 -1
  902. package/dist/esm-es5/mds-card-header.entry.js +1 -1
  903. package/dist/esm-es5/mds-card-media.entry.js +1 -1
  904. package/dist/esm-es5/mds-card.entry.js +1 -1
  905. package/dist/esm-es5/mds-details.entry.js +1 -1
  906. package/dist/esm-es5/mds-dropdown.entry.js +1 -1
  907. package/dist/esm-es5/mds-emoji.entry.js +1 -1
  908. package/dist/esm-es5/mds-entity.entry.js +1 -1
  909. package/dist/esm-es5/mds-file-preview.entry.js +11 -11
  910. package/dist/esm-es5/mds-file.entry.js +11 -11
  911. package/dist/esm-es5/mds-filter-item.entry.js +1 -1
  912. package/dist/esm-es5/mds-filter.entry.js +1 -1
  913. package/dist/esm-es5/mds-header-bar.entry.js +1 -1
  914. package/dist/esm-es5/mds-header.entry.js +1 -1
  915. package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
  916. package/dist/esm-es5/mds-hr.entry.js +1 -1
  917. package/dist/esm-es5/mds-img.entry.js +1 -1
  918. package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
  919. package/dist/esm-es5/mds-input-date-range.entry.js +33 -6
  920. package/dist/esm-es5/mds-input-date.entry.js +47 -7
  921. package/dist/esm-es5/mds-input-field.entry.js +1 -1
  922. package/dist/esm-es5/mds-input-otp.entry.js +21 -4
  923. package/dist/esm-es5/mds-input-range.entry.js +15 -7
  924. package/dist/esm-es5/mds-input-select.entry.js +37 -6
  925. package/dist/esm-es5/mds-input-switch_2.entry.js +24 -4
  926. package/dist/esm-es5/mds-input-tip_2.entry.js +1 -1
  927. package/dist/esm-es5/mds-input-upload.entry.js +42 -18
  928. package/dist/esm-es5/mds-input.entry.js +105 -22
  929. package/dist/esm-es5/mds-keyboard-key.entry.js +1 -1
  930. package/dist/esm-es5/mds-keyboard.entry.js +1 -1
  931. package/dist/esm-es5/mds-kpi-item.entry.js +1 -1
  932. package/dist/esm-es5/mds-kpi.entry.js +1 -1
  933. package/dist/esm-es5/mds-label.entry.js +1 -1
  934. package/dist/esm-es5/mds-list-item.entry.js +1 -1
  935. package/dist/esm-es5/mds-list.entry.js +1 -1
  936. package/dist/esm-es5/mds-mention.entry.js +1 -1
  937. package/dist/esm-es5/mds-modal.entry.js +1 -1
  938. package/dist/esm-es5/mds-note.entry.js +1 -1
  939. package/dist/esm-es5/mds-notification.entry.js +1 -1
  940. package/dist/esm-es5/mds-paginator-item.entry.js +1 -1
  941. package/dist/esm-es5/mds-paginator.entry.js +1 -1
  942. package/dist/esm-es5/mds-policy-ai.entry.js +1 -1
  943. package/dist/esm-es5/mds-pref-animation.entry.js +7 -1
  944. package/dist/esm-es5/mds-pref-consumption.entry.js +7 -1
  945. package/dist/esm-es5/mds-pref-contrast.entry.js +8 -2
  946. package/dist/esm-es5/mds-pref-language-item.entry.js +1 -1
  947. package/dist/esm-es5/mds-pref-language.entry.js +1 -1
  948. package/dist/esm-es5/mds-pref-mode.entry.js +10 -2
  949. package/dist/esm-es5/mds-pref-theme-item.entry.js +1 -1
  950. package/dist/esm-es5/mds-pref-theme.entry.js +1 -1
  951. package/dist/esm-es5/mds-pref.entry.js +6 -3
  952. package/dist/esm-es5/mds-price-table-features-cell.entry.js +1 -1
  953. package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
  954. package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
  955. package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
  956. package/dist/esm-es5/mds-price-table-list-item.entry.js +1 -1
  957. package/dist/esm-es5/mds-price-table-list.entry.js +1 -1
  958. package/dist/esm-es5/mds-price-table.entry.js +1 -1
  959. package/dist/esm-es5/mds-progress_2.entry.js +1 -1
  960. package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
  961. package/dist/esm-es5/mds-push-notification.entry.js +1 -1
  962. package/dist/esm-es5/mds-quote.entry.js +1 -1
  963. package/dist/esm-es5/mds-radial-menu-item.entry.js +1 -1
  964. package/dist/esm-es5/mds-radial-menu.entry.js +1 -1
  965. package/dist/esm-es5/mds-separator.entry.js +1 -1
  966. package/dist/esm-es5/mds-status-bar.entry.js +1 -1
  967. package/dist/esm-es5/mds-stepper-bar-item.entry.js +1 -1
  968. package/dist/esm-es5/mds-stepper-bar.entry.js +1 -1
  969. package/dist/esm-es5/mds-tab-bar-item.entry.js +1 -1
  970. package/dist/esm-es5/mds-tab-bar.entry.js +1 -1
  971. package/dist/esm-es5/mds-tab_2.entry.js +1 -1
  972. package/dist/esm-es5/mds-table-body.entry.js +1 -1
  973. package/dist/esm-es5/mds-table-footer.entry.js +1 -1
  974. package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
  975. package/dist/esm-es5/mds-table-header.entry.js +1 -1
  976. package/dist/esm-es5/mds-table-row.entry.js +1 -1
  977. package/dist/esm-es5/mds-table.entry.js +1 -1
  978. package/dist/esm-es5/mds-text.entry.js +1 -1
  979. package/dist/esm-es5/mds-toast.entry.js +1 -1
  980. package/dist/esm-es5/mds-tooltip.entry.js +1 -1
  981. package/dist/esm-es5/mds-tree-item.entry.js +1 -1
  982. package/dist/esm-es5/mds-tree.entry.js +1 -1
  983. package/dist/esm-es5/mds-url-view.entry.js +1 -1
  984. package/dist/esm-es5/mds-usage.entry.js +1 -1
  985. package/dist/esm-es5/mds-video-wall.entry.js +1 -1
  986. package/dist/esm-es5/mds-zero.entry.js +1 -1
  987. package/dist/esm-es5/preference-DNNqH7BU.js +58 -0
  988. package/dist/hydrate/index.js +1431 -309
  989. package/dist/hydrate/index.mjs +1431 -309
  990. package/dist/magma-components/index.esm.js +1 -1
  991. package/dist/magma-components/magma-components.esm.js +1 -1
  992. package/dist/magma-components/magma-components.js +1 -1
  993. package/dist/magma-components/p-00e47e49.system.entry.js +14 -0
  994. package/dist/magma-components/p-0141c597.system.entry.js +15 -0
  995. package/dist/magma-components/p-021f96f8.entry.js +1 -0
  996. package/dist/magma-components/p-0255924b.system.entry.js +22 -0
  997. package/dist/magma-components/p-03c2060d.entry.js +1 -0
  998. package/dist/magma-components/p-05014374.entry.js +1 -0
  999. package/dist/magma-components/p-05f73994.entry.js +1 -0
  1000. package/dist/magma-components/p-0646392d.entry.js +1 -0
  1001. package/dist/magma-components/p-0a38e4ce.system.entry.js +1 -0
  1002. package/dist/magma-components/p-0a551e86.entry.js +1 -0
  1003. package/dist/magma-components/p-0a904a12.entry.js +1 -0
  1004. package/dist/magma-components/p-0a9fb138.system.entry.js +1 -0
  1005. package/dist/magma-components/p-106f39c6.entry.js +1 -0
  1006. package/dist/magma-components/p-10ad73e3.system.entry.js +19 -0
  1007. package/dist/magma-components/p-1150ffb8.system.entry.js +10 -0
  1008. package/dist/magma-components/p-12c5ae26.entry.js +1 -0
  1009. package/dist/magma-components/p-13a1d35f.entry.js +1 -0
  1010. package/dist/magma-components/p-15d4846d.entry.js +1 -0
  1011. package/dist/magma-components/p-1673225e.system.entry.js +8 -0
  1012. package/dist/magma-components/p-188f4b1d.system.entry.js +7 -0
  1013. package/dist/magma-components/p-18c8628c.entry.js +1 -0
  1014. package/dist/magma-components/p-1be45c75.entry.js +1 -0
  1015. package/dist/magma-components/p-1cb495d3.entry.js +1 -0
  1016. package/dist/magma-components/p-1e3d89cd.system.entry.js +1 -0
  1017. package/dist/magma-components/p-1e700f0a.entry.js +1 -0
  1018. package/dist/magma-components/p-20e4f7dd.system.entry.js +15 -0
  1019. package/dist/magma-components/p-21865dd2.entry.js +1 -0
  1020. package/dist/magma-components/p-218d8254.system.entry.js +1 -0
  1021. package/dist/magma-components/p-21c46e74.system.entry.js +4 -0
  1022. package/dist/magma-components/p-231b604f.system.entry.js +1 -0
  1023. package/dist/magma-components/p-2507f5cf.entry.js +1 -0
  1024. package/dist/magma-components/p-2723caa7.system.entry.js +13 -0
  1025. package/dist/magma-components/p-277444bc.entry.js +1 -0
  1026. package/dist/magma-components/p-283b0548.system.entry.js +102 -0
  1027. package/dist/magma-components/p-2c44c961.system.entry.js +10 -0
  1028. package/dist/magma-components/p-2ec0db8e.entry.js +1 -0
  1029. package/dist/magma-components/p-2f520704.entry.js +1 -0
  1030. package/dist/magma-components/p-30c3872d.entry.js +1 -0
  1031. package/dist/magma-components/p-314abfba.entry.js +1 -0
  1032. package/dist/magma-components/p-322a5452.entry.js +1 -0
  1033. package/dist/magma-components/p-3231a6a3.entry.js +1 -0
  1034. package/dist/magma-components/p-34401d35.entry.js +1 -0
  1035. package/dist/magma-components/p-35aa29c5.entry.js +1 -0
  1036. package/dist/magma-components/p-35ee2d77.entry.js +1 -0
  1037. package/dist/magma-components/p-36a67b51.entry.js +1 -0
  1038. package/dist/magma-components/p-3a1339bb.system.entry.js +4 -0
  1039. package/dist/magma-components/p-3d56e3f4.entry.js +1 -0
  1040. package/dist/magma-components/p-3e0eed90.system.entry.js +12 -0
  1041. package/dist/magma-components/p-3ecade3c.system.entry.js +11 -0
  1042. package/dist/magma-components/p-3eefca33.system.entry.js +16 -0
  1043. package/dist/magma-components/p-4211ce6c.system.entry.js +1 -0
  1044. package/dist/magma-components/p-436f9b27.system.entry.js +38 -0
  1045. package/dist/magma-components/p-439c9ce3.system.entry.js +10 -0
  1046. package/dist/magma-components/p-44e2a945.system.entry.js +1 -0
  1047. package/dist/magma-components/p-4658154f.entry.js +1 -0
  1048. package/dist/magma-components/p-474047fa.system.entry.js +10 -0
  1049. package/dist/magma-components/p-474c5d53.system.entry.js +11 -0
  1050. package/dist/magma-components/p-493fb2f4.system.entry.js +7 -0
  1051. package/dist/magma-components/p-4ac94b84.system.entry.js +32 -0
  1052. package/dist/magma-components/p-4c73f14b.system.entry.js +14 -0
  1053. package/dist/magma-components/p-4cb88b06.system.entry.js +1 -0
  1054. package/dist/magma-components/p-4dd6a39b.entry.js +1 -0
  1055. package/dist/magma-components/p-4e7f21ac.entry.js +1 -0
  1056. package/dist/magma-components/p-4f14a166.entry.js +1 -0
  1057. package/dist/magma-components/p-50ea11c9.system.entry.js +32 -0
  1058. package/dist/magma-components/p-514d0fcb.entry.js +1 -0
  1059. package/dist/magma-components/p-52793bdb.system.entry.js +1 -0
  1060. package/dist/magma-components/p-5299f709.system.entry.js +26 -0
  1061. package/dist/magma-components/p-57762bae.entry.js +1 -0
  1062. package/dist/magma-components/p-577db922.entry.js +1 -0
  1063. package/dist/magma-components/p-58b82b40.system.entry.js +10 -0
  1064. package/dist/magma-components/p-5a7267e8.system.entry.js +4 -0
  1065. package/dist/magma-components/p-5a911e7b.system.entry.js +13 -0
  1066. package/dist/magma-components/p-5ac9e2f4.entry.js +1 -0
  1067. package/dist/magma-components/p-5c94e0c2.system.entry.js +7 -0
  1068. package/dist/magma-components/p-5ccf493c.system.entry.js +7 -0
  1069. package/dist/magma-components/p-5d119459.entry.js +1 -0
  1070. package/dist/magma-components/p-5f1132b8.entry.js +1 -0
  1071. package/dist/magma-components/p-5fd04ce1.entry.js +1 -0
  1072. package/dist/magma-components/p-60f67c37.entry.js +1 -0
  1073. package/dist/magma-components/p-61bedbe7.system.entry.js +68 -0
  1074. package/dist/magma-components/p-632bc44c.entry.js +1 -0
  1075. package/dist/magma-components/p-64f78149.system.entry.js +1 -0
  1076. package/dist/magma-components/p-69c21eae.entry.js +1 -0
  1077. package/dist/magma-components/p-6a6326c6.entry.js +1 -0
  1078. package/dist/magma-components/p-6c18c40e.system.entry.js +89 -0
  1079. package/dist/magma-components/p-6c800411.entry.js +1 -0
  1080. package/dist/magma-components/p-6e03b83a.entry.js +1 -0
  1081. package/dist/magma-components/p-6ed05d99.entry.js +1 -0
  1082. package/dist/magma-components/p-6f74cdf5.system.entry.js +12 -0
  1083. package/dist/magma-components/p-6fdb3fe7.system.entry.js +27 -0
  1084. package/dist/magma-components/p-6ff8be3e.system.entry.js +30 -0
  1085. package/dist/magma-components/p-7-TP6wnI.js +1 -0
  1086. package/dist/magma-components/p-73fde271.system.entry.js +72 -0
  1087. package/dist/magma-components/p-74b51db8.entry.js +1 -0
  1088. package/dist/magma-components/p-76ecad2f.entry.js +18 -0
  1089. package/dist/magma-components/p-774ce1d2.entry.js +1 -0
  1090. package/dist/magma-components/p-77615947.system.entry.js +1 -0
  1091. package/dist/magma-components/p-7770b989.system.entry.js +1 -0
  1092. package/dist/magma-components/p-7787ebaf.system.entry.js +1 -0
  1093. package/dist/magma-components/p-789c1b93.system.entry.js +1 -0
  1094. package/dist/magma-components/p-7927010f.system.entry.js +25 -0
  1095. package/dist/magma-components/p-79421ee1.system.entry.js +11 -0
  1096. package/dist/magma-components/p-7ab15184.entry.js +1 -0
  1097. package/dist/magma-components/p-7afec7ee.entry.js +1 -0
  1098. package/dist/magma-components/p-7e085c82.entry.js +1 -0
  1099. package/dist/magma-components/p-7e7cf986.system.entry.js +7 -0
  1100. package/dist/magma-components/p-7ffda4f5.entry.js +1 -0
  1101. package/dist/magma-components/p-809adece.system.entry.js +17 -0
  1102. package/dist/magma-components/p-8183b7ed.entry.js +1 -0
  1103. package/dist/magma-components/p-832883c4.entry.js +1 -0
  1104. package/dist/magma-components/p-83394280.system.entry.js +32 -0
  1105. package/dist/magma-components/p-835fc007.entry.js +1 -0
  1106. package/dist/magma-components/p-837fbbf7.system.entry.js +1 -0
  1107. package/dist/magma-components/p-84645c60.system.entry.js +1 -0
  1108. package/dist/magma-components/p-86f4b6eb.system.entry.js +20 -0
  1109. package/dist/magma-components/p-87026d34.entry.js +1 -0
  1110. package/dist/magma-components/p-87faaa8e.system.entry.js +16 -0
  1111. package/dist/magma-components/p-88287207.system.entry.js +13 -0
  1112. package/dist/magma-components/p-883c223a.system.entry.js +4 -0
  1113. package/dist/magma-components/p-88f99a4f.system.entry.js +81 -0
  1114. package/dist/magma-components/p-8a3d2259.system.entry.js +17 -0
  1115. package/dist/magma-components/p-8aafbfdf.system.entry.js +49 -0
  1116. package/dist/magma-components/p-8afc9bc4.system.entry.js +2838 -0
  1117. package/dist/magma-components/p-8ca1d30d.system.entry.js +1 -0
  1118. package/dist/magma-components/p-8ccd187a.entry.js +1 -0
  1119. package/dist/magma-components/p-8d53bd61.system.entry.js +4 -0
  1120. package/dist/magma-components/p-8yWTOQiz.js +1 -0
  1121. package/dist/magma-components/p-90993b0b.system.entry.js +68 -0
  1122. package/dist/magma-components/p-915c5f06.system.entry.js +47 -0
  1123. package/dist/magma-components/p-91c4015f.system.entry.js +4 -0
  1124. package/dist/magma-components/p-91ff1560.system.entry.js +7 -0
  1125. package/dist/magma-components/p-92d9b537.entry.js +1 -0
  1126. package/dist/magma-components/p-932620b6.entry.js +1 -0
  1127. package/dist/magma-components/p-9344a234.entry.js +1 -0
  1128. package/dist/magma-components/p-93d39066.entry.js +1 -0
  1129. package/dist/magma-components/p-97f6166e.system.entry.js +28 -0
  1130. package/dist/magma-components/p-9d1cdb42.system.entry.js +15 -0
  1131. package/dist/magma-components/p-9dcfc247.entry.js +1 -0
  1132. package/dist/magma-components/p-9eb1e154.system.entry.js +14 -0
  1133. package/dist/magma-components/p-9fe14430.system.entry.js +7 -0
  1134. package/dist/magma-components/p-BPNsbMrg.system.js +67 -0
  1135. package/dist/magma-components/p-BS7eEvwu.system.js +17 -0
  1136. package/dist/magma-components/p-BTF_aRDG.system.js +231 -0
  1137. package/dist/magma-components/p-BpVYIPkx.js +1 -0
  1138. package/dist/magma-components/p-BxPbQB28.js +3 -0
  1139. package/dist/magma-components/p-CdsZyFQ-.system.js +10 -0
  1140. package/dist/magma-components/p-D7BrzK-C.system.js +90 -0
  1141. package/dist/magma-components/p-DaONbL_w.system.js +162 -0
  1142. package/dist/magma-components/p-Kv1yahtR.js +5 -0
  1143. package/dist/magma-components/p-ZDRIVCAt.system.js +5 -0
  1144. package/dist/magma-components/p-a41e52f7.entry.js +1 -0
  1145. package/dist/magma-components/p-a462aadd.entry.js +1 -0
  1146. package/dist/magma-components/p-a4a83a63.entry.js +1 -0
  1147. package/dist/magma-components/p-a64bbb36.system.entry.js +40 -0
  1148. package/dist/magma-components/p-a6af4083.system.entry.js +32 -0
  1149. package/dist/magma-components/p-a7e7f2c0.entry.js +1 -0
  1150. package/dist/magma-components/p-aba96089.entry.js +1 -0
  1151. package/dist/magma-components/p-ac81f63a.system.entry.js +913 -0
  1152. package/dist/magma-components/p-aed8b119.entry.js +1 -0
  1153. package/dist/magma-components/p-b24b5179.entry.js +1 -0
  1154. package/dist/magma-components/p-b295e4ab.system.entry.js +1 -0
  1155. package/dist/magma-components/p-b2c62b6e.system.entry.js +7 -0
  1156. package/dist/magma-components/p-b431ca8a.entry.js +1 -0
  1157. package/dist/magma-components/p-b5559b28.system.entry.js +1 -0
  1158. package/dist/magma-components/p-b626c69f.system.entry.js +1 -0
  1159. package/dist/magma-components/p-b897c97d.entry.js +1 -0
  1160. package/dist/magma-components/p-bab4c75e.system.entry.js +45 -0
  1161. package/dist/magma-components/p-bba04b08.system.entry.js +14 -0
  1162. package/dist/magma-components/p-bc53c19e.entry.js +8 -0
  1163. package/dist/magma-components/p-bf2fe278.system.entry.js +16 -0
  1164. package/dist/magma-components/p-c0136138.entry.js +1 -0
  1165. package/dist/magma-components/p-c166ec50.system.entry.js +47 -0
  1166. package/dist/magma-components/p-c22887f7.system.entry.js +90 -0
  1167. package/dist/magma-components/p-c28fce23.entry.js +1 -0
  1168. package/dist/magma-components/p-c34d9e61.system.entry.js +1 -0
  1169. package/dist/magma-components/p-c48bad95.entry.js +1 -0
  1170. package/dist/magma-components/p-cb2c5f1b.entry.js +1 -0
  1171. package/dist/magma-components/p-cc0c6ae7.entry.js +1 -0
  1172. package/dist/magma-components/p-cc2a09f2.system.entry.js +16 -0
  1173. package/dist/magma-components/p-cc9d9458.entry.js +1 -0
  1174. package/dist/magma-components/p-ccb14076.system.entry.js +217 -0
  1175. package/dist/magma-components/p-ccb6898a.system.entry.js +4 -0
  1176. package/dist/magma-components/p-d04ac65d.entry.js +1 -0
  1177. package/dist/magma-components/p-d07d227b.system.entry.js +8 -0
  1178. package/dist/magma-components/p-d1faf129.entry.js +1 -0
  1179. package/dist/magma-components/p-d282a929.entry.js +1 -0
  1180. package/dist/magma-components/p-d2f134ac.entry.js +1 -0
  1181. package/dist/magma-components/p-d47df503.system.entry.js +37 -0
  1182. package/dist/magma-components/p-d5bd6bef.entry.js +1 -0
  1183. package/dist/magma-components/p-d9804d2f.entry.js +1 -0
  1184. package/dist/magma-components/p-dc06b29e.entry.js +1 -0
  1185. package/dist/magma-components/p-dc59b764.entry.js +1 -0
  1186. package/dist/magma-components/p-dc7bada4.entry.js +1 -0
  1187. package/dist/magma-components/p-dcc3be64.system.entry.js +7 -0
  1188. package/dist/magma-components/p-dd58f9ee.entry.js +18 -0
  1189. package/dist/magma-components/p-de091be7.system.entry.js +7 -0
  1190. package/dist/magma-components/p-dfe8552c.system.entry.js +11 -0
  1191. package/dist/magma-components/p-e1e69217.system.entry.js +1 -0
  1192. package/dist/magma-components/p-e213640b.entry.js +1 -0
  1193. package/dist/magma-components/p-e2ef1d6f.entry.js +1 -0
  1194. package/dist/magma-components/p-e2ef5996.entry.js +1 -0
  1195. package/dist/magma-components/p-e7751639.entry.js +1 -0
  1196. package/dist/magma-components/p-e887a14c.entry.js +1 -0
  1197. package/dist/magma-components/p-e8cd2b93.system.entry.js +4 -0
  1198. package/dist/magma-components/p-e8ed096b.entry.js +1 -0
  1199. package/dist/magma-components/p-eaff7300.entry.js +1 -0
  1200. package/dist/magma-components/p-eb681207.system.entry.js +1 -0
  1201. package/dist/magma-components/p-ec9cc7b9.entry.js +1 -0
  1202. package/dist/magma-components/p-eca99a0a.system.entry.js +1 -0
  1203. package/dist/magma-components/p-ecd3c27f.entry.js +1 -0
  1204. package/dist/magma-components/p-ed897f9f.entry.js +1 -0
  1205. package/dist/magma-components/p-ee1e7f07.system.entry.js +3 -0
  1206. package/dist/magma-components/p-ef3424e3.entry.js +1 -0
  1207. package/dist/magma-components/p-f29a059d.system.entry.js +15 -0
  1208. package/dist/magma-components/p-f5bb8c0c.entry.js +1 -0
  1209. package/dist/magma-components/p-f654eafe.entry.js +1 -0
  1210. package/dist/magma-components/p-f733ae92.system.entry.js +16 -0
  1211. package/dist/magma-components/p-f8eb19b3.entry.js +1 -0
  1212. package/dist/magma-components/p-f8feee93.system.entry.js +4 -0
  1213. package/dist/magma-components/p-faa1f22c.entry.js +1 -0
  1214. package/dist/magma-components/p-ffa1a0b4.system.entry.js +1 -0
  1215. package/dist/magma-components/p-hVpoPUxI.system.js +58 -0
  1216. package/dist/magma-components/p-wI0alRSO.js +1 -0
  1217. package/dist/stats.json +3191 -2538
  1218. package/dist/types/common/form.d.ts +8 -1
  1219. package/dist/types/common/preference.d.ts +1 -1
  1220. package/dist/types/common/validity/index.d.ts +22 -0
  1221. package/dist/types/components/mds-button/mds-button.d.ts +9 -0
  1222. package/dist/types/components/mds-button-dropdown/mds-button-dropdown.d.ts +23 -1
  1223. package/dist/types/components/mds-input/mds-input.d.ts +41 -2
  1224. package/dist/types/components/mds-input/meta/validators.d.ts +22 -0
  1225. package/dist/types/components/mds-input/meta/validity.d.ts +14 -0
  1226. package/dist/types/components/mds-input-date/mds-input-date.d.ts +38 -0
  1227. package/dist/types/components/mds-input-date-range/mds-input-date-range.d.ts +26 -0
  1228. package/dist/types/components/mds-input-otp/mds-input-otp.d.ts +21 -2
  1229. package/dist/types/components/mds-input-range/mds-input-range.d.ts +8 -1
  1230. package/dist/types/components/mds-input-select/mds-input-select.d.ts +41 -4
  1231. package/dist/types/components/mds-input-select/meta/event-detail.d.ts +8 -0
  1232. package/dist/types/components/mds-input-switch/mds-input-switch.d.ts +17 -0
  1233. package/dist/types/components/mds-input-upload/mds-input-upload.d.ts +27 -5
  1234. package/dist/types/components/mds-keyboard-key/meta/icons.d.ts +1 -1
  1235. package/dist/types/components/mds-pref-animation/mds-pref-animation.d.ts +10 -1
  1236. package/dist/types/components/mds-pref-consumption/mds-pref-consumption.d.ts +10 -1
  1237. package/dist/types/components/mds-pref-contrast/mds-pref-contrast.d.ts +10 -1
  1238. package/dist/types/components/mds-pref-mode/mds-pref-mode.d.ts +10 -1
  1239. package/dist/types/components.d.ts +102 -19
  1240. package/package.json +25 -12
  1241. package/dist/cjs/floating-controller-Cd_vNLLD.js +0 -369
  1242. package/dist/cjs/form-DTCBh5WK.js +0 -22
  1243. package/dist/cjs/index--6wz7eWi.js +0 -5183
  1244. package/dist/cjs/locale-CB5_Z7PE.js +0 -816
  1245. package/dist/cjs/preference-eJcbLLAn.js +0 -389
  1246. package/dist/components/p-6K9sFzLr.js +0 -1
  1247. package/dist/components/p-A9TZf0Ii.js +0 -1
  1248. package/dist/components/p-BBhbQT2f.js +0 -1
  1249. package/dist/components/p-BFpRu7yD.js +0 -1
  1250. package/dist/components/p-BL63WAAq.js +0 -8
  1251. package/dist/components/p-BNHXZ-JR.js +0 -1
  1252. package/dist/components/p-BShLEry5.js +0 -1
  1253. package/dist/components/p-BSxuG1vZ.js +0 -1
  1254. package/dist/components/p-BTHR4xXu.js +0 -1
  1255. package/dist/components/p-BYxxgEE_.js +0 -1
  1256. package/dist/components/p-BZFyAX-6.js +0 -1
  1257. package/dist/components/p-BhFTcUD0.js +0 -3
  1258. package/dist/components/p-Bss3F51Q.js +0 -5
  1259. package/dist/components/p-BtMdmkID.js +0 -1
  1260. package/dist/components/p-ByaUOMp0.js +0 -1
  1261. package/dist/components/p-C1xZO_fq.js +0 -1
  1262. package/dist/components/p-C58NKMEE.js +0 -1
  1263. package/dist/components/p-C6Q4zFh6.js +0 -1
  1264. package/dist/components/p-CUQ7WIXh.js +0 -1
  1265. package/dist/components/p-CVpjH8Un.js +0 -1
  1266. package/dist/components/p-Cd_8zD_I.js +0 -1
  1267. package/dist/components/p-CnAeawmf.js +0 -1
  1268. package/dist/components/p-CvIFS8oA.js +0 -1
  1269. package/dist/components/p-DCrjf0F0.js +0 -1
  1270. package/dist/components/p-DlHJvYE7.js +0 -1
  1271. package/dist/components/p-DlaJNPdd.js +0 -1
  1272. package/dist/components/p-DnrQaRnh.js +0 -1
  1273. package/dist/components/p-OPg_Naue.js +0 -1
  1274. package/dist/components/p-RS4yyl41.js +0 -1
  1275. package/dist/components/p-gv3eu44S.js +0 -1
  1276. package/dist/components/p-kff6xSdW.js +0 -1
  1277. package/dist/components/p-pys1EQ60.js +0 -1
  1278. package/dist/components/p-qketFgr0.js +0 -1
  1279. package/dist/components/p-wq6nWuWE.js +0 -1
  1280. package/dist/components/p-zml3K7nx.js +0 -1
  1281. package/dist/esm/floating-controller-DVldZ5mh.js +0 -366
  1282. package/dist/esm/form-A9TZf0Ii.js +0 -19
  1283. package/dist/esm/index-DIiEV39g.js +0 -5149
  1284. package/dist/esm/locale-CbJbTW_c.js +0 -814
  1285. package/dist/esm/preference-CKerJx2M.js +0 -385
  1286. package/dist/esm-es5/floating-controller-DVldZ5mh.js +0 -66
  1287. package/dist/esm-es5/form-A9TZf0Ii.js +0 -8
  1288. package/dist/esm-es5/index-DIiEV39g.js +0 -371
  1289. package/dist/esm-es5/locale-CbJbTW_c.js +0 -230
  1290. package/dist/esm-es5/preference-CKerJx2M.js +0 -58
  1291. package/dist/magma-components/p-005172ba.entry.js +0 -1
  1292. package/dist/magma-components/p-05fa40aa.system.entry.js +0 -10
  1293. package/dist/magma-components/p-071f18c6.system.entry.js +0 -27
  1294. package/dist/magma-components/p-0798b0bf.system.entry.js +0 -24
  1295. package/dist/magma-components/p-0827a5bd.entry.js +0 -1
  1296. package/dist/magma-components/p-086fb3aa.entry.js +0 -1
  1297. package/dist/magma-components/p-0a088e7d.system.entry.js +0 -10
  1298. package/dist/magma-components/p-0a691082.entry.js +0 -1
  1299. package/dist/magma-components/p-0ec21574.system.entry.js +0 -10
  1300. package/dist/magma-components/p-0f6bb54d.system.entry.js +0 -22
  1301. package/dist/magma-components/p-102d3bd3.system.entry.js +0 -1
  1302. package/dist/magma-components/p-10704ede.system.entry.js +0 -4
  1303. package/dist/magma-components/p-15c77a98.system.entry.js +0 -19
  1304. package/dist/magma-components/p-15f63bf3.entry.js +0 -1
  1305. package/dist/magma-components/p-16e9fb14.system.entry.js +0 -7
  1306. package/dist/magma-components/p-181dfb04.entry.js +0 -1
  1307. package/dist/magma-components/p-184720be.system.entry.js +0 -1
  1308. package/dist/magma-components/p-18473d2f.entry.js +0 -1
  1309. package/dist/magma-components/p-18667ae7.system.entry.js +0 -13
  1310. package/dist/magma-components/p-18f7b970.system.entry.js +0 -4
  1311. package/dist/magma-components/p-19adde9d.entry.js +0 -1
  1312. package/dist/magma-components/p-1afc0452.entry.js +0 -1
  1313. package/dist/magma-components/p-1cce738a.system.entry.js +0 -32
  1314. package/dist/magma-components/p-1df6ac96.system.entry.js +0 -7
  1315. package/dist/magma-components/p-209063b6.system.entry.js +0 -50
  1316. package/dist/magma-components/p-216f95cc.system.entry.js +0 -1
  1317. package/dist/magma-components/p-21891a24.entry.js +0 -1
  1318. package/dist/magma-components/p-21d6687a.system.entry.js +0 -7
  1319. package/dist/magma-components/p-2217a7be.entry.js +0 -1
  1320. package/dist/magma-components/p-231505e8.entry.js +0 -1
  1321. package/dist/magma-components/p-2386f0d6.system.entry.js +0 -37
  1322. package/dist/magma-components/p-23e61db9.system.entry.js +0 -4
  1323. package/dist/magma-components/p-25935d33.system.entry.js +0 -1
  1324. package/dist/magma-components/p-284c40cd.system.entry.js +0 -4
  1325. package/dist/magma-components/p-29684655.system.entry.js +0 -16
  1326. package/dist/magma-components/p-2b56fc14.entry.js +0 -1
  1327. package/dist/magma-components/p-2b73fee6.entry.js +0 -1
  1328. package/dist/magma-components/p-2d5aadba.system.entry.js +0 -7
  1329. package/dist/magma-components/p-2de17848.entry.js +0 -1
  1330. package/dist/magma-components/p-34482514.entry.js +0 -1
  1331. package/dist/magma-components/p-34c0890e.entry.js +0 -1
  1332. package/dist/magma-components/p-3635eca6.system.entry.js +0 -1
  1333. package/dist/magma-components/p-3b0c1202.entry.js +0 -1
  1334. package/dist/magma-components/p-3db23b5f.system.entry.js +0 -16
  1335. package/dist/magma-components/p-3ec7d3ea.entry.js +0 -1
  1336. package/dist/magma-components/p-3f747a63.system.entry.js +0 -1
  1337. package/dist/magma-components/p-3ff30842.system.entry.js +0 -16
  1338. package/dist/magma-components/p-40563e33.entry.js +0 -1
  1339. package/dist/magma-components/p-41bf6f25.system.entry.js +0 -81
  1340. package/dist/magma-components/p-421a630e.entry.js +0 -1
  1341. package/dist/magma-components/p-4299b76b.system.entry.js +0 -4
  1342. package/dist/magma-components/p-4543501c.entry.js +0 -1
  1343. package/dist/magma-components/p-4616bc07.entry.js +0 -1
  1344. package/dist/magma-components/p-46786d71.system.entry.js +0 -14
  1345. package/dist/magma-components/p-470e5ac8.system.entry.js +0 -1
  1346. package/dist/magma-components/p-48d37230.entry.js +0 -1
  1347. package/dist/magma-components/p-49b120cb.system.entry.js +0 -13
  1348. package/dist/magma-components/p-4af76eb3.entry.js +0 -1
  1349. package/dist/magma-components/p-4b3a8132.system.entry.js +0 -13
  1350. package/dist/magma-components/p-4ba6cb3f.entry.js +0 -1
  1351. package/dist/magma-components/p-4c8316a8.entry.js +0 -1
  1352. package/dist/magma-components/p-4c95442e.entry.js +0 -1
  1353. package/dist/magma-components/p-4cadbd49.entry.js +0 -1
  1354. package/dist/magma-components/p-4e4bdbf8.entry.js +0 -1
  1355. package/dist/magma-components/p-4e5ab0e4.system.entry.js +0 -16
  1356. package/dist/magma-components/p-4f107cb2.system.entry.js +0 -2838
  1357. package/dist/magma-components/p-518b55f3.entry.js +0 -1
  1358. package/dist/magma-components/p-56ad5bf2.entry.js +0 -1
  1359. package/dist/magma-components/p-5eec629c.system.entry.js +0 -17
  1360. package/dist/magma-components/p-5f545f85.system.entry.js +0 -1
  1361. package/dist/magma-components/p-61a5ac3d.system.entry.js +0 -17
  1362. package/dist/magma-components/p-636cc471.entry.js +0 -1
  1363. package/dist/magma-components/p-646034cb.system.entry.js +0 -27
  1364. package/dist/magma-components/p-677ab154.system.entry.js +0 -3
  1365. package/dist/magma-components/p-67d80d37.system.entry.js +0 -1
  1366. package/dist/magma-components/p-6937f340.entry.js +0 -1
  1367. package/dist/magma-components/p-6b7e449f.entry.js +0 -1
  1368. package/dist/magma-components/p-6c417ea1.system.entry.js +0 -913
  1369. package/dist/magma-components/p-6ce60d59.entry.js +0 -1
  1370. package/dist/magma-components/p-6cf760ea.system.entry.js +0 -45
  1371. package/dist/magma-components/p-6dc27543.entry.js +0 -1
  1372. package/dist/magma-components/p-6de37588.entry.js +0 -1
  1373. package/dist/magma-components/p-6f6b5eb5.entry.js +0 -1
  1374. package/dist/magma-components/p-7090184f.entry.js +0 -1
  1375. package/dist/magma-components/p-716ad14c.entry.js +0 -1
  1376. package/dist/magma-components/p-71804224.entry.js +0 -1
  1377. package/dist/magma-components/p-735dc594.system.entry.js +0 -1
  1378. package/dist/magma-components/p-739fdf76.system.entry.js +0 -1
  1379. package/dist/magma-components/p-74b0902a.entry.js +0 -1
  1380. package/dist/magma-components/p-7530a2f2.entry.js +0 -1
  1381. package/dist/magma-components/p-759133b3.entry.js +0 -1
  1382. package/dist/magma-components/p-75dd012a.system.entry.js +0 -11
  1383. package/dist/magma-components/p-76ae22d6.entry.js +0 -1
  1384. package/dist/magma-components/p-78248693.entry.js +0 -1
  1385. package/dist/magma-components/p-7912f877.entry.js +0 -1
  1386. package/dist/magma-components/p-7c0d202c.entry.js +0 -1
  1387. package/dist/magma-components/p-7d304fd4.system.entry.js +0 -65
  1388. package/dist/magma-components/p-7f6d708c.system.entry.js +0 -41
  1389. package/dist/magma-components/p-81b72b6e.entry.js +0 -1
  1390. package/dist/magma-components/p-859ab5a2.entry.js +0 -18
  1391. package/dist/magma-components/p-88564e9b.system.entry.js +0 -14
  1392. package/dist/magma-components/p-896ae0ee.entry.js +0 -1
  1393. package/dist/magma-components/p-89a3bc7a.system.entry.js +0 -16
  1394. package/dist/magma-components/p-8b1abf81.system.entry.js +0 -32
  1395. package/dist/magma-components/p-8bbee38d.entry.js +0 -1
  1396. package/dist/magma-components/p-8bf680d6.system.entry.js +0 -15
  1397. package/dist/magma-components/p-8cb3a071.system.entry.js +0 -15
  1398. package/dist/magma-components/p-8dff6606.system.entry.js +0 -11
  1399. package/dist/magma-components/p-8e40eda3.system.entry.js +0 -9
  1400. package/dist/magma-components/p-8f229eaf.entry.js +0 -1
  1401. package/dist/magma-components/p-91b9d4e7.system.entry.js +0 -4
  1402. package/dist/magma-components/p-92e1001f.entry.js +0 -1
  1403. package/dist/magma-components/p-9378b373.system.entry.js +0 -49
  1404. package/dist/magma-components/p-94fa3396.system.entry.js +0 -47
  1405. package/dist/magma-components/p-9741d95e.system.entry.js +0 -7
  1406. package/dist/magma-components/p-97ea9e6e.system.entry.js +0 -68
  1407. package/dist/magma-components/p-9846fe89.system.entry.js +0 -1
  1408. package/dist/magma-components/p-998721b9.system.entry.js +0 -1
  1409. package/dist/magma-components/p-9a5296c0.system.entry.js +0 -7
  1410. package/dist/magma-components/p-9bbd4193.system.entry.js +0 -102
  1411. package/dist/magma-components/p-9be4a736.entry.js +0 -1
  1412. package/dist/magma-components/p-9caffe14.entry.js +0 -1
  1413. package/dist/magma-components/p-9d86477d.system.entry.js +0 -1
  1414. package/dist/magma-components/p-9de1ac7f.entry.js +0 -1
  1415. package/dist/magma-components/p-9e3bc553.system.entry.js +0 -26
  1416. package/dist/magma-components/p-9e58467e.system.entry.js +0 -10
  1417. package/dist/magma-components/p-9e9a1ebd.system.entry.js +0 -15
  1418. package/dist/magma-components/p-A9TZf0Ii.js +0 -1
  1419. package/dist/magma-components/p-BFnx_0hM.js +0 -5
  1420. package/dist/magma-components/p-BbMKuVem.js +0 -1
  1421. package/dist/magma-components/p-C2FHijr2.system.js +0 -231
  1422. package/dist/magma-components/p-CDTiTqY0.system.js +0 -58
  1423. package/dist/magma-components/p-CI85vVs8.system.js +0 -9
  1424. package/dist/magma-components/p-CnXBPjmc.system.js +0 -5
  1425. package/dist/magma-components/p-DB8Rm54c.js +0 -1
  1426. package/dist/magma-components/p-DIiEV39g.js +0 -3
  1427. package/dist/magma-components/p-DVd2EM-q.system.js +0 -90
  1428. package/dist/magma-components/p-DmC-b-ZK.system.js +0 -67
  1429. package/dist/magma-components/p-MGv0i39Y.system.js +0 -162
  1430. package/dist/magma-components/p-a15da479.system.entry.js +0 -8
  1431. package/dist/magma-components/p-a3b0f586.entry.js +0 -1
  1432. package/dist/magma-components/p-a93b2a39.entry.js +0 -1
  1433. package/dist/magma-components/p-aa267e7b.entry.js +0 -1
  1434. package/dist/magma-components/p-ab9095ae.system.entry.js +0 -4
  1435. package/dist/magma-components/p-ab997243.system.entry.js +0 -4
  1436. package/dist/magma-components/p-ace198e9.entry.js +0 -1
  1437. package/dist/magma-components/p-ad3983b2.entry.js +0 -1
  1438. package/dist/magma-components/p-aea6081f.entry.js +0 -1
  1439. package/dist/magma-components/p-af41c8b8.system.entry.js +0 -1
  1440. package/dist/magma-components/p-af45f0a5.system.entry.js +0 -20
  1441. package/dist/magma-components/p-b0539d61.system.entry.js +0 -32
  1442. package/dist/magma-components/p-b35c26f8.entry.js +0 -18
  1443. package/dist/magma-components/p-b3a3578c.entry.js +0 -1
  1444. package/dist/magma-components/p-b49e0321.system.entry.js +0 -1
  1445. package/dist/magma-components/p-b71e0d51.entry.js +0 -1
  1446. package/dist/magma-components/p-b8d4a14e.entry.js +0 -1
  1447. package/dist/magma-components/p-ba035f90.entry.js +0 -1
  1448. package/dist/magma-components/p-bc51d310.system.entry.js +0 -1
  1449. package/dist/magma-components/p-bd490a8e.entry.js +0 -1
  1450. package/dist/magma-components/p-be198039.system.entry.js +0 -4
  1451. package/dist/magma-components/p-bf7168b4.entry.js +0 -1
  1452. package/dist/magma-components/p-bf84d9fa.entry.js +0 -1
  1453. package/dist/magma-components/p-c4e58240.entry.js +0 -1
  1454. package/dist/magma-components/p-c573de10.entry.js +0 -1
  1455. package/dist/magma-components/p-c6be3db7.system.entry.js +0 -1
  1456. package/dist/magma-components/p-c7517884.system.entry.js +0 -38
  1457. package/dist/magma-components/p-c9be79bd.entry.js +0 -1
  1458. package/dist/magma-components/p-c9e12c2b.system.entry.js +0 -7
  1459. package/dist/magma-components/p-cb6a1908.entry.js +0 -1
  1460. package/dist/magma-components/p-cbd5aef4.system.entry.js +0 -14
  1461. package/dist/magma-components/p-cc033985.system.entry.js +0 -14
  1462. package/dist/magma-components/p-cd21137b.system.entry.js +0 -1
  1463. package/dist/magma-components/p-cd84a264.system.entry.js +0 -41
  1464. package/dist/magma-components/p-d0457835.entry.js +0 -1
  1465. package/dist/magma-components/p-d3116844.entry.js +0 -1
  1466. package/dist/magma-components/p-d38165ed.system.entry.js +0 -1
  1467. package/dist/magma-components/p-d3933a22.entry.js +0 -1
  1468. package/dist/magma-components/p-d44c49d6.system.entry.js +0 -8
  1469. package/dist/magma-components/p-d4a529ce.entry.js +0 -1
  1470. package/dist/magma-components/p-d64311e2.entry.js +0 -1
  1471. package/dist/magma-components/p-d6d4aa1a.entry.js +0 -1
  1472. package/dist/magma-components/p-d81e7100.system.entry.js +0 -15
  1473. package/dist/magma-components/p-d8c27f4b.entry.js +0 -1
  1474. package/dist/magma-components/p-d921d876.entry.js +0 -1
  1475. package/dist/magma-components/p-da1ac3e1.entry.js +0 -1
  1476. package/dist/magma-components/p-da4dc390.system.entry.js +0 -4
  1477. package/dist/magma-components/p-dda7a33b.entry.js +0 -1
  1478. package/dist/magma-components/p-de6bc3c8.entry.js +0 -1
  1479. package/dist/magma-components/p-df2b7607.system.entry.js +0 -4
  1480. package/dist/magma-components/p-e0b2ef8f.system.entry.js +0 -1
  1481. package/dist/magma-components/p-e0c50a2d.entry.js +0 -1
  1482. package/dist/magma-components/p-e1277efe.system.entry.js +0 -1
  1483. package/dist/magma-components/p-e1e6dd97.entry.js +0 -1
  1484. package/dist/magma-components/p-e2f7a9bd.system.entry.js +0 -1
  1485. package/dist/magma-components/p-e375c8b1.entry.js +0 -1
  1486. package/dist/magma-components/p-e3fce8ca.entry.js +0 -1
  1487. package/dist/magma-components/p-e5c6f9a9.system.entry.js +0 -7
  1488. package/dist/magma-components/p-e5da7036.entry.js +0 -1
  1489. package/dist/magma-components/p-e6dccab5.system.entry.js +0 -1
  1490. package/dist/magma-components/p-e9a16f22.system.entry.js +0 -134
  1491. package/dist/magma-components/p-ea0091b6.entry.js +0 -1
  1492. package/dist/magma-components/p-ec00defc.system.entry.js +0 -13
  1493. package/dist/magma-components/p-ec59ec9a.entry.js +0 -1
  1494. package/dist/magma-components/p-eddcef53.system.entry.js +0 -1
  1495. package/dist/magma-components/p-edfb0d7a.entry.js +0 -1
  1496. package/dist/magma-components/p-eed00e7f.system.entry.js +0 -1
  1497. package/dist/magma-components/p-ef8cb401.entry.js +0 -1
  1498. package/dist/magma-components/p-f070a5b5.system.entry.js +0 -11
  1499. package/dist/magma-components/p-f23d4974.entry.js +0 -1
  1500. package/dist/magma-components/p-f542246f.system.entry.js +0 -1
  1501. package/dist/magma-components/p-f5c680dd.entry.js +0 -1
  1502. package/dist/magma-components/p-f60c6e8e.system.entry.js +0 -40
  1503. package/dist/magma-components/p-f8369939.entry.js +0 -1
  1504. package/dist/magma-components/p-f97ede3e.system.entry.js +0 -19
  1505. package/dist/magma-components/p-f97ff5b2.entry.js +0 -1
  1506. package/dist/magma-components/p-f9d9cf7c.system.entry.js +0 -11
  1507. package/dist/magma-components/p-fa163e86.entry.js +0 -1
  1508. package/dist/magma-components/p-fe1662e8.system.entry.js +0 -28
  1509. package/dist/magma-components/p-fe19080a.entry.js +0 -8
  1510. package/dist/magma-components/p-ff133cbd.entry.js +0 -1
  1511. package/dist/magma-components/p-ff49fb35.entry.js +0 -1
  1512. package/dist/magma-components/p-fff44704.entry.js +0 -1
@@ -8953,22 +8953,22 @@ let Locale$1 = class Locale {
8953
8953
  };
8954
8954
 
8955
8955
  const cancel$7 = "Ακύρωση";
8956
- var localeEl$w = {
8956
+ var localeEl$x = {
8957
8957
  cancel: cancel$7
8958
8958
  };
8959
8959
 
8960
8960
  const cancel$6 = "Cancel";
8961
- var localeEn$w = {
8961
+ var localeEn$x = {
8962
8962
  cancel: cancel$6
8963
8963
  };
8964
8964
 
8965
8965
  const cancel$5 = "Cancelar";
8966
- var localeEs$w = {
8966
+ var localeEs$x = {
8967
8967
  cancel: cancel$5
8968
8968
  };
8969
8969
 
8970
8970
  const cancel$4 = "Annulla";
8971
- var localeIt$x = {
8971
+ var localeIt$y = {
8972
8972
  cancel: cancel$4
8973
8973
  };
8974
8974
 
@@ -8985,10 +8985,10 @@ class MdsBanner {
8985
8985
  this.closeEvent = createEvent(this, "mdsBannerClose", 7);
8986
8986
  this.km = new KeyboardManager();
8987
8987
  this.t = new Locale$1({
8988
- el: localeEl$w,
8989
- en: localeEn$w,
8990
- es: localeEs$w,
8991
- it: localeIt$x,
8988
+ el: localeEl$x,
8989
+ en: localeEn$x,
8990
+ es: localeEs$x,
8991
+ it: localeIt$y,
8992
8992
  });
8993
8993
  /**
8994
8994
  * Sets the theme variant colors
@@ -9317,22 +9317,22 @@ class MdsBibliography {
9317
9317
  var miBaselineArrowBack = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20v-2z"/></svg>`;
9318
9318
 
9319
9319
  const back$3 = "Πήγαινε πίσω";
9320
- var localeEl$v = {
9320
+ var localeEl$w = {
9321
9321
  back: back$3
9322
9322
  };
9323
9323
 
9324
9324
  const back$2 = "Go back";
9325
- var localeEn$v = {
9325
+ var localeEn$w = {
9326
9326
  back: back$2
9327
9327
  };
9328
9328
 
9329
9329
  const back$1 = "Volver atrás";
9330
- var localeEs$v = {
9330
+ var localeEs$w = {
9331
9331
  back: back$1
9332
9332
  };
9333
9333
 
9334
9334
  const back = "Indietro";
9335
- var localeIt$w = {
9335
+ var localeIt$x = {
9336
9336
  back: back
9337
9337
  };
9338
9338
 
@@ -9347,10 +9347,10 @@ class MdsBreadcrumb {
9347
9347
  this.changedEvent = createEvent(this, "mdsBreadcrumbChange", 7);
9348
9348
  this.kb = new KeyboardManager();
9349
9349
  this.t = new Locale$1({
9350
- el: localeEl$v,
9351
- en: localeEn$v,
9352
- es: localeEs$v,
9353
- it: localeIt$w,
9350
+ el: localeEl$w,
9351
+ en: localeEn$w,
9352
+ es: localeEs$w,
9353
+ it: localeIt$x,
9354
9354
  });
9355
9355
  /**
9356
9356
  * Hides the back arrow button
@@ -9543,12 +9543,53 @@ const isIconFormatIsSVG = (icon) => {
9543
9543
  return icon.startsWith(MARKUP_SVG_ICON);
9544
9544
  };
9545
9545
 
9546
+ /**
9547
+ * Safe wrappers around ElementInternals methods. In Stencil's hydrate/SSR
9548
+ * runtime (and in mock-doc spec tests) `@AttachInternals()` returns an inert
9549
+ * proxy whose members are all `undefined`, so direct calls like
9550
+ * `internals.setFormValue(...)` throw. Property reads (`internals.form`) are
9551
+ * safe and don't need these wrappers.
9552
+ */
9553
+ const setFormValue = (internals, value) => {
9554
+ if (typeof (internals === null || internals === void 0 ? void 0 : internals.setFormValue) === 'function') {
9555
+ internals.setFormValue(value);
9556
+ }
9557
+ };
9558
+ const setValidity = (internals, flags, message, anchor) => {
9559
+ if (typeof (internals === null || internals === void 0 ? void 0 : internals.setValidity) === 'function') {
9560
+ internals.setValidity(flags, message, anchor);
9561
+ }
9562
+ };
9563
+ /**
9564
+ * Submits `form` as a native submit button with this `name` and `value` would. A custom
9565
+ * element cannot be the submitter of `requestSubmit()`, so a hidden native button stands in
9566
+ * for it for the length of the call: the receiver gets `name=value`, `event.submitter`
9567
+ * carries them, and `new FormData(form)` leaves them out unless it is given the submitter.
9568
+ */
9569
+ const requestSubmitAs = (form, name, value) => {
9570
+ const submitter = form.ownerDocument.createElement('button');
9571
+ submitter.type = 'submit';
9572
+ submitter.hidden = true;
9573
+ // Angular and Vue bind null for a missing value, which a native button would send as "null"
9574
+ if (name != null)
9575
+ submitter.name = name;
9576
+ if (value != null)
9577
+ submitter.value = value;
9578
+ form.append(submitter);
9579
+ try {
9580
+ form.requestSubmit(submitter);
9581
+ }
9582
+ finally {
9583
+ submitter.remove();
9584
+ }
9585
+ };
9586
+
9546
9587
  var mdiApple = `<svg xmlns="http://www.w3.org/2000/svg" id="mdi-apple" viewBox="0 0 24 24"><path d="M18.71,19.5C17.88,20.74 17,21.95 15.66,21.97C14.32,22 13.89,21.18 12.37,21.18C10.84,21.18 10.37,21.95 9.1,22C7.79,22.05 6.8,20.68 5.96,19.47C4.25,17 2.94,12.45 4.7,9.39C5.57,7.87 7.13,6.91 8.82,6.88C10.1,6.86 11.32,7.75 12.11,7.75C12.89,7.75 14.37,6.68 15.92,6.84C16.57,6.87 18.39,7.1 19.56,8.82C19.47,8.88 17.39,10.1 17.41,12.63C17.44,15.65 20.06,16.66 20.09,16.67C20.06,16.74 19.67,18.11 18.71,19.5M13,3.5C13.73,2.67 14.94,2.04 15.94,2C16.07,3.17 15.6,4.35 14.9,5.19C14.21,6.04 13.07,6.7 11.95,6.61C11.8,5.46 12.36,4.26 13,3.5Z" /></svg>`;
9547
9588
 
9548
9589
  var logoGoogle = `<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" xmlnsXlink="http://www.w3.org/1999/xlink"><path fill="#EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"></path><path fill="#4285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"></path><path fill="#FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"></path><path fill="#34A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"></path><path fill="none" d="M0 0h48v48H0z"></path></svg>
9549
9590
  `;
9550
9591
 
9551
- const mdsButtonCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}@keyframes focus-bounce{0%,75%,to{outline-offset:var(--magma-outline-focus-offset,2px)}50%{outline-offset:var(--magma-outline-blur-offset,6px)}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-spinner,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-button-await-duration:.725s;--mds-button-transition-duration:var(--duration-300,.3s);--private-button-transition-duration:var(--mds-button-transition-duration);--mds-button-background:rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163)));--mds-button-border-hover-opacity:.75;--mds-button-border-high-contrast-hover-width:3px;--mds-button-border-high-contrast-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-outline-hover-width:3px;--mds-button-border-tone-outline-opacity:.3;--mds-button-border-tone-strong-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-weak-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-default-opacity:0;--mds-button-border-opacity:0;--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-gap:calc(var(--spacing,.0025rem)*200);--mds-button-line-clamp:1;--mds-button-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));background-color:var(--mds-button-background,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));border-radius:var(--mds-button-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-sizing:border-box;color:var(--mds-button-color,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-timing-function:ease-in-out;corner-shape:var(--mds-button-corner-shape,var(--magma-corner-shape,squircle));align-items:center;align-self:flex-start;cursor:pointer;display:inline-flex;fill:currentColor;gap:var(--mds-button-gap,calc(var(--spacing,.0025rem)*200));justify-content:center;justify-self:flex-start;min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding:0 calc(var(--spacing,.0025rem)*400);position:relative;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,outline,outline-offset,transform;-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));-webkit-user-select:none;user-select:none}:host:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}:host(:focus-visible){--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running;z-index:10}.text{--mds-text-line-clamp:var(--mds-button-line-clamp,1)}.text:first-letter{text-transform:uppercase}.icon{align-items:center;display:inline-flex;fill:inherit;flex-shrink:0;justify-content:center;pointer-events:none;transition-property:fill;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.icon{-webkit-transition-duration:var(--private-button-transition-duration);transition-duration:var(--private-button-transition-duration)}.await{display:none;margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));transform:scale(0);transition-behavior:allow-discrete;transition-property:display,margin-right,opacity,transform,width;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.spinner{height:calc(var(--spacing,.0025rem)*600);width:calc(var(--spacing,.0025rem)*600)}.spinner{--mds-spinner-duration:var(--mds-button-await-duration,.725s);color:currentColor}:is(:host(:not([await])),:host([await=false])) .spinner{-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94))}:host([await]:not([await=false])) .await{display:flex;margin-right:0;opacity:1;transform:scale(1)}@starting-style{:host([await]:not([await=false])) .await{margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));opacity:0;transform:scale(0)}}:host([await]:not([await=false])){pointer-events:none}:host([icon]:not([label])[await]:not([await=false])) .icon{display:none}:host([disabled]:not([disabled=false])){opacity:.5;pointer-events:none}:host([size=sm]){--mds-button-radius:var(--magma-radius-md,var(--radius-squircle-md,20px));min-height:calc(var(--spacing,.0025rem)*700);min-width:calc(var(--spacing,.0025rem)*700);padding:0 calc(var(--spacing,.0025rem)*300)}:host([size=sm]) .icon{height:calc(var(--spacing,.0025rem)*400);width:calc(var(--spacing,.0025rem)*400)}:host([size=sm]) .text{--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}:host([size=sm]):host([await]:not([await=false])) .await{transform:scale(.75)}:host([size=md]){min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=md]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*300)}:host([size=md]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*300)}:host([size=lg]){min-height:calc(var(--spacing,.0025rem)*1200);min-width:calc(var(--spacing,.0025rem)*1200);padding-left:calc(var(--spacing,.0025rem)*500);padding-right:calc(var(--spacing,.0025rem)*500)}:host([size=lg]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*400)}:host([size=lg]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=xl]){min-height:calc(var(--spacing,.0025rem)*1300);min-width:calc(var(--spacing,.0025rem)*1300);padding-left:calc(var(--spacing,.0025rem)*600);padding-right:calc(var(--spacing,.0025rem)*600)}:host([size=xl]) .icon{height:calc(var(--spacing,.0025rem)*800);width:calc(var(--spacing,.0025rem)*800)}:host([size][icon][icon-position]:not([label])){aspect-ratio:1;padding:0}:host(:not([label])) .text,:host([label=""]) .text{display:none}:host([variant=primary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=primary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=primary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=primary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=primary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=secondary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=secondary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=secondary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=secondary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=ai]){--mds-button-background:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=ai]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242)))}:host([variant=ai]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));fill:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252)))}:host([variant=ai]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-background:rgb(var(--magma-accent-ai-surface-subtle,var(--magma-tint-accent-ai-surface-subtle,var(--variant-ai-10,240 234 254))))}:host([variant=ai]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=info]){--mds-button-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=info]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137)));--mds-button-border-color-rgb:var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137))}:host([variant=info]):host([tone=weak]){--mds-button-background:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-button-border-color-rgb:var(--magma-info-wash-base,var(--status-info-09,193 230 246));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)));fill:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-info-wash-strong,var(--status-info-08,168 219 242)));--mds-button-border-color-rgb:var(--magma-info-wash-strong,var(--status-info-08,168 219 242));--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=info]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]){--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)));--mds-button-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)))}:host([variant=info]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=success]){--mds-button-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=success]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32)));--mds-button-border-color-rgb:var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32))}:host([variant=success]):host([tone=weak]){--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-button-border-color-rgb:var(--magma-success-wash-base,var(--status-success-09,191 233 205));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)));fill:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-success-wash-strong,var(--status-success-08,165 225 186)));--mds-button-border-color-rgb:var(--magma-success-wash-strong,var(--status-success-08,165 225 186));--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=success]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]){--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)));--mds-button-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)))}:host([variant=success]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=warning]){--mds-button-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=warning]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0))}:host([variant=warning]):host([tone=weak]){--mds-button-background:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-button-border-color-rgb:var(--magma-warning-wash-base,var(--status-warning-09,255 220 117));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)));fill:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57)));--mds-button-border-color-rgb:var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57));--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=warning]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]){--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)));--mds-button-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)))}:host([variant=warning]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=error]){--mds-button-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=error]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40)));--mds-button-border-color-rgb:var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40))}:host([variant=error]):host([tone=weak]){--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-button-border-color-rgb:var(--magma-danger-wash-base,var(--status-error-09,255 214 211));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)));fill:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-danger-wash-strong,var(--status-error-08,254 198 194)));--mds-button-border-color-rgb:var(--magma-danger-wash-strong,var(--status-error-08,254 198 194));--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=error]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]){--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)));--mds-button-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)))}:host([variant=error]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=light]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=strong]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255)}:host([variant=light]):host([tone=weak]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=weak]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=light]):host([tone=outline]),:host([variant=light]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))))}:host([variant=light]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-button-border-color-rgb:var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73)))}:host([variant=dark]):host([tone=weak]){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));fill:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=dark]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-button-background:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}:host([variant=dark]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=google]),:host([variant=google][tone]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-hover-opacity:.5;--mds-button-border-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.2;--mds-button-border-width:calc(var(--spacing,.0025rem)*25);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-button-border-color-rgb:var(--magma-shadow-ink,var(--magma-tint-scale-01,var(--tone-neutral-01,5 5 5)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0))}:host([variant=google]:hover),:host([variant=google][tone]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-width:var(--mds-button-border-hover-width);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([variant=apple]) .icon{transform:translateY(-5%)}:host([variant=apple]),:host([variant=apple][tone]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-border-width:0;--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)))}:host([variant=apple]:hover),:host([variant=apple][tone]:hover){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-opacity:1}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]:hover),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]:hover){--mds-button-border-opacity:.5}:host([tone=outline]),:host([tone=text]){--mds-button-background:#0000}:host([tone=box]),:host([tone=strong]),:host([tone=weak]){--mds-button-border-default-opacity:1;--mds-button-border-width:0;--mds-button-border-opacity:var(--mds-button-border-default-opacity,0)}:host([tone=strong]:hover),:host([tone=strong][active]){--mds-button-border-width:var(--mds-button-border-tone-strong-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=weak]:hover),:host([tone=weak][active]){--mds-button-border-width:var(--mds-button-border-tone-weak-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=outline]){--mds-button-border-opacity:var(--mds-button-border-tone-outline-opacity)}:host([tone=outline]:hover),:host([tone=outline][active]){--mds-button-background:#0000;--mds-button-border-width:var(--mds-button-border-tone-outline-hover-width,3px);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([tone=box]){-webkit-box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);transition-property:background-color,border-color,box-shadow,color,outline,filter,outline-offset,transform}:host([tone=box]):host(:hover){filter:brightness(1.1)}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-button-transition-duration:0s}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]:hover),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]:hover){--mds-button-border-opacity:.5}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-button-transition-duration:0s}}`;
9592
+ const mdsButtonCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}@keyframes focus-bounce{0%,75%,to{outline-offset:var(--magma-outline-focus-offset,2px)}50%{outline-offset:var(--magma-outline-blur-offset,6px)}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-spinner,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-button-await-duration:.725s;--mds-button-transition-duration:var(--duration-300,.3s);--private-button-transition-duration:var(--mds-button-transition-duration);--mds-button-background:rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163)));--mds-button-border-hover-opacity:.75;--mds-button-border-high-contrast-hover-width:3px;--mds-button-border-high-contrast-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-outline-hover-width:3px;--mds-button-border-tone-outline-opacity:.3;--mds-button-border-tone-strong-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-tone-weak-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-default-opacity:0;--mds-button-border-opacity:0;--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-gap:calc(var(--spacing,.0025rem)*200);--mds-button-line-clamp:1;--mds-button-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));background-color:var(--mds-button-background,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));border-radius:var(--mds-button-radius,var(--magma-radius-2xl,var(--radius-squircle-2xl,40px)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-sizing:border-box;color:var(--mds-button-color,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-timing-function:ease-in-out;corner-shape:var(--mds-button-corner-shape,var(--magma-corner-shape,squircle));align-items:center;align-self:flex-start;cursor:pointer;display:inline-flex;fill:currentColor;gap:var(--mds-button-gap,calc(var(--spacing,.0025rem)*200));justify-content:center;justify-self:flex-start;min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding:0 calc(var(--spacing,.0025rem)*400);position:relative;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,outline,outline-offset,transform;-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));-webkit-user-select:none;user-select:none}:host:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}:host(:focus-visible){--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running;z-index:10}.text{--mds-text-line-clamp:var(--mds-button-line-clamp,1)}.text:first-letter{text-transform:uppercase}.icon{align-items:center;display:inline-flex;fill:inherit;flex-shrink:0;justify-content:center;pointer-events:none;transition-property:fill;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.icon{-webkit-transition-duration:var(--private-button-transition-duration);transition-duration:var(--private-button-transition-duration)}.await{display:none;margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));transform:scale(0);transition-behavior:allow-discrete;transition-property:display,margin-right,opacity,transform,width;-webkit-transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));transition-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955))}.await,.spinner{height:calc(var(--spacing,.0025rem)*600);width:calc(var(--spacing,.0025rem)*600)}.spinner{--mds-spinner-duration:var(--mds-button-await-duration,.725s);color:currentColor}:is(:host(:not([await])),:host([await=false])) .spinner{-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);-webkit-transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94));transition-timing-function:var(--ease-out-quad,cubic-bezier(.25,.46,.45,.94))}:host([await]:not([await=false])) .await{display:flex;margin-right:0;opacity:1;transform:scale(1)}@starting-style{:host([await]:not([await=false])) .await{margin-right:calc(calc(-1 * var(--mds-button-gap,calc(var(--spacing,.0025rem) * 200))) - calc(var(--spacing,.0025rem) * 600));opacity:0;transform:scale(0)}}:host([await]:not([await=false])){pointer-events:none}:host([icon]:not([label])[await]:not([await=false])) .icon{display:none}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){opacity:.5;pointer-events:none}:host([size=sm]){--mds-button-radius:var(--magma-radius-md,var(--radius-squircle-md,20px));min-height:calc(var(--spacing,.0025rem)*700);min-width:calc(var(--spacing,.0025rem)*700);padding:0 calc(var(--spacing,.0025rem)*300)}:host([size=sm]) .icon{height:calc(var(--spacing,.0025rem)*400);width:calc(var(--spacing,.0025rem)*400)}:host([size=sm]) .text{--tw-font-weight:var(--font-weight-medium,500);font-weight:var(--font-weight-medium,500)}:host([size=sm]):host([await]:not([await=false])) .await{transform:scale(.75)}:host([size=md]){min-height:calc(var(--spacing,.0025rem)*900);min-width:calc(var(--spacing,.0025rem)*900);padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=md]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*300)}:host([size=md]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*300)}:host([size=lg]){min-height:calc(var(--spacing,.0025rem)*1200);min-width:calc(var(--spacing,.0025rem)*1200);padding-left:calc(var(--spacing,.0025rem)*500);padding-right:calc(var(--spacing,.0025rem)*500)}:host([size=lg]):host([icon][icon-position=left]){padding-left:calc(var(--spacing,.0025rem)*400)}:host([size=lg]):host([icon][icon-position=right]){padding-right:calc(var(--spacing,.0025rem)*400)}:host([size=xl]){min-height:calc(var(--spacing,.0025rem)*1300);min-width:calc(var(--spacing,.0025rem)*1300);padding-left:calc(var(--spacing,.0025rem)*600);padding-right:calc(var(--spacing,.0025rem)*600)}:host([size=xl]) .icon{height:calc(var(--spacing,.0025rem)*800);width:calc(var(--spacing,.0025rem)*800)}:host([size][icon][icon-position]:not([label])){aspect-ratio:1;padding:0}:host(:not([label])) .text,:host([label=""]) .text{display:none}:host([variant=primary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=primary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=primary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=primary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=primary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=primary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=primary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]){--mds-button-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=secondary]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-button-border-color-rgb:var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204)))}:host([variant=secondary]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231))));--mds-button-border-color-rgb:var(--magma-accent-surface,var(--magma-tint-accent-surface,var(--variant-primary-09,220 224 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));fill:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226))));--mds-button-border-color-rgb:var(--magma-accent-surface-hover,var(--magma-tint-accent-surface-hover,var(--variant-primary-08,204 212 226)))}:host([variant=secondary]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))))}:host([variant=secondary]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)));--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=secondary]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-button-background:rgb(var(--magma-accent-surface-subtle,var(--magma-tint-accent-surface-subtle,var(--variant-primary-10,236 237 240))))}:host([variant=secondary]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-emphasis-active,var(--magma-tint-accent-emphasis-active,var(--variant-primary-02,0 57 163))))}:host([variant=ai]){--mds-button-background:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=ai]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242)))}:host([variant=ai]):host([tone=weak]){--mds-button-background:rgb(var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface,var(--magma-tint-accent-ai-surface,var(--variant-ai-09,229 218 253)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))));fill:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252))));--mds-button-border-color-rgb:var(--magma-accent-ai-surface-hover,var(--magma-tint-accent-ai-surface-hover,var(--variant-ai-08,219 205 252)))}:host([variant=ai]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-hover,var(--magma-tint-accent-ai-emphasis-hover,var(--variant-ai-03,87 20 242))))}:host([variant=ai]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)));--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=ai]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-button-background:rgb(var(--magma-accent-ai-surface-subtle,var(--magma-tint-accent-ai-surface-subtle,var(--variant-ai-10,240 234 254))))}:host([variant=ai]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-accent-ai-emphasis-active,var(--magma-tint-accent-ai-emphasis-active,var(--variant-ai-02,65 11 190))))}:host([variant=info]){--mds-button-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=info]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137)));--mds-button-border-color-rgb:var(--magma-info-emphasis-hover,var(--status-info-03,0 94 137))}:host([variant=info]):host([tone=weak]){--mds-button-background:rgb(var(--magma-info-wash-base,var(--status-info-09,193 230 246)));--mds-button-border-color-rgb:var(--magma-info-wash-base,var(--status-info-09,193 230 246));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)));fill:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-info-wash-strong,var(--status-info-08,168 219 242)));--mds-button-border-color-rgb:var(--magma-info-wash-strong,var(--status-info-08,168 219 242));--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=info]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-subtle,var(--text-info-subtle,0 94 137)))}:host([variant=info]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164));--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]){--mds-button-color:rgb(var(--magma-info-text-muted,var(--text-info-muted,0 71 114)))}:host([variant=info]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)));--mds-button-background:rgb(var(--magma-info-wash-soft,var(--status-info-10,220 240 250)))}:host([variant=info]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-info-text-default,var(--text-info-default,0 45 86)))}:host([variant=success]){--mds-button-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=success]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32)));--mds-button-border-color-rgb:var(--magma-success-emphasis-hover,var(--status-success-03,0 102 32))}:host([variant=success]):host([tone=weak]){--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));--mds-button-border-color-rgb:var(--magma-success-wash-base,var(--status-success-09,191 233 205));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)));fill:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-success-wash-strong,var(--status-success-08,165 225 186)));--mds-button-border-color-rgb:var(--magma-success-wash-strong,var(--status-success-08,165 225 186));--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=success]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-subtle,var(--text-success-subtle,0 102 32)))}:host([variant=success]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57));--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]){--mds-button-color:rgb(var(--magma-success-text-muted,var(--text-success-muted,0 80 7)))}:host([variant=success]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)));--mds-button-background:rgb(var(--magma-success-wash-soft,var(--status-success-10,220 243 227)))}:host([variant=success]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-success-text-default,var(--text-success-default,0 53 0)))}:host([variant=warning]){--mds-button-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=warning]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0)));--mds-button-border-color-rgb:var(--magma-warning-emphasis-hover,var(--status-warning-03,113 85 0))}:host([variant=warning]):host([tone=weak]){--mds-button-background:rgb(var(--magma-warning-wash-base,var(--status-warning-09,255 220 117)));--mds-button-border-color-rgb:var(--magma-warning-wash-base,var(--status-warning-09,255 220 117));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)));fill:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57)));--mds-button-border-color-rgb:var(--magma-warning-wash-strong,var(--status-warning-08,255 205 57));--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=warning]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-subtle,var(--text-warning-subtle,113 85 0)))}:host([variant=warning]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0));--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]){--mds-button-color:rgb(var(--magma-warning-text-muted,var(--text-warning-muted,88 66 0)))}:host([variant=warning]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)));--mds-button-background:rgb(var(--magma-warning-wash-soft,var(--status-warning-10,255 237 181)))}:host([variant=warning]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-warning-text-default,var(--text-warning-default,58 44 0)))}:host([variant=error]){--mds-button-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=error]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40)));--mds-button-border-color-rgb:var(--magma-danger-emphasis-hover,var(--status-error-03,165 33 40))}:host([variant=error]):host([tone=weak]){--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));--mds-button-border-color-rgb:var(--magma-danger-wash-base,var(--status-error-09,255 214 211));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)));fill:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-danger-wash-strong,var(--status-error-08,254 198 194)));--mds-button-border-color-rgb:var(--magma-danger-wash-strong,var(--status-error-08,254 198 194));--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=error]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-subtle,var(--text-error-subtle,165 33 40)))}:host([variant=error]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65));--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]){--mds-button-color:rgb(var(--magma-danger-text-muted,var(--text-error-muted,132 0 11)))}:host([variant=error]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)));--mds-button-background:rgb(var(--magma-danger-wash-soft,var(--status-error-10,255 232 230)))}:host([variant=error]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-danger-text-default,var(--text-error-default,89 0 0)))}:host([variant=light]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=strong]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255)}:host([variant=light]):host([tone=weak]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=light]):host([tone=weak]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-color-rgb:var(--tone-neutral-seed,255 255 255);--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=light]):host([tone=outline]),:host([variant=light]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)));--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=light]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))))}:host([variant=light]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))))}:host([variant=dark]):host([tone=strong]:hover){--mds-button-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-button-border-color-rgb:var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73)))}:host([variant=dark]):host([tone=weak]){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));fill:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=weak]:hover){--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-button-border-color-rgb:var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=outline]){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))))}:host([variant=dark]):host([tone=outline]:hover){--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)));--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=dark]):host([tone=text]:hover){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-button-background:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}:host([variant=dark]):host([tone=text][active]){--mds-button-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}:host([variant=google]),:host([variant=google][tone]){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-hover-opacity:.5;--mds-button-border-hover-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.2;--mds-button-border-width:calc(var(--spacing,.0025rem)*25);--mds-button-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-button-border-color-rgb:var(--magma-shadow-ink,var(--magma-tint-scale-01,var(--tone-neutral-01,5 5 5)));-webkit-box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0));box-shadow:0 0 0 var(--mds-button-border-width,calc(var(--spacing,.0025rem)*50)) rgb(var(--mds-button-border-color-rgb,var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))/var(--mds-button-border-opacity,0))}:host([variant=google]:hover),:host([variant=google][tone]:hover){--mds-button-background:rgb(var(--tone-neutral-seed,255 255 255));--mds-button-border-width:var(--mds-button-border-hover-width);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([variant=apple]) .icon{transform:translateY(-5%)}:host([variant=apple]),:host([variant=apple][tone]){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-color:rgb(var(--magma-on-inverse,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-button-border-width:0;--mds-button-border-color-rgb:var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42)))}:host([variant=apple]:hover),:host([variant=apple][tone]:hover){--mds-button-background:rgb(var(--magma-surface-inverse,var(--magma-tint-scale-02,var(--tone-neutral-02,42 42 42))));--mds-button-border-opacity:1}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google]:hover),:host([pref-mode=dark]:not([pref-theme-scheme=light])):host([variant=google][tone]:hover){--mds-button-border-opacity:.5}:host([tone=outline]),:host([tone=text]){--mds-button-background:#0000}:host([tone=box]),:host([tone=strong]),:host([tone=weak]){--mds-button-border-default-opacity:1;--mds-button-border-width:0;--mds-button-border-opacity:var(--mds-button-border-default-opacity,0)}:host([tone=strong]:hover),:host([tone=strong][active]){--mds-button-border-width:var(--mds-button-border-tone-strong-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=weak]:hover),:host([tone=weak][active]){--mds-button-border-width:var(--mds-button-border-tone-weak-hover-width,calc(var(--spacing,.0025rem)*50))}:host([tone=outline]){--mds-button-border-opacity:var(--mds-button-border-tone-outline-opacity)}:host([tone=outline]:hover),:host([tone=outline][active]){--mds-button-background:#0000;--mds-button-border-width:var(--mds-button-border-tone-outline-hover-width,3px);--mds-button-border-opacity:var(--mds-button-border-hover-opacity,.75)}:host([tone=box]){-webkit-box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);box-shadow:var(--shadow-box-solid-strong,#0006 0 2px 4px,#0000004d 0 7px 13px -3px,#00000059 0 -3px 0 inset,#ffffff1a 0 -8px 10px inset,#ffffff26 0 -4px 0 inset);transition-property:background-color,border-color,box-shadow,color,outline,filter,outline-offset,transform}:host([tone=box]):host(:hover){filter:brightness(1.1)}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-button-transition-duration:0s}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]){--mds-button-border-width:calc(var(--spacing,.0025rem)*50);--mds-button-border-opacity:.3}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google]:hover),:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))):host([variant=google][tone]:hover){--mds-button-border-opacity:.5}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-button-transition-duration:0s}}`;
9552
9593
 
9553
9594
  /**
9554
9595
  * @slot - Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here.
@@ -9599,9 +9640,9 @@ class MdsButton {
9599
9640
  */
9600
9641
  this.truncate = 'word';
9601
9642
  this.handleRequestSubmitForm = (e) => {
9602
- var _a;
9603
9643
  e.preventDefault();
9604
- (_a = this.internals.form) === null || _a === void 0 ? void 0 : _a.requestSubmit();
9644
+ if (this.internals.form)
9645
+ requestSubmitAs(this.internals.form, this.name, this.value);
9605
9646
  };
9606
9647
  this.handleReset = (e) => {
9607
9648
  var _a;
@@ -9753,7 +9794,7 @@ class MdsButton {
9753
9794
  render() {
9754
9795
  var _a;
9755
9796
  this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
9756
- return (hAsync(Host, { key: '3d7db80d99477ad9e4ff34c97d0cb0e04160a041', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preferenceStore.state.animation, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: '133053ee2566972bbbaf1f47faa87c1f9c30b841', class: "await" }, hAsync("mds-spinner", { key: 'ce67aa6522a2c646b1efebf51dcc51d3a987b5c9', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (hAsync("mds-icon", { key: '81d183d185387f2e6113869e14cb274a57f44f3b', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), hAsync("mds-text", { key: '5ac26dd99519f30bcfe71fcbe0fdd4195055bea2', class: "text", part: "label", tag: "span", typography: this.typography, truncate: this.truncate, animation: this.animation, text: this.label }, this.label || hAsync("slot", { key: 'a56c6946ed59d9b9fe481955027015d7f46bcab1', onSlotchange: this.onSlotChangeHandler })), hAsync("slot", { key: '1f0a279dd9e57ba7510c879e72d1f815adb76b6b', name: "notification" }), this.icon && this.iconPosition === 'right' && (hAsync("mds-icon", { key: 'eb2f6eff668e5195d5725360ba30cb99a6e7a054', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
9797
+ return (hAsync(Host, { key: 'c27de85281e3ace66ba8a53167b67d4f1ec8725d', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preferenceStore.state.animation, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: 'e4642dba90a570dcf2c3d3dba5d4a3694eee8028', class: "await" }, hAsync("mds-spinner", { key: 'aa4c2d008c48f9ca33834e608b99cbdc8b56b380', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (hAsync("mds-icon", { key: '92d622bf8018c97d73ee6c2b95b1e3276100d158', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), hAsync("mds-text", { key: '5520e63cd5a770afa1af19f3dc0e50e7dd0bfaeb', class: "text", part: "label", tag: "span", typography: this.typography, truncate: this.truncate, animation: this.animation, text: this.label }, this.label || hAsync("slot", { key: '50195d714a1e773a0d81f386b2a897b3c3df1d57', onSlotchange: this.onSlotChangeHandler })), hAsync("slot", { key: '1610d40e7923b9256a78055c3fe39afc4ff930fe', name: "notification" }), this.icon && this.iconPosition === 'right' && (hAsync("mds-icon", { key: 'b9154cbef4d9b5c50379e2b620bedef32e60ec0c', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" }))));
9757
9798
  }
9758
9799
  static get formAssociated() { return true; }
9759
9800
  get host() { return getElement(this); }
@@ -9787,6 +9828,8 @@ class MdsButton {
9787
9828
  "icon": [1537],
9788
9829
  "iconPosition": [513, "icon-position"],
9789
9830
  "type": [513],
9831
+ "name": [513],
9832
+ "value": [513],
9790
9833
  "variant": [513],
9791
9834
  "tone": [513],
9792
9835
  "size": [513],
@@ -9799,7 +9842,7 @@ class MdsButton {
9799
9842
  },
9800
9843
  "$listeners$": undefined,
9801
9844
  "$lazyBundleId$": "-",
9802
- "$attrsToReflect$": [["label", "label"], ["animation", "animation"], ["icon", "icon"], ["iconPosition", "icon-position"], ["type", "type"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
9845
+ "$attrsToReflect$": [["label", "label"], ["animation", "animation"], ["icon", "icon"], ["iconPosition", "icon-position"], ["type", "type"], ["name", "name"], ["value", "value"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
9803
9846
  }; }
9804
9847
  }
9805
9848
 
@@ -9813,10 +9856,22 @@ const mdsButtonDropdownCss = () => `@layer reset,vendor,theme,base,components,ut
9813
9856
  class MdsButtonDropdown {
9814
9857
  constructor(hostRef) {
9815
9858
  registerInstance(this, hostRef);
9859
+ this.clickEvent = createEvent(this, "mdsButtonDropdownClick", 7);
9860
+ if (hostRef.$hostElement$["s-ei"]) {
9861
+ this.internals = hostRef.$hostElement$["s-ei"];
9862
+ }
9863
+ else {
9864
+ this.internals = hostRef.$hostElement$.attachInternals();
9865
+ hostRef.$hostElement$["s-ei"] = this.internals;
9866
+ }
9867
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
9868
+ // around it, which disables the host but not the buttons in its shadow root
9869
+ this.formDisabled = false;
9816
9870
  /**
9817
- * The type of the button element
9871
+ * The type of the primary action: with `'submit'` or `'reset'` it submits or resets the form
9872
+ * the component is in, the chevron never does. Unlike `mds-button` it defaults to `'button'`
9818
9873
  */
9819
- this.type = 'submit';
9874
+ this.type = 'button';
9820
9875
  /**
9821
9876
  * Specifies the color variant for the button
9822
9877
  */
@@ -9837,19 +9892,42 @@ class MdsButtonDropdown {
9837
9892
  * Specifies if the text shoud be truncated or should behave as a normal text
9838
9893
  */
9839
9894
  this.truncate = 'word';
9895
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
9896
+ this.primaryActionClick = () => {
9897
+ var _a;
9898
+ if (this.isDisabled() || this.await)
9899
+ return;
9900
+ this.clickEvent.emit();
9901
+ const { form } = this.internals;
9902
+ // a link navigates instead, from the button itself
9903
+ if (!form || ((_a = this.href) !== null && _a !== void 0 ? _a : '') !== '')
9904
+ return;
9905
+ if (this.type === 'submit') {
9906
+ requestSubmitAs(form, this.name, this.value);
9907
+ }
9908
+ else if (this.type === 'reset') {
9909
+ form.reset();
9910
+ }
9911
+ };
9912
+ }
9913
+ formDisabledCallback(disabled) {
9914
+ this.formDisabled = disabled;
9840
9915
  }
9841
9916
  render() {
9842
- return (hAsync(Host, { key: 'cc838a144e10bc573500c91de8255a40d0ae6c9d' }, hAsync("mds-button", { key: '0dfe4e90f96da291d3dd89164b3166d10735cadd', active: this.active, autoFocus: this.autoFocus, class: "dropdown-primary-action", await: this.await, disabled: this.disabled, href: this.href, icon: this.icon, size: this.size, target: this.target, tone: this.tone, type: this.type, variant: this.variant, label: this.label }), hAsync("mds-button", { key: '204869122fb94a6580f7e0e18f7ca9a4c38e3dcf', active: this.active, autoFocus: this.autoFocus, await: this.await, class: "dropdown-action", disabled: this.disabled, href: this.href, icon: miBaselineKeyboardArrowDown, size: this.size, target: this.target, tone: this.tone, type: this.type, variant: this.variant }), hAsync("mds-dropdown", { key: 'c1e6627c692c39bac7dfd317d3914a68e95613f4', target: ".dropdown-action", part: "dropdown" }, hAsync("slot", { key: '430f76e81ec5ca5f3cd7e63cb917734892ec04a4' }))));
9917
+ return (hAsync(Host, { key: 'f82475fbdff387ee0f3fd5ea6c491020402d82a4' }, hAsync("mds-button", { key: '654f45dd78a89904ceca9112b010027912e0af0b', active: this.active, autoFocus: this.autoFocus, class: "dropdown-primary-action", await: this.await, disabled: this.isDisabled(), href: this.href, icon: this.icon, onClick: this.primaryActionClick, size: this.size, target: this.target, tone: this.tone, variant: this.variant, label: this.label }), hAsync("mds-button", { key: 'db9a5a8d8052ea29d09c2f6ced702b6606a9e208', active: this.active, autoFocus: this.autoFocus, await: this.await, class: "dropdown-action", disabled: this.isDisabled(), href: this.href, icon: miBaselineKeyboardArrowDown, size: this.size, target: this.target, tone: this.tone, variant: this.variant }), hAsync("mds-dropdown", { key: '0a37f731ee4322c3470de48de010e78a2a14dde3', target: ".dropdown-action", part: "dropdown" }, hAsync("slot", { key: '10a9170285f0d4bc50e44766842277c1db64d96e' }))));
9843
9918
  }
9919
+ static get formAssociated() { return true; }
9844
9920
  static get style() { return mdsButtonDropdownCss(); }
9845
9921
  static get cmpMeta() { return {
9846
- "$flags$": 265,
9922
+ "$flags$": 329,
9847
9923
  "$tagName$": "mds-button-dropdown",
9848
9924
  "$members$": {
9849
9925
  "label": [1],
9850
9926
  "autoFocus": [4, "auto-focus"],
9851
9927
  "icon": [1537],
9852
9928
  "type": [513],
9929
+ "name": [513],
9930
+ "value": [513],
9853
9931
  "variant": [513],
9854
9932
  "tone": [513],
9855
9933
  "size": [513],
@@ -9858,11 +9936,12 @@ class MdsButtonDropdown {
9858
9936
  "await": [1540],
9859
9937
  "href": [513],
9860
9938
  "target": [1],
9861
- "truncate": [513]
9939
+ "truncate": [513],
9940
+ "formDisabled": [32]
9862
9941
  },
9863
9942
  "$listeners$": undefined,
9864
9943
  "$lazyBundleId$": "-",
9865
- "$attrsToReflect$": [["icon", "icon"], ["type", "type"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
9944
+ "$attrsToReflect$": [["icon", "icon"], ["type", "type"], ["name", "name"], ["value", "value"], ["variant", "variant"], ["tone", "tone"], ["size", "size"], ["active", "active"], ["disabled", "disabled"], ["await", "await"], ["href", "href"], ["truncate", "truncate"]]
9866
9945
  }; }
9867
9946
  }
9868
9947
 
@@ -18845,22 +18924,22 @@ class MdsCardMedia {
18845
18924
  var miBaselineCancel = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10s10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17L12 13.41L8.41 17L7 15.59L10.59 12L7 8.41L8.41 7L12 10.59L15.59 7L17 8.41L13.41 12L17 15.59z"/></svg>`;
18846
18925
 
18847
18926
  const deleteLabel$7 = "Αφαίρεση";
18848
- var localeEl$u = {
18927
+ var localeEl$v = {
18849
18928
  deleteLabel: deleteLabel$7
18850
18929
  };
18851
18930
 
18852
18931
  const deleteLabel$6 = "Remove";
18853
- var localeEn$u = {
18932
+ var localeEn$v = {
18854
18933
  deleteLabel: deleteLabel$6
18855
18934
  };
18856
18935
 
18857
18936
  const deleteLabel$5 = "Eliminar";
18858
- var localeEs$u = {
18937
+ var localeEs$v = {
18859
18938
  deleteLabel: deleteLabel$5
18860
18939
  };
18861
18940
 
18862
18941
  const deleteLabel$4 = "Rimuovi";
18863
- var localeIt$v = {
18942
+ var localeIt$w = {
18864
18943
  deleteLabel: deleteLabel$4
18865
18944
  };
18866
18945
 
@@ -18874,10 +18953,10 @@ class MdsChip {
18874
18953
  this.selectEvent = createEvent(this, "mdsChipSelect", 7);
18875
18954
  this.km = new KeyboardManager();
18876
18955
  this.t = new Locale$1({
18877
- el: localeEl$u,
18878
- en: localeEn$u,
18879
- es: localeEs$u,
18880
- it: localeIt$v,
18956
+ el: localeEl$v,
18957
+ en: localeEn$v,
18958
+ es: localeEs$v,
18959
+ it: localeIt$w,
18881
18960
  });
18882
18961
  /**
18883
18962
  * Sets the component disabled status
@@ -19134,8 +19213,8 @@ var arrowSvg$1 = `<svg width="30" height="16" viewBox="0 0 30 16" xmlns="http://
19134
19213
  const sides = ['top', 'right', 'bottom', 'left'];
19135
19214
  const alignments = ['start', 'end'];
19136
19215
  const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
19137
- const min = Math.min;
19138
- const max = Math.max;
19216
+ const min$4 = Math.min;
19217
+ const max$4 = Math.max;
19139
19218
  const round = Math.round;
19140
19219
  const floor = Math.floor;
19141
19220
  const createCoords = v => ({
@@ -19149,7 +19228,7 @@ const oppositeSideMap = {
19149
19228
  top: 'bottom'
19150
19229
  };
19151
19230
  function clamp$1(start, value, end) {
19152
- return max(start, min(value, end));
19231
+ return max$4(start, min$4(value, end));
19153
19232
  }
19154
19233
  function evaluate(value, param) {
19155
19234
  return typeof value === 'function' ? value(param) : value;
@@ -19525,8 +19604,8 @@ const arrow$1 = options => ({
19525
19604
  // If the padding is large enough that it causes the arrow to no longer be
19526
19605
  // centered, modify the padding so that it is centered.
19527
19606
  const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
19528
- const minPadding = min(paddingObject[minProp], largestPossiblePadding);
19529
- const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
19607
+ const minPadding = min$4(paddingObject[minProp], largestPossiblePadding);
19608
+ const maxPadding = min$4(paddingObject[maxProp], largestPossiblePadding);
19530
19609
 
19531
19610
  // Make sure the arrow doesn't overflow the floating element if the center
19532
19611
  // point is outside the floating element's bounds.
@@ -20313,12 +20392,12 @@ function getDocumentRect(element) {
20313
20392
  const html = getDocumentElement(element);
20314
20393
  const scroll = getNodeScroll(element);
20315
20394
  const body = element.ownerDocument.body;
20316
- const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
20317
- const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
20395
+ const width = max$4(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
20396
+ const height = max$4(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
20318
20397
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
20319
20398
  const y = -scroll.scrollTop;
20320
20399
  if (getComputedStyle$1(body).direction === 'rtl') {
20321
- x += max(html.clientWidth, body.clientWidth) - width;
20400
+ x += max$4(html.clientWidth, body.clientWidth) - width;
20322
20401
  }
20323
20402
  return {
20324
20403
  width,
@@ -20445,10 +20524,10 @@ function getClippingRect(_ref) {
20445
20524
  const firstClippingAncestor = clippingAncestors[0];
20446
20525
  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
20447
20526
  const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
20448
- accRect.top = max(rect.top, accRect.top);
20449
- accRect.right = min(rect.right, accRect.right);
20450
- accRect.bottom = min(rect.bottom, accRect.bottom);
20451
- accRect.left = max(rect.left, accRect.left);
20527
+ accRect.top = max$4(rect.top, accRect.top);
20528
+ accRect.right = min$4(rect.right, accRect.right);
20529
+ accRect.bottom = min$4(rect.bottom, accRect.bottom);
20530
+ accRect.left = max$4(rect.left, accRect.left);
20452
20531
  return accRect;
20453
20532
  }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
20454
20533
  return {
@@ -20625,7 +20704,7 @@ function observeMove(element, onMove) {
20625
20704
  const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
20626
20705
  const options = {
20627
20706
  rootMargin,
20628
- threshold: max(0, min(1, threshold)) || 1
20707
+ threshold: max$4(0, min$4(1, threshold)) || 1
20629
20708
  };
20630
20709
  let isFirstUpdate = true;
20631
20710
  function handleObserve(entries) {
@@ -36479,22 +36558,22 @@ var miBaselineFileDownloadDone = `<svg xmlns="http://www.w3.org/2000/svg" width=
36479
36558
  var miOutlineFileDownload = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59L7 11l5 5l5-5z"/></svg>`;
36480
36559
 
36481
36560
  const alreadyDownloaded$3 = "Έχετε ήδη κατεβάσει αυτό το αρχείο";
36482
- var localeEl$t = {
36561
+ var localeEl$u = {
36483
36562
  alreadyDownloaded: alreadyDownloaded$3
36484
36563
  };
36485
36564
 
36486
36565
  const alreadyDownloaded$2 = "You have already downloaded this file";
36487
- var localeEn$t = {
36566
+ var localeEn$u = {
36488
36567
  alreadyDownloaded: alreadyDownloaded$2
36489
36568
  };
36490
36569
 
36491
36570
  const alreadyDownloaded$1 = "Ya has descargado este archivo";
36492
- var localeEs$t = {
36571
+ var localeEs$u = {
36493
36572
  alreadyDownloaded: alreadyDownloaded$1
36494
36573
  };
36495
36574
 
36496
36575
  const alreadyDownloaded = "Hai già scaricato questo file";
36497
- var localeIt$u = {
36576
+ var localeIt$v = {
36498
36577
  alreadyDownloaded: alreadyDownloaded
36499
36578
  };
36500
36579
 
@@ -36512,7 +36591,7 @@ const documentMS$3 = "Έγγραφο Microsoft Word";
36512
36591
  const documentRTF$3 = "Έγγραφο μορφής εμπλουτισμένου κειμένου";
36513
36592
  const documentTXT$3 = "Απλό έγγραφο κειμένου";
36514
36593
  const documentWeb$3 = "Ιστοσελίδα";
36515
- const email$3 = "Ηλεκτρονικό ταχυδρομείο";
36594
+ const email$7 = "Ηλεκτρονικό ταχυδρομείο";
36516
36595
  const extensibleMarkupLanguage$3 = "Γλώσσα σήμανσης για δεδομένα";
36517
36596
  const fileAI$3 = "Διανυσματικό αρχείο Adobe Illustrator";
36518
36597
  const fileDB$3 = "Αρχείο βάσης δεδομένων";
@@ -36555,7 +36634,7 @@ var fileDescriptionLocaleEl = {
36555
36634
  documentRTF: documentRTF$3,
36556
36635
  documentTXT: documentTXT$3,
36557
36636
  documentWeb: documentWeb$3,
36558
- email: email$3,
36637
+ email: email$7,
36559
36638
  extensibleMarkupLanguage: extensibleMarkupLanguage$3,
36560
36639
  fileAI: fileAI$3,
36561
36640
  fileDB: fileDB$3,
@@ -36599,7 +36678,7 @@ const documentMS$2 = "Microsoft Word Document";
36599
36678
  const documentRTF$2 = "Rich Text Format Document";
36600
36679
  const documentTXT$2 = "Plain Text Document";
36601
36680
  const documentWeb$2 = "Web Page";
36602
- const email$2 = "E-mail";
36681
+ const email$6 = "E-mail";
36603
36682
  const extensibleMarkupLanguage$2 = "Markup language for data";
36604
36683
  const fileAI$2 = "Adobe Illustrator Vector File";
36605
36684
  const fileDB$2 = "Database File";
@@ -36642,7 +36721,7 @@ var fileDescriptionLocaleEn = {
36642
36721
  documentRTF: documentRTF$2,
36643
36722
  documentTXT: documentTXT$2,
36644
36723
  documentWeb: documentWeb$2,
36645
- email: email$2,
36724
+ email: email$6,
36646
36725
  extensibleMarkupLanguage: extensibleMarkupLanguage$2,
36647
36726
  fileAI: fileAI$2,
36648
36727
  fileDB: fileDB$2,
@@ -36686,7 +36765,7 @@ const documentMS$1 = "Documento de Microsoft Word";
36686
36765
  const documentRTF$1 = "Documento de formato de texto enriquecido";
36687
36766
  const documentTXT$1 = "Documento de texto sin formato";
36688
36767
  const documentWeb$1 = "Página web";
36689
- const email$1 = "Correo electrónico";
36768
+ const email$5 = "Correo electrónico";
36690
36769
  const extensibleMarkupLanguage$1 = "Lenguaje de marcado para datos";
36691
36770
  const fileAI$1 = "Archivo vectorial de Adobe Illustrator";
36692
36771
  const fileDB$1 = "Archivo de base de datos";
@@ -36729,7 +36808,7 @@ var fileDescriptionLocaleEs = {
36729
36808
  documentRTF: documentRTF$1,
36730
36809
  documentTXT: documentTXT$1,
36731
36810
  documentWeb: documentWeb$1,
36732
- email: email$1,
36811
+ email: email$5,
36733
36812
  extensibleMarkupLanguage: extensibleMarkupLanguage$1,
36734
36813
  fileAI: fileAI$1,
36735
36814
  fileDB: fileDB$1,
@@ -36773,7 +36852,7 @@ const documentMS = "Documento di testo Microsoft Word";
36773
36852
  const documentRTF = "Documento di testo Rich Text Format";
36774
36853
  const documentTXT = "Documento di testo senza formattazione";
36775
36854
  const documentWeb = "Pagina web";
36776
- const email = "E-mail";
36855
+ const email$4 = "E-mail";
36777
36856
  const extensibleMarkupLanguage = "Linguaggio markup per dati";
36778
36857
  const fileAI = "File vettoriale Adobe Illustrator";
36779
36858
  const fileDB = "File di database";
@@ -36816,7 +36895,7 @@ var fileDescriptionLocaleIt = {
36816
36895
  documentRTF: documentRTF,
36817
36896
  documentTXT: documentTXT,
36818
36897
  documentWeb: documentWeb,
36819
- email: email,
36898
+ email: email$4,
36820
36899
  extensibleMarkupLanguage: extensibleMarkupLanguage,
36821
36900
  fileAI: fileAI,
36822
36901
  fileDB: fileDB,
@@ -36854,10 +36933,10 @@ class MdsFile {
36854
36933
  registerInstance(this, hostRef);
36855
36934
  this.downloadedEvent = createEvent(this, "mdsFileDownload", 7);
36856
36935
  this.t = new Locale$1({
36857
- el: Object.assign(Object.assign({}, localeEl$t), fileDescriptionLocaleEl),
36858
- en: Object.assign(Object.assign({}, localeEn$t), fileDescriptionLocaleEn),
36859
- es: Object.assign(Object.assign({}, localeEs$t), fileDescriptionLocaleEs),
36860
- it: Object.assign(Object.assign({}, localeIt$u), fileDescriptionLocaleIt),
36936
+ el: Object.assign(Object.assign({}, localeEl$u), fileDescriptionLocaleEl),
36937
+ en: Object.assign(Object.assign({}, localeEn$u), fileDescriptionLocaleEn),
36938
+ es: Object.assign(Object.assign({}, localeEs$u), fileDescriptionLocaleEs),
36939
+ it: Object.assign(Object.assign({}, localeIt$v), fileDescriptionLocaleIt),
36861
36940
  });
36862
36941
  this.wasDownloaded = false;
36863
36942
  /**
@@ -37116,22 +37195,22 @@ const STRINGS = {
37116
37195
  }
37117
37196
 
37118
37197
  const remove$a = "Αφαιρέστε το αρχείο από την ουρά μεταφόρτωσης";
37119
- var localeEl$s = {
37198
+ var localeEl$t = {
37120
37199
  remove: remove$a
37121
37200
  };
37122
37201
 
37123
37202
  const remove$9 = "Remove file from upload queue";
37124
- var localeEn$s = {
37203
+ var localeEn$t = {
37125
37204
  remove: remove$9
37126
37205
  };
37127
37206
 
37128
37207
  const remove$8 = "Eliminar archivo de la cola de carga";
37129
- var localeEs$s = {
37208
+ var localeEs$t = {
37130
37209
  remove: remove$8
37131
37210
  };
37132
37211
 
37133
37212
  const remove$7 = "Rimuovi file dalla coda di upload";
37134
- var localeIt$t = {
37213
+ var localeIt$u = {
37135
37214
  remove: remove$7
37136
37215
  };
37137
37216
 
@@ -37143,10 +37222,10 @@ class MdsFilePreview {
37143
37222
  this.downloadedEvent = createEvent(this, "mdsFileDownload", 7);
37144
37223
  this.deletedEvent = createEvent(this, "mdsFileDelete", 7);
37145
37224
  this.t = new Locale$1({
37146
- el: Object.assign(Object.assign({}, localeEl$s), fileDescriptionLocaleEl),
37147
- en: Object.assign(Object.assign({}, localeEn$s), fileDescriptionLocaleEn),
37148
- es: Object.assign(Object.assign({}, localeEs$s), fileDescriptionLocaleEs),
37149
- it: Object.assign(Object.assign({}, localeIt$t), fileDescriptionLocaleIt),
37225
+ el: Object.assign(Object.assign({}, localeEl$t), fileDescriptionLocaleEl),
37226
+ en: Object.assign(Object.assign({}, localeEn$t), fileDescriptionLocaleEn),
37227
+ es: Object.assign(Object.assign({}, localeEs$t), fileDescriptionLocaleEs),
37228
+ it: Object.assign(Object.assign({}, localeIt$u), fileDescriptionLocaleIt),
37150
37229
  });
37151
37230
  /**
37152
37231
  * Truncates the filename shown
@@ -38393,22 +38472,22 @@ class MdsIcon {
38393
38472
  var miBaselineBrokenImage = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M21 5v6.59l-3-3.01l-4 4.01l-4-4l-4 4l-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99l4-4l4 4l4-3.99z"/></svg>`;
38394
38473
 
38395
38474
  const clickToLoad$3 = "Φόρτωση εικόνας";
38396
- var localeEl$r = {
38475
+ var localeEl$s = {
38397
38476
  clickToLoad: clickToLoad$3
38398
38477
  };
38399
38478
 
38400
38479
  const clickToLoad$2 = "Load image";
38401
- var localeEn$r = {
38480
+ var localeEn$s = {
38402
38481
  clickToLoad: clickToLoad$2
38403
38482
  };
38404
38483
 
38405
38484
  const clickToLoad$1 = "Cargar imagen";
38406
- var localeEs$r = {
38485
+ var localeEs$s = {
38407
38486
  clickToLoad: clickToLoad$1
38408
38487
  };
38409
38488
 
38410
38489
  const clickToLoad = "Carica immagine";
38411
- var localeIt$s = {
38490
+ var localeIt$t = {
38412
38491
  clickToLoad: clickToLoad
38413
38492
  };
38414
38493
 
@@ -38423,10 +38502,10 @@ class MdsImg {
38423
38502
  this.imageError = false;
38424
38503
  this.consumptionMode = 'high';
38425
38504
  this.t = new Locale$1({
38426
- el: localeEl$r,
38427
- en: localeEn$r,
38428
- es: localeEs$r,
38429
- it: localeIt$s,
38505
+ el: localeEl$s,
38506
+ en: localeEn$s,
38507
+ es: localeEs$s,
38508
+ it: localeIt$t,
38430
38509
  });
38431
38510
  /**
38432
38511
  * Specifies an alternate text for an image
@@ -38578,22 +38657,196 @@ var miOutlineMicOff = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height
38578
38657
 
38579
38658
  var miBaselineDone = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19L21 7l-1.4-1.4L9 16.2z"/></svg>`;
38580
38659
 
38660
+ const cardNumber$3 = "Εισαγάγετε έναν έγκυρο αριθμό κάρτας.";
38661
+ const email$3 = "Εισαγάγετε μια διεύθυνση email.";
38662
+ const invalid$3 = "Εισαγάγετε μια έγκυρη τιμή.";
38663
+ const invalidDate$3 = "Εισαγάγετε μια έγκυρη ημερομηνία.";
38664
+ const max$3 = "Η τιμή πρέπει να είναι το πολύ {{max}}.";
38665
+ const maxDate$3 = "Η ημερομηνία δεν μπορεί να είναι μετά τις {{max}}.";
38666
+ const maxlength$3 = [
38667
+ "Χρησιμοποιήστε το πολύ {{maxlength}} χαρακτήρα.",
38668
+ "Χρησιμοποιήστε το πολύ {{maxlength}} χαρακτήρες."
38669
+ ];
38670
+ const min$3 = "Η τιμή πρέπει να είναι τουλάχιστον {{min}}.";
38671
+ const minDate$3 = "Η ημερομηνία δεν μπορεί να είναι πριν από τις {{min}}.";
38672
+ const minlength$3 = [
38673
+ "Χρησιμοποιήστε τουλάχιστον {{minlength}} χαρακτήρα.",
38674
+ "Χρησιμοποιήστε τουλάχιστον {{minlength}} χαρακτήρες."
38675
+ ];
38676
+ const pattern$3 = "Χρησιμοποιήστε τη μορφή που ζητείται.";
38677
+ const required$7 = "Συμπληρώστε αυτό το πεδίο.";
38678
+ const requiredSelect$3 = "Επιλέξτε ένα στοιχείο από τη λίστα.";
38679
+ const url$3 = "Εισαγάγετε μια διεύθυνση URL.";
38680
+ const vatNumber$3 = "Εισαγάγετε έναν έγκυρο αριθμό ΦΠΑ.";
38681
+ var localeEl$r = {
38682
+ cardNumber: cardNumber$3,
38683
+ email: email$3,
38684
+ invalid: invalid$3,
38685
+ invalidDate: invalidDate$3,
38686
+ max: max$3,
38687
+ maxDate: maxDate$3,
38688
+ maxlength: maxlength$3,
38689
+ min: min$3,
38690
+ minDate: minDate$3,
38691
+ minlength: minlength$3,
38692
+ pattern: pattern$3,
38693
+ required: required$7,
38694
+ requiredSelect: requiredSelect$3,
38695
+ url: url$3,
38696
+ vatNumber: vatNumber$3
38697
+ };
38698
+
38699
+ const cardNumber$2 = "Enter a valid card number.";
38700
+ const email$2 = "Enter an email address.";
38701
+ const invalid$2 = "Enter a valid value.";
38702
+ const invalidDate$2 = "Enter a valid date.";
38703
+ const max$2 = "The value must be {{max}} or less.";
38704
+ const maxDate$2 = "The date must be {{max}} or earlier.";
38705
+ const maxlength$2 = [
38706
+ "Use at most {{maxlength}} character.",
38707
+ "Use at most {{maxlength}} characters."
38708
+ ];
38709
+ const min$2 = "The value must be {{min}} or more.";
38710
+ const minDate$2 = "The date must be {{min}} or later.";
38711
+ const minlength$2 = [
38712
+ "Use at least {{minlength}} character.",
38713
+ "Use at least {{minlength}} characters."
38714
+ ];
38715
+ const pattern$2 = "Match the requested format.";
38716
+ const required$6 = "Fill in this field.";
38717
+ const requiredSelect$2 = "Select an item in the list.";
38718
+ const url$2 = "Enter a URL.";
38719
+ const vatNumber$2 = "Enter a valid VAT number.";
38720
+ var localeEn$r = {
38721
+ cardNumber: cardNumber$2,
38722
+ email: email$2,
38723
+ invalid: invalid$2,
38724
+ invalidDate: invalidDate$2,
38725
+ max: max$2,
38726
+ maxDate: maxDate$2,
38727
+ maxlength: maxlength$2,
38728
+ min: min$2,
38729
+ minDate: minDate$2,
38730
+ minlength: minlength$2,
38731
+ pattern: pattern$2,
38732
+ required: required$6,
38733
+ requiredSelect: requiredSelect$2,
38734
+ url: url$2,
38735
+ vatNumber: vatNumber$2
38736
+ };
38737
+
38738
+ const cardNumber$1 = "Introduce un número de tarjeta válido.";
38739
+ const email$1 = "Introduce una dirección de correo electrónico.";
38740
+ const invalid$1 = "Introduce un valor válido.";
38741
+ const invalidDate$1 = "Introduce una fecha válida.";
38742
+ const max$1 = "El valor debe ser como máximo {{max}}.";
38743
+ const maxDate$1 = "La fecha no puede ser posterior al {{max}}.";
38744
+ const maxlength$1 = [
38745
+ "Usa como máximo {{maxlength}} carácter.",
38746
+ "Usa como máximo {{maxlength}} caracteres."
38747
+ ];
38748
+ const min$1 = "El valor debe ser como mínimo {{min}}.";
38749
+ const minDate$1 = "La fecha no puede ser anterior al {{min}}.";
38750
+ const minlength$1 = [
38751
+ "Usa al menos {{minlength}} carácter.",
38752
+ "Usa al menos {{minlength}} caracteres."
38753
+ ];
38754
+ const pattern$1 = "Usa el formato solicitado.";
38755
+ const required$5 = "Completa este campo.";
38756
+ const requiredSelect$1 = "Selecciona un elemento de la lista.";
38757
+ const url$1 = "Introduce una URL.";
38758
+ const vatNumber$1 = "Introduce un número de IVA válido.";
38759
+ var localeEs$r = {
38760
+ cardNumber: cardNumber$1,
38761
+ email: email$1,
38762
+ invalid: invalid$1,
38763
+ invalidDate: invalidDate$1,
38764
+ max: max$1,
38765
+ maxDate: maxDate$1,
38766
+ maxlength: maxlength$1,
38767
+ min: min$1,
38768
+ minDate: minDate$1,
38769
+ minlength: minlength$1,
38770
+ pattern: pattern$1,
38771
+ required: required$5,
38772
+ requiredSelect: requiredSelect$1,
38773
+ url: url$1,
38774
+ vatNumber: vatNumber$1
38775
+ };
38776
+
38777
+ const cardNumber = "Inserisci un numero di carta valido.";
38778
+ const email = "Inserisci un indirizzo email.";
38779
+ const invalid = "Inserisci un valore valido.";
38780
+ const invalidDate = "Inserisci una data valida.";
38781
+ const max = "Il valore deve essere al massimo {{max}}.";
38782
+ const maxDate = "La data non può essere successiva al {{max}}.";
38783
+ const maxlength = [
38784
+ "Usa al massimo {{maxlength}} carattere.",
38785
+ "Usa al massimo {{maxlength}} caratteri."
38786
+ ];
38787
+ const min = "Il valore deve essere almeno {{min}}.";
38788
+ const minDate = "La data non può essere precedente al {{min}}.";
38789
+ const minlength = [
38790
+ "Usa almeno {{minlength}} carattere.",
38791
+ "Usa almeno {{minlength}} caratteri."
38792
+ ];
38793
+ const pattern = "Rispetta il formato richiesto.";
38794
+ const required$4 = "Compila questo campo.";
38795
+ const requiredSelect = "Seleziona un elemento dell'elenco.";
38796
+ const url = "Inserisci un URL.";
38797
+ const vatNumber = "Inserisci una partita IVA valida.";
38798
+ var localeIt$s = {
38799
+ cardNumber: cardNumber,
38800
+ email: email,
38801
+ invalid: invalid,
38802
+ invalidDate: invalidDate,
38803
+ max: max,
38804
+ maxDate: maxDate,
38805
+ maxlength: maxlength,
38806
+ min: min,
38807
+ minDate: minDate,
38808
+ minlength: minlength,
38809
+ pattern: pattern,
38810
+ required: required$4,
38811
+ requiredSelect: requiredSelect,
38812
+ url: url,
38813
+ vatNumber: vatNumber
38814
+ };
38815
+
38816
+ const flags = {
38817
+ cardNumber: 'typeMismatch',
38818
+ email: 'typeMismatch',
38819
+ invalid: 'customError',
38820
+ invalidDate: 'badInput',
38821
+ max: 'rangeOverflow',
38822
+ maxDate: 'rangeOverflow',
38823
+ maxlength: 'tooLong',
38824
+ min: 'rangeUnderflow',
38825
+ minDate: 'rangeUnderflow',
38826
+ minlength: 'tooShort',
38827
+ pattern: 'patternMismatch',
38828
+ required: 'valueMissing',
38829
+ requiredSelect: 'valueMissing',
38830
+ url: 'typeMismatch',
38831
+ vatNumber: 'typeMismatch',
38832
+ };
38833
+ const messages = new Locale$1({ el: localeEl$r, en: localeEn$r, es: localeEs$r, it: localeIt$s });
38834
+ /** The message of a problem, in the language of the page. */
38835
+ const validityMessage = ({ rule, context, message }) => message || messages.get(rule, context);
38581
38836
  /**
38582
- * Safe wrappers around ElementInternals methods. In Stencil's hydrate/SSR
38583
- * runtime (and in mock-doc spec tests) `@AttachInternals()` returns an inert
38584
- * proxy whose members are all `undefined`, so direct calls like
38585
- * `internals.setFormValue(...)` throw. Property reads (`internals.form`) are
38586
- * safe and don't need these wrappers.
38837
+ * Reports to the form the problem of a form-associated component, or clears it when there is
38838
+ * none: like a native control, an invalid component matches `:invalid` and stops the submit of
38839
+ * its form, which shows the message next to the anchor and focuses it.
38840
+ * @param internals the ElementInternals of the component
38841
+ * @param problem the rule the value breaks, `undefined` when the value is valid
38842
+ * @param anchor the control of the shadow tree the browser points the message at
38587
38843
  */
38588
- const setFormValue = (internals, value) => {
38589
- if (typeof (internals === null || internals === void 0 ? void 0 : internals.setFormValue) === 'function') {
38590
- internals.setFormValue(value);
38591
- }
38592
- };
38593
- const setValidity = (internals, flags, message, anchor) => {
38594
- if (typeof (internals === null || internals === void 0 ? void 0 : internals.setValidity) === 'function') {
38595
- internals.setValidity(flags, message, anchor);
38844
+ const updateValidity = (internals, problem, anchor) => {
38845
+ if (problem === undefined) {
38846
+ setValidity(internals, {});
38847
+ return;
38596
38848
  }
38849
+ setValidity(internals, { [flags[problem.rule]]: true }, validityMessage(problem), anchor);
38597
38850
  };
38598
38851
 
38599
38852
  const decrease$3 = "Μείωση";
@@ -38710,6 +38963,97 @@ const minLenghtValidator = (length) => {
38710
38963
  : null;
38711
38964
  };
38712
38965
  };
38966
+ // the flag the browsers compile the pattern attribute with: v in the current HTML spec, u before it
38967
+ const patternFlags = (() => {
38968
+ try {
38969
+ return RegExp('', 'v').flags;
38970
+ }
38971
+ catch (_a) {
38972
+ return 'u';
38973
+ }
38974
+ })();
38975
+ /**
38976
+ * The rule of the `pattern` attribute of a native input: the whole value matches the expression.
38977
+ * An expression that does not compile sets no rule, as in the browser: `null` then.
38978
+ */
38979
+ const patternValidator = (pattern) => {
38980
+ let expression;
38981
+ try {
38982
+ expression = new RegExp(`^(?:${pattern})$`, patternFlags);
38983
+ }
38984
+ catch (_a) {
38985
+ return null;
38986
+ }
38987
+ return (input) => {
38988
+ if (input === '')
38989
+ return null; // don't validate empty values to allow optional controls
38990
+ return expression.test(input) ? null : { pattern: 'formato non valido' };
38991
+ };
38992
+ };
38993
+ // the valid email address of the HTML spec, the one a native type="email" checks
38994
+ const emailExpression = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
38995
+ const emailValidatorFn = (input) => {
38996
+ if (input === '')
38997
+ return null; // don't validate empty values to allow optional controls
38998
+ return emailExpression.test(input) ? null : { email: 'indirizzo email non valido' };
38999
+ };
39000
+ // a native type="url" accepts an absolute URL, the one the URL parser reads without a base
39001
+ const urlValidatorFn = (input) => {
39002
+ if (input === '')
39003
+ return null; // don't validate empty values to allow optional controls
39004
+ try {
39005
+ new URL(input);
39006
+ return null;
39007
+ }
39008
+ catch (_a) {
39009
+ return { url: 'url non valido' };
39010
+ }
39011
+ };
39012
+ /**
39013
+ * An Italian partita IVA: 11 digits, the last one the check digit of the first ten (the digits in
39014
+ * odd position summed as they are, the ones in even position doubled, minus 9 above 9).
39015
+ */
39016
+ const pivaValidatorFn = (input) => {
39017
+ if (input === '')
39018
+ return null; // don't validate empty values to allow optional controls
39019
+ const error = { piva: 'partita iva non valida' };
39020
+ if (!/^\d{11}$/.test(input))
39021
+ return error;
39022
+ const digits = input.split('').map(Number);
39023
+ const sum = digits.slice(0, 10).reduce((total, digit, index) => {
39024
+ if (index % 2 === 0)
39025
+ return total + digit;
39026
+ const doubled = digit * 2;
39027
+ return total + (doubled > 9 ? doubled - 9 : doubled);
39028
+ }, 0);
39029
+ return (10 - (sum % 10)) % 10 === digits[10] ? null : error;
39030
+ };
39031
+ /**
39032
+ * A payment card number: 13 to 19 digits, in groups split by spaces or dashes, that pass the Luhn
39033
+ * check.
39034
+ */
39035
+ const ccValidatorFn = (input) => {
39036
+ if (input === '')
39037
+ return null; // don't validate empty values to allow optional controls
39038
+ const error = { cc: 'numero di carta non valido' };
39039
+ if (!/^\d+(?:[ -]\d+)*$/.test(input))
39040
+ return error;
39041
+ const digits = input.replace(/[ -]/g, '');
39042
+ if (digits.length < 13 || digits.length > 19)
39043
+ return error;
39044
+ // from the right, every second digit doubled, minus 9 above 9
39045
+ const sum = digits
39046
+ .split('')
39047
+ .reverse()
39048
+ .map(Number)
39049
+ .reduce((total, digit, index) => {
39050
+ if (index % 2 === 0)
39051
+ return total + digit;
39052
+ const doubled = digit * 2;
39053
+ return total + (doubled > 9 ? doubled - 9 : doubled);
39054
+ }, 0);
39055
+ return sum % 10 === 0 ? null : error;
39056
+ };
38713
39057
  const isbnValidatorFn = (input) => {
38714
39058
  if (input === '')
38715
39059
  return null; // don't validate empty values to allow optional controls
@@ -38759,11 +39103,18 @@ class Validator {
38759
39103
  removeValidator(validator) {
38760
39104
  this._validators = this._validators.filter((v) => !this._hasValidator(validator, v));
38761
39105
  }
38762
- validate(value) {
39106
+ /**
39107
+ * Returns the errors of a value without storing them: `errors` and `isValid` keep the ones of
39108
+ * the last `validate`.
39109
+ */
39110
+ check(value) {
38763
39111
  const res = this._validators
38764
39112
  .map((v) => v(value))
38765
39113
  .reduce((prev, curr) => (Object.assign(Object.assign({}, prev), curr)), NullValidator);
38766
- this._errors = Object.keys(res).length === 0 ? null : res;
39114
+ return Object.keys(res).length === 0 ? null : res;
39115
+ }
39116
+ validate(value) {
39117
+ this._errors = this.check(value);
38767
39118
  this.isValid = !this._errors;
38768
39119
  }
38769
39120
  get errors() {
@@ -38813,11 +39164,17 @@ function createInputValidationManager(type) {
38813
39164
  case 'tel':
38814
39165
  inputManager = new InputValidationManager('');
38815
39166
  break;
39167
+ case 'email':
39168
+ inputManager = new InputValidationManager('');
39169
+ inputManager.validator.addValidator(emailValidatorFn);
39170
+ break;
38816
39171
  case 'url':
38817
39172
  inputManager = new InputValidationManager('');
39173
+ inputManager.validator.addValidator(urlValidatorFn);
38818
39174
  break;
38819
39175
  case 'cc':
38820
39176
  inputManager = new InputValidationManager(InputMaskPattern.CC_MASK);
39177
+ inputManager.validator.addValidator(ccValidatorFn);
38821
39178
  break;
38822
39179
  case 'cf':
38823
39180
  inputManager = new InputValidationManager(InputMaskPattern.CF_MASK);
@@ -38842,6 +39199,7 @@ function createInputValidationManager(type) {
38842
39199
  break;
38843
39200
  case 'piva':
38844
39201
  inputManager = new InputValidationManager('');
39202
+ inputManager.validator.addValidator(pivaValidatorFn);
38845
39203
  break;
38846
39204
  default:
38847
39205
  inputManager = new InputValidationManager('');
@@ -38849,6 +39207,42 @@ function createInputValidationManager(type) {
38849
39207
  return inputManager;
38850
39208
  }
38851
39209
 
39210
+ // the validators of the type carry an Italian message: the form gets the localized one instead
39211
+ const typeErrors = ['cf-length', 'cf-regex', 'isbn-error'];
39212
+ /**
39213
+ * The problem reported to the form for the errors of a value. The first validator that fails
39214
+ * decides it: the ones of the type come first, then required, max, min, maxlength, minlength,
39215
+ * pattern and the custom ones last, which keep their own message.
39216
+ */
39217
+ const validityProblem = (errors, value, constraints) => {
39218
+ const [key] = Object.keys(errors);
39219
+ switch (key) {
39220
+ case 'required':
39221
+ return { rule: 'required' };
39222
+ case 'max':
39223
+ return { rule: 'max', context: { max: constraints.max } };
39224
+ case 'min':
39225
+ return { rule: 'min', context: { min: constraints.min } };
39226
+ // the maxlength and minlength validators share this key
39227
+ case 'minLenght':
39228
+ return constraints.maxlength !== undefined && value.length > constraints.maxlength
39229
+ ? { rule: 'maxlength', context: { maxlength: constraints.maxlength } }
39230
+ : { rule: 'minlength', context: { minlength: constraints.minlength } };
39231
+ case 'pattern':
39232
+ return { rule: 'pattern' };
39233
+ case 'email':
39234
+ return { rule: 'email' };
39235
+ case 'url':
39236
+ return { rule: 'url' };
39237
+ case 'piva':
39238
+ return { rule: 'vatNumber' };
39239
+ case 'cc':
39240
+ return { rule: 'cardNumber' };
39241
+ default:
39242
+ return { rule: 'invalid', message: typeErrors.includes(key) ? undefined : errors[key] };
39243
+ }
39244
+ };
39245
+
38852
39246
  const mdsInputCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-icon,mds-input-tip,mds-input-tip-item,mds-spinner):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-placeholder-default-color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-placeholder-focus-color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-placeholder-hover-color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));--mds-input-ring:0 0 0 1px rgb(var(--mds-input-variant-color-rgb,0 0 0)/.1);--mds-input-shadow:0 1px 3px 0 rgb(var(--mds-input-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-variant-color-rgb,0 0 0)/.06);--mds-input-textarea-field-sizing:content;--mds-input-textarea-resize:none;--mds-input-textarea-max-height:calc(var(--spacing,.0025rem)*6400);--mds-input-textarea-min-height:calc(var(--spacing,.0025rem)*2400);--mds-input-tip-background:rgb(var(--magma-surface-inverse-muted,var(--magma-tint-scale-03,var(--tone-neutral-03,73 73 73))));--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-variant-color-rgb:var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204)));--mds-input-border-radius:var(--magma-radius-xl,var(--radius-squircle-xl,36px));--mds-input-transition-duration:var(--duration-300,.3s);--mds-input-controls-border:2px solid rgb(var(--magma-border-muted,var(--magma-tint-border-muted,var(--border-neutral-muted,219 219 219))));--mds-input-controls-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--private-input-transition-duration:var(--mds-input-transition-duration);border-radius:var(--mds-input-border-radius);corner-shape:var(--magma-corner-shape,squircle);font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));gap:calc(var(--spacing,.0025rem)*200);line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;container-type:inline-size;display:flex;position:relative;--mds-input-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-variant-color-rgb:0 0 0}:host([typography=detail]) .input{font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([typography=snippet]) .input{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.input{font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-radius:inherit;-webkit-box-shadow:var(--mds-input-ring),var(--mds-input-shadow);box-shadow:var(--mds-input-ring),var(--mds-input-shadow);box-sizing:border-box;color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));corner-shape:inherit;border:0;margin:0;max-width:100%;min-height:3rem;overflow:hidden;padding:calc(var(--spacing,.0025rem)*300) calc(var(--spacing,.0025rem)*400);text-overflow:ellipsis;-webkit-transition-duration:var(--private-input-transition-duration);transition-duration:var(--private-input-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,margin,opacity,padding,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));width:100%}.input::-webkit-input-placeholder{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:-ms-placeholder-shown{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transition-duration:var(--duration-300,.3s);transition-property:color;transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input::-moz-placeholder{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transition-duration:var(--duration-300,.3s);transition-property:color;transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input::placeholder{color:var(--mds-input-placeholder-default-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input:hover::placeholder{color:var(--mds-input-placeholder-hover-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input:hover:-ms-placeholder-shown{color:var(--mds-input-placeholder-hover-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input:focus::placeholder{color:var(--mds-input-placeholder-focus-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input:focus:-ms-placeholder-shown{color:var(--mds-input-placeholder-focus-color,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.input::-webkit-inner-spin-button,.input::-webkit-outer-spin-button{appearance:none;display:none;margin:0}:host textarea.input,:host([typography]) textarea.input{border-radius:var(--mds-input-border-radius);field-sizing:var(--mds-input-textarea-field-sizing,content);max-height:var(--mds-input-textarea-max-height,calc(var(--spacing,.0025rem)*6400));min-height:var(--mds-input-textarea-min-height,calc(var(--spacing,.0025rem)*2400));overflow:auto;resize:var(--mds-input-textarea-resize,none)}@container style(--mds-input-textarea-resize:none){:host textarea.input,:host([typography]) textarea.input{border-bottom-right-radius:0}}.input:focus{--tw-outline-style:none;outline-style:none;--mds-input-ring:0 0 0 3px rgb(var(--mds-input-variant-color-rgb,0 0 0)/1);--mds-input-shadow:0 4px 6px 3px rgb(var(--mds-input-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-variant-color-rgb,0 0 0)/.06)}.input:disabled{background-color:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}.input:disabled::placeholder{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled:-ms-placeholder-shown{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled::-moz-placeholder{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.input.has-icon{padding-left:calc(var(--spacing,.0025rem)*1100)}.input.has-right-icon{padding-right:calc(var(--spacing,.0025rem)*1100)}.await,.icon{fill:var(--mds-input-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));left:calc(var(--spacing,.0025rem)*300);position:absolute;top:calc(var(--spacing,.0025rem)*300)}.await{color:var(--mds-input-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));height:24px;width:24px}.counter{border-left:var(--mds-input-controls-border);display:flex;flex-direction:column;gap:0;position:absolute;right:0}.counter-button{aspect-ratio:unset;border:0;border-radius:var(--mds-input-border-radius);fill:var(--mds-input-controls-color);height:calc(var(--spacing,.0025rem)*600);min-height:0;width:calc(var(--spacing,.0025rem)*700)}.counter .counter-button:first-child{border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mds-input-border-radius)}.counter .counter-button:last-child{border-bottom-left-radius:0;border-bottom-right-radius:var(--mds-input-border-radius);border-top-left-radius:0;border-top-right-radius:0}.counter-button--horizontal{bottom:0;height:calc(var(--spacing,.0025rem)*1200);position:absolute;top:0;width:calc(var(--spacing,.0025rem)*1200)}.counter-button--decrease{border-bottom-right-radius:0;border-right:var(--mds-input-controls-border);border-top-right-radius:0;left:0}.counter-button--increase{border-bottom-left-radius:0;border-left:var(--mds-input-controls-border);border-top-left-radius:0;right:0}.mic-toggle-button,.password-toggle-button{fill:var(--mds-input-controls-color);position:absolute;right:calc(var(--spacing,.0025rem)*150);top:calc(var(--spacing,.0025rem)*150)}.toggle-button--error{cursor:help;fill:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}.mic-toggle-button--recording{animation:var(--animate-pulse,pulse 2s cubic-bezier(.4,0,.6,1) infinite)}:host([type=number]) .input{-moz-appearance:textfield;padding-right:calc(var(--spacing,.0025rem)*800)}:host([type=number][controls-layout=horizontal]) .input{padding-left:calc(var(--spacing,.0025rem)*1400);padding-right:calc(var(--spacing,.0025rem)*1400);text-align:center}:host([type=number][controls-layout=horizontal][icon]) .input{padding-left:calc(var(--spacing,.0025rem)*2400);text-align:left}:host([type=number][controls-layout=horizontal]) .icon{left:calc(var(--spacing,.0025rem)*1500)}:host([type=password]) .input{padding-right:calc(var(--spacing,.0025rem)*1000)}:host([type=password]) .input[type=text]:not(:-moz-placeholder-shown){font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([type=password]) .input[type=text]:not(:-ms-placeholder-shown){font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([type=password]) .input[type=text]:not(:placeholder-shown){font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host([type=cf]) .input{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-snippet,1rem);font-weight:var(--tw-font-weight,var(--text-size-code-snippet--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-snippet--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:uppercase}mds-input-tip{--mds-input-tip-horizontal-offset:inherit;--mds-input-tip-horizontal-offset-focused:inherit;--mds-input-tip-vertical-offset:inherit;--mds-input-tip-background:inherit}:host(:focus){--mds-input-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([variant=ai]){--mds-input-icon-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-input-tip-background:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-variant-color-rgb:0 0 0}:host([variant=ai]:focus){--mds-input-icon-color:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-variant-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)))}:host([variant=info]){--mds-input-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-variant-color-rgb:0 0 0}:host([variant=info]:focus){--mds-input-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-variant-color-rgb:0 0 0}:host([variant=success]:focus){--mds-input-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-variant-color-rgb:0 0 0}:host([variant=warning]:focus){--mds-input-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-variant-color-rgb:0 0 0}:host([variant=error]:focus){--mds-input-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-transition-duration:0s}:host([pref-contrast=more]){--mds-input-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}.password-mask{background-color:var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-bottom-left-radius:inherit;border-bottom-right-radius:0;border-top-left-radius:inherit;corner-shape:inherit;align-items:center;border-top-right-radius:0;bottom:0;display:flex;gap:calc(var(--spacing,.0025rem)*50);height:100%;justify-content:start;left:0;overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*500);pointer-events:none;position:absolute;right:calc(var(--spacing,.0025rem)*1200);top:0}.password-mask:before{background-image:-webkit-gradient(linear,left top,right top,from(#0000),to(var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))))));background-image:linear-gradient(to right,#0000,var(--mds-input-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))))));bottom:0;content:"";display:inline-flex;position:absolute;right:0;top:0;width:calc(var(--spacing,.0025rem)*600)}.password-mask-items{background-color:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))/0);display:inline-flex;gap:calc(var(--spacing,.0025rem)*100);padding:calc(var(--spacing,.0025rem)*100)}.password-mask-item,.password-mask-items{border-radius:var(--radius-full,1000px);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:background-color;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.password-mask-item{background-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));height:calc(var(--spacing,.0025rem)*200);width:calc(var(--spacing,.0025rem)*200)}:host(:focus-within) .password-mask-items{background-color:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}@keyframes pulse{50%{opacity:.5}}@media (forced-colors:active){.input:focus{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-transition-duration:0s}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}}`;
38853
39247
 
38854
39248
  class MdsInput {
@@ -38867,19 +39261,29 @@ class MdsInput {
38867
39261
  this.internals = hostRef.$hostElement$.attachInternals();
38868
39262
  hostRef.$hostElement$["s-ei"] = this.internals;
38869
39263
  }
39264
+ // the value at load, which a form reset brings back as the value attribute of a native input
39265
+ this.defaultValue = '';
39266
+ // replaced by buildValidation on load, a valid empty set before
39267
+ this.inputValidation = createInputValidationManager('text');
39268
+ // the validators added through addValidator, kept apart so that a rebuild of the rules keeps them
39269
+ this.customValidators = [];
39270
+ // true once a blur has validated the field and driven its variant
39271
+ this.validated = false;
38870
39272
  this.speechToTextLabelKey = 'speechToTextOn';
38871
39273
  this.speechToTextIcon = miOutlineMic;
38872
39274
  this.hasFocus = false;
38873
39275
  this.isRecording = false;
38874
39276
  this.countVariant = 'count-empty';
38875
39277
  this.isPasswordVisible = false;
38876
- // private valuePristine?: string
38877
39278
  this.t = new Locale$1({
38878
39279
  el: localeEl$q,
38879
39280
  en: localeEn$q,
38880
39281
  es: localeEs$q,
38881
39282
  it: localeIt$r,
38882
39283
  });
39284
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
39285
+ // around it, which disables the host but not the native control in its shadow root
39286
+ this.formDisabled = false;
38883
39287
  /**
38884
39288
  * Specifies whether the element should have autocomplete enabled
38885
39289
  */
@@ -38928,6 +39332,9 @@ class MdsInput {
38928
39332
  * Specifies the value of the input element
38929
39333
  */
38930
39334
  this.value = '';
39335
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
39336
+ // the user can change the value: the buttons that change it (steppers, mic) follow it
39337
+ this.canEdit = () => !this.isDisabled() && !this.readonly;
38931
39338
  this.countMaxLength = () => {
38932
39339
  var _a, _b, _c;
38933
39340
  if (this.maxlength === undefined || this.maxlength === 0 || Number.isNaN(this.maxlength))
@@ -38964,6 +39371,8 @@ class MdsInput {
38964
39371
  this.value = input.value;
38965
39372
  setFormValue(this.internals, this.value);
38966
39373
  }
39374
+ };
39375
+ this.onKeyDown = (ev) => {
38967
39376
  this.keyDownEvent.emit(ev);
38968
39377
  };
38969
39378
  this.onBlur = () => {
@@ -38985,18 +39394,21 @@ class MdsInput {
38985
39394
  }
38986
39395
  };
38987
39396
  this.stepUp = () => {
38988
- if (this.nativeInput && !this.readonly && !this.disabled) {
39397
+ if (this.nativeInput && this.canEdit()) {
38989
39398
  this.nativeInput.stepUp();
38990
39399
  this.value = this.nativeInput.value;
38991
39400
  }
38992
39401
  };
38993
39402
  this.stepDown = () => {
38994
- if (this.nativeInput && !this.readonly && !this.disabled) {
39403
+ if (this.nativeInput && this.canEdit()) {
38995
39404
  this.nativeInput.stepDown();
38996
39405
  this.value = this.nativeInput.value;
38997
39406
  }
38998
39407
  };
38999
39408
  this.toggleTextRecognition = () => {
39409
+ // a dictation can always be stopped, started only where the user can change the value
39410
+ if (!this.isRecording && !this.canEdit())
39411
+ return;
39000
39412
  this.isRecording = !this.isRecording;
39001
39413
  if (!this.isRecording) {
39002
39414
  this.speechToTextLabelKey = 'speechToTextOn';
@@ -39027,11 +39439,12 @@ class MdsInput {
39027
39439
  const SpeechRecognition =
39028
39440
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
39029
39441
  (_c = window.SpeechRecognition) !== null && _c !== void 0 ? _c : window.webkitSpeechRecognition;
39030
- this.value = '';
39031
39442
  if (!SpeechRecognition) {
39032
39443
  this.onSpeechRecognitionError();
39033
39444
  return;
39034
39445
  }
39446
+ // the dictation replaces the value, once it can start
39447
+ this.value = '';
39035
39448
  this.recognition = new SpeechRecognition();
39036
39449
  this.recognition.continuous = true;
39037
39450
  this.recognition.lang = navigator.language || 'it-IT';
@@ -39041,6 +39454,12 @@ class MdsInput {
39041
39454
  let progress = 0; // need to save position progress on speech results
39042
39455
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
39043
39456
  this.recognition.onresult = (event) => {
39457
+ // the field was disabled or made read-only while dictating
39458
+ if (!this.canEdit()) {
39459
+ if (this.isRecording)
39460
+ this.toggleTextRecognition();
39461
+ return;
39462
+ }
39044
39463
  const speechResult = event.results;
39045
39464
  const interimResult = speechResult[progress];
39046
39465
  if (interimResult.isFinal) {
@@ -39065,15 +39484,27 @@ class MdsInput {
39065
39484
  }
39066
39485
  };
39067
39486
  }
39487
+ formDisabledCallback(disabled) {
39488
+ this.formDisabled = disabled;
39489
+ }
39490
+ /**
39491
+ * Like a native input, a form reset brings back the value of load and forgets the validation
39492
+ * shown on blur: the field looks pristine until the next blur.
39493
+ */
39068
39494
  formResetCallback() {
39069
- setFormValue(this.internals, '');
39495
+ const validated = this.validated;
39496
+ this.validated = false;
39497
+ this.isValid = !(this.required && this.defaultValue === '');
39498
+ this.value = this.defaultValue;
39499
+ if (validated)
39500
+ this.variant = 'primary';
39070
39501
  }
39071
39502
  connectedCallback() {
39072
39503
  this.datalistId = `datalist-${hashRandomValue()}`;
39073
39504
  }
39074
39505
  componentWillLoad() {
39075
- // this.valuePristine = this.value
39076
- var _a, _b;
39506
+ var _a, _b, _c;
39507
+ this.defaultValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
39077
39508
  // If the mds-input has a tabindex attribute we get the value
39078
39509
  // and pass it down to the native input, then remove it from the
39079
39510
  // mds-input to avoid causing tabbing twice on the same element
@@ -39082,31 +39513,109 @@ class MdsInput {
39082
39513
  this.tabindex = tabindex !== null ? parseInt(tabindex) : undefined;
39083
39514
  this.el.removeAttribute('tabindex');
39084
39515
  }
39085
- setFormValue(this.internals, (_a = this.value) !== null && _a !== void 0 ? _a : null);
39516
+ setFormValue(this.internals, (_b = this.value) !== null && _b !== void 0 ? _b : null);
39086
39517
  this.maxLengthChanged(this.maxlength);
39087
- this.isValid = !(this.required && ((_b = this.value) !== null && _b !== void 0 ? _b : '') === '');
39518
+ this.buildValidation();
39519
+ this.isValid = !(this.required && ((_c = this.value) !== null && _c !== void 0 ? _c : '') === '');
39088
39520
  }
39089
39521
  componentDidLoad() {
39090
- var _a, _b, _c;
39091
- this.inputValidation = createInputValidationManager(this.type);
39092
- this.setValidators();
39093
- (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.setAttribute('pattern', String(this.inputValidation.pattern));
39522
+ var _a, _b;
39094
39523
  if (this.autofocus) {
39095
- (_b = this.nativeInput) === null || _b === void 0 ? void 0 : _b.focus();
39524
+ (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.focus();
39096
39525
  }
39097
- this.variantChanged((_c = this.variant) !== null && _c !== void 0 ? _c : 'primary');
39526
+ this.variantChanged((_b = this.variant) !== null && _b !== void 0 ? _b : 'primary');
39527
+ }
39528
+ componentDidRender() {
39529
+ // after every render: the native control the message points at can be a new element
39530
+ this.updateFormValidity();
39098
39531
  }
39099
- setValidators() {
39532
+ /**
39533
+ * Builds the validators from scratch: the ones of the type, the ones of the constraint props and
39534
+ * the custom ones. A rebuild instead of an append, so that a rule changed after load replaces
39535
+ * the old one instead of stacking on it.
39536
+ */
39537
+ buildValidation() {
39538
+ var _a, _b;
39539
+ const validation = createInputValidationManager((_a = this.type) !== null && _a !== void 0 ? _a : 'text');
39540
+ const { validator } = validation;
39541
+ const max = this.numericBound(this.max);
39542
+ const min = this.numericBound(this.min);
39100
39543
  if (this.required)
39101
- this.inputValidation.validator.addValidator(requiredValidor);
39102
- if (this.max !== '' && Number(this.max) !== 0 && !Number.isNaN(Number(this.max)))
39103
- this.inputValidation.validator.addValidator(maxValidator(Number(this.max)));
39104
- if (this.min !== '' && Number(this.min) !== 0 && !Number.isNaN(Number(this.min)))
39105
- this.inputValidation.validator.addValidator(minValidator(Number(this.max)));
39544
+ validator.addValidator(requiredValidor);
39545
+ if (max !== undefined)
39546
+ validator.addValidator(maxValidator(max));
39547
+ if (min !== undefined)
39548
+ validator.addValidator(minValidator(min));
39106
39549
  if (this.maxlength !== undefined && this.maxlength !== 0 && !Number.isNaN(this.maxlength))
39107
- this.inputValidation.validator.addValidator(maxLenghtValidator(this.maxlength));
39550
+ validator.addValidator(maxLenghtValidator(this.maxlength));
39108
39551
  if (this.minlength !== undefined && this.minlength !== 0 && !Number.isNaN(this.minlength))
39109
- this.inputValidation.validator.addValidator(minLenghtValidator(this.minlength));
39552
+ validator.addValidator(minLenghtValidator(this.minlength));
39553
+ const pattern = this.patternApplies() ? patternValidator((_b = this.pattern) !== null && _b !== void 0 ? _b : '') : null;
39554
+ if (pattern)
39555
+ validator.addValidator(pattern);
39556
+ validator.addValidator(this.customValidators);
39557
+ this.inputValidation = validation;
39558
+ }
39559
+ /** As on a native input, `pattern` constrains the text types, not a number, a date or a time. */
39560
+ patternApplies() {
39561
+ var _a, _b;
39562
+ return (((_a = this.pattern) !== null && _a !== void 0 ? _a : '') !== '' &&
39563
+ !['date', 'number', 'textarea', 'time'].includes((_b = this.type) !== null && _b !== void 0 ? _b : 'text'));
39564
+ }
39565
+ /** The number held by `min` or `max`, `undefined` when the prop is unset or not a number. */
39566
+ numericBound(bound) {
39567
+ if (bound === undefined || bound === null || bound === '')
39568
+ return undefined;
39569
+ const value = Number(bound);
39570
+ return Number.isNaN(value) ? undefined : value;
39571
+ }
39572
+ /**
39573
+ * Reports the validity of the value to the form, decided by the same validators that drive the
39574
+ * variant: like a native `required`, an invalid field stops the submit of its form. Runs on every
39575
+ * change of the value or of the rules, not on blur: the form can be submitted without a blur.
39576
+ */
39577
+ updateFormValidity() {
39578
+ var _a;
39579
+ const value = (_a = this.value) !== null && _a !== void 0 ? _a : '';
39580
+ const errors = this.inputValidation.validator.check(value);
39581
+ const problem = errors
39582
+ ? validityProblem(errors, value, {
39583
+ max: this.numericBound(this.max),
39584
+ maxlength: this.maxlength,
39585
+ min: this.numericBound(this.min),
39586
+ minlength: this.minlength,
39587
+ })
39588
+ : undefined;
39589
+ updateValidity(this.internals, problem, this.nativeInput);
39590
+ }
39591
+ /**
39592
+ * A submit stopped by an invalid field, or a `checkValidity()` of its form, validates the field
39593
+ * as a blur does, so that it shows what is wrong.
39594
+ */
39595
+ invalidHandler() {
39596
+ this.validateInput();
39597
+ }
39598
+ /**
39599
+ * Rebuilds the validators when a prop they derive from changes after load, as it does with the
39600
+ * React wrappers under SSR, which set the props on an element that has already loaded.
39601
+ */
39602
+ validationRulesChanged() {
39603
+ var _a;
39604
+ this.buildValidation();
39605
+ this.updateFormValidity();
39606
+ if (!this.validated) {
39607
+ // pristine field: only the required tip follows, the variant waits for the first blur
39608
+ this.isValid = !(this.required && ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '');
39609
+ return;
39610
+ }
39611
+ if (this.inputValidation.validator.hasValidator()) {
39612
+ this.validateInput();
39613
+ return;
39614
+ }
39615
+ // the last rule is gone: nothing is left to drive the variant, back to the pristine look
39616
+ this.validated = false;
39617
+ this.isValid = true;
39618
+ this.variant = 'primary';
39110
39619
  }
39111
39620
  /**
39112
39621
  * Emits the change event when the component value changes
@@ -39115,6 +39624,7 @@ class MdsInput {
39115
39624
  var _a;
39116
39625
  this.changeEvent.emit({ value: this.value });
39117
39626
  setFormValue(this.internals, (_a = this.value) !== null && _a !== void 0 ? _a : null);
39627
+ this.updateFormValidity();
39118
39628
  if (this.maxlength !== undefined) {
39119
39629
  this.countMaxLength();
39120
39630
  }
@@ -39143,7 +39653,9 @@ class MdsInput {
39143
39653
  * @param validator the validator function to add
39144
39654
  */
39145
39655
  async addValidator(validator) {
39656
+ this.customValidators.push(validator);
39146
39657
  this.inputValidation.validator.addValidator(validator);
39658
+ this.updateFormValidity();
39147
39659
  return Promise.resolve();
39148
39660
  }
39149
39661
  /**
@@ -39151,7 +39663,9 @@ class MdsInput {
39151
39663
  * @param validator the validator function to remove
39152
39664
  */
39153
39665
  async removeValidator(validator) {
39666
+ this.customValidators = this.customValidators.filter((custom) => custom !== validator);
39154
39667
  this.inputValidation.validator.removeValidator(validator);
39668
+ this.updateFormValidity();
39155
39669
  }
39156
39670
  /**
39157
39671
  * Returns if validator is presen
@@ -39169,11 +39683,13 @@ class MdsInput {
39169
39683
  return Promise.resolve(this.inputValidation.validator.errors);
39170
39684
  }
39171
39685
  validateInput() {
39686
+ var _a, _b;
39172
39687
  // validate input only when atleast one validator is present
39173
39688
  if (this.inputValidation.validator.hasValidator()) {
39174
- this.isValid = this.inputValidation.isValid(this.value);
39689
+ this.validated = true;
39690
+ this.isValid = this.inputValidation.isValid((_a = this.value) !== null && _a !== void 0 ? _a : '');
39175
39691
  // set variant attribute
39176
- if (this.value === '' && !this.required)
39692
+ if (((_b = this.value) !== null && _b !== void 0 ? _b : '') === '' && !this.required)
39177
39693
  this.variant = 'primary';
39178
39694
  else
39179
39695
  this.variant = this.isValid ? 'success' : 'error';
@@ -39209,22 +39725,42 @@ class MdsInput {
39209
39725
  }
39210
39726
  render() {
39211
39727
  var _a, _b, _c;
39212
- return (hAsync(Host, { key: '845f538a792b4465e10fcfaf54b10b8fdff8b1e9', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.type === 'number' && this.controlsLayout === 'horizontal' && (hAsync("mds-button", { key: '3e98aeaf32c5fe6904579e7f8750a52bd8ed3779', class: "counter-button counter-button--horizontal counter-button--decrease", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), variant: "dark", tone: "text", part: "counter-button-decrease" })), this.type === 'textarea' ? (hAsync("textarea", { "aria-label": this.accessibleName, class: clsx('input', ((_a = this.icon) !== null && _a !== void 0 ? _a : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoFocus: this.autofocus, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: (input) => (this.nativeInput = input), required: this.required, tabIndex: this.tabindex, value: this.value })) : (hAsync("input", { "aria-label": this.accessibleName, class: clsx('input', ((_b = this.icon) !== null && _b !== void 0 ? _b : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoComplete: this.autocomplete, autoFocus: this.autofocus, disabled: this.disabled, max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, pattern: this.pattern, list: this.datalistId, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: (input) => (this.nativeInput = input), required: this.required, step: this.step, tabIndex: this.tabindex, type: this.type === 'password' && this.isPasswordVisible ? 'text' : this.type, value: this.value })), this.type === 'number' && this.controlsLayout === 'vertical' && (hAsync("div", { key: '7ab2af1009a7e03a842ed67cd325993c9a21edec', class: "counter counter--vertical" }, hAsync("mds-button", { key: '2ef1243427d235fa097a9b2e5add1fb7e67ae5fc', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), variant: "dark", size: "sm", tone: "text", part: "counter-button-increase" }), hAsync("mds-button", { key: '2053f7c658aa16a8a84a7173f5db555f34800e7a', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), variant: "dark", size: "sm", tone: "text", part: "counter-button-decrease" }))), this.type === 'number' && this.controlsLayout === 'horizontal' && (hAsync("mds-button", { key: '3efe63b2ca3abe15080f721d383d3cadfaf5f5f3', class: "counter-button counter-button--horizontal counter-button--increase", variant: "dark", tone: "text", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" })), this.type === 'password' && (hAsync("mds-button", { key: '910df4fde2fb8a423cd12fde3960018a85e1c583', class: "password-toggle-button", variant: "dark", tone: "text", icon: this.isPasswordVisible ? miBaselineVisibleOff : miBaselineVisible, onClick: this.handlePasswordToggleClick, tabindex: "0", title: this.isPasswordVisible ? this.t.get('hidePassword') : this.t.get('showPassword'), part: "password-toggle-button" })), this.type === 'password' && !this.isPasswordVisible && ((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) > 0 && (hAsync("div", { key: '1440dbe88ab432466f355d5864672560c2db204c', class: "password-mask" }, hAsync("div", { key: '864ba9b91cbca7057b4694e371e018c9df62a430', class: "password-mask-items", part: "password-mask-items" }, Array.from({ length: this.value.length }).map((_, index) => (hAsync("div", { key: index, class: "password-mask-item", part: "password-mask-item" })))))), this.mic && (hAsync("mds-button", { key: 'ae60b8787ca87a563823f4f9e5dcc0ec883d88b3', class: clsx('mic-toggle-button', this.isRecording && 'mic-toggle-button--recording'), icon: this.speechToTextIcon, onClick: this.toggleTextRecognition, tabindex: "0", title: this.t.get(this.speechToTextLabelKey), variant: "dark", tone: "text", part: "mic-toggle-button" })), hAsync("mds-input-tip", { key: '428b89c685610212d326639fe26420f42b4c6a6a', position: "top", active: this.hasFocus, part: "tip-top" }, this.disabled && hAsync("mds-input-tip-item", { key: '1c1cefd4812f2053a2a7dac7f671741190e6d1f9', expanded: true, variant: "disabled" }), this.readonly && hAsync("mds-input-tip-item", { key: '345b4aa563e0256ead4ca1d1273c7139d558b372', expanded: true, variant: "readonly" }), this.required && (hAsync("mds-input-tip-item", { key: '490afbec9f2f6bf267909ab3815b0064a5eccbdd', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' }))), hAsync("mds-input-tip", { key: 'f97f2382bb8333189adaa9cba8b4b36a0e85b0a5', position: "bottom", active: this.hasFocus, part: "tip-bottom" }, this.tip && (hAsync("mds-input-tip-item", { key: '37331d0c0d73c035ef897aab7535eadc9d7e8089', expanded: true, variant: "text" }, this.tip)), this.maxlength && (hAsync("mds-input-tip-item", { key: '2f15cf016309493535f60e924ea17bad3c04aa5c', part: "tip-count", expanded: true, variant: this.countVariant }, this.currentLengthLabel))), this.datalist && (hAsync("datalist", { key: '080fdb03ff33d0b7b4f2097497daba098159db91', id: this.datalistId, class: "datalist" }, this.datalist.map((element, i) => {
39728
+ return (hAsync(Host, { key: '48be1ea3b45d760004cafcc1512d912aa3bbb09b', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.type === 'number' && this.controlsLayout === 'horizontal' && (hAsync("mds-button", { key: '4394045c76229b350e2b7925e97ee9cfb7fbc886', class: "counter-button counter-button--horizontal counter-button--decrease", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, disabled: !this.canEdit(), onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), variant: "dark", tone: "text", part: "counter-button-decrease" })), this.type === 'textarea' ? (hAsync("textarea", { "aria-label": this.accessibleName, class: clsx('input', ((_a = this.icon) !== null && _a !== void 0 ? _a : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoFocus: this.autofocus, disabled: this.isDisabled(), maxLength: this.maxlength, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: (input) => (this.nativeInput = input), required: this.required, tabIndex: this.tabindex, value: this.value })) : (hAsync("input", { "aria-label": this.accessibleName, class: clsx('input', ((_b = this.icon) !== null && _b !== void 0 ? _b : this.await) && 'has-icon', this.mic && 'has-right-icon'), autoComplete: this.autocomplete, autoFocus: this.autofocus, disabled: this.isDisabled(), max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, onKeyDown: this.onKeyDown, pattern: this.pattern, list: this.datalistId, part: "field", placeholder: this.placeholder, readOnly: this.readonly, ref: (input) => (this.nativeInput = input), required: this.required, step: this.step, tabIndex: this.tabindex, type: this.type === 'password' && this.isPasswordVisible ? 'text' : this.type, value: this.value })), this.type === 'number' && this.controlsLayout === 'vertical' && (hAsync("div", { key: '743be29eebc5999a9d0925a605bb6635f140f92b', class: "counter counter--vertical" }, hAsync("mds-button", { key: '4dc91b23c9c93fa8b8b947abe18e0e831bd041d1', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, disabled: !this.canEdit(), onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), variant: "dark", size: "sm", tone: "text", part: "counter-button-increase" }), hAsync("mds-button", { key: '09a7bc1c90e3fe865f644946777166b86da80194', class: "counter-button", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowDown : miBaselineRemove, disabled: !this.canEdit(), onClick: this.stepDown, tabindex: "0", title: this.t.get('decrease'), variant: "dark", size: "sm", tone: "text", part: "counter-button-decrease" }))), this.type === 'number' && this.controlsLayout === 'horizontal' && (hAsync("mds-button", { key: '81cadffb0b8250c384e613495cdc16bc9053e144', class: "counter-button counter-button--horizontal counter-button--increase", variant: "dark", tone: "text", icon: this.controlsIcon === 'arrow' ? miBaselineKeyboardArrowUp : miBaselineAdd, disabled: !this.canEdit(), onClick: this.stepUp, tabindex: "0", title: this.t.get('increase'), part: "counter-button-increase" })), this.type === 'password' && (hAsync("mds-button", { key: 'cdbb6575eb87a9937e9bbc0ff2f72f31bb2f0dfc', class: "password-toggle-button", variant: "dark", tone: "text", icon: this.isPasswordVisible ? miBaselineVisibleOff : miBaselineVisible, disabled: this.isDisabled(), onClick: this.handlePasswordToggleClick, tabindex: "0", title: this.isPasswordVisible ? this.t.get('hidePassword') : this.t.get('showPassword'), part: "password-toggle-button" })), this.type === 'password' && !this.isPasswordVisible && ((_c = this.value) === null || _c === void 0 ? void 0 : _c.length) > 0 && (hAsync("div", { key: '69bc7dbdd9f7df55c28baf13dc3bdd94d7b60bb9', class: "password-mask" }, hAsync("div", { key: 'a8e470d57c54e4e2f9572c075cb3cb46b1dab1ef', class: "password-mask-items", part: "password-mask-items" }, Array.from({ length: this.value.length }).map((_, index) => (hAsync("div", { key: index, class: "password-mask-item", part: "password-mask-item" })))))), this.mic && (hAsync("mds-button", { key: 'f55d1b36d90f5e27db83eced736aab4334d53ebf', class: clsx('mic-toggle-button', this.isRecording && 'mic-toggle-button--recording'), icon: this.speechToTextIcon, disabled: !this.canEdit(), onClick: this.toggleTextRecognition, tabindex: "0", title: this.t.get(this.speechToTextLabelKey), variant: "dark", tone: "text", part: "mic-toggle-button" })), hAsync("mds-input-tip", { key: '6ad012233367c3ab1cad76655b157b7adf6bae1a', position: "top", active: this.hasFocus, part: "tip-top" }, this.isDisabled() && (hAsync("mds-input-tip-item", { key: '2a06f717b4805396462b71b2def8cd347eddabce', expanded: true, variant: "disabled" })), this.readonly && hAsync("mds-input-tip-item", { key: '135cebe86e822ed380dc5d08dcdb171fb8a34b82', expanded: true, variant: "readonly" }), this.required && (hAsync("mds-input-tip-item", { key: '572b7216d9ad15133671db09490a0b3c3bc4520f', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' }))), hAsync("mds-input-tip", { key: '97662d138ecf73ade4e2ce1d5bed878f82ff557c', position: "bottom", active: this.hasFocus, part: "tip-bottom" }, this.tip && (hAsync("mds-input-tip-item", { key: '991b04754698281693d30c1fba593d6bf0239b6b', expanded: true, variant: "text" }, this.tip)), this.maxlength && (hAsync("mds-input-tip-item", { key: 'b02d00e94cad631e7804466ee0852c0e3218138c', part: "tip-count", expanded: true, variant: this.countVariant }, this.currentLengthLabel))), this.datalist && (hAsync("datalist", { key: '98076063078aa7427ecb5305cdfb17c0f75f87da', id: this.datalistId, class: "datalist" }, this.datalist.map((element, i) => {
39213
39729
  return hAsync("option", { key: i, value: element });
39214
- }))), this.icon && !this.await && (hAsync("mds-icon", { key: '8f1a7c1559c81cd7bb0b2418fc81a66055e8b374', class: clsx('icon', this.variant), name: this.icon })), hAsync("mds-spinner", { key: '172dfc79d67b94a453ede3dd6d991ab90a161f1c', running: this.await, class: clsx('await', this.variant) })));
39730
+ }))), this.icon && !this.await && (hAsync("mds-icon", { key: 'a48e5af6c49c4f0740ad46fb75fde88ff814a8a7', class: clsx('icon', this.variant), name: this.icon })), hAsync("mds-spinner", { key: '3aec6c0f1a77f68fc271a10e485eeab814a34d35', running: this.await, class: clsx('await', this.variant) })));
39215
39731
  }
39216
39732
  static get formAssociated() { return true; }
39217
39733
  get el() { return getElement(this); }
39218
39734
  static get watchers() { return {
39735
+ "max": [{
39736
+ "validationRulesChanged": 0
39737
+ }],
39738
+ "maxlength": [{
39739
+ "validationRulesChanged": 0
39740
+ }, {
39741
+ "maxLengthChanged": 0
39742
+ }],
39743
+ "min": [{
39744
+ "validationRulesChanged": 0
39745
+ }],
39746
+ "minlength": [{
39747
+ "validationRulesChanged": 0
39748
+ }],
39749
+ "pattern": [{
39750
+ "validationRulesChanged": 0
39751
+ }],
39752
+ "required": [{
39753
+ "validationRulesChanged": 0
39754
+ }],
39755
+ "type": [{
39756
+ "validationRulesChanged": 0
39757
+ }],
39219
39758
  "value": [{
39220
39759
  "valueChanged": 0
39221
39760
  }],
39222
39761
  "variant": [{
39223
39762
  "variantChanged": 0
39224
39763
  }],
39225
- "maxlength": [{
39226
- "maxLengthChanged": 0
39227
- }],
39228
39764
  "disabled": [{
39229
39765
  "disabledChanged": 0
39230
39766
  }]
@@ -39264,6 +39800,7 @@ class MdsInput {
39264
39800
  "currentLengthLabel": [32],
39265
39801
  "countVariant": [32],
39266
39802
  "isPasswordVisible": [32],
39803
+ "formDisabled": [32],
39267
39804
  "addValidator": [64],
39268
39805
  "removeValidator": [64],
39269
39806
  "hasValidator": [64],
@@ -39271,7 +39808,7 @@ class MdsInput {
39271
39808
  "setFocus": [64],
39272
39809
  "getInputElement": [64]
39273
39810
  },
39274
- "$listeners$": undefined,
39811
+ "$listeners$": [[0, "invalid", "invalidHandler"]],
39275
39812
  "$lazyBundleId$": "-",
39276
39813
  "$attrsToReflect$": [["autocomplete", "autocomplete"], ["autofocus", "autofocus"], ["await", "await"], ["controlsLayout", "controls-layout"], ["controlsIcon", "controls-icon"], ["disabled", "disabled"], ["icon", "icon"], ["max", "max"], ["maxlength", "maxlength"], ["mic", "mic"], ["min", "min"], ["minlength", "minlength"], ["name", "name"], ["pattern", "pattern"], ["placeholder", "placeholder"], ["readonly", "readonly"], ["required", "required"], ["variant", "variant"], ["tip", "tip"], ["step", "step"], ["type", "type"], ["typography", "typography"], ["value", "value"]]
39277
39814
  }; }
@@ -39294,8 +39831,15 @@ class MdsInputDate {
39294
39831
  this.internals = hostRef.$hostElement$.attachInternals();
39295
39832
  hostRef.$hostElement$["s-ei"] = this.internals;
39296
39833
  }
39834
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
39835
+ // around it, which disables the host but not the native control in its shadow root
39836
+ this.formDisabled = false;
39297
39837
  this.isSlotted = false;
39838
+ // the value at load, which a form reset brings back as the value attribute of a native input
39839
+ this.defaultValue = '';
39298
39840
  this.empty = undefined;
39841
+ // true once the user has edited or left the field, or a stopped submit pointed at it: from then
39842
+ // on the validation drives the variant, like :user-invalid on a native control
39299
39843
  this.touched = false;
39300
39844
  /**
39301
39845
  * Specifies the value of the input
@@ -39339,6 +39883,7 @@ class MdsInputDate {
39339
39883
  this.required = false;
39340
39884
  this.calendarKey = 0;
39341
39885
  this.hasFocus = false;
39886
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
39342
39887
  this.handleChange = (event) => {
39343
39888
  const input = event.target;
39344
39889
  this.touched = true;
@@ -39350,6 +39895,7 @@ class MdsInputDate {
39350
39895
  this.onBlur = (ev) => {
39351
39896
  const input = ev.target;
39352
39897
  this.hasFocus = false;
39898
+ this.touched = true;
39353
39899
  this.value = input.value;
39354
39900
  this.validateValue(input.validity.badInput);
39355
39901
  };
@@ -39368,6 +39914,7 @@ class MdsInputDate {
39368
39914
  this.calendarKey += 1;
39369
39915
  };
39370
39916
  this.handleCalendarChange = (ev) => {
39917
+ this.touched = true;
39371
39918
  this.value = ev.detail.startDate;
39372
39919
  if (this.delay === 0)
39373
39920
  return;
@@ -39383,27 +39930,67 @@ class MdsInputDate {
39383
39930
  this.valueChange.emit(this.value);
39384
39931
  this.validateValue();
39385
39932
  }
39933
+ /**
39934
+ * Checks the value: the validity reported to the form and the required tip follow it at once,
39935
+ * the variant and `mdsInputValidation` only once the field is touched.
39936
+ */
39386
39937
  validateValue(hasBadInput = false) {
39387
39938
  const date = DateTime.fromISO(this.value);
39388
39939
  const hasValue = Boolean(this.value);
39389
39940
  const hasInvalidValue = hasValue && !date.isValid;
39390
- const isMissingRequiredValue = this.required && !hasValue;
39391
- const outOfRange = date.isValid &&
39392
- ((this.max && DateTime.fromISO(this.max) < date) ||
39393
- (this.min && DateTime.fromISO(this.min) > date));
39394
- if (hasBadInput || hasInvalidValue || isMissingRequiredValue || outOfRange) {
39395
- this.isValid = false;
39396
- this.variant = 'error';
39397
- setFormValue(this.internals, null);
39398
- this.empty = hasBadInput || hasInvalidValue ? true : undefined;
39941
+ this.problem = this.findProblem(date, hasBadInput || hasInvalidValue);
39942
+ this.isValid = this.problem === undefined;
39943
+ setFormValue(this.internals, this.isValid ? this.value : null);
39944
+ this.empty = hasBadInput || hasInvalidValue ? true : undefined;
39945
+ this.updateFormValidity();
39946
+ if (!this.touched)
39947
+ return;
39948
+ this.variant = this.isValid ? 'primary' : 'error';
39949
+ this.validationEvent.emit(this.isValid);
39950
+ }
39951
+ /**
39952
+ * A submit stopped by an invalid date, or a `checkValidity()` of its form, touches the field, so
39953
+ * that it shows what is wrong.
39954
+ */
39955
+ invalidHandler() {
39956
+ this.touched = true;
39957
+ this.validateValue();
39958
+ }
39959
+ /** The rule the value breaks, `undefined` when it breaks none. */
39960
+ findProblem(date, isBadInput) {
39961
+ var _a, _b, _c;
39962
+ if (isBadInput)
39963
+ return { rule: 'invalidDate' };
39964
+ if (this.required && ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '')
39965
+ return { rule: 'required' };
39966
+ if (!date.isValid)
39967
+ return undefined;
39968
+ if (((_b = this.max) !== null && _b !== void 0 ? _b : '') !== '' && DateTime.fromISO(this.max) < date) {
39969
+ return { rule: 'maxDate', context: { max: this.formatDate(this.max) } };
39399
39970
  }
39400
- else {
39401
- this.isValid = true;
39402
- this.variant = 'primary';
39403
- setFormValue(this.internals, this.value);
39404
- this.empty = undefined;
39971
+ if (((_c = this.min) !== null && _c !== void 0 ? _c : '') !== '' && DateTime.fromISO(this.min) > date) {
39972
+ return { rule: 'minDate', context: { min: this.formatDate(this.min) } };
39405
39973
  }
39406
- this.validationEvent.emit(this.isValid);
39974
+ return undefined;
39975
+ }
39976
+ /** An ISO date as the page language writes it, for the messages. */
39977
+ formatDate(iso) {
39978
+ return DateTime.fromISO(iso)
39979
+ .setLocale(preferenceStore.state.language)
39980
+ .toLocaleString(DateTime.DATE_SHORT);
39981
+ }
39982
+ /**
39983
+ * Reports the validity of the value to the form, with the rules that drive the variant: like a
39984
+ * native control, an invalid date stops the submit of its form.
39985
+ */
39986
+ updateFormValidity() {
39987
+ var _a, _b;
39988
+ const input = (_b = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input')) !== null && _b !== void 0 ? _b : undefined;
39989
+ updateValidity(this.internals, this.problem, input);
39990
+ }
39991
+ componentDidRender() {
39992
+ // the native input the message points at exists from the first render on
39993
+ this.updateFormValidity();
39407
39994
  }
39408
39995
  /**
39409
39996
  * Sets focus on the underlying input element.
@@ -39429,30 +40016,75 @@ class MdsInputDate {
39429
40016
  async getErrors() {
39430
40017
  return Promise.resolve(this.isValid ? null : { error: '' });
39431
40018
  }
40019
+ formDisabledCallback(disabled) {
40020
+ this.formDisabled = disabled;
40021
+ }
40022
+ /**
40023
+ * Like a native input, a form reset brings back the value of load and forgets the interaction:
40024
+ * the field looks pristine until the user edits or leaves it again.
40025
+ */
39432
40026
  formResetCallback() {
39433
- setFormValue(this.internals, '');
40027
+ var _a;
40028
+ const { touched } = this;
40029
+ this.touched = false;
40030
+ // the native input can hold a partial date that never reached the value
40031
+ const input = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input');
40032
+ if (input)
40033
+ input.value = this.defaultValue;
40034
+ this.value = this.defaultValue;
40035
+ this.validateValue();
40036
+ if (touched)
40037
+ this.variant = 'primary';
39434
40038
  }
39435
40039
  componentWillLoad() {
39436
40040
  this.isSlotted = !(this.host.getAttribute('slot') === null || this.host.getAttribute('slot') === '');
39437
40041
  this.value = this.value || '';
39438
- // Se max è precedente a min, imposto max uguale a min
39439
- if (this.min !== null && this.min !== '' && this.max !== null && this.max !== '') {
39440
- const minDate = DateTime.fromISO(this.min);
39441
- const maxDate = DateTime.fromISO(this.max);
39442
- if (maxDate < minDate) {
39443
- this.max = this.min;
39444
- }
40042
+ this.defaultValue = this.value;
40043
+ this.clampRange();
40044
+ this.validateValue();
40045
+ }
40046
+ /**
40047
+ * Snaps `max` to `min` when the range is reversed.
40048
+ * @returns true when `max` changed
40049
+ */
40050
+ clampRange() {
40051
+ if (this.min === null || this.min === '' || this.max === null || this.max === '')
40052
+ return false;
40053
+ if (DateTime.fromISO(this.max) < DateTime.fromISO(this.min)) {
40054
+ this.max = this.min;
40055
+ return true;
39445
40056
  }
40057
+ return false;
40058
+ }
40059
+ /**
40060
+ * Validates again when a rule changes after load, as it does with the React wrappers under SSR,
40061
+ * which set the props on an element that has already loaded.
40062
+ */
40063
+ validationRulesChanged() {
40064
+ // a reversed range snaps max to min, and that change runs this watcher again
40065
+ if (this.clampRange())
40066
+ return;
39446
40067
  this.validateValue();
39447
40068
  }
39448
40069
  render() {
39449
- return (hAsync(Host, { key: '7deeee86a7a4e6e1012355daf9a8c1f20699dc79', empty: this.empty, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("input", { key: '5638b0605b339535385d0d8fdb5b5b404697b814', "aria-label": this.accessibleName, value: this.value, id: "dateInput", class: "input", part: "input-date", type: "date", disabled: this.disabled, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.handleChange, onChange: this.handleChange }), !this.isSlotted && (hAsync("div", { key: 'd86699480eeb7d0b0fa9550533433ccdedfe2cb8', class: "action-open-calendar-wrapper" }, hAsync("mds-button", { key: 'd944ac7e9773439413e1124a78d251206009996f', id: "calendar-dropdown", class: "action-open-calendar", disabled: this.disabled, variant: "dark", tone: "text", icon: miBaselineCalendarToday, onClick: this.handleOpenCalendarClick }))), hAsync("mds-input-tip", { key: 'f4a794937ef3456f9a1c8c78b287041a997a89cd', position: "top", active: this.hasFocus }, this.disabled && hAsync("mds-input-tip-item", { key: '69b8aa28e6c25ece212a6ccb6fab01399ca2ebd3', expanded: true, variant: "disabled" }), this.readonly && hAsync("mds-input-tip-item", { key: '879abd3cbf773214934813fd68f09562ae67022a', expanded: true, variant: "readonly" }), this.required && (hAsync("mds-input-tip-item", { key: 'a9fa986de0a67f1e7d05fbb62348758459978a25', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' }))), !this.isSlotted && (hAsync("mds-dropdown", { key: '3f05e1b4705dcfc380ecd0f97a7bd957ce7c2ecf', placement: "bottom-end", "disable-auto-placement": true, ref: (el) => (this.dropdownRef = el), role: "group", target: "#calendar-dropdown" }, hAsync("mds-calendar", Object.assign({ key: this.calendarKey, singlePicker: true, hideToday: this.hideToday, onMdsCalendarChange: this.handleCalendarChange, startDate: this.value }, (this.min !== null && this.min !== '' ? { min: this.min } : {}), (this.max !== null && this.max !== '' ? { max: this.max } : {})))))));
40070
+ return (hAsync(Host, { key: 'bb6ce788477995704deb7554cec8363e0e219418', empty: this.empty, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("input", { key: 'ff6e84704788c49a01491dc042a349c95a5b6ce2', "aria-label": this.accessibleName, value: this.value, id: "dateInput", class: "input", part: "input-date", type: "date", disabled: this.isDisabled(), name: this.name, readOnly: this.readonly, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.handleChange, onChange: this.handleChange }), !this.isSlotted && (hAsync("div", { key: 'e7fa728f2f5ede454ef7cf43da5885484a47a201', class: "action-open-calendar-wrapper" }, hAsync("mds-button", { key: '0c67d5ed8fc65af85a21010be65f37409e1125bc', id: "calendar-dropdown", class: "action-open-calendar",
40071
+ // a read-only date cannot change, from the calendar either
40072
+ disabled: this.isDisabled() || this.readonly, variant: "dark", tone: "text", icon: miBaselineCalendarToday, onClick: this.handleOpenCalendarClick }))), hAsync("mds-input-tip", { key: '43e3767bc9f70ea31883f5d7d562e102b4bcc3c9', position: "top", active: this.hasFocus }, this.isDisabled() && (hAsync("mds-input-tip-item", { key: '6cedaa989e6ec5899d73fc6d4f8c68f798408dae', expanded: true, variant: "disabled" })), this.readonly && hAsync("mds-input-tip-item", { key: '4f067b4c600e75f78fa7bef72a28d5cb1e4ad9e4', expanded: true, variant: "readonly" }), this.required && (hAsync("mds-input-tip-item", { key: '28419231c5a20cd36b9c4c5e668c99707a20c485', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' }))), !this.isSlotted && (hAsync("mds-dropdown", { key: '3f9cdf80cc2167a864e6b7cc4435e6623d5858e2', placement: "bottom-end", "disable-auto-placement": true, ref: (el) => (this.dropdownRef = el), role: "group", target: "#calendar-dropdown" }, hAsync("mds-calendar", Object.assign({ key: this.calendarKey, singlePicker: true, hideToday: this.hideToday, onMdsCalendarChange: this.handleCalendarChange, startDate: this.value }, (this.min !== null && this.min !== '' ? { min: this.min } : {}), (this.max !== null && this.max !== '' ? { max: this.max } : {})))))));
39450
40073
  }
39451
40074
  static get formAssociated() { return true; }
39452
40075
  get host() { return getElement(this); }
39453
40076
  static get watchers() { return {
39454
40077
  "value": [{
39455
40078
  "handleValue": 0
40079
+ }],
40080
+ "max": [{
40081
+ "validationRulesChanged": 0
40082
+ }],
40083
+ "min": [{
40084
+ "validationRulesChanged": 0
40085
+ }],
40086
+ "required": [{
40087
+ "validationRulesChanged": 0
39456
40088
  }]
39457
40089
  }; }
39458
40090
  static get style() { return mdsInputDateCss(); }
@@ -39471,6 +40103,7 @@ class MdsInputDate {
39471
40103
  "disabled": [516],
39472
40104
  "readonly": [516],
39473
40105
  "required": [516],
40106
+ "formDisabled": [32],
39474
40107
  "empty": [32],
39475
40108
  "isValid": [32],
39476
40109
  "touched": [32],
@@ -39481,7 +40114,7 @@ class MdsInputDate {
39481
40114
  "setValue": [64],
39482
40115
  "getErrors": [64]
39483
40116
  },
39484
- "$listeners$": undefined,
40117
+ "$listeners$": [[0, "invalid", "invalidHandler"]],
39485
40118
  "$lazyBundleId$": "-",
39486
40119
  "$attrsToReflect$": [["value", "value"], ["name", "name"], ["variant", "variant"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["disabled", "disabled"], ["readonly", "readonly"], ["required", "required"]]
39487
40120
  }; }
@@ -39531,7 +40164,7 @@ var localeIt$q = {
39531
40164
  to: to
39532
40165
  };
39533
40166
 
39534
- const mdsInputDateRangeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar,mds-dropdown,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-date-range-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-date-range-calendar-width:22rem;--mds-input-date-range-fields-firefox-justify-content:start;--mds-input-date-range-fields-gap:0 calc(var(--spacing,.0025rem)*200);--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-ring:0 0 0 1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1);--mds-input-date-range-shadow:0 1px 3px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);--mds-input-date-range-transition-duration:var(--duration-300,.3s);--private-input-date-range-transition-duration:var(--mds-input-date-range-transition-duration);font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));corner-shape:var(--magma-corner-shape,squircle);container-type:inline-size;cursor:text;display:flex;gap:calc(var(--spacing,.0025rem)*200);overflow:visible;position:relative;--mds-input-date-range-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-date-range-variant-color-rgb:0 0 0}.date-preselection{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.inputs{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-hack,.875rem);font-weight:var(--tw-font-weight,var(--text-size-code-hack--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-hack--line-height,1.25rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--mds-input-date-range-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-radius:inherit;-webkit-box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-sizing:border-box;color:inherit;corner-shape:inherit;align-items:center;border:0;display:inline-flex;flex-wrap:wrap;gap:var(--mds-input-date-range-fields-gap,0 calc(var(--spacing,.0025rem)*200));margin:0;min-height:3rem;overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;-webkit-transition-duration:var(--private-input-date-range-transition-duration);transition-duration:var(--private-input-date-range-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,margin,opacity,padding,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));width:100%}.input-element{align-items:baseline;display:inline-flex}:host(:focus-within) .inputs{--tw-outline-style:none;outline-style:none;transition-duration:var(--default-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;transition-timing-function:var(--default-transition-timing-function);--mds-input-date-range-ring:0 0 0 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/1);--mds-input-date-range-shadow:0 4px 6px 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input-wrapper{display:flex;flex-shrink:0}:host ::slotted(mds-input-date){color:inherit}.date-label{margin-left:calc(var(--spacing,.0025rem)*50);margin-right:calc(var(--spacing,.0025rem)*50);min-width:min-content;white-space:nowrap}.date-label:first-child{margin-left:0}.calendars{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}.calendar-preselection-panel{align-content:start;background-color:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))));border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));box-sizing:border-box;display:grid;min-inline-size:max-content;padding:calc(var(--spacing,.0025rem)*400)}.calendar-single{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}:is(.calendar-single,.calendars) mds-calendar{-ms-flex:0 0 var(--mds-input-date-range-calendar-width,22rem);flex:0 0 var(--mds-input-date-range-calendar-width,22rem);inline-size:var(--mds-input-date-range-calendar-width,22rem);max-inline-size:var(--mds-input-date-range-calendar-width,22rem);min-inline-size:var(--mds-input-date-range-calendar-width,22rem)}.action-open-calendar-wrapper{align-items:center;aspect-ratio:1;bottom:0;display:flex;justify-content:center;position:absolute;right:0;top:0}.action-open-calendar{--mds-button-color:var(--mds-input-date-range-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));align-self:center}mds-dropdown{padding:0}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-date-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-date-range-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}:host([pref-contrast=more]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}@supports ((-moz-appearance:none)){.action-open-calendar{display:none}.inputs{-ms-flex-pack:var(--mds-input-date-range-fields-firefox-justify-content,start);justify-content:var(--mds-input-date-range-fields-firefox-justify-content,start);padding-right:calc(var(--spacing,.0025rem)*400)}}:host(:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([variant=ai]){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-input-tip-background:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=ai]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)))}:host([variant=info]){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=info]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=success]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=error]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}@media (forced-colors:active){:host(:focus-within) .inputs{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-date-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-date-range-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}}`;
40167
+ const mdsInputDateRangeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar,mds-dropdown,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-date-range-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-date-range-calendar-width:22rem;--mds-input-date-range-fields-firefox-justify-content:start;--mds-input-date-range-fields-gap:0 calc(var(--spacing,.0025rem)*200);--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-ring:0 0 0 1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1);--mds-input-date-range-shadow:0 1px 3px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);--mds-input-date-range-transition-duration:var(--duration-300,.3s);--private-input-date-range-transition-duration:var(--mds-input-date-range-transition-duration);font-family:var(--font-info,Karla,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif);font-size:var(--text-size-info-detail,1rem);font-weight:var(--tw-font-weight,var(--text-size-info-detail--font-weight,400));line-height:var(--tw-leading,var(--text-size-info-detail--line-height,1.5rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:var(--magma-radius-2xl,var(--radius-squircle-2xl,40px));color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));corner-shape:var(--magma-corner-shape,squircle);container-type:inline-size;cursor:text;display:flex;gap:calc(var(--spacing,.0025rem)*200);overflow:visible;position:relative;--mds-input-date-range-icon-color:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-date-range-variant-color-rgb:0 0 0}.date-preselection{display:grid;gap:calc(var(--spacing,.0025rem)*200)}.inputs{font-family:var(--font-code,"Roboto Mono","Courier New",monospace);font-size:var(--text-size-code-hack,.875rem);font-weight:var(--tw-font-weight,var(--text-size-code-hack--font-weight,400));line-height:var(--tw-leading,var(--text-size-code-hack--line-height,1.25rem));min-height:auto;text-box:trim-both text;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:var(--mds-input-date-range-background,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border-radius:inherit;-webkit-box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-shadow:var(--mds-input-date-range-ring),var(--mds-input-date-range-shadow);box-sizing:border-box;color:inherit;corner-shape:inherit;align-items:center;border:0;display:inline-flex;flex-wrap:wrap;gap:var(--mds-input-date-range-fields-gap,0 calc(var(--spacing,.0025rem)*200));margin:0;min-height:3rem;overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;-webkit-transition-duration:var(--private-input-date-range-transition-duration);transition-duration:var(--private-input-date-range-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,margin,opacity,padding,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));width:100%}.input-element{align-items:baseline;display:inline-flex}:host(:focus-within) .inputs{--tw-outline-style:none;outline-style:none;transition-duration:var(--default-transition-duration);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;transition-timing-function:var(--default-transition-timing-function);--mds-input-date-range-ring:0 0 0 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/1);--mds-input-date-range-shadow:0 4px 6px 3px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-date-range-variant-color-rgb,0 0 0)/.06);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.input-wrapper{display:flex;flex-shrink:0}:host ::slotted(mds-input-date){color:inherit}.date-label{margin-left:calc(var(--spacing,.0025rem)*50);margin-right:calc(var(--spacing,.0025rem)*50);min-width:min-content;white-space:nowrap}.date-label:first-child{margin-left:0}.calendars{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}.calendar-preselection-panel{align-content:start;background-color:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))));border-radius:var(--magma-radius-lg,var(--radius-squircle-lg,28px));box-sizing:border-box;display:grid;min-inline-size:max-content;padding:calc(var(--spacing,.0025rem)*400)}.calendar-single{display:flex;flex-wrap:nowrap;gap:calc(var(--spacing,.0025rem)*200);min-width:max-content}:is(.calendar-single,.calendars) mds-calendar{-ms-flex:0 0 var(--mds-input-date-range-calendar-width,22rem);flex:0 0 var(--mds-input-date-range-calendar-width,22rem);inline-size:var(--mds-input-date-range-calendar-width,22rem);max-inline-size:var(--mds-input-date-range-calendar-width,22rem);min-inline-size:var(--mds-input-date-range-calendar-width,22rem)}.action-open-calendar-wrapper{align-items:center;aspect-ratio:1;bottom:0;display:flex;justify-content:center;position:absolute;right:0;top:0}.action-open-calendar{--mds-button-color:var(--mds-input-date-range-icon-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));align-self:center}mds-dropdown{padding:0}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));cursor:default}:host(:disabled:not([disabled=false])) .inputs,:host([disabled]:not([disabled=false])) .inputs{background-color:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))))}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-date-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-date-range-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:host([pref-mode=dark]:not([pref-theme-scheme=light])) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}:host([pref-contrast=more]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}@supports ((-moz-appearance:none)){.action-open-calendar{display:none}.inputs{-ms-flex-pack:var(--mds-input-date-range-fields-firefox-justify-content,start);justify-content:var(--mds-input-date-range-fields-firefox-justify-content,start);padding-right:calc(var(--spacing,.0025rem)*400)}}:host(:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-fg,var(--magma-tint-accent-fg,var(--variant-primary-03,7 76 204))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))}:host([variant=ai]){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245))));--mds-input-tip-background:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=ai]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-accent-ai-fg,var(--magma-tint-accent-ai-fg,var(--variant-ai-03,87 20 242))));--mds-input-date-range-variant-color-rgb:var(--magma-accent-ai-emphasis,var(--magma-tint-accent-ai-emphasis,var(--variant-ai-04,126 73 245)))}:host([variant=info]){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-tip-background:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=info]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-info-emphasis,var(--status-info-04,0 119 164)));--mds-input-date-range-variant-color-rgb:var(--magma-info-emphasis,var(--status-info-04,0 119 164))}:host([variant=success]){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-tip-background:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=success]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)));--mds-input-date-range-variant-color-rgb:var(--magma-success-emphasis,var(--status-success-04,0 128 57))}:host([variant=warning]){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-tip-background:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-warning-emphasis,var(--status-warning-04,142 106 0)));--mds-input-date-range-variant-color-rgb:var(--magma-warning-emphasis,var(--status-warning-04,142 106 0))}:host([variant=error]){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-tip-background:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=error]:focus-within){--mds-input-date-range-icon-color:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)));--mds-input-date-range-variant-color-rgb:var(--magma-danger-emphasis,var(--status-error-04,196 64 65))}@media (forced-colors:active){:host(:focus-within) .inputs{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-date-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-date-range-ring:var(--shadow-ring-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.3))}:is(:host([pref-mode=system]:not([pref-theme-scheme=light])),:host(:not([pref-mode]))) .counter-button:hover{--mds-button-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-date-range-ring:var(--shadow-ring-strong-2,0 0 0 2px rgb(var(--tone-neutral-01,5 5 5)/.6));--mds-input-date-range-background:rgb(var(--magma-wash-base,var(--magma-tint-scale-09,var(--tone-neutral-09,225 225 225))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))))}}`;
39535
40168
 
39536
40169
  /**
39537
40170
  * @slot calendar-preselection - Add `HTML elements` or `components` to this slot.
@@ -39554,6 +40187,9 @@ class MdsInputDateRange {
39554
40187
  this.internalEndDate = '';
39555
40188
  this.visibleCalendarDate = '';
39556
40189
  this.hasPreselection = false;
40190
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
40191
+ // around it, which disables the host but not the calendar button in its shadow root
40192
+ this.formDisabled = false;
39557
40193
  this.t = new Locale$1({
39558
40194
  el: localeEl$p,
39559
40195
  en: localeEn$p,
@@ -39593,6 +40229,12 @@ class MdsInputDateRange {
39593
40229
  * Enables the linked dual-calendar range picker behavior.
39594
40230
  */
39595
40231
  this.dualCalendar = false;
40232
+ /**
40233
+ * Disables the range, like a disabled native input: the dates cannot be changed, from the fields
40234
+ * or from the calendar, and are left out of the form. It disables the two slotted fields too. A
40235
+ * disabled `<fieldset>` around the component does the same.
40236
+ */
40237
+ this.disabled = false;
39596
40238
  this.lastEmittedStartDate = null;
39597
40239
  this.lastEmittedEndDate = null;
39598
40240
  this.initialStartDate = '';
@@ -39644,6 +40286,7 @@ class MdsInputDateRange {
39644
40286
  setAttributeIfEmpty(field, 'aria-label', ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${part}` : part);
39645
40287
  });
39646
40288
  };
40289
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
39647
40290
  this.handleCalendarHover = (ev) => {
39648
40291
  if (this.internalStartDate === '' || this.internalEndDate !== '') {
39649
40292
  this.clearHoverPreview();
@@ -39769,12 +40412,23 @@ class MdsInputDateRange {
39769
40412
  this.hoveredCalendarDate = null;
39770
40413
  this.syncCalendarsHoverAttributes();
39771
40414
  }
40415
+ /** A date inside `min` and `max`, the bounds that are set. */
40416
+ isWithinRange(date) {
40417
+ var _a, _b;
40418
+ const min = DateTime.fromISO((_a = this.min) !== null && _a !== void 0 ? _a : '');
40419
+ const max = DateTime.fromISO((_b = this.max) !== null && _b !== void 0 ? _b : '');
40420
+ return !(min.isValid && date < min) && !(max.isValid && date > max);
40421
+ }
39772
40422
  getEmittableDateRangeDetail() {
39773
40423
  const startDate = DateTime.fromISO(this.internalStartDate);
39774
40424
  const endDate = DateTime.fromISO(this.internalEndDate);
39775
40425
  if (!startDate.isValid || !endDate.isValid) {
39776
40426
  return null;
39777
40427
  }
40428
+ // a date typed outside the window is flagged by its field, not emitted as a range
40429
+ if (!this.isWithinRange(startDate) || !this.isWithinRange(endDate)) {
40430
+ return null;
40431
+ }
39778
40432
  return {
39779
40433
  startDate: this.internalStartDate,
39780
40434
  endDate: this.internalEndDate,
@@ -39799,6 +40453,46 @@ class MdsInputDateRange {
39799
40453
  handleEndDateChange(newValue) {
39800
40454
  this.syncExternalDate('end', newValue);
39801
40455
  }
40456
+ handleRangeChange() {
40457
+ this.forwardRange(true);
40458
+ }
40459
+ handleDisabledChange() {
40460
+ this.forwardDisabled(true);
40461
+ }
40462
+ /**
40463
+ * Bounds both fields, as the range promises: min and max reach the slotted dates, which flag a
40464
+ * date typed outside them and report it to the form. At load a bound the range does not set
40465
+ * leaves the one written on the field alone; a bound changed later always reaches the fields.
40466
+ */
40467
+ forwardRange(changed) {
40468
+ ['start', 'end'].forEach((slotName) => {
40469
+ var _a, _b;
40470
+ const field = this.slottedField(slotName);
40471
+ if (field == null)
40472
+ return;
40473
+ if (changed || ((_a = this.min) !== null && _a !== void 0 ? _a : '') !== '')
40474
+ field.min = this.min;
40475
+ if (changed || ((_b = this.max) !== null && _b !== void 0 ? _b : '') !== '')
40476
+ field.max = this.max;
40477
+ });
40478
+ }
40479
+ /**
40480
+ * Disables both fields with the range. At load a range that is not disabled leaves a field
40481
+ * disabled on its own alone; a disabled changed later always reaches the fields. A disabled
40482
+ * fieldset needs no forwarding: the fields are inside it and follow it themselves.
40483
+ */
40484
+ forwardDisabled(changed) {
40485
+ ['start', 'end'].forEach((slotName) => {
40486
+ const field = this.slottedField(slotName);
40487
+ if (field != null && (changed || this.disabled))
40488
+ field.disabled = !!this.disabled;
40489
+ });
40490
+ }
40491
+ slottedField(slotName) {
40492
+ var _a;
40493
+ const slot = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
40494
+ return slot === null || slot === void 0 ? void 0 : slot.assignedElements()[0];
40495
+ }
39802
40496
  componentWillLoad() {
39803
40497
  var _a, _b;
39804
40498
  // a null bound by a framework counts as no date, as the watchers already do
@@ -39850,6 +40544,8 @@ class MdsInputDateRange {
39850
40544
  else {
39851
40545
  this.internalEndDate = event.start;
39852
40546
  }
40547
+ // a preset ending before it starts snaps its end to the start, as a typed range does
40548
+ this.validateDateRange();
39853
40549
  this.updateInputValue('end', this.internalEndDate);
39854
40550
  this.syncFormValue();
39855
40551
  const calendars = this.getCalendars();
@@ -39863,13 +40559,23 @@ class MdsInputDateRange {
39863
40559
  componentDidLoad() {
39864
40560
  var _a;
39865
40561
  this.nameSlottedFields();
40562
+ this.forwardRange(false);
40563
+ this.forwardDisabled(false);
39866
40564
  this.updateInputListeners();
39867
40565
  this.updateInputValue('start', this.internalStartDate);
39868
40566
  this.updateInputValue('end', this.internalEndDate);
40567
+ // a preset matching the dates of load shows selected from the start
40568
+ this.checkPreselections();
39869
40569
  this.syncFormValue();
39870
40570
  this.host.addEventListener('focusout', this.handleFocusOut);
39871
40571
  (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('mdsCalendarHover', this.handleCalendarHover);
39872
40572
  }
40573
+ formDisabledCallback(disabled) {
40574
+ this.formDisabled = disabled;
40575
+ // a calendar left open would still change the dates
40576
+ if (disabled && this.dropdownRef)
40577
+ this.dropdownRef.visible = false;
40578
+ }
39873
40579
  formResetCallback() {
39874
40580
  this.clearHoverPreview();
39875
40581
  this.internalStartDate = this.initialStartDate;
@@ -39901,9 +40607,7 @@ class MdsInputDateRange {
39901
40607
  this.syncFormValue();
39902
40608
  }
39903
40609
  updateInputValue(slotName, newValue) {
39904
- var _a;
39905
- const slot = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
39906
- const input = slot === null || slot === void 0 ? void 0 : slot.assignedElements()[0];
40610
+ const input = this.slottedField(slotName);
39907
40611
  if (input != null) {
39908
40612
  this.syncingInputSlots.add(slotName);
39909
40613
  input.setValue(newValue).finally(() => {
@@ -39987,7 +40691,7 @@ class MdsInputDateRange {
39987
40691
  return (hAsync("div", { class: "calendars" }, this.renderCalendarPreselectionPanel(), hAsync("mds-calendar", Object.assign({ key: `${this.calendarKey}-start`, hideToday: this.hideToday, hideNextButton: true, disableMonthYearSelection: true, viewDate: this.getCalendarViewDate(), onMdsCalendarNavigate: this.handleCalendarNavigate, onMdsCalendarChange: this.handleCalendarChange, onMdsCalendarPreselect: this.handleCalendarPreselect, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min !== null && this.min !== '' ? { min: this.min } : {}), (this.max !== null && this.max !== '' ? { max: this.max } : {}))), hAsync("mds-calendar", Object.assign({ key: `${this.calendarKey}-end`, hideToday: this.hideToday, hidePreviousButton: true, disableMonthYearSelection: true, viewDate: this.getCalendarViewDate(1), onMdsCalendarNavigate: this.handleCalendarNavigate, onMdsCalendarChange: this.handleCalendarChange, onMdsCalendarPreselect: this.handleCalendarPreselect, startDate: this.internalStartDate, endDate: this.internalEndDate }, (this.min !== null && this.min !== '' ? { min: this.min } : {}), (this.max !== null && this.max !== '' ? { max: this.max } : {})))));
39988
40692
  }
39989
40693
  render() {
39990
- return (hAsync(Host, { key: '718cf4ea938605b2569a5fa19e264cf176282a80', onClick: this.focusDateInput, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: 'f8dade2fe985e70d2943aee08d6f84123e53f38b', class: "inputs" }, hAsync("div", { key: 'be2dd565a6364f3ccf287514ea5726e332577389', class: "input-element" }, hAsync("mds-text", { key: 'a6c3e21e613ee60986acb06edc852f110357fc31', class: "date-label", typography: "detail", onClick: this.focusStartDateInput }, this.t.get('from')), hAsync("div", { key: '08cdedb27bcdcfd35b94e90ae261f64d8694b0ef', class: "input-wrapper" }, hAsync("slot", { key: 'da01b0a0fc65c8cf7094cf0db83be1d942b332b1', name: "start" }))), hAsync("div", { key: '63e620c85a9a23660645a0e28648912cbcd79919', class: "input-element" }, hAsync("mds-text", { key: '801f3a01f11502a5878e0ede645f238ef80fa388', class: "date-label", typography: "detail", onClick: this.focusEndDateInput }, this.t.get('to')), hAsync("div", { key: 'fa57d66e7f8318685256e1febf35b291f7b59f19', class: "input-wrapper" }, hAsync("slot", { key: '68e860a29b253276b3ebb29b502e7c432bb1ea9c', name: "end" })))), hAsync("div", { key: 'cb145bf4822dda4e6dbe07240089944740b090fe', class: "action-open-calendar-wrapper" }, hAsync("mds-button", { key: '9216baaff6c990532db1c8366b054655065a399f', class: "action-open-calendar", variant: "dark", tone: "text", icon: miBaselineCalendarToday, id: "calendar-dropdown", onClick: this.handleOpenCalendarClick })), hAsync("mds-dropdown", { key: '94f181ff090a617de824cd46ea21981806f7f40a', ref: (el) => (this.dropdownRef = el), target: "#calendar-dropdown", "disable-auto-placement": true, placement: "bottom-end", role: "group" }, this.dualCalendar ? this.renderDualCalendars() : this.renderSingleCalendar())));
40694
+ return (hAsync(Host, { key: 'a4e8ec428307b1f97e36c7bb9043161492402c55', onClick: this.focusDateInput, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: 'b268dca893e7aed56b485ab2d4aac7da87cd2281', class: "inputs" }, hAsync("div", { key: '956cd85c968e0b390643e7faba8dbdb129c8f7ca', class: "input-element" }, hAsync("mds-text", { key: 'c87e22b6dca6c6128d01cfa0344650839727b457', class: "date-label", typography: "detail", onClick: this.focusStartDateInput }, this.t.get('from')), hAsync("div", { key: 'ee0e90044817fab1ea582e8a21bcb886771f5e28', class: "input-wrapper" }, hAsync("slot", { key: '85362085edd727aca5c20e969294c8d3e79f2c8a', name: "start" }))), hAsync("div", { key: 'e3839ed897233bf7a3f10f37304abc636bb9f595', class: "input-element" }, hAsync("mds-text", { key: '674476a4fcb3c532f4b06f55518d01405e1ade51', class: "date-label", typography: "detail", onClick: this.focusEndDateInput }, this.t.get('to')), hAsync("div", { key: 'f50b01476fa382d240b620e1036c05f7726f12b5', class: "input-wrapper" }, hAsync("slot", { key: 'f114e11c0715a6257374d40a16c2f8ab74ca68a2', name: "end" })))), hAsync("div", { key: '641ea2c039b9c275b0bcf37237fab78d17f9f0b2', class: "action-open-calendar-wrapper" }, hAsync("mds-button", { key: 'd24d7b2d4b0ba45e87388208499181031785ceb3', class: "action-open-calendar", disabled: this.isDisabled(), variant: "dark", tone: "text", icon: miBaselineCalendarToday, id: "calendar-dropdown", onClick: this.handleOpenCalendarClick })), hAsync("mds-dropdown", { key: '74b9b52ea2c08752de62593cc7d92db3552502ed', ref: (el) => (this.dropdownRef = el), target: "#calendar-dropdown", "disable-auto-placement": true, placement: "bottom-end", role: "group" }, this.dualCalendar ? this.renderDualCalendars() : this.renderSingleCalendar())));
39991
40695
  }
39992
40696
  syncFormValue() {
39993
40697
  var _a, _b, _c, _d;
@@ -40007,6 +40711,15 @@ class MdsInputDateRange {
40007
40711
  }],
40008
40712
  "endDate": [{
40009
40713
  "handleEndDateChange": 0
40714
+ }],
40715
+ "min": [{
40716
+ "handleRangeChange": 0
40717
+ }],
40718
+ "max": [{
40719
+ "handleRangeChange": 0
40720
+ }],
40721
+ "disabled": [{
40722
+ "handleDisabledChange": 0
40010
40723
  }]
40011
40724
  }; }
40012
40725
  static get style() { return mdsInputDateRangeCss(); }
@@ -40023,17 +40736,19 @@ class MdsInputDateRange {
40023
40736
  "hideToday": [516, "hide-today"],
40024
40737
  "dualCalendar": [516, "dual-calendar"],
40025
40738
  "name": [513],
40739
+ "disabled": [516],
40026
40740
  "calendarKey": [32],
40027
40741
  "internalStartDate": [32],
40028
40742
  "internalEndDate": [32],
40029
40743
  "visibleCalendarDate": [32],
40030
40744
  "dropdownRef": [32],
40031
40745
  "hasPreselection": [32],
40746
+ "formDisabled": [32],
40032
40747
  "preselect": [64]
40033
40748
  },
40034
40749
  "$listeners$": undefined,
40035
40750
  "$lazyBundleId$": "-",
40036
- "$attrsToReflect$": [["startDate", "start-date"], ["endDate", "end-date"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["dualCalendar", "dual-calendar"], ["name", "name"]]
40751
+ "$attrsToReflect$": [["startDate", "start-date"], ["endDate", "end-date"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["dualCalendar", "dual-calendar"], ["name", "name"], ["disabled", "disabled"]]
40037
40752
  }; }
40038
40753
  }
40039
40754
 
@@ -40187,7 +40902,7 @@ var localeIt$p = {
40187
40902
  digit: digit
40188
40903
  };
40189
40904
 
40190
- const mdsInputOtpCss = () => `@layer reset,vendor,theme,base,components,utilities;:host{display:inline-flex;gap:calc(var(--spacing,.0025rem)*400)}.input{width:calc(var(--spacing,.0025rem)*1200)}.input::part(field){text-align:center}.input::part(tip-count){display:none}`;
40905
+ const mdsInputOtpCss = () => `@layer reset,vendor,theme,base,components,utilities;:host{display:inline-flex;gap:calc(var(--spacing,.0025rem)*400)}.input{width:calc(var(--spacing,.0025rem)*1200)}.input::part(field){text-align:center}.input::part(tip-count),.input::part(tip-top){display:none}`;
40191
40906
 
40192
40907
  class MdsInputOtp {
40193
40908
  constructor(hostRef) {
@@ -40199,6 +40914,13 @@ class MdsInputOtp {
40199
40914
  this.internals = hostRef.$hostElement$.attachInternals();
40200
40915
  hostRef.$hostElement$["s-ei"] = this.internals;
40201
40916
  }
40917
+ // the value of load, which a form reset brings back as the value attribute of a native input
40918
+ this.loadValue = '';
40919
+ // the digit of each cell, by position: value joins them and drops the empty ones
40920
+ this.digits = [];
40921
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
40922
+ // around it, which disables the host but not the cells in its shadow root
40923
+ this.formDisabled = false;
40202
40924
  this.t = new Locale$1({
40203
40925
  el: localeEl$o,
40204
40926
  en: localeEn$o,
@@ -40214,26 +40936,29 @@ class MdsInputOtp {
40214
40936
  */
40215
40937
  this.autosubmit = false;
40216
40938
  /**
40217
- * The current value of the OTP code
40939
+ * Disables every cell of the code, like a disabled native input: the code cannot be changed and
40940
+ * is left out of the form. A disabled `<fieldset>` around the component does the same.
40941
+ */
40942
+ this.disabled = false;
40943
+ /**
40944
+ * The current value of the OTP code: a value set in the markup or by code fills the cells from
40945
+ * the first one
40218
40946
  */
40219
40947
  this.value = '';
40220
- this.getOtpCode = () => {
40221
- const inputs = Array.from(this.element.shadowRoot.querySelectorAll('mds-input'));
40222
- const otpCode = inputs.map((input) => input.value).join('');
40223
- return otpCode;
40224
- };
40948
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
40225
40949
  this.setOtpDigit = (currentInput, digit) => {
40226
- currentInput.value = digit;
40227
- const otpCode = this.getOtpCode();
40228
- this.value = otpCode;
40229
- setFormValue(this.internals, otpCode);
40950
+ const index = Array.from(this.element.shadowRoot.querySelectorAll('mds-input')).indexOf(currentInput);
40951
+ const digits = [...this.digits];
40952
+ digits[index] = digit;
40953
+ this.digits = digits;
40954
+ this.updateValue();
40230
40955
  };
40231
40956
  this.submit = (currentInput) => {
40232
- var _a;
40233
- const isOtpCompleted = this.getOtpCode().length === this.length;
40957
+ var _a, _b;
40958
+ const isOtpCompleted = ((_a = this.value) !== null && _a !== void 0 ? _a : '').length === this.length;
40234
40959
  currentInput.blur();
40235
40960
  if (this.autosubmit && isOtpCompleted) {
40236
- (_a = this.internals.form) === null || _a === void 0 ? void 0 : _a.requestSubmit();
40961
+ (_b = this.internals.form) === null || _b === void 0 ? void 0 : _b.requestSubmit();
40237
40962
  }
40238
40963
  };
40239
40964
  this.handleKeyDown = (e) => {
@@ -40283,11 +41008,47 @@ class MdsInputOtp {
40283
41008
  return ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${digit}` : digit;
40284
41009
  };
40285
41010
  }
41011
+ valueChanged(newValue) {
41012
+ // the value a typed digit writes already matches the cells
41013
+ if ((newValue !== null && newValue !== void 0 ? newValue : '') === this.digits.join(''))
41014
+ return;
41015
+ this.fillCells(newValue !== null && newValue !== void 0 ? newValue : '');
41016
+ }
41017
+ formDisabledCallback(disabled) {
41018
+ this.formDisabled = disabled;
41019
+ }
41020
+ /** Like a native input, a form reset brings back the code of load. */
41021
+ formResetCallback() {
41022
+ this.fillCells(this.loadValue);
41023
+ }
41024
+ componentWillLoad() {
41025
+ var _a;
41026
+ this.loadValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
41027
+ this.fillCells(this.loadValue);
41028
+ }
41029
+ /** Puts a code in the cells, from the first one, as many digits as there are cells. */
41030
+ fillCells(code) {
41031
+ this.digits = Array.from(code).slice(0, this.length);
41032
+ this.updateValue();
41033
+ }
41034
+ /** Joins the cells into value, the code the form submits. */
41035
+ updateValue() {
41036
+ this.value = this.digits.join('');
41037
+ setFormValue(this.internals, this.value);
41038
+ }
40286
41039
  render() {
40287
- return (hAsync(Host, { key: '10ca24b0e94edc403924d73cb409ff246d52bf36' }, Array.from({ length: this.length }).map((_, index) => (hAsync("mds-input", { "aria-label": this.digitName(index), class: "input", maxlength: 1, onKeyDown: this.handleKeyDown, onPaste: this.handlePaste })))));
41040
+ return (hAsync(Host, { key: 'a04c64edf256fa28b732e52380df22b2fa452ed7' }, Array.from({ length: this.length }).map((_, index) => {
41041
+ var _a;
41042
+ return (hAsync("mds-input", { "aria-label": this.digitName(index), class: "input", disabled: this.isDisabled(), maxlength: 1, onKeyDown: this.handleKeyDown, onPaste: this.handlePaste, value: (_a = this.digits[index]) !== null && _a !== void 0 ? _a : '' }));
41043
+ })));
40288
41044
  }
40289
41045
  static get formAssociated() { return true; }
40290
41046
  get element() { return getElement(this); }
41047
+ static get watchers() { return {
41048
+ "value": [{
41049
+ "valueChanged": 0
41050
+ }]
41051
+ }; }
40291
41052
  static get style() { return mdsInputOtpCss(); }
40292
41053
  static get cmpMeta() { return {
40293
41054
  "$flags$": 73,
@@ -40296,15 +41057,18 @@ class MdsInputOtp {
40296
41057
  "accessibleName": [1, "aria-label"],
40297
41058
  "length": [2],
40298
41059
  "autosubmit": [516],
40299
- "value": [1537]
41060
+ "disabled": [516],
41061
+ "value": [1537],
41062
+ "digits": [32],
41063
+ "formDisabled": [32]
40300
41064
  },
40301
41065
  "$listeners$": undefined,
40302
41066
  "$lazyBundleId$": "-",
40303
- "$attrsToReflect$": [["autosubmit", "autosubmit"], ["value", "value"]]
41067
+ "$attrsToReflect$": [["autosubmit", "autosubmit"], ["disabled", "disabled"], ["value", "value"]]
40304
41068
  }; }
40305
41069
  }
40306
41070
 
40307
- const mdsInputRangeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-text:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-range-transition-duration:var(--duration-300,.3s);--private-input-range-transition-duration:var(--mds-input-range-transition-duration);--mds-input-range-thumb-background-disabled:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-thumb-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-range-thumb-cursor:col-resize;--mds-input-range-thumb-size:calc(var(--spacing,.0025rem)*400);--mds-input-range-track-background-disabled:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-progress-background-disabled:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-input-range-track-size:calc(var(--spacing,.0025rem)*600);--private-border-width:calc(var(--mds-input-range-track-size)/2 - var(--mds-input-range-thumb-size)/2);--private-thumb-size:calc(var(--mds-input-range-thumb-size) + var(--private-border-width)*2);display:grid;gap:calc(var(--spacing,.0025rem)*200);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:color;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.header{display:flex;gap:calc(var(--spacing,.0025rem)*200)}.label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.value{margin-left:auto}.range{align-items:center;display:flex;height:var(--private-thumb-size);position:relative}.track{box-sizing:border-box;position:absolute;width:100%}.field{animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));appearance:none;background-color:#0000;border-radius:var(--radius-full,1000px);flex-grow:1;height:calc(var(--spacing,.0025rem)*400);margin:0;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-timing-function:ease-in-out;z-index:20}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.field::-webkit-slider-thumb{appearance:none;background-color:var(--mds-input-range-thumb-background);border-color:var(--mds-input-range-track-progress-background);border-radius:var(--mds-input-range-thumb-size);border-style:solid;border-width:var(--private-border-width);cursor:var(--mds-input-range-thumb-cursor);height:var(--private-thumb-size);line-height:0;transform:translateY(-50%);transition-property:background-color,border;width:var(--private-thumb-size)}.field::-webkit-slider-runnable-track{appearance:none;border:0;height:0;width:100%}.track-progress{background-color:var(--mds-input-range-track-progress-background);width:calc((100% - var(--mds-input-range-track-size))*(var(--mds-input-range-progress,0)*0.01) + var(--mds-input-range-track-size)/2)}.track-progress,.track-total{display:flex;height:var(--mds-input-range-track-size);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:background-color}.track-total{background-color:var(--mds-input-range-track-background);overflow:hidden;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);width:100%}.contrast-area,.track-total{border-radius:var(--mds-input-range-track-size)}.contrast-area{margin-left:calc(var(--spacing,.0025rem)*100);margin-right:calc(var(--spacing,.0025rem)*100)}:host([disabled]:not([disabled=false])){--mds-input-range-thumb-background:var(--mds-input-range-thumb-background-disabled);--mds-input-range-track-background:var(--mds-input-range-track-background-disabled);--mds-input-range-track-progress-background:var(--mds-input-range-track-progress-background-disabled)}:host([disabled]:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}:host([pref-contrast=more]){color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}`;
41071
+ const mdsInputRangeCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-text:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-range-transition-duration:var(--duration-300,.3s);--private-input-range-transition-duration:var(--mds-input-range-transition-duration);--mds-input-range-thumb-background-disabled:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-thumb-background:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-range-thumb-cursor:col-resize;--mds-input-range-thumb-size:calc(var(--spacing,.0025rem)*400);--mds-input-range-track-background-disabled:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-background:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-range-track-progress-background-disabled:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis-hover,var(--magma-tint-accent-emphasis-hover,var(--variant-primary-03,7 76 204))));--mds-input-range-track-size:calc(var(--spacing,.0025rem)*600);--private-border-width:calc(var(--mds-input-range-track-size)/2 - var(--mds-input-range-thumb-size)/2);--private-thumb-size:calc(var(--mds-input-range-thumb-size) + var(--private-border-width)*2);display:grid;gap:calc(var(--spacing,.0025rem)*200);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:color;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.header{display:flex;gap:calc(var(--spacing,.0025rem)*200)}.label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.value{margin-left:auto}.range{align-items:center;display:flex;height:var(--private-thumb-size);position:relative}.track{box-sizing:border-box;position:absolute;width:100%}.field{animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));appearance:none;background-color:#0000;border-radius:var(--radius-full,1000px);flex-grow:1;height:calc(var(--spacing,.0025rem)*400);margin:0;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-timing-function:ease-in-out;z-index:20}.field:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.field::-webkit-slider-thumb{appearance:none;background-color:var(--mds-input-range-thumb-background);border-color:var(--mds-input-range-track-progress-background);border-radius:var(--mds-input-range-thumb-size);border-style:solid;border-width:var(--private-border-width);cursor:var(--mds-input-range-thumb-cursor);height:var(--private-thumb-size);line-height:0;transform:translateY(-50%);transition-property:background-color,border;width:var(--private-thumb-size)}.field::-webkit-slider-runnable-track{appearance:none;border:0;height:0;width:100%}.track-progress{background-color:var(--mds-input-range-track-progress-background);width:calc((100% - var(--mds-input-range-track-size))*(var(--mds-input-range-progress,0)*0.01) + var(--mds-input-range-track-size)/2)}.track-progress,.track-total{display:flex;height:var(--mds-input-range-track-size);-webkit-transition-duration:var(--private-input-range-transition-duration);transition-duration:var(--private-input-range-transition-duration);transition-property:background-color}.track-total{background-color:var(--mds-input-range-track-background);overflow:hidden;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);width:100%}.contrast-area,.track-total{border-radius:var(--mds-input-range-track-size)}.contrast-area{margin-left:calc(var(--spacing,.0025rem)*100);margin-right:calc(var(--spacing,.0025rem)*100)}:host(:disabled:not([disabled=false])),:host([disabled]:not([disabled=false])){--mds-input-range-thumb-background:var(--mds-input-range-thumb-background-disabled);--mds-input-range-track-background:var(--mds-input-range-track-background-disabled);--mds-input-range-track-progress-background:var(--mds-input-range-track-progress-background-disabled)}:host([disabled]:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}:host(:disabled:not([disabled=false])) .field::-webkit-slider-thumb{cursor:not-allowed}:host([pref-animation=reduce]),:host([pref-animation=reduce]) *,:host([pref-animation=reduce]) :after,:host([pref-animation=reduce]) :before{transition-duration:.01ms!important}:host([pref-animation=reduce]){--private-input-range-transition-duration:0s}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}:host([pref-contrast=more]){color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host(:not([pref-animation])) *,:host(:not([pref-animation])) :after,:host(:not([pref-animation])) :before,:host([pref-animation=system]),:host([pref-animation=system]) *,:host([pref-animation=system]) :after,:host([pref-animation=system]) :before{transition-duration:.01ms!important}:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-range-track-progress-background:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))))}}`;
40308
41072
 
40309
41073
  /**
40310
41074
  * @part header - The element containing the labels displayed over the input element
@@ -40322,6 +41086,9 @@ class MdsInputRange {
40322
41086
  this.internals = hostRef.$hostElement$.attachInternals();
40323
41087
  hostRef.$hostElement$["s-ei"] = this.internals;
40324
41088
  }
41089
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
41090
+ // around it, which disables the host but not the native control in its shadow root
41091
+ this.formDisabled = false;
40325
41092
  /**
40326
41093
  * The greatest value in the range of permitted values
40327
41094
  */
@@ -40336,25 +41103,31 @@ class MdsInputRange {
40336
41103
  */
40337
41104
  this.step = 1;
40338
41105
  this.onInput = () => {
40339
- if (Number.isNaN(this.inputElement.value))
40340
- throw Error(`Entered value ${this.inputElement.value} is not a Number`);
41106
+ // a range input always holds a number: the browser sanitizes anything else
40341
41107
  // trigger valueChanged that update progress and emit event
40342
41108
  this.value = Number(this.inputElement.value);
40343
41109
  };
41110
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
41111
+ }
41112
+ /** As on a native input, a step that is not a positive number falls back to the default, 1. */
41113
+ allowedStep() {
41114
+ const step = Number(this.step);
41115
+ return step > 0 ? step : 1;
40344
41116
  }
40345
41117
  calculateProgress() {
40346
41118
  // validate value
40347
41119
  let v = Number(this.inputElement.value);
41120
+ const step = this.allowedStep();
40348
41121
  // multiplier is needed to manage decimal value and step, so we can work with integer value and avoid decimal division
40349
- const multiplier = Math.pow(10, this.decimalPlaces);
41122
+ const multiplier = Math.pow(10, this.countDecimals(step));
40350
41123
  if (v > this.max)
40351
41124
  v = this.max;
40352
41125
  else if (v < this.min)
40353
41126
  v = this.min;
40354
- if (((v - this.min) * multiplier) % (this.step * multiplier) !== 0) {
41127
+ if (((v - this.min) * multiplier) % (step * multiplier) !== 0) {
40355
41128
  v =
40356
- (Math.round((v * multiplier - this.min * multiplier) / (this.step * multiplier)) *
40357
- (this.step * multiplier) +
41129
+ (Math.round((v * multiplier - this.min * multiplier) / (step * multiplier)) *
41130
+ (step * multiplier) +
40358
41131
  this.min * multiplier) /
40359
41132
  multiplier;
40360
41133
  }
@@ -40393,24 +41166,31 @@ class MdsInputRange {
40393
41166
  this.calculateProgress();
40394
41167
  }
40395
41168
  stepChanged() {
40396
- if (this.step <= 0)
40397
- throw Error('step cant be negative or zero');
40398
- this.decimalPlaces = this.countDecimals(this.step);
40399
41169
  this.calculateProgress();
40400
41170
  }
41171
+ formDisabledCallback(disabled) {
41172
+ this.formDisabled = disabled;
41173
+ }
41174
+ /** Like a native input, a form reset brings back the value of load, thumb included. */
40401
41175
  formResetCallback() {
40402
- setFormValue(this.internals, '');
41176
+ // an empty value makes the native input take its default, the middle of the range
41177
+ this.inputElement.value = this.loadValue === undefined ? '' : String(this.loadValue);
41178
+ this.onInput();
41179
+ }
41180
+ componentWillLoad() {
41181
+ var _a;
41182
+ const value = Number((_a = this.value) !== null && _a !== void 0 ? _a : NaN);
41183
+ this.loadValue = Number.isNaN(value) ? undefined : value;
40403
41184
  }
40404
41185
  componentDidLoad() {
40405
41186
  var _a;
40406
- this.decimalPlaces = this.countDecimals(this.step);
40407
41187
  this.onInput(); // define value
40408
41188
  this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
40409
41189
  this.calculateProgress();
40410
41190
  }
40411
41191
  render() {
40412
41192
  var _a;
40413
- return (hAsync(Host, { key: '7c0a8d739163d2bf261c37c07010dc0b3d50e229', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("header", { key: '95f14dfc8f5cd2a51a101d7836e7f3fecada1ff7', class: "header", part: "header" }, hAsync("mds-text", { key: 'b43ad53a0a963336581c646e1f071bdae3a26efc', class: "label", typography: "label" }, hAsync("slot", { key: 'c977a9d5544930cefabe76ca3d7394d629d52450' })), hAsync("mds-text", { key: '92b8d45b0a8846d0266c366129448f1d97357947', class: "value", typography: "label" }, this.formatValue ? this.formatValue(this.value) : this.value)), hAsync("div", { key: '29e4bcfc4fb52fbfdcc5684a9d0a45651ade0c97', class: "range" }, hAsync("div", { key: '38f46832e1735ff53d83aff2ee67ba359d711ed6', class: "track", part: "track" }, hAsync("div", { key: '96206811d68b037c6d484f34773a368ca46419ab', class: "contrast-area" }), hAsync("div", { key: '6f329d1cac11dfdb21c2d10f01b6ec82cb6d7805', class: "track-total" }, hAsync("div", { key: '590710af361f8d3933b22e80ccca3fe1d6a62498', class: "track-progress", style: { '--mds-input-range-progress': `${(_a = this.progress) !== null && _a !== void 0 ? _a : 0}` } }))), hAsync("input", { key: '485d49941a1cb41258d32e02ec1c3f03882744f1', ref: (el) => (this.inputElement = el), class: "field", "aria-label": this.label, disabled: this.disabled, max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value, name: this.name }))));
41193
+ return (hAsync(Host, { key: 'd223cb20d2d286382af3b1605e4d77d1a77d67c0', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("header", { key: '2e618309f22f583ea4583901965a3669073ee17e', class: "header", part: "header" }, hAsync("mds-text", { key: 'cf89fae0a98b66a470ab220811af5cf1b1922f59', class: "label", typography: "label" }, hAsync("slot", { key: '392a0503e0ad2af44ecb9ce184713b5245a64063' })), hAsync("mds-text", { key: 'ab5f2a7fe91bae04199b100e6bc6711ccd6c6e2a', class: "value", typography: "label" }, this.formatValue ? this.formatValue(this.value) : this.value)), hAsync("div", { key: '5d5681f116e152979f0d329070be816173507caf', class: "range" }, hAsync("div", { key: 'f539571bbf87692d690b792ed8c638fd3f3810f7', class: "track", part: "track" }, hAsync("div", { key: '6b0eef0ba0ef24a80bf52bd04dce7d9ed2114ad4', class: "contrast-area" }), hAsync("div", { key: '622bce4e0e3edf7de827c64a8b97bd6ea90f7e67', class: "track-total" }, hAsync("div", { key: '1a05102fb4ebd2f8fa452df45302c6983aa0234d', class: "track-progress", style: { '--mds-input-range-progress': `${(_a = this.progress) !== null && _a !== void 0 ? _a : 0}` } }))), hAsync("input", { key: '81eb2d3245ab389890b14ee0aa6aec6324450933', ref: (el) => (this.inputElement = el), class: "field", "aria-label": this.label, disabled: this.isDisabled(), max: this.max, min: this.min, onInput: this.onInput, step: this.step, type: "range", value: this.value, name: this.name }))));
40414
41194
  }
40415
41195
  static get formAssociated() { return true; }
40416
41196
  get element() { return getElement(this); }
@@ -40443,7 +41223,8 @@ class MdsInputRange {
40443
41223
  "step": [2],
40444
41224
  "disabled": [1540],
40445
41225
  "value": [1538],
40446
- "progress": [32]
41226
+ "progress": [32],
41227
+ "formDisabled": [32]
40447
41228
  },
40448
41229
  "$listeners$": undefined,
40449
41230
  "$lazyBundleId$": "-",
@@ -40469,8 +41250,14 @@ class MdsInputSelect {
40469
41250
  this.internals = hostRef.$hostElement$.attachInternals();
40470
41251
  hostRef.$hostElement$["s-ei"] = this.internals;
40471
41252
  }
41253
+ // true while value takes the selection of the native select, which must not be applied back:
41254
+ // with multiple, selecting the first option alone would drop the others
41255
+ this.adoptingSelection = false;
40472
41256
  // @State() selected: boolean
40473
41257
  this.hasFocus = false;
41258
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
41259
+ // around it, which disables the host but not the native control in its shadow root
41260
+ this.formDisabled = false;
40474
41261
  /**
40475
41262
  * If true, the element is displayed as disabled
40476
41263
  */
@@ -40491,11 +41278,10 @@ class MdsInputSelect {
40491
41278
  * Specifies the value of the component
40492
41279
  */
40493
41280
  this.value = '';
40494
- this.onInput = (ev) => {
40495
- const input = ev.target;
40496
- if (input) {
40497
- this.value = input.value;
40498
- }
41281
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
41282
+ this.onInput = () => {
41283
+ this.adoptSelection();
41284
+ this.syncSelection();
40499
41285
  };
40500
41286
  this.onBlur = () => {
40501
41287
  this.hasFocus = false;
@@ -40505,6 +41291,7 @@ class MdsInputSelect {
40505
41291
  };
40506
41292
  // a removed attribute or a null bound by a framework counts as no placeholder, like ''
40507
41293
  this.hasPlaceholder = () => { var _a; return ((_a = this.placeholder) !== null && _a !== void 0 ? _a : '') !== ''; };
41294
+ this.placeholderOption = () => { var _a, _b; return (_b = (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.querySelector('.placeholder-option')) !== null && _b !== void 0 ? _b : null; };
40508
41295
  this.emptyOptions = () => {
40509
41296
  var _a;
40510
41297
  const select = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('select');
@@ -40538,20 +41325,8 @@ class MdsInputSelect {
40538
41325
  var _a;
40539
41326
  (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.appendChild(element.cloneNode(true));
40540
41327
  });
40541
- this.setCurrentValue();
40542
- };
40543
- this.setCurrentValue = () => {
40544
- var _a;
40545
- if (this.selectEl == null)
40546
- return;
40547
- if (this.value != null && this.value !== '' && this.value !== 0 && !Number.isNaN(this.value)) {
40548
- this.selectEl.querySelectorAll('option').forEach((element) => {
40549
- element.selected = element.value === this.value;
40550
- });
40551
- }
40552
- else if (!this.hasPlaceholder()) {
40553
- this.value = (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.querySelectorAll('option')[0].value;
40554
- }
41328
+ this.applySelection(true);
41329
+ this.syncSelection();
40555
41330
  };
40556
41331
  }
40557
41332
  /**
@@ -40565,10 +41340,67 @@ class MdsInputSelect {
40565
41340
  * Emits the change event when the component value changes
40566
41341
  */
40567
41342
  valueChanged() {
41343
+ if (this.adoptingSelection)
41344
+ return;
41345
+ this.applySelection(false);
41346
+ this.syncSelection();
41347
+ }
41348
+ requiredChanged() {
41349
+ this.updateFormValidity();
41350
+ }
41351
+ nameChanged() {
41352
+ this.updateFormValue(this.selectedValues());
41353
+ }
41354
+ /** The values of the selected options, the placeholder left out. */
41355
+ selectedValues() {
41356
+ var _a;
41357
+ if (this.selectEl == null) {
41358
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '' ? [] : [this.value.toString()];
41359
+ }
41360
+ return Array.from(this.selectEl.selectedOptions)
41361
+ .filter((option) => !option.classList.contains('placeholder-option'))
41362
+ .map((option) => option.value);
41363
+ }
41364
+ /**
41365
+ * Reports the selection to the form and emits the change, once per selection: a single select
41366
+ * submits its value, a multiple one an entry per selected option under `name`, as a native
41367
+ * select.
41368
+ */
41369
+ syncSelection() {
41370
+ var _a;
41371
+ const values = this.selectedValues();
41372
+ this.updateFormValue(values);
41373
+ this.updateFormValidity();
41374
+ const value = (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString();
41375
+ const selection = JSON.stringify([value, values]);
41376
+ if (selection === this.emittedSelection)
41377
+ return;
41378
+ this.emittedSelection = selection;
41379
+ this.changeEvent.emit({ value, values });
41380
+ }
41381
+ updateFormValue(values) {
40568
41382
  var _a, _b, _c;
40569
- this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
40570
- this.setCurrentValue();
40571
- setFormValue(this.internals, (_c = (_b = this.value) === null || _b === void 0 ? void 0 : _b.toString()) !== null && _c !== void 0 ? _c : null);
41383
+ if (!this.multiple) {
41384
+ setFormValue(this.internals, (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : null);
41385
+ return;
41386
+ }
41387
+ const name = (_c = this.name) !== null && _c !== void 0 ? _c : '';
41388
+ if (name === '' || values.length === 0) {
41389
+ setFormValue(this.internals, null);
41390
+ return;
41391
+ }
41392
+ const data = new FormData();
41393
+ values.forEach((value) => data.append(name, value));
41394
+ setFormValue(this.internals, data);
41395
+ }
41396
+ /**
41397
+ * Reports to the form a required select left empty: like a native `required`, it stops the
41398
+ * submit of its form.
41399
+ */
41400
+ updateFormValidity() {
41401
+ var _a;
41402
+ const missing = this.required && ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '';
41403
+ updateValidity(this.internals, missing ? { rule: 'requiredSelect' } : undefined, this.selectEl);
40572
41404
  }
40573
41405
  disabledChanged(newValue) {
40574
41406
  /**
@@ -40588,11 +41420,15 @@ class MdsInputSelect {
40588
41420
  * @param oldValue placeholder old value
40589
41421
  */
40590
41422
  placeholderChanged(newValue, oldValue) {
41423
+ if (this.selectEl == null)
41424
+ return;
40591
41425
  if (newValue != null && newValue !== '' && (oldValue !== null && oldValue !== void 0 ? oldValue : '') === '') {
40592
- let defaultOption = document.querySelector('.placeholder-option');
41426
+ // the placeholder of this select, in its shadow root, not one of the page
41427
+ let defaultOption = this.placeholderOption();
40593
41428
  if (defaultOption)
40594
41429
  defaultOption.remove();
40595
41430
  defaultOption = document.createElement('option');
41431
+ defaultOption.className = 'placeholder-option';
40596
41432
  this.selectEl.insertBefore(defaultOption, this.selectEl.firstChild);
40597
41433
  defaultOption.value = '';
40598
41434
  defaultOption.text = newValue;
@@ -40607,8 +41443,29 @@ class MdsInputSelect {
40607
41443
  defaultOption.disabled = true;
40608
41444
  }
40609
41445
  }
41446
+ formDisabledCallback(disabled) {
41447
+ this.formDisabled = disabled;
41448
+ }
41449
+ /**
41450
+ * Like a native select, a form reset brings the options back to the selection of the markup,
41451
+ * the placeholder when the markup selects none, and the value of load on top.
41452
+ */
40610
41453
  formResetCallback() {
40611
- setFormValue(this.internals, '');
41454
+ if (this.selectEl == null)
41455
+ return;
41456
+ const options = Array.from(this.selectEl.querySelectorAll('option'));
41457
+ options.forEach((option) => {
41458
+ option.selected = option.defaultSelected;
41459
+ });
41460
+ const placeholder = this.placeholderOption();
41461
+ if (placeholder && this.hasPlaceholder() && !options.some((option) => option.defaultSelected)) {
41462
+ placeholder.selected = true;
41463
+ }
41464
+ this.adoptingSelection = true;
41465
+ this.value = this.loadValue;
41466
+ this.adoptingSelection = false;
41467
+ this.applySelection(true);
41468
+ this.syncSelection();
40612
41469
  }
40613
41470
  componentWillLoad() {
40614
41471
  // needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
@@ -40618,19 +41475,64 @@ class MdsInputSelect {
40618
41475
  !Number.isNaN(this.defaultValue)) {
40619
41476
  this.value = this.defaultValue;
40620
41477
  }
41478
+ this.loadValue = this.value;
41479
+ }
41480
+ componentDidRender() {
41481
+ // the select the message points at exists from the first render on
41482
+ this.updateFormValidity();
40621
41483
  }
40622
41484
  componentDidLoad() {
40623
- if (this.value != null && this.value !== '' && this.value !== 0 && !Number.isNaN(this.value)) {
41485
+ if (!this.multiple &&
41486
+ this.value != null &&
41487
+ this.value !== '' &&
41488
+ this.value !== 0 &&
41489
+ !Number.isNaN(this.value)) {
40624
41490
  setFormValue(this.internals, this.value.toString());
40625
41491
  }
40626
41492
  }
41493
+ /** Sets value to the selection of the native select, without applying it back. */
41494
+ adoptSelection() {
41495
+ if (this.selectEl == null)
41496
+ return;
41497
+ this.adoptingSelection = true;
41498
+ this.value = this.selectEl.value;
41499
+ this.adoptingSelection = false;
41500
+ }
41501
+ /**
41502
+ * Applies value to the options. A value selects its option alone, as `select.value` does, with
41503
+ * `multiple` too. Without a value, the select keeps the options the markup selects, or its own
41504
+ * default, when `fromMarkup`; a value cleared by code clears the selection instead, down to the
41505
+ * placeholder or, without one, the first option a single select falls back to.
41506
+ */
41507
+ applySelection(fromMarkup) {
41508
+ if (this.selectEl == null)
41509
+ return;
41510
+ if (this.value != null && this.value !== '' && this.value !== 0 && !Number.isNaN(this.value)) {
41511
+ this.selectEl.querySelectorAll('option').forEach((element) => {
41512
+ element.selected = element.value === this.value;
41513
+ });
41514
+ return;
41515
+ }
41516
+ if (fromMarkup) {
41517
+ this.adoptSelection();
41518
+ return;
41519
+ }
41520
+ this.selectEl.querySelectorAll('option').forEach((element) => {
41521
+ element.selected = false;
41522
+ });
41523
+ const placeholder = this.placeholderOption();
41524
+ if (placeholder && this.hasPlaceholder())
41525
+ placeholder.selected = true;
41526
+ this.adoptSelection();
41527
+ }
40627
41528
  render() {
40628
- return (hAsync(Host, { key: 'd592094ab2ad5a0af7603c62516dcc85961b1986', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("select", { key: '3d8afceda13a8f8cda25008aa159131512607185', "aria-label": this.accessibleName, class: "input", onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.disabled, multiple: this.multiple, size: this.size, part: "select", ref: (el) => (this.selectEl = el) }, hAsync("option", { key: 'd51ff2bc9e48b52042a5a1b11f4cd9249ad3f841', class: "placeholder-option", value: "", disabled: !this.required ? undefined : true, selected: this.defaultValue != null &&
41529
+ var _a;
41530
+ return (hAsync(Host, { key: 'cbdd53b56d64ee8ace9cf091d86ec6a529415f7b', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("select", { key: 'df3ffc167f4452b6b098720eff7b01abf6088d84', "aria-label": this.accessibleName, class: "input", onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, name: this.name, required: this.required, disabled: this.isDisabled(), multiple: this.multiple, size: this.size, part: "select", ref: (el) => (this.selectEl = el) }, hAsync("option", { key: '3372af1fe267f93fe42751dc264c8fa1be41a681', class: "placeholder-option", value: "", disabled: !this.required ? undefined : true, selected: this.defaultValue != null &&
40629
41531
  this.defaultValue !== '' &&
40630
41532
  this.defaultValue !== 0 &&
40631
41533
  !Number.isNaN(this.defaultValue)
40632
41534
  ? undefined
40633
- : true }, this.placeholder)), hAsync("div", { key: 'e7433aed2a6eb737f729267ae910ac7ad0d66f91', class: "icon-container" }, hAsync("mds-icon", { key: '1000ecef2c0d3967ab36ca6b26492f0d16828e0b', class: "icon", name: miBaselineKeyboardArrowDown })), hAsync("div", { key: 'f50de5c45a4a81a1671c11eb7f5208cf90ad420c', class: "option-container" }, hAsync("slot", { key: '4e81caee891537bb05722c66bd08fdea2656d2f5', onSlotchange: this.onSlotChangeHandler })), hAsync("mds-input-tip", { key: '8b2529c44303088088d451632239594d1029d328', position: "top", active: this.hasFocus, part: "tip-top" }, this.disabled && hAsync("mds-input-tip-item", { key: 'ba2ab348eb11aada0385bb88908ff0f218146a69', expanded: true, variant: "disabled" }), this.required && (hAsync("mds-input-tip-item", { key: 'a4c571f697981eb930b6aed49cd5788dc9a98cfd', expanded: this.hasFocus, variant: this.value === '' ? 'required' : 'required-success' })))));
41535
+ : true }, this.placeholder)), hAsync("div", { key: '2054fdad7eb96317127f0a5f5d3545c51be98a6e', class: "icon-container" }, hAsync("mds-icon", { key: '8f7c8a2377912ec8c62b04f95fcb15b97c46deed', class: "icon", name: miBaselineKeyboardArrowDown })), hAsync("div", { key: 'f9b5a34c5f60d2a8d2c8ee8be5e8b8a0f3bd3800', class: "option-container" }, hAsync("slot", { key: '5c03186b7deca1d7bd2aba50b03f7bf7e6038f29', onSlotchange: this.onSlotChangeHandler })), hAsync("mds-input-tip", { key: 'b7013f98b08bfa532df0cc602cc0683c762af2b7', position: "top", active: this.hasFocus, part: "tip-top" }, this.isDisabled() && (hAsync("mds-input-tip-item", { key: '2519d758e2ca30c6886b39c0fffbe50a7d33f016', expanded: true, variant: "disabled" })), this.required && (hAsync("mds-input-tip-item", { key: 'a6db53481ffe5d62cd31a3eae0be3ad3c4b77828', expanded: this.hasFocus, variant: ((_a = this.value) !== null && _a !== void 0 ? _a : '') === '' ? 'required' : 'required-success' })))));
40634
41536
  }
40635
41537
  static get formAssociated() { return true; }
40636
41538
  get host() { return getElement(this); }
@@ -40638,6 +41540,12 @@ class MdsInputSelect {
40638
41540
  "value": [{
40639
41541
  "valueChanged": 0
40640
41542
  }],
41543
+ "required": [{
41544
+ "requiredChanged": 0
41545
+ }],
41546
+ "name": [{
41547
+ "nameChanged": 0
41548
+ }],
40641
41549
  "disabled": [{
40642
41550
  "disabledChanged": 0
40643
41551
  }],
@@ -40663,6 +41571,7 @@ class MdsInputSelect {
40663
41571
  "defaultValue": [520, "default-value"],
40664
41572
  "variant": [513],
40665
41573
  "hasFocus": [32],
41574
+ "formDisabled": [32],
40666
41575
  "setValue": [64]
40667
41576
  },
40668
41577
  "$listeners$": undefined,
@@ -40732,7 +41641,7 @@ var localeIt$o = {
40732
41641
  unselect: unselect
40733
41642
  };
40734
41643
 
40735
- const mdsInputSwitchCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-switch-animation-timing-adjust:1.4;--mds-input-switch-animation-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-padding-lg:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-md:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-sm:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-duration:.3s;--mds-input-switch-icon-color-checked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2));--mds-input-switch-toggle-size-lg:calc(var(--spacing,.0025rem)*800);--mds-input-switch-toggle-size-md:calc(var(--spacing,.0025rem)*600);--mds-input-switch-toggle-size-sm:calc(var(--spacing,.0025rem)*400);--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));align-items:flex-start;display:inline-flex;gap:calc(var(--spacing,.0025rem)*200)}.field{height:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:0}.label-icon{align-items:baseline;animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));border-radius:var(--radius);cursor:pointer;display:flex;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));position:relative;transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-property:outline-offset,opacity;transition-timing-function:ease-in-out}.field:focus-visible+.label-icon,.label-icon:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.label-text{cursor:pointer;display:flex}.label-text--empty{display:none}:host([type=switch]) .label-text{align-items:center;align-self:center}.icon-explicit{fill:var(--mds-input-switch-icon-explicit-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.icon-typography-checked,.icon-typography-unchecked{align-items:center;display:inline-flex}.icon-typography-checked{left:0;position:absolute;top:0}.switch-container{align-self:stretch;animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));border-radius:var(--radius-full,1000px);box-sizing:border-box;display:flex;flex-shrink:0;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-property:width,outline-offset,opacity;transition-timing-function:ease-in-out;width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.field:focus-visible+.switch-container,.switch-container:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.switch{background-color:var(--mds-input-switch-box-color-enabled-unchecked,rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)))));box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:min-content;padding:var(--mds-input-switch-box-padding,calc(var(--spacing,.0025rem)*100));-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.switch,.switch-toggle{border-radius:var(--radius-full,1000px)}.switch-toggle{align-items:center;-webkit-animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-fill-mode:forwards;animation-iteration-count:1;animation-name:none;animation-play-state:paused;-webkit-animation-timing-function:var(--mds-input-switch-animation-timing-function);animation-timing-function:var(--mds-input-switch-animation-timing-function);background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));-webkit-box-shadow:var(--shadow);box-shadow:var(--shadow);display:flex;height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));justify-content:center;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-linear);transition-timing-function:var(--ease-linear);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.field:checked+.switch-container .switch{background-color:var(--mds-input-switch-box-color-enabled-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}.field:checked+.switch-container .switch-toggle{animation-name:check;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:not(:checked)+.dirty .switch-toggle{animation-name:uncheck;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-unchecked,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))))}.field:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-unchecked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:checked:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-checked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-unchecked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:checked:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}@keyframes check{0%{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}@keyframes uncheck{0%{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}:host([disabled]){pointer-events:none}.icon-checked,.icon-unchecked{--tw-font-weight:var(--font-weight-normal,400);font-weight:var(--font-weight-normal,400);-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:fill,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))));opacity:1;transform:scale(1)}.icon-checked,.icon-unchecked{-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s)}.icon-checked{fill:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));transform:scale(0)}.field:disabled+.label-icon,.field:disabled+.label-icon+.label-text{cursor:default}.field:checked+.label-icon .icon-unchecked{opacity:0;transform:scale(1.5);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*2);transition-duration:calc(var(--mds-input-switch-duration,.3s)*2)}.field:checked+.label-icon .icon-checked{transform:scale(1);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5)}.field:disabled+.label-icon .icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transform:scale(1)}:host([explicit]:not([disabled]):not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))))}:host([explicit][checked]:not([disabled])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}:host([explicit][checked][disabled]){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([explicit][disabled]:not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}:host([size=sm]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem)*400));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem) * 400)) * 2) + calc(var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=md]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=lg]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem)*800));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem) * 800)) * 2) + calc(var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem) * 100)) * 2))}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}}`;
41644
+ const mdsInputSwitchCss = () => `@layer reset,vendor,theme,base,components,utilities;@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-font-weight:initial}}}:host(:not(:is([hydrated],.hydrated))),:is(mds-icon,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-switch-animation-timing-adjust:1.4;--mds-input-switch-animation-timing-function:var(--ease-in-out-quad,cubic-bezier(.455,.03,.515,.955));--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-padding-lg:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-md:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding-sm:calc(var(--spacing,.0025rem)*100);--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-duration:.3s;--mds-input-switch-icon-color-checked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-unchecked:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2));--mds-input-switch-toggle-size-lg:calc(var(--spacing,.0025rem)*800);--mds-input-switch-toggle-size-md:calc(var(--spacing,.0025rem)*600);--mds-input-switch-toggle-size-sm:calc(var(--spacing,.0025rem)*400);--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));align-items:flex-start;display:inline-flex;gap:calc(var(--spacing,.0025rem)*200)}.field{height:0;margin:0;opacity:0;pointer-events:none;position:absolute;width:0}.label-icon{align-items:baseline;animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));border-radius:var(--radius);cursor:pointer;display:flex;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));position:relative;transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-property:outline-offset,opacity;transition-timing-function:ease-in-out}.field:focus-visible+.label-icon,.label-icon:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.label-text{cursor:pointer;display:flex}.label-text--empty{display:none}:host([type=switch]) .label-text{align-items:center;align-self:center}.icon-explicit{fill:var(--mds-input-switch-icon-explicit-color,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.icon-typography-checked,.icon-typography-unchecked{align-items:center;display:inline-flex}.icon-typography-checked{left:0;position:absolute;top:0}.switch-container{align-self:stretch;animation-duration:var(--magma-outline-animation-duration,1s);animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:focus-bounce;animation-play-state:paused;animation-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));border-radius:var(--radius-full,1000px);box-sizing:border-box;display:flex;flex-shrink:0;outline:var(--magma-outline-blur,2px solid var(--magma-outline-blur-color,#0000));transition-duration:.2s;transition-property:background-color,border-color,box-shadow,color,fill,outline,outline-offset,transform;transition-property:width,outline-offset,opacity;transition-timing-function:ease-in-out;width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.field:focus-visible+.switch-container,.switch-container:focus-visible{--magma-outline-blur:var(--magma-outline-focus);animation-play-state:running}.switch{background-color:var(--mds-input-switch-box-color-enabled-unchecked,rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140)))));box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:min-content;padding:var(--mds-input-switch-box-padding,calc(var(--spacing,.0025rem)*100));-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);width:var(--mds-input-switch-toggle-container-size,calc(var(--spacing,.0025rem)*600*2 + var(--spacing,.0025rem)*100*2))}.switch,.switch-toggle{border-radius:var(--radius-full,1000px)}.switch-toggle{align-items:center;-webkit-animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);animation-fill-mode:forwards;animation-iteration-count:1;animation-name:none;animation-play-state:paused;-webkit-animation-timing-function:var(--mds-input-switch-animation-timing-function);animation-timing-function:var(--mds-input-switch-animation-timing-function);background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))));-webkit-box-shadow:var(--shadow);box-shadow:var(--shadow);display:flex;height:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600));justify-content:center;-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,border-color,box-shadow,color,fill,height,margin,opacity,padding,transform,width;-webkit-transition-timing-function:var(--ease-linear);transition-timing-function:var(--ease-linear);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}.field:checked+.switch-container .switch{background-color:var(--mds-input-switch-box-color-enabled-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}.field:checked+.switch-container .switch-toggle{animation-name:check;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:not(:checked)+.dirty .switch-toggle{animation-name:uncheck;-webkit-animation-play-state:initial;animation-play-state:initial;background-color:var(--mds-input-switch-toggle-color-enabled-unchecked,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))))}.field:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-unchecked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:checked:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-checked,rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208)))))}.field:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-unchecked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}.field:checked:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-checked,rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255)))))}@keyframes check{0%{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}@keyframes uncheck{0%{transform:translate(100%);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem) * 600)) * var(--mds-input-switch-animation-timing-adjust,1.4))}to{transform:translate(0);width:var(--mds-input-switch-toggle-size,calc(var(--spacing,.0025rem)*600))}}:host(:disabled),:host([disabled]){pointer-events:none}.icon-checked,.icon-unchecked{--tw-font-weight:var(--font-weight-normal,400);font-weight:var(--font-weight-normal,400);-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:fill,transform;-webkit-transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1));transition-timing-function:var(--ease-out-expo,cubic-bezier(.19,1,.22,1))}.icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))));opacity:1;transform:scale(1)}.icon-checked,.icon-unchecked{-webkit-transition-duration:var(--mds-input-switch-duration,.3s);transition-duration:var(--mds-input-switch-duration,.3s)}.icon-checked{fill:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))));transform:scale(0)}.field:disabled+.label-icon,.field:disabled+.label-icon+.label-text{cursor:default}.field:checked+.label-icon .icon-unchecked{opacity:0;transform:scale(1.5);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*2);transition-duration:calc(var(--mds-input-switch-duration,.3s)*2)}.field:checked+.label-icon .icon-checked{transform:scale(1);-webkit-transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5);transition-duration:calc(var(--mds-input-switch-duration,.3s)*1.5)}.field:disabled+.label-icon .icon-unchecked{fill:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:disabled:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}.field:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))));transform:scale(1)}:host([explicit]:not([disabled]):not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked,rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99)))))}:host([explicit][checked]:not([disabled])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231)))))}:host([explicit][checked][disabled]){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([explicit][disabled]:not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119)))))}:host([pref-mode=dark]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}:host([size=sm]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem)*400));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-sm,calc(var(--spacing,.0025rem) * 400)) * 2) + calc(var(--mds-input-switch-box-padding-sm,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=md]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem) * 600)) * 2) + calc(var(--mds-input-switch-box-padding-md,calc(var(--spacing,.0025rem) * 100)) * 2))}:host([size=lg]){--mds-input-switch-box-padding:var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem)*100));--mds-input-switch-toggle-size:var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem)*800));--mds-input-switch-toggle-container-size:calc(calc(var(--mds-input-switch-toggle-size-lg,calc(var(--spacing,.0025rem) * 800)) * 2) + calc(var(--mds-input-switch-box-padding-lg,calc(var(--spacing,.0025rem) * 100)) * 2))}@property --tw-font-weight{syntax:"*";inherits:false}@media (prefers-color-scheme:dark){:host(:not([pref-mode])),:host([pref-mode=system]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--magma-accent-emphasis,var(--magma-tint-accent-emphasis,var(--variant-primary-04,36 103 231))));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-switch-box-color-disabled-checked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--magma-wash-strong,var(--magma-tint-scale-08,var(--tone-neutral-08,208 208 208))));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--magma-text-on-emphasis,var(--magma-tint-text-on-emphasis,var(--tone-neutral-seed,255 255 255))));--mds-input-switch-icon-color-checked:rgb(var(--magma-accent-border,var(--magma-tint-accent-border,var(--variant-primary-06,148 172 218))));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));--mds-input-switch-icon-color-indeterminate:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}}`;
40736
41645
 
40737
41646
  /**
40738
41647
  * @slot - Put text string or elements here
@@ -40748,7 +41657,13 @@ class MdsInputSwitch {
40748
41657
  this.internals = hostRef.$hostElement$.attachInternals();
40749
41658
  hostRef.$hostElement$["s-ei"] = this.internals;
40750
41659
  }
41660
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
41661
+ // around it, which disables the host but not the native control in its shadow root
41662
+ this.formDisabled = false;
40751
41663
  this.km = new KeyboardManager();
41664
+ // the checked state of load, which a form reset brings back as the checked attribute of a
41665
+ // native input
41666
+ this.loadChecked = false;
40752
41667
  this.dirty = false;
40753
41668
  this.hasText = false;
40754
41669
  this.t = new Locale$1({
@@ -40781,27 +41696,35 @@ class MdsInputSwitch {
40781
41696
  * Specifies the value of the input element
40782
41697
  */
40783
41698
  this.value = '';
41699
+ /**
41700
+ * Unchecks the other radios of the group, as a native radio does: the same name in the same
41701
+ * form and the same tree. A radio without a name is a group of its own.
41702
+ */
40784
41703
  this.uncheckSiblings = () => {
40785
- const elements = document.querySelectorAll(`mds-input-switch[name="${this.name}"]`);
40786
- elements.forEach((element) => {
40787
- if (element !== this.host) {
41704
+ var _a;
41705
+ if (((_a = this.name) !== null && _a !== void 0 ? _a : '') === '')
41706
+ return;
41707
+ const root = this.host.getRootNode();
41708
+ const form = this.host.closest('form');
41709
+ root
41710
+ .querySelectorAll('mds-input-switch[type="radio"]')
41711
+ .forEach((element) => {
41712
+ if (element !== this.host &&
41713
+ element.name === this.name &&
41714
+ element.closest('form') === form) {
40788
41715
  element.checked = false;
40789
41716
  }
40790
41717
  });
40791
41718
  };
40792
41719
  this.handleInputOnChange = (e) => {
40793
- var _a, _b;
41720
+ var _a;
40794
41721
  const { value } = e.target;
40795
41722
  e.preventDefault();
40796
41723
  e.stopPropagation();
40797
41724
  const input = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('field');
40798
41725
  this.checked = input.checked;
40799
41726
  this.indeterminate = false;
40800
- if (this.type === 'radio') {
40801
- this.uncheckSiblings();
40802
- }
40803
41727
  this.changeEvent.emit({ name: this.name, checked: this.checked, value });
40804
- setFormValue(this.internals, this.checked ? ((_b = this.value) !== null && _b !== void 0 ? _b : null) : null);
40805
41728
  };
40806
41729
  this.handleDirty = () => {
40807
41730
  this.dirty = true;
@@ -40812,6 +41735,12 @@ class MdsInputSwitch {
40812
41735
  this.km.addElement((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.field'));
40813
41736
  this.km.attachClickBehavior();
40814
41737
  };
41738
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
41739
+ }
41740
+ /** Submits the value while checked and enabled, nothing otherwise, as a native input. */
41741
+ updateFormValue() {
41742
+ var _a;
41743
+ setFormValue(this.internals, this.checked && !this.disabled ? ((_a = this.value) !== null && _a !== void 0 ? _a : null) : null);
40815
41744
  }
40816
41745
  disabledChanged(newValue) {
40817
41746
  /**
@@ -40819,31 +41748,50 @@ class MdsInputSwitch {
40819
41748
  * if solved, please check mds-button, mds-input, mds-input-*
40820
41749
  * https://github.com/ionic-team/stencil/issues/5461
40821
41750
  */
40822
- if (newValue) {
40823
- setFormValue(this.internals, null);
40824
- return;
40825
- }
40826
41751
  if (newValue === false) {
41752
+ // the watcher runs again with undefined
40827
41753
  this.disabled = undefined;
41754
+ return;
40828
41755
  }
41756
+ this.updateFormValue();
40829
41757
  }
41758
+ /**
41759
+ * The form value follows every change of checked, by the user or by code; a radio checked
41760
+ * unchecks the others of its group, which clear their own form value.
41761
+ */
40830
41762
  checkedChanged(newValue) {
40831
41763
  if (newValue === false) {
41764
+ // the watcher runs again with undefined
40832
41765
  this.checked = undefined;
41766
+ return;
40833
41767
  }
41768
+ if (newValue && this.type === 'radio')
41769
+ this.uncheckSiblings();
41770
+ this.updateFormValue();
41771
+ }
41772
+ valueChanged() {
41773
+ this.updateFormValue();
40834
41774
  }
40835
41775
  explicitChanged(newValue) {
40836
41776
  if (newValue === false) {
40837
41777
  this.explicit = undefined;
40838
41778
  }
40839
41779
  }
41780
+ formDisabledCallback(disabled) {
41781
+ this.formDisabled = disabled;
41782
+ }
41783
+ /** Like a native checkbox or radio, a form reset brings back the checked state of load. */
40840
41784
  formResetCallback() {
40841
- setFormValue(this.internals, '');
41785
+ this.checked = this.loadChecked ? true : undefined;
41786
+ this.updateFormValue();
41787
+ }
41788
+ componentWillLoad() {
41789
+ this.loadChecked = this.checked === true;
40842
41790
  }
40843
41791
  componentDidLoad() {
40844
- var _a, _b;
41792
+ var _a;
40845
41793
  this.label = (_a = this.host.textContent) !== null && _a !== void 0 ? _a : '';
40846
- setFormValue(this.internals, this.checked ? ((_b = this.value) !== null && _b !== void 0 ? _b : null) : null);
41794
+ this.updateFormValue();
40847
41795
  this.checkFocusElement();
40848
41796
  this.hasText = hasSlotted(this.host);
40849
41797
  }
@@ -40851,7 +41799,7 @@ class MdsInputSwitch {
40851
41799
  var _a;
40852
41800
  const { iconChecked, iconUnchecked, iconIndeterminate } = inputSwitchIconVariant[this.type];
40853
41801
  const iconCheckedUser = this.icon !== '' ? this.icon : iconChecked;
40854
- return (hAsync(Host, { key: 'dbfda640a6671c0b6875efb5803e1f2b0509d71a', onClick: this.handleDirty, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("input", { key: '58153dafb41014ea668d40c6e3bad6f161ea1b9c', "aria-label": this.t.get(this.checked ? 'unselect' : 'select', { label: this.label }), autoFocus: this.autofocus, checked: this.checked, class: "field", disabled: this.disabled, id: "field", indeterminate: this.indeterminate, name: this.name, onChange: this.handleInputOnChange, role: this.type === 'switch' ? 'switch' : undefined, type: this.type === 'switch' ? 'checkbox' : this.type, value: (_a = this.value) !== null && _a !== void 0 ? _a : undefined }), this.type === 'switch' ? (hAsync("label", { htmlFor: "field", class: clsx('switch-container', this.dirty !== false && 'dirty') }, hAsync("div", { class: "switch" }, hAsync("div", { class: "switch-toggle" }, this.explicit && (hAsync("mds-icon", { class: "icon-explicit", name: this.checked ? miBaselineChecked : miBaselineRemove })))))) : (hAsync("label", { htmlFor: "field", class: "label-icon" }, hAsync("mds-text", { class: "icon-typography-unchecked", tag: "div", typography: this.typography, variant: this.variant }, hAsync("mds-icon", { class: "icon-unchecked", name: clsx(this.indeterminate ? iconIndeterminate : iconUnchecked) })), this.checked && (hAsync("mds-text", { class: "icon-typography-checked", tag: "div", typography: this.typography, variant: this.variant }, hAsync("mds-icon", { class: "icon-checked", name: clsx(this.indeterminate ? iconIndeterminate : iconCheckedUser) }))))), hAsync("label", { key: 'a68be76ef4a93499c6746db389c55adc52c19576', htmlFor: "field", class: clsx('label-text', !this.hasText && 'label-text--empty') }, hAsync("mds-text", { key: 'adf8bde3e0b83f5ffbf75a4d3df22633fb4a83dc', tag: "p", typography: this.typography, variant: this.variant }, hAsync("slot", { key: '43e3aa44b1e05ac346d07fcaf5a553fe5818bc5b' })))));
41802
+ return (hAsync(Host, { key: 'dc4f6b92e7a7f8e64147487aa29dda42abe36a42', onClick: this.handleDirty, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("input", { key: '66ecfc3ede5d9e910ceba7a1d688004e4d1fa02c', "aria-label": this.t.get(this.checked ? 'unselect' : 'select', { label: this.label }), autoFocus: this.autofocus, checked: this.checked, class: "field", disabled: this.isDisabled(), id: "field", indeterminate: this.indeterminate, name: this.name, onChange: this.handleInputOnChange, role: this.type === 'switch' ? 'switch' : undefined, type: this.type === 'switch' ? 'checkbox' : this.type, value: (_a = this.value) !== null && _a !== void 0 ? _a : undefined }), this.type === 'switch' ? (hAsync("label", { htmlFor: "field", class: clsx('switch-container', this.dirty !== false && 'dirty') }, hAsync("div", { class: "switch" }, hAsync("div", { class: "switch-toggle" }, this.explicit && (hAsync("mds-icon", { class: "icon-explicit", name: this.checked ? miBaselineChecked : miBaselineRemove })))))) : (hAsync("label", { htmlFor: "field", class: "label-icon" }, hAsync("mds-text", { class: "icon-typography-unchecked", tag: "div", typography: this.typography, variant: this.variant }, hAsync("mds-icon", { class: "icon-unchecked", name: clsx(this.indeterminate ? iconIndeterminate : iconUnchecked) })), this.checked && (hAsync("mds-text", { class: "icon-typography-checked", tag: "div", typography: this.typography, variant: this.variant }, hAsync("mds-icon", { class: "icon-checked", name: clsx(this.indeterminate ? iconIndeterminate : iconCheckedUser) }))))), hAsync("label", { key: '6c683b5b694dbe8925ab481d1f8fa0e1b7678630', htmlFor: "field", class: clsx('label-text', !this.hasText && 'label-text--empty') }, hAsync("mds-text", { key: '211c7fb20a182438447eb46976ad9aa599e2e1bc', tag: "p", typography: this.typography, variant: this.variant }, hAsync("slot", { key: '0d755335e5e4a63ac2bb662f7cb1a13a63cb22e3' })))));
40855
41803
  }
40856
41804
  static get formAssociated() { return true; }
40857
41805
  get host() { return getElement(this); }
@@ -40862,6 +41810,9 @@ class MdsInputSwitch {
40862
41810
  "checked": [{
40863
41811
  "checkedChanged": 0
40864
41812
  }],
41813
+ "value": [{
41814
+ "valueChanged": 0
41815
+ }],
40865
41816
  "explicit": [{
40866
41817
  "explicitChanged": 0
40867
41818
  }]
@@ -40883,6 +41834,7 @@ class MdsInputSwitch {
40883
41834
  "typography": [513],
40884
41835
  "variant": [513],
40885
41836
  "value": [1537],
41837
+ "formDisabled": [32],
40886
41838
  "dirty": [32],
40887
41839
  "hasText": [32]
40888
41840
  },
@@ -41313,8 +42265,9 @@ var localeIt$m = {
41313
42265
  sortByStatus: sortByStatus
41314
42266
  };
41315
42267
 
41316
- const mdsInputUploadCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-file-preview,mds-progress,mds-tab,mds-tab-item,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-upload-drag-area-background-color-on-drag:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-upload-drag-area-background-color:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-upload-drag-area-border-on-drag:3px dashed rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-upload-drag-area-border:3px dashed rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-upload-min-cols:3;container-type:inline-size;display:grid;gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(1,minmax(1px,100%))}.drag-area{align-items:center;background-color:var(--mds-input-upload-drag-area-background-color,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border:var(--mds-input-upload-drag-area-border);border-radius:var(--radius-2xl,24px);display:flex;flex-direction:column;gap:calc(var(--spacing,.0025rem)*400);justify-content:center;padding:calc(var(--spacing,.0025rem)*600);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);-webkit-user-select:none;user-select:none}.drag-area--on-drag-enter{--mds-input-upload-drag-area-background-color:var(--mds-input-upload-drag-area-background-color-on-drag,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))));--mds-input-upload-drag-area-border:var(--mds-input-upload-drag-area-border-on-drag)}.icon{display:flex;fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));width:calc(var(--spacing,.0025rem)*600)}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.action{border-radius:var(--radius-full,1000px);fill:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));height:auto;padding:calc(var(--spacing,.0025rem)*150)}.action--cancel-upload:focus-visible,.action--cancel-upload:hover{--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));fill:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)))}.action--retry-upload:focus-visible,.action--retry-upload:hover{--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));fill:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)))}.main-action{display:grid;grid-template-columns:repeat(1,minmax(1px,100%));pointer-events:none;text-align:center}.main-action,.main-actions{gap:calc(var(--spacing,.0025rem)*200)}.main-actions{display:flex;flex-flow:wrap;justify-content:center}.main-action-icon{align-items:center;display:inline-flex;justify-content:center}.file-list,.main-infos{display:grid;gap:calc(var(--spacing,.0025rem)*100);grid-template-columns:repeat(1,minmax(1px,100%))}.file-list{--cols:var(--mds-input-upload-min-cols,3);--perc-w:calc(100%/var(--cols));--gap:calc(var(--spacing,.0025rem)*400);--gap-w:calc(var(--gap) - var(--gap)/var(--cols));--max-w:calc(var(--perc-w) - var(--gap-w));--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),var(--max-w)));gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));grid-template-columns:var(--template-cols)}.file-list--more-items{--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),1fr))}.main-infos{min-width:0;text-align:center;width:100%}.progress-bar{justify-self:center;max-width:calc(var(--spacing,.0025rem)*8000);min-width:0;width:100%}.additional-infos{align-items:flex-start;gap:calc(var(--spacing,.0025rem)*400)}.additional-infos,.file-specs{display:flex;flex-wrap:wrap;justify-content:space-between}.file-specs{flex-grow:1;gap:calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*400)}.action-sort{display:inline-flex}.file-specs.file-specs-sort{flex-flow:column;justify-content:center}@container (max-width:340px){.file-list{--template-cols:1fr}.main-actions{flex-direction:column}}`;
42268
+ const mdsInputUploadCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-file-preview,mds-progress,mds-tab,mds-tab-item,mds-text):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-input-upload-drag-area-background-color-on-drag:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));--mds-input-upload-drag-area-background-color:rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255))));--mds-input-upload-drag-area-border-on-drag:3px dashed rgb(var(--magma-border-strong,var(--magma-tint-border-strong,var(--border-neutral-strong,140 140 140))));--mds-input-upload-drag-area-border:3px dashed rgb(var(--magma-border-default,var(--magma-tint-border-default,var(--border-neutral-default,196 196 196))));--mds-input-upload-min-cols:3;container-type:inline-size;display:grid;gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(1,minmax(1px,100%))}.drag-area{align-items:center;background-color:var(--mds-input-upload-drag-area-background-color,rgb(var(--magma-surface-overlay,var(--magma-tint-overlay,var(--surface-neutral-overlay,255 255 255)))));border:var(--mds-input-upload-drag-area-border);border-radius:var(--radius-2xl,24px);display:flex;flex-direction:column;gap:calc(var(--spacing,.0025rem)*400);justify-content:center;padding:calc(var(--spacing,.0025rem)*600);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;-webkit-transition-timing-function:var(--ease-in-out);transition-timing-function:var(--ease-in-out);-webkit-user-select:none;user-select:none}.drag-area--on-drag-enter{--mds-input-upload-drag-area-background-color:var(--mds-input-upload-drag-area-background-color-on-drag,rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237)))));--mds-input-upload-drag-area-border:var(--mds-input-upload-drag-area-border-on-drag)}.icon{display:flex;fill:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));width:calc(var(--spacing,.0025rem)*600)}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.action{border-radius:var(--radius-full,1000px);fill:rgb(var(--magma-text-subtle,var(--magma-tint-text-subtle,var(--text-neutral-subtle,99 99 99))));height:auto;padding:calc(var(--spacing,.0025rem)*150)}.action--cancel-upload:focus-visible,.action--cancel-upload:hover{--mds-button-background:rgb(var(--magma-danger-wash-base,var(--status-error-09,255 214 211)));fill:rgb(var(--magma-danger-emphasis,var(--status-error-04,196 64 65)))}.action--retry-upload:focus-visible,.action--retry-upload:hover{--mds-button-background:rgb(var(--magma-success-wash-base,var(--status-success-09,191 233 205)));fill:rgb(var(--magma-success-emphasis,var(--status-success-04,0 128 57)))}.main-action{display:grid;grid-template-columns:repeat(1,minmax(1px,100%));pointer-events:none;text-align:center}.main-action,.main-actions{gap:calc(var(--spacing,.0025rem)*200)}.main-actions{display:flex;flex-flow:wrap;justify-content:center}.main-action-icon{align-items:center;display:inline-flex;justify-content:center}.file-list,.main-infos{display:grid;gap:calc(var(--spacing,.0025rem)*100);grid-template-columns:repeat(1,minmax(1px,100%))}.file-list{--cols:var(--mds-input-upload-min-cols,3);--perc-w:calc(100%/var(--cols));--gap:calc(var(--spacing,.0025rem)*400);--gap-w:calc(var(--gap) - var(--gap)/var(--cols));--max-w:calc(var(--perc-w) - var(--gap-w));--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),var(--max-w)));gap:calc(var(--spacing,.0025rem)*400);grid-template-columns:repeat(auto-fit,minmax(10rem,1fr));grid-template-columns:var(--template-cols)}.file-list--more-items{--template-cols:repeat(auto-fit,minmax(calc(var(--spacing,.0025rem)*4000),1fr))}.main-infos{min-width:0;text-align:center;width:100%}.progress-bar{justify-self:center;max-width:calc(var(--spacing,.0025rem)*8000);min-width:0;width:100%}.additional-infos{align-items:flex-start;gap:calc(var(--spacing,.0025rem)*400)}.additional-infos,.file-specs{display:flex;flex-wrap:wrap;justify-content:space-between}.file-specs{flex-grow:1;gap:calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*400)}.action-sort{display:inline-flex}.file-specs.file-specs-sort{flex-flow:column;justify-content:center}@container (max-width:340px){.file-list{--template-cols:1fr}.main-actions{flex-direction:column}}:host(:disabled:not([disabled=false])) .drag-area,:host([disabled]:not([disabled=false])) .drag-area{background-color:rgb(var(--magma-wash-soft,var(--magma-tint-scale-10,var(--tone-neutral-10,237 237 237))));color:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))));cursor:not-allowed}:host(:disabled:not([disabled=false])) .icon,:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--magma-text-disabled,var(--magma-tint-text-disabled,var(--text-neutral-disabled,119 119 119))))}`;
41317
42269
 
42270
+ const isSort = (value) => value === 'date' || value === 'status';
41318
42271
  class MdsInputUpload {
41319
42272
  constructor(hostRef) {
41320
42273
  registerInstance(this, hostRef);
@@ -41329,6 +42282,8 @@ class MdsInputUpload {
41329
42282
  this.fileUploaded = 0;
41330
42283
  this.cssMinCols = 1000;
41331
42284
  this.idFile = 0;
42285
+ // one object URL per previewed file, created once and revoked when the file leaves the list
42286
+ this.previewUrls = new Map();
41332
42287
  this.t = new Locale$1({
41333
42288
  el: localeEl$l,
41334
42289
  en: localeEn$l,
@@ -41339,10 +42294,21 @@ class MdsInputUpload {
41339
42294
  this.files = [];
41340
42295
  this.progress = 0;
41341
42296
  this.animateText = false;
42297
+ // the order applied to the files: sort at load, then the user's choice from the sort tabs
42298
+ this.activeSort = 'date';
42299
+ // the disabled state of the host as a form control: its own disabled, or a disabled fieldset
42300
+ // around it, which disables the host but not the controls in its shadow root
42301
+ this.formDisabled = false;
41342
42302
  /**
41343
42303
  * Defines the file types the file input should accept
41344
42304
  */
41345
42305
  this.accept = '';
42306
+ /**
42307
+ * Disables the component, like a disabled native file input: no file can be added, dropped or
42308
+ * removed, and the files are left out of the form. A disabled `<fieldset>` around the component
42309
+ * does the same.
42310
+ */
42311
+ this.disabled = false;
41346
42312
  /**
41347
42313
  * Specifies the max size of a single file that can be uploaded in MB
41348
42314
  */
@@ -41351,6 +42317,7 @@ class MdsInputUpload {
41351
42317
  * Specifies the max number of files that can be uploaded
41352
42318
  */
41353
42319
  this.maxFiles = 1;
42320
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
41354
42321
  this.updateCSSCustomProps = () => {
41355
42322
  if (typeof window === 'undefined')
41356
42323
  return;
@@ -41358,37 +42325,44 @@ class MdsInputUpload {
41358
42325
  this.cssMinCols = Number(elementStyles.getPropertyValue('--mds-input-upload-min-cols'));
41359
42326
  };
41360
42327
  this.onDropHandler = (event) => {
41361
- if (this.nativeInput && event.dataTransfer) {
41362
- this.update(this.nativeInput, this.prepareFiles(event.dataTransfer.files));
41363
- }
41364
42328
  event.preventDefault();
42329
+ this.dragging = false;
42330
+ if (event.dataTransfer && !this.isDisabled()) {
42331
+ this.onAdd(event.dataTransfer.files);
42332
+ }
41365
42333
  };
41366
42334
  this.onDragOverHandler = (event) => {
42335
+ // still handled when disabled: a file dropped on the page would otherwise be opened by the
42336
+ // browser, so the drop is refused instead
41367
42337
  event.preventDefault();
42338
+ if (this.isDisabled() && event.dataTransfer)
42339
+ event.dataTransfer.dropEffect = 'none';
41368
42340
  };
41369
42341
  this.onDragEnterHandler = (event) => {
41370
- var _a;
42342
+ if (this.isDisabled()) {
42343
+ event.preventDefault();
42344
+ return;
42345
+ }
41371
42346
  this.dragging = true;
41372
42347
  this.animateText = true;
41373
- (_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.add('drag-area--on-drag-enter');
41374
42348
  event.preventDefault();
41375
42349
  };
41376
42350
  this.onDragLeaveHandler = (event) => {
41377
- var _a;
41378
42351
  this.dragging = false;
41379
- (_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.remove('drag-area--on-drag-enter');
41380
42352
  event.preventDefault();
41381
42353
  };
41382
- this.onAdd = (event) => {
41383
- if (!event)
42354
+ this.onAdd = (fileList) => {
42355
+ if (!fileList)
41384
42356
  return;
41385
- if (event instanceof FileList || Array.isArray(event)) {
41386
- this.update(this.nativeInput, this.prepareFiles(event));
41387
- }
41388
- else {
41389
- const input = event.target;
41390
- this.update(input, this.prepareFiles(input.files));
41391
- }
42357
+ this.prepareFiles(fileList);
42358
+ this.update();
42359
+ };
42360
+ this.onInputChange = (event) => {
42361
+ const input = event.target;
42362
+ this.onAdd(input.files);
42363
+ // the input only picks the files, the list lives in this.files: clearing it lets the user
42364
+ // pick a removed file again
42365
+ input.value = '';
41392
42366
  };
41393
42367
  /**
41394
42368
  * Delete single file from upload
@@ -41396,32 +42370,23 @@ class MdsInputUpload {
41396
42370
  */
41397
42371
  this.onCancel = (filekey) => {
41398
42372
  this.files = this.files.filter((f) => f.key !== filekey);
41399
- if (this.nativeInput) {
41400
- const data = new DataTransfer();
41401
- this.files.forEach((f) => {
41402
- if (f.status === Status.SUCCESS) {
41403
- data.items.add(f.file);
41404
- }
41405
- });
41406
- this.update(this.nativeInput, data.files);
41407
- }
42373
+ this.update();
41408
42374
  };
41409
42375
  /**
41410
42376
  * Delete all files from upload
41411
42377
  */
41412
42378
  this.onReset = () => {
41413
- if (this.nativeInput) {
41414
- this.files = [];
41415
- this.nativeInput.value = '';
41416
- this.update(this.nativeInput, null);
41417
- }
42379
+ this.files = [];
42380
+ this.update(true);
41418
42381
  };
41419
42382
  this.onChangeTab = (event) => {
41420
- if (event.value !== undefined && event.value !== '') {
41421
- this.sortFiles(this.files, event.value);
41422
- this.userSort = event.value;
41423
- localStorage.setItem(LOCALSTORAGE_KEY_USER_SORT, this.userSort);
41424
- }
42383
+ // the tab reports the selection the component makes itself too (a new sort): only a
42384
+ // different order is the user's choice
42385
+ if (!isSort(event.value) || event.value === this.activeSort)
42386
+ return;
42387
+ this.activeSort = event.value;
42388
+ this.sortFiles(this.files, this.activeSort);
42389
+ localStorage.setItem(LOCALSTORAGE_KEY_USER_SORT, this.activeSort);
41425
42390
  };
41426
42391
  this.handleAddFileClick = () => {
41427
42392
  var _a;
@@ -41434,29 +42399,51 @@ class MdsInputUpload {
41434
42399
  this.onCancel(filekey);
41435
42400
  };
41436
42401
  }
42402
+ formDisabledCallback(disabled) {
42403
+ this.formDisabled = disabled;
42404
+ }
41437
42405
  formResetCallback() {
41438
42406
  this.onReset();
41439
42407
  }
42408
+ connectedCallback() {
42409
+ // disconnectedCallback revoked the preview URLs: a moved component renders new ones
42410
+ if (this.files.length > 0)
42411
+ forceUpdate$1(this);
42412
+ }
41440
42413
  componentWillLoad() {
41441
- var _a;
41442
42414
  this.extensions = this.getExtension();
41443
- this.userSort = (_a = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT)) !== null && _a !== void 0 ? _a : 'date';
42415
+ const userSort = localStorage.getItem(LOCALSTORAGE_KEY_USER_SORT);
42416
+ this.activeSort = isSort(this.sort) ? this.sort : isSort(userSort) ? userSort : 'date';
41444
42417
  this.updateInitialValue(this.initialValue);
41445
42418
  }
41446
42419
  componentDidLoad() {
41447
42420
  this.updateCSSCustomProps();
41448
42421
  }
42422
+ componentDidRender() {
42423
+ this.revokePreviewUrls(new Set(this.files.map((f) => f.file)));
42424
+ }
42425
+ disconnectedCallback() {
42426
+ this.revokePreviewUrls(new Set());
42427
+ }
41449
42428
  updateInitialValue(newValue) {
41450
42429
  if (newValue) {
41451
42430
  this.onAdd(newValue);
41452
42431
  }
41453
42432
  }
42433
+ handleNameChange() {
42434
+ this.updateFormValue();
42435
+ }
42436
+ handleSortChange(newValue) {
42437
+ if (isSort(newValue)) {
42438
+ this.activeSort = newValue;
42439
+ this.sortFiles(this.files, newValue);
42440
+ }
42441
+ }
41454
42442
  /**
41455
- * Returns a promise of files uploaded as Filelist or null if there's none
42443
+ * Returns a promise of the accepted files as a FileList, empty if there's none
41456
42444
  */
41457
42445
  getFiles() {
41458
- var _a, _b;
41459
- return Promise.resolve((_b = (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : null);
42446
+ return Promise.resolve(this.acceptedFiles());
41460
42447
  }
41461
42448
  /**
41462
42449
  * Returns a promise of files error or null if there's none
@@ -41484,14 +42471,9 @@ class MdsInputUpload {
41484
42471
  * Limit number of file to maxFiles
41485
42472
  * Check size and type for every single file.
41486
42473
  * @param fileList list recieved from input selection or drag and drop
41487
- * @returns list of files accepted
41488
42474
  */
41489
42475
  prepareFiles(fileList) {
41490
- var _a;
41491
- if (!fileList)
41492
- return null;
41493
42476
  const files = fileList instanceof FileList ? Array.from(fileList) : fileList;
41494
- const data = new DataTransfer();
41495
42477
  // prepare new file added
41496
42478
  for (const file of files) {
41497
42479
  // update only file not added previously or files with errors
@@ -41519,11 +42501,7 @@ class MdsInputUpload {
41519
42501
  }
41520
42502
  }
41521
42503
  }
41522
- // set input.files only uploadable file
41523
- this.files.filter((f) => f.status === Status.SUCCESS).forEach((f) => data.items.add(f.file));
41524
- this.sortFiles(this.files, (_a = this.sort) !== null && _a !== void 0 ? _a : this.userSort);
41525
- // this.updateProgress()
41526
- return data.files;
42504
+ this.sortFiles(this.files, this.activeSort);
41527
42505
  }
41528
42506
  // Stores the locale key, not the translated message: consumers translate at
41529
42507
  // read time so the texts follow the current language
@@ -41544,10 +42522,31 @@ class MdsInputUpload {
41544
42522
  }
41545
42523
  return { errorKey, type };
41546
42524
  }
41547
- update(input, files) {
41548
- if (!input)
42525
+ // the files the form submits and getFiles() returns: the ones that passed the checks, in the
42526
+ // order they were added whatever order the list shows
42527
+ acceptedFiles() {
42528
+ const data = new DataTransfer();
42529
+ this.files
42530
+ .filter((f) => f.status === Status.SUCCESS)
42531
+ .sort((a, b) => a.id - b.id)
42532
+ .forEach((f) => data.items.add(f.file));
42533
+ return data.files;
42534
+ }
42535
+ // one entry per file under the name, as a native file input submits them; a file input
42536
+ // without a name submits nothing
42537
+ updateFormValue() {
42538
+ var _a;
42539
+ const files = this.acceptedFiles();
42540
+ const name = (_a = this.name) !== null && _a !== void 0 ? _a : '';
42541
+ if (name === '' || files.length === 0) {
42542
+ setFormValue(this.internals, null);
41549
42543
  return;
41550
- input.files = files;
42544
+ }
42545
+ const data = new FormData();
42546
+ Array.from(files).forEach((file) => data.append(name, file));
42547
+ setFormValue(this.internals, data);
42548
+ }
42549
+ update(reset = false) {
41551
42550
  const validity = {};
41552
42551
  const errorMessage = new Set();
41553
42552
  this.files
@@ -41566,10 +42565,10 @@ class MdsInputUpload {
41566
42565
  }
41567
42566
  errorMessage.add(this.t.get(error.errorKey));
41568
42567
  });
41569
- setFormValue(this.internals, input.value);
42568
+ this.updateFormValue();
41570
42569
  setValidity(this.internals, validity, Array.from(errorMessage).join(', '));
41571
42570
  this.updateProgress();
41572
- this.changedEvent.emit(files);
42571
+ this.changedEvent.emit(reset ? null : this.acceptedFiles());
41573
42572
  }
41574
42573
  /**
41575
42574
  * Update progress bar
@@ -41637,6 +42636,22 @@ class MdsInputUpload {
41637
42636
  sortById(a, b) {
41638
42637
  return b.id - a.id;
41639
42638
  }
42639
+ previewUrl(file) {
42640
+ let url = this.previewUrls.get(file);
42641
+ if (url === undefined) {
42642
+ url = URL.createObjectURL(file);
42643
+ this.previewUrls.set(file, url);
42644
+ }
42645
+ return url;
42646
+ }
42647
+ revokePreviewUrls(keep) {
42648
+ this.previewUrls.forEach((url, file) => {
42649
+ if (!keep.has(file)) {
42650
+ URL.revokeObjectURL(url);
42651
+ this.previewUrls.delete(file);
42652
+ }
42653
+ });
42654
+ }
41640
42655
  isSortTabShown() {
41641
42656
  var _a;
41642
42657
  // the type has no empty sort, but the attribute can be empty or removed
@@ -41645,23 +42660,23 @@ class MdsInputUpload {
41645
42660
  }
41646
42661
  render() {
41647
42662
  var _a;
41648
- return (hAsync(Host, { key: '1282e72ee06803608c3814261fe7afb90bba04dd' }, hAsync("div", { key: '5ea63f793cbbac434e17d9970ad1cf46b09babea', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: (dragArea) => (this.elDragArea = dragArea) }, hAsync("div", { key: 'c578728c760a7c42b58cbe1947c5e210d2c4b513', class: "main-action" }, hAsync("div", { key: '53290a67d9a6c2af46b7fcf980822f25ab9415d2', class: "main-action-icon" }, hAsync("mds-icon", { key: '98bb7709ed2e548c5b1d3ef850cf594fd582f31e', class: "icon", name: miOutlineFileUpload })), hAsync("mds-text", { key: '0b5e87c56e64b00a4a60a678f7b5dc41e4f1a343', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.dragging
42663
+ return (hAsync(Host, { key: '2644c38a7b6037c5376dfd31adc4c753f20f52bc' }, hAsync("div", { key: 'b0ba5a112e01d0177f3ff6da57d51546d0abf355', class: clsx('drag-area', this.dragging && 'drag-area--on-drag-enter'), onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler }, hAsync("div", { key: 'de532adb36df80996061b07e429b3b1312c3ea11', class: "main-action" }, hAsync("div", { key: 'a10d7a5bf0eab47460e07a1021d0dd8eccbfba71', class: "main-action-icon" }, hAsync("mds-icon", { key: '7d68284af1d4f74712676a61d5230478b6649b13', class: "icon", name: miOutlineFileUpload })), hAsync("mds-text", { key: 'f37d1e61e598de34792368f123bcc1755d661f8b', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.dragging
41649
42664
  ? this.t.get('dragEnter')
41650
- : this.t.get('clickOrDrag', { maxFiles: this.maxFiles }) })), hAsync("div", { key: '407e5f6ba315adc4914bac66591ab158858e58a9', class: "main-actions" }, hAsync("mds-button", { key: '21e2bdd0e2c056fbac4324d1e10e8818d738ae4e', variant: "primary", onClick: this.handleAddFileClick, label: this.files != null
42665
+ : this.t.get('clickOrDrag', { maxFiles: this.maxFiles }) })), hAsync("div", { key: '074afd34533489652602381303b1c967a7c71aed', class: "main-actions" }, hAsync("mds-button", { key: '28c3b07e927222db52675ae27044b83148563c5d', variant: "primary", disabled: this.isDisabled(), onClick: this.handleAddFileClick, label: this.files != null
41651
42666
  ? this.t.get('addFile', { maxFiles: this.maxFiles })
41652
- : this.t.get('selectFile') }), this.files.length > 0 && (hAsync("mds-button", { key: 'c2aa797ea1ffa79e13edaca370ee9a80def808f9', variant: "error", onClick: this.onReset, label: this.t.get('cancel') }))), hAsync("div", { key: 'b74bff2a047a5cb207301017acd6a7277c663f51', class: "main-infos" }, hAsync("mds-progress", { key: '9e46cde334899b47039062c4accaf589cfb7db6e', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1 ? (hAsync("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))) : (hAsync("mds-text", { variant: "info", typography: "caption" }, ((_a = this.maxFiles) !== null && _a !== void 0 ? _a : 0) !== 0 && !Number.isNaN(this.maxFiles)
42667
+ : this.t.get('selectFile') }), this.files.length > 0 && (hAsync("mds-button", { key: 'a0f6ac365c6b1a1e7dd2a62204331f1ad4357d03', variant: "error", disabled: this.isDisabled(), onClick: this.onReset, label: this.t.get('cancel') }))), hAsync("div", { key: '9c82bbc279746a05148d1107f4568c08beae6141', class: "main-infos" }, hAsync("mds-progress", { key: '25c2636d434a46cb54a304f2e2192f70940e14fe', "aria-hidden": "true", class: "progress-bar", progress: this.progress }), this.files.length < 1 ? (hAsync("mds-text", { variant: "info", typography: "caption" }, this.t.get('maxFilesUpload', { maxFiles: this.maxFiles }))) : (hAsync("mds-text", { variant: "info", typography: "caption" }, ((_a = this.maxFiles) !== null && _a !== void 0 ? _a : 0) !== 0 && !Number.isNaN(this.maxFiles)
41653
42668
  ? this.t.get('currentFilesWithMax', {
41654
42669
  currentFiles: this.files.length,
41655
42670
  maxFiles: this.maxFiles,
41656
42671
  })
41657
- : this.t.get('currentFilesNoMax', { currentFiles: this.files.length }))))), hAsync("input", { key: 'c867482029ed15726d1badeee21945ce78fcb9aa', type: "file", accept: this.accept, hidden: true, ref: (i) => (this.nativeInput = i), onChange: this.onAdd, multiple: this.maxFiles > 1 }), hAsync("div", { key: '38bd7d7f7ce6024baf6a037445152b7acc3d3f3b', class: "additional-infos" }, hAsync("div", { key: '6dd3982680177166a93c408ca4f32540efcd17fa', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, hAsync("mds-text", { key: '892c2695e43c3b57e31b62cc6f9cb8bf8369c862', variant: "info", typography: "caption" }, this.extensions !== ''
42672
+ : this.t.get('currentFilesNoMax', { currentFiles: this.files.length }))))), hAsync("input", { key: 'ecde7b22afc1ef5a6ab26d0d90a450cab30df028', type: "file", accept: this.accept, disabled: this.isDisabled(), hidden: true, ref: (i) => (this.nativeInput = i), onChange: this.onInputChange, multiple: this.maxFiles > 1 }), hAsync("div", { key: '0b7cfe2d35557ce63475e0100dfd12379bd7e9a5', class: "additional-infos" }, hAsync("div", { key: 'ed538f5298e23166895fc6810028143353a4fab0', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, hAsync("mds-text", { key: '3de05cd3fecfd9fc2ee3394d61b0ca32c59d21e8', variant: "info", typography: "caption" }, this.extensions !== ''
41658
42673
  ? `${this.t.get('canUpload')} ${this.extensions}`
41659
- : this.t.get('canUploadAll')), hAsync("mds-text", { key: 'b20bee8f4d335453dc457d8abddf07aae13950f5', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() && (hAsync("mds-tab", { key: '4e998b760c02e9bee956d9037e1e9ce2af0e3e0d', class: "action-sort", onMdsTabChange: this.handleTabChange }, hAsync("mds-tab-item", { key: '348200582b1d9b6fe9584d17f9939ee1d77274c7', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: "date" }), hAsync("mds-tab-item", { key: 'e2cedd3bd3c1bf62e7fe682bfc6c19d3f0b57f2a', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: "status" })))), hAsync("div", { key: 'b549c38e2fac65c513a3a82b97190831b5ef968f', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map((file) => {
42674
+ : this.t.get('canUploadAll')), hAsync("mds-text", { key: 'ce8e3aec8d6cd776186e32ec70d08ae76eeff13a', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() && (hAsync("mds-tab", { key: 'f849f3703d7c2a4aee551ef3d513e062d074c65a', class: "action-sort", onMdsTabChange: this.handleTabChange }, hAsync("mds-tab-item", { key: '892e958efc1e37f32dd69929fdb10482fcb01879', disabled: this.isDisabled(), icon: iconSortById, selected: this.activeSort === 'date', title: this.t.get('sortByDate'), value: "date" }), hAsync("mds-tab-item", { key: '9f332bcf7146bb45e5ee4b0c02a70f3410c9cfd9', disabled: this.isDisabled(), icon: iconSortByStatus, selected: this.activeSort === 'status', title: this.t.get('sortByStatus'), value: "status" })))), hAsync("div", { key: 'ea61a5d4a2f7d98e891b3b42c883c710606cc353', class: clsx('file-list', this.files.length > this.cssMinCols && 'file-list--more-items') }, this.files.map((file) => {
41660
42675
  switch (file.status) {
41661
42676
  case Status.ERROR:
41662
- return (hAsync("mds-file-preview", { deletable: true, variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: this.handleFileDelete(file.key), message: this.t.get(file.errorKey) }));
42677
+ return (hAsync("mds-file-preview", { deletable: !this.isDisabled(), variant: "error", filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: this.handleFileDelete(file.key), message: this.t.get(file.errorKey) }));
41663
42678
  case Status.SUCCESS:
41664
- return (hAsync("mds-file-preview", { deletable: true, filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: this.handleFileDelete(file.key), src: URL.createObjectURL(file.file) }));
42679
+ return (hAsync("mds-file-preview", { deletable: !this.isDisabled(), filename: file.file.name, filesize: file.file.size.toString(), onMdsFileDelete: this.handleFileDelete(file.key), src: this.previewUrl(file.file) }));
41665
42680
  }
41666
42681
  }))));
41667
42682
  }
@@ -41671,6 +42686,12 @@ class MdsInputUpload {
41671
42686
  "initialValue": [{
41672
42687
  "updateInitialValue": 0
41673
42688
  }],
42689
+ "name": [{
42690
+ "handleNameChange": 0
42691
+ }],
42692
+ "sort": [{
42693
+ "handleSortChange": 0
42694
+ }],
41674
42695
  "maxFiles": [{
41675
42696
  "handleMaxFilesChange": 0
41676
42697
  }]
@@ -41681,6 +42702,8 @@ class MdsInputUpload {
41681
42702
  "$tagName$": "mds-input-upload",
41682
42703
  "$members$": {
41683
42704
  "accept": [513],
42705
+ "disabled": [516],
42706
+ "name": [513],
41684
42707
  "maxFileSize": [514, "max-file-size"],
41685
42708
  "maxFiles": [514, "max-files"],
41686
42709
  "sort": [513],
@@ -41689,13 +42712,15 @@ class MdsInputUpload {
41689
42712
  "files": [32],
41690
42713
  "progress": [32],
41691
42714
  "animateText": [32],
42715
+ "activeSort": [32],
42716
+ "formDisabled": [32],
41692
42717
  "getFiles": [64],
41693
42718
  "getFilesError": [64],
41694
42719
  "reset": [64]
41695
42720
  },
41696
42721
  "$listeners$": undefined,
41697
42722
  "$lazyBundleId$": "-",
41698
- "$attrsToReflect$": [["accept", "accept"], ["maxFileSize", "max-file-size"], ["maxFiles", "max-files"], ["sort", "sort"]]
42723
+ "$attrsToReflect$": [["accept", "accept"], ["disabled", "disabled"], ["name", "name"], ["maxFileSize", "max-file-size"], ["maxFiles", "max-files"], ["sort", "sort"]]
41699
42724
  }; }
41700
42725
  }
41701
42726
 
@@ -44151,6 +45176,9 @@ var localeIt$f = {
44151
45176
 
44152
45177
  const mdsPrefCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),mds-text:not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{display:grid;gap:calc(var(--spacing,.0025rem)*400)}:host(:empty),:host([controller]){display:none}.reload-required{display:grid;gap:calc(var(--spacing,.0025rem)*200)}`;
44153
45178
 
45179
+ // The mounted instances: `data-magma-pref` stays on <html> while any of them is, so
45180
+ // a settings page unmounting its own mds-pref leaves the app controller in charge.
45181
+ const mountedPrefs = new Set();
44154
45182
  /**
44155
45183
  * @name Pref
44156
45184
  * @description This component is based on MdsTab component pattern
@@ -44254,6 +45282,7 @@ class MdsPref {
44254
45282
  }
44255
45283
  componentDidLoad() {
44256
45284
  var _a;
45285
+ mountedPrefs.add(this.host);
44257
45286
  if (typeof window !== 'undefined') {
44258
45287
  (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.setAttribute('data-magma-pref', '');
44259
45288
  }
@@ -44267,14 +45296,15 @@ class MdsPref {
44267
45296
  }
44268
45297
  disconnectedCallback() {
44269
45298
  var _a;
44270
- if (typeof window !== 'undefined') {
45299
+ mountedPrefs.delete(this.host);
45300
+ if (typeof window !== 'undefined' && mountedPrefs.size === 0) {
44271
45301
  (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-magma-pref');
44272
45302
  }
44273
45303
  this.removePerfEvents();
44274
45304
  this.removeThemeEvent(this.host.querySelector('mds-pref-theme'));
44275
45305
  }
44276
45306
  render() {
44277
- return (hAsync(Host, { key: '75bd4a024ef7e6fbf97a1bcb90f5927423959565' }, hAsync("slot", { key: '68400b48511b1089063665c6b33331629207135f' }), this.showReload && (hAsync("div", { key: 'd07255c793b3f93c42b6c86e972416651d13a701', class: "reload-required" }, hAsync("mds-text", { key: 'd19ea1765dea329590fa7d7a81186f3d4775106b', typography: "caption" }, this.t.get('reloadPageToSeeChanges'))))));
45307
+ return (hAsync(Host, { key: '3e9d23654e644bc31a70425bfd5a4e0cca0d3d74' }, hAsync("slot", { key: '6688f1a65df7f2197bf6f4456e9d644b446a84b5' }), this.showReload && (hAsync("div", { key: '2283359a9f78f4465e334f1fabe89b1e5300d993', class: "reload-required" }, hAsync("mds-text", { key: '37a204636723d04c4a9d46d39d84296f6535f2ca', typography: "caption" }, this.t.get('reloadPageToSeeChanges'))))));
44278
45308
  }
44279
45309
  get host() { return getElement(this); }
44280
45310
  static get watchers() { return {
@@ -44359,6 +45389,7 @@ class MdsPrefAnimation {
44359
45389
  this.localStorageAlias = 'mdsPrefAnimation';
44360
45390
  this.customPropertyAlias = '--magma-pref-animation';
44361
45391
  this.defaultMode = 'system';
45392
+ this.syncingFromStore = false;
44362
45393
  this.t = new Locale$1({
44363
45394
  el: localeEl$d,
44364
45395
  en: localeEn$e,
@@ -44379,6 +45410,18 @@ class MdsPrefAnimation {
44379
45410
  label: 'animationEnabled',
44380
45411
  },
44381
45412
  };
45413
+ /**
45414
+ * Follows an animation applied elsewhere (another instance, or a writer of the
45415
+ * `<html>` classes) without applying it again: no event, no storage write.
45416
+ */
45417
+ this.syncAnimation = (mode) => {
45418
+ if (mode === undefined || mode === this.mode) {
45419
+ return;
45420
+ }
45421
+ this.syncingFromStore = true;
45422
+ this.mode = mode;
45423
+ this.syncingFromStore = false;
45424
+ };
44382
45425
  this.setAnimation = (mode) => {
44383
45426
  this.prefChangeEvent.emit({ preference: 'animation' });
44384
45427
  this.mode = mode;
@@ -44399,16 +45442,27 @@ class MdsPrefAnimation {
44399
45442
  this.setAnimation(mode);
44400
45443
  };
44401
45444
  }
44402
- componentWillRender() {
45445
+ // Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
45446
+ componentWillLoad() {
44403
45447
  var _a, _b;
44404
45448
  this.setAnimation((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
44405
45449
  }
45450
+ connectedCallback() {
45451
+ this.unsubscribeStore = preferenceStore.onChange('animation', this.syncAnimation);
45452
+ }
45453
+ disconnectedCallback() {
45454
+ var _a;
45455
+ (_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
45456
+ }
44406
45457
  modeChanged(newValue) {
45458
+ if (this.syncingFromStore) {
45459
+ return;
45460
+ }
44407
45461
  this.setAnimation(newValue);
44408
45462
  }
44409
45463
  render() {
44410
45464
  var _a;
44411
- return (hAsync(Host, { key: '316e143c4b4db5b9dfb62cb220fe3bc6a5c9f281', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '1cdfe2135ee272feced051d65f82474a9cafc6dd', class: "info", typography: "caption" }, hAsync("b", { key: '521c7e5128313ff63abfd588853624bf30d93a68' }, this.t.get('label')), ' ', this.t.get(this.animation[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: 'fbc3785a43f7425462cf8aa72dd5da5192e706a9', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '0db92d6a4004725bd6c0bf533bae68e16c821f68', selected: this.mode === 'reduce', onClick: this.handleModeClick('reduce'), class: "item item--reduce", icon: miOutlineCircle, title: this.t.get(this.animation.reduce.label) }), hAsync("mds-tab-item", { key: '9336c4f7cc8b84835a2cc43b4ec40bf5da62f0b6', selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.animation.system.label) }), hAsync("mds-tab-item", { key: 'e3bd86fd690120b3d0fcdda2b9c41da05ebeafef', selected: this.mode === 'no-preference', onClick: this.handleModeClick('no-preference'), class: "item item--no-preference", icon: miBaselineAnimation, title: this.t.get(this.animation['no-preference'].label) }))));
45465
+ return (hAsync(Host, { key: 'd25afdb5885370379e89e39f75a296e9ec450580', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '8e87fb8a03a0cc859606faccfd0e20f30bca1926', class: "info", typography: "caption" }, hAsync("b", { key: '1a2c122bace752fd63249bd6c5bdb147804129f8' }, this.t.get('label')), ' ', this.t.get(this.animation[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: '48bfc95518d841d5745ffd93ba0ebc2a5e6f8a82', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '1921aebbfb66ceaf9195e5f439221161d8fc36c6', selected: this.mode === 'reduce', onClick: this.handleModeClick('reduce'), class: "item item--reduce", icon: miOutlineCircle, title: this.t.get(this.animation.reduce.label) }), hAsync("mds-tab-item", { key: '7bbab624ad0bd68aede42badc4bf1caf0df773fc', selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.animation.system.label) }), hAsync("mds-tab-item", { key: '37a797b325134f7beaa31575beab581844de951d', selected: this.mode === 'no-preference', onClick: this.handleModeClick('no-preference'), class: "item item--no-preference", icon: miBaselineAnimation, title: this.t.get(this.animation['no-preference'].label) }))));
44412
45466
  }
44413
45467
  static get watchers() { return {
44414
45468
  "mode": [{
@@ -44500,6 +45554,7 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
44500
45554
  this.localStorageAlias = 'mdsPrefConsumption';
44501
45555
  this.customPropertyAlias = '--magma-pref-consumption';
44502
45556
  this.defaultMode = 'high';
45557
+ this.syncingFromStore = false;
44503
45558
  this.t = new Locale$1({
44504
45559
  el: localeEl$c,
44505
45560
  en: localeEn$d,
@@ -44520,6 +45575,18 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
44520
45575
  label: 'consumptionLow',
44521
45576
  },
44522
45577
  };
45578
+ /**
45579
+ * Follows a consumption applied elsewhere (another instance, or a writer of the
45580
+ * `<html>` classes) without applying it again: no event, no storage write.
45581
+ */
45582
+ this.syncConsumption = (mode) => {
45583
+ if (mode === undefined || mode === this.mode) {
45584
+ return;
45585
+ }
45586
+ this.syncingFromStore = true;
45587
+ this.mode = mode;
45588
+ this.syncingFromStore = false;
45589
+ };
44523
45590
  this.setConsumption = (mode) => {
44524
45591
  this.prefChangeEvent.emit({ preference: 'consumption' });
44525
45592
  this.mode = mode;
@@ -44540,16 +45607,27 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
44540
45607
  this.setConsumption(mode);
44541
45608
  };
44542
45609
  }
44543
- componentWillRender() {
45610
+ // Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
45611
+ componentWillLoad() {
44544
45612
  var _a, _b;
44545
45613
  this.setConsumption((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
44546
45614
  }
45615
+ connectedCallback() {
45616
+ this.unsubscribeStore = preferenceStore.onChange('consumption', this.syncConsumption);
45617
+ }
45618
+ disconnectedCallback() {
45619
+ var _a;
45620
+ (_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
45621
+ }
44547
45622
  modeChanged(newValue) {
45623
+ if (this.syncingFromStore) {
45624
+ return;
45625
+ }
44548
45626
  this.setConsumption(newValue);
44549
45627
  }
44550
45628
  render() {
44551
45629
  var _a;
44552
- return (hAsync(Host, { key: '54b1faff4937274faebca07bab0a8839c5764dec', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '4321a62b672bc9809824662dfe395fcd2676b56e', class: "info", typography: "caption" }, hAsync("b", { key: '68eea4182022681cd5085e3b029a5ed404795758' }, this.t.get('label')), ' ', this.t.get(this.consumption[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: '83265fb0aa01eb10a6fcf19e647d490207e5151e', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '2219f44d0f8934439932b10fc02f266b07003a90', selected: this.mode === 'low', onClick: this.handleModeClick('low'), class: "item item--low", icon: mggConsumptionLow, title: this.t.get(this.consumption.low.label) }), hAsync("mds-tab-item", { key: '0466ba1148b2ece0d8df7b0f76e6304dfb4ce26a', selected: this.mode === 'medium', onClick: this.handleModeClick('medium'), class: "item item--medium", icon: mggConsumptionMedium, title: this.t.get(this.consumption.medium.label) }), hAsync("mds-tab-item", { key: 'e93cdd4a2314f7a8e8821bb9c6a0eabf3ab55555', selected: this.mode === 'high', onClick: this.handleModeClick('high'), class: "item item--high", icon: mggConsumptionHigh, title: this.t.get(this.consumption.high.label) }))));
45630
+ return (hAsync(Host, { key: 'c85635ab48a40e3fbd570876d6c941fb6a4f00ad', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '2a81b0c3ad64a38f3f6934c5712fe4359dde2a35', class: "info", typography: "caption" }, hAsync("b", { key: '4f0e560287cf8a81d809493d95dcce1e30d166ae' }, this.t.get('label')), ' ', this.t.get(this.consumption[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: 'c8af1116e00ea1ee5d4c839b83344964c09e3a30', fill: true, size: this.size }, hAsync("mds-tab-item", { key: 'c907c9f847e0180fc33b60a362ea297fc9f53b39', selected: this.mode === 'low', onClick: this.handleModeClick('low'), class: "item item--low", icon: mggConsumptionLow, title: this.t.get(this.consumption.low.label) }), hAsync("mds-tab-item", { key: '181190f490172350ec485b715efdbc67557fe1b7', selected: this.mode === 'medium', onClick: this.handleModeClick('medium'), class: "item item--medium", icon: mggConsumptionMedium, title: this.t.get(this.consumption.medium.label) }), hAsync("mds-tab-item", { key: '6ad366ced10575c9edc07b3b64271672c52b0a5f', selected: this.mode === 'high', onClick: this.handleModeClick('high'), class: "item item--high", icon: mggConsumptionHigh, title: this.t.get(this.consumption.high.label) }))));
44553
45631
  }
44554
45632
  static get watchers() { return {
44555
45633
  "mode": [{
@@ -44629,6 +45707,7 @@ class MdsPrefContrast {
44629
45707
  this.localStorageAlias = 'mdsPrefContrast';
44630
45708
  this.customPropertyAlias = '--magma-pref-contrast';
44631
45709
  this.defaultMode = 'system';
45710
+ this.syncingFromStore = false;
44632
45711
  this.t = new Locale$1({
44633
45712
  el: localeEl$b,
44634
45713
  en: localeEn$c,
@@ -44655,6 +45734,18 @@ class MdsPrefContrast {
44655
45734
  label: 'contrastDefault',
44656
45735
  },
44657
45736
  };
45737
+ /**
45738
+ * Follows a contrast applied elsewhere (another instance, or a writer of the
45739
+ * `<html>` classes) without applying it again: no event, no storage write.
45740
+ */
45741
+ this.syncContrast = (mode) => {
45742
+ if (mode === undefined || mode === this.mode) {
45743
+ return;
45744
+ }
45745
+ this.syncingFromStore = true;
45746
+ this.mode = mode;
45747
+ this.syncingFromStore = false;
45748
+ };
44658
45749
  this.rollbackContrast = () => {
44659
45750
  if (typeof window === 'undefined') {
44660
45751
  return this.defaultMode;
@@ -44691,18 +45782,26 @@ class MdsPrefContrast {
44691
45782
  this.setContrast(mode);
44692
45783
  };
44693
45784
  }
44694
- componentWillRender() {
45785
+ // Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
45786
+ componentWillLoad() {
44695
45787
  var _a, _b;
44696
45788
  this.setContrast((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
44697
45789
  }
45790
+ connectedCallback() {
45791
+ this.unsubscribeStore = preferenceStore.onChange('contrast', this.syncContrast);
45792
+ }
45793
+ disconnectedCallback() {
45794
+ var _a;
45795
+ (_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
45796
+ }
44698
45797
  modeChanged(newValue, oldValue) {
44699
- if (newValue !== oldValue) {
45798
+ if (newValue !== oldValue && !this.syncingFromStore) {
44700
45799
  this.setContrast(newValue);
44701
45800
  }
44702
45801
  }
44703
45802
  render() {
44704
45803
  var _a;
44705
- return (hAsync(Host, { key: 'dfa5f7d0811bb1acc4e0ef9be168c857ab5704af', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '4cc4662732f75c2197a7f32f812aa1ff7cb94d5e', class: "info", typography: "caption" }, hAsync("b", { key: 'ea29991f41f4241aa2f89eabe8a244e9c383cd7d' }, this.t.get('label')), ' ', this.t.get(this.contrast[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: 'e2138c0af0e534a75bd92fe1e11620efa4415957', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '5a7c2fb077c0874ac731de09cfb735d70b7bc9bc', selected: this.mode === 'more', onClick: this.handleModeClick('more'), class: "item item--more", icon: miBaselineContrast, title: this.t.get(this.contrast.more.label) }), hAsync("mds-tab-item", { key: '8eb4c0663165f538f8f4b5ed535a2d1e27c7df44', selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.contrast.system.label) }), hAsync("mds-tab-item", { key: 'feb3300e7e4f21f76bd544c41433056fa28bae54', selected: this.mode === 'no-preference', onClick: this.handleModeClick('no-preference'), class: "item item--default", icon: this.mode === 'no-preference' ? miBaselineAutoAwesome : miOutlineAutoAwesome, title: this.t.get(this.contrast['no-preference'].label) }))));
45804
+ return (hAsync(Host, { key: 'e616ac6092e299e246f1d1eb53c39f45f241ac95', "pref-contrast": preferenceStore.state.contrast }, hAsync("mds-text", { key: '68d13eb8be2ee6adaf88e78bc9b2be38dc70feca', class: "info", typography: "caption" }, hAsync("b", { key: '47e8b4c296c88bb4e860135b846c536197312443' }, this.t.get('label')), ' ', this.t.get(this.contrast[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label)), hAsync("mds-tab", { key: '24a16f9b5bd82bc838a899b75399817d73d1dfb0', fill: true, size: this.size }, hAsync("mds-tab-item", { key: 'ac1df9489fe6df41d8040e30da99d095fa8db50d', selected: this.mode === 'more', onClick: this.handleModeClick('more'), class: "item item--more", icon: miBaselineContrast, title: this.t.get(this.contrast.more.label) }), hAsync("mds-tab-item", { key: 'd7a46a75971a9f66e6283fa717e46c8940c16f59', selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.contrast.system.label) }), hAsync("mds-tab-item", { key: '8838c3b0829cc9f8ec387dd0f5dfb5c7ebea8994', selected: this.mode === 'no-preference', onClick: this.handleModeClick('no-preference'), class: "item item--default", icon: this.mode === 'no-preference' ? miBaselineAutoAwesome : miOutlineAutoAwesome, title: this.t.get(this.contrast['no-preference'].label) }))));
44706
45805
  }
44707
45806
  static get watchers() { return {
44708
45807
  "mode": [{
@@ -46059,6 +47158,7 @@ class MdsPrefMode {
46059
47158
  this.cssOverlayZIndex = '6000';
46060
47159
  this.overlayId = 'mds-pref-mode-overlay';
46061
47160
  this.overlayShow = false;
47161
+ this.syncingFromStore = false;
46062
47162
  this.disabled = false;
46063
47163
  this.updateCSSCustomProps = () => {
46064
47164
  var _a, _b, _c;
@@ -46090,6 +47190,18 @@ class MdsPrefMode {
46090
47190
  label: 'lightMode',
46091
47191
  },
46092
47192
  };
47193
+ /**
47194
+ * Follows a mode applied elsewhere (another instance, or a writer of the
47195
+ * `<html>` classes) without applying it again: no event, no storage write.
47196
+ */
47197
+ this.syncMode = (mode) => {
47198
+ if (mode === undefined || mode === this.mode || this.disabled) {
47199
+ return;
47200
+ }
47201
+ this.syncingFromStore = true;
47202
+ this.mode = mode;
47203
+ this.syncingFromStore = false;
47204
+ };
46093
47205
  this.setMode = (mode) => {
46094
47206
  this.prefChangeEvent.emit({ preference: 'mode' });
46095
47207
  this.mode = mode;
@@ -46207,7 +47319,10 @@ class MdsPrefMode {
46207
47319
  this.changeMode(mode);
46208
47320
  };
46209
47321
  }
46210
- componentWillRender() {
47322
+ // The stored mode is applied once, on load. After that each instance only mirrors
47323
+ // the shared store: re-applying its own `mode` on every render made a second
47324
+ // instance (a controller next to a settings page) revert what the other one chose.
47325
+ componentWillLoad() {
46211
47326
  var _a, _b;
46212
47327
  if (!isSafari()) {
46213
47328
  this.setMode((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
@@ -46216,11 +47331,18 @@ class MdsPrefMode {
46216
47331
  this.disabled = true;
46217
47332
  this.mode = 'light';
46218
47333
  }
47334
+ connectedCallback() {
47335
+ this.unsubscribeStore = preferenceStore.onChange('mode', this.syncMode);
47336
+ }
47337
+ disconnectedCallback() {
47338
+ var _a;
47339
+ (_a = this.unsubscribeStore) === null || _a === void 0 ? void 0 : _a.call(this);
47340
+ }
46219
47341
  componentDidLoad() {
46220
47342
  this.updateCSSCustomProps();
46221
47343
  }
46222
47344
  modeChanged(newValue, oldValue) {
46223
- if (newValue === oldValue) {
47345
+ if (newValue === oldValue || this.syncingFromStore) {
46224
47346
  return;
46225
47347
  }
46226
47348
  this.setMode(newValue);
@@ -46237,9 +47359,9 @@ class MdsPrefMode {
46237
47359
  }
46238
47360
  render() {
46239
47361
  var _a, _b;
46240
- return (hAsync(Host, { key: '93052dfea650c0b96b0818b6ded53b40b35c7490', "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-text", { key: 'b19e1fde7bdc84765cee7145dc6fdfd3c779339e', class: "info", typography: "caption" }, hAsync("b", { key: '5eae911ede8699c5b53d293ec195957e67a2716e' }, this.t.get('label')), ' ', this.disabled
47362
+ return (hAsync(Host, { key: '38b5a158f45cd24c544afceb41f0baf1e04910da', "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-text", { key: 'cc086f42401d84ab5ae370d406ba5e6b28cf1d29', class: "info", typography: "caption" }, hAsync("b", { key: '945bdb711e6038f86f3bf5ffcaaafb4c362191e5' }, this.t.get('label')), ' ', this.disabled
46241
47363
  ? this.t.get(this.modes[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label, { forced: true })
46242
- : this.t.get(this.modes[(_b = this.mode) !== null && _b !== void 0 ? _b : this.defaultMode].label, { forced: false })), hAsync("mds-tab", { key: '6d7ad904ef9072c72502dcf0e49584b3784531f7', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '410152bae335d83120e70f60339abe481106042d', disabled: this.isModeDisabled('light'), selected: this.mode === 'light', onClick: this.handleModeClick('light'), class: "item item--light", icon: miBaselineLightMode, title: this.t.get(this.modes.light.label, { forced: false }) }), hAsync("mds-tab-item", { key: 'ce522eddaeab3dec97e65d5b4ed0e7b31a8767c7', disabled: this.isModeDisabled('system'), selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.modes.system.label) }), hAsync("mds-tab-item", { key: '67889e2b7d49ab1832cb1a874624d2c5896c8738', disabled: this.isModeDisabled('dark'), selected: this.mode === 'dark', onClick: this.handleModeClick('dark'), class: "item item--dark", icon: this.mode === 'dark' ? miBaselineDarkMode : miOutlineDarkMode, title: this.t.get(this.modes.dark.label) }))));
47364
+ : this.t.get(this.modes[(_b = this.mode) !== null && _b !== void 0 ? _b : this.defaultMode].label, { forced: false })), hAsync("mds-tab", { key: 'd40d4317bdcd1bf41b5d516c0d8a6c5c2f6e6689', fill: true, size: this.size }, hAsync("mds-tab-item", { key: '13ddcc4bab79d042f1171d383c800eb309c59299', disabled: this.isModeDisabled('light'), selected: this.mode === 'light', onClick: this.handleModeClick('light'), class: "item item--light", icon: miBaselineLightMode, title: this.t.get(this.modes.light.label, { forced: false }) }), hAsync("mds-tab-item", { key: '84b9c4484e359a81e0cc57f447bc911c723aea30', disabled: this.isModeDisabled('system'), selected: this.mode === 'system', onClick: this.handleModeClick('system'), class: "item item--system", icon: miBaselineSettings, title: this.t.get(this.modes.system.label) }), hAsync("mds-tab-item", { key: '6d4092d1145c98051a4fb526ca24e1d6caa1e900', disabled: this.isModeDisabled('dark'), selected: this.mode === 'dark', onClick: this.handleModeClick('dark'), class: "item item--dark", icon: this.mode === 'dark' ? miBaselineDarkMode : miOutlineDarkMode, title: this.t.get(this.modes.dark.label) }))));
46243
47365
  }
46244
47366
  get element() { return getElement(this); }
46245
47367
  static get watchers() { return {