@maggioli-design-system/magma 2.0.0 → 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 (1540) 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 +65 -23
  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 +29 -34
  27. package/dist/cjs/mds-badge.cjs.entry.js +5 -4
  28. package/dist/cjs/mds-banner_3.cjs.entry.js +3 -3
  29. package/dist/cjs/mds-benchmark-bar.cjs.entry.js +4 -3
  30. package/dist/cjs/mds-bibliography.cjs.entry.js +5 -4
  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 +42 -15
  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 +7 -6
  44. package/dist/cjs/mds-emoji.cjs.entry.js +2 -2
  45. package/dist/cjs/mds-entity.cjs.entry.js +3 -3
  46. package/dist/cjs/mds-file-preview.cjs.entry.js +20 -20
  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 +19 -10
  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 +6 -6
  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 +95 -13
  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 +166 -35
  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 +141 -68
  65. package/dist/cjs/mds-input.cjs.entry.js +320 -36
  66. package/dist/cjs/mds-keyboard-key.cjs.entry.js +11 -8
  67. package/dist/cjs/mds-keyboard.cjs.entry.js +9 -6
  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 +6 -5
  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 +13 -10
  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 +6 -5
  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 +4 -3
  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 +4 -4
  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 +6 -4
  106. package/dist/cjs/mds-tab-bar-item.cjs.entry.js +5 -4
  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 +4 -4
  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 +4 -3
  116. package/dist/cjs/mds-toast.cjs.entry.js +11 -5
  117. package/dist/cjs/mds-tooltip.cjs.entry.js +7 -7
  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/mds-avatar.js +27 -32
  151. package/dist/collection/components/mds-avatar/pattern.md +108 -0
  152. package/dist/collection/components/mds-avatar-stack/AGENTS.md +65 -0
  153. package/dist/collection/components/mds-avatar-stack/antipattern.md +122 -0
  154. package/dist/collection/components/mds-avatar-stack/documentation.json +196 -0
  155. package/dist/collection/components/mds-avatar-stack/pattern.md +125 -0
  156. package/dist/collection/components/mds-avatar-stack-item/AGENTS.md +60 -0
  157. package/dist/collection/components/mds-avatar-stack-item/antipattern.md +113 -0
  158. package/dist/collection/components/mds-avatar-stack-item/documentation.json +315 -0
  159. package/dist/collection/components/mds-avatar-stack-item/pattern.md +105 -0
  160. package/dist/collection/components/mds-badge/AGENTS.md +63 -0
  161. package/dist/collection/components/mds-badge/antipattern.md +104 -0
  162. package/dist/collection/components/mds-badge/documentation.json +316 -0
  163. package/dist/collection/components/mds-badge/mds-badge.js +3 -2
  164. package/dist/collection/components/mds-badge/pattern.md +130 -0
  165. package/dist/collection/components/mds-banner/AGENTS.md +87 -0
  166. package/dist/collection/components/mds-banner/antipattern.md +141 -0
  167. package/dist/collection/components/mds-banner/documentation.json +378 -0
  168. package/dist/collection/components/mds-banner/pattern.md +176 -0
  169. package/dist/collection/components/mds-benchmark-bar/AGENTS.md +59 -0
  170. package/dist/collection/components/mds-benchmark-bar/antipattern.md +77 -0
  171. package/dist/collection/components/mds-benchmark-bar/documentation.json +313 -0
  172. package/dist/collection/components/mds-benchmark-bar/mds-benchmark-bar.js +3 -2
  173. package/dist/collection/components/mds-benchmark-bar/pattern.md +102 -0
  174. package/dist/collection/components/mds-bibliography/AGENTS.md +61 -0
  175. package/dist/collection/components/mds-bibliography/antipattern.md +130 -0
  176. package/dist/collection/components/mds-bibliography/documentation.json +407 -0
  177. package/dist/collection/components/mds-bibliography/mds-bibliography.js +4 -3
  178. package/dist/collection/components/mds-bibliography/pattern.md +142 -0
  179. package/dist/collection/components/mds-breadcrumb/AGENTS.md +68 -0
  180. package/dist/collection/components/mds-breadcrumb/antipattern.md +112 -0
  181. package/dist/collection/components/mds-breadcrumb/documentation.json +156 -0
  182. package/dist/collection/components/mds-breadcrumb/pattern.md +103 -0
  183. package/dist/collection/components/mds-breadcrumb-item/AGENTS.md +67 -0
  184. package/dist/collection/components/mds-breadcrumb-item/antipattern.md +109 -0
  185. package/dist/collection/components/mds-breadcrumb-item/documentation.json +160 -0
  186. package/dist/collection/components/mds-breadcrumb-item/pattern.md +85 -0
  187. package/dist/collection/components/mds-button/AGENTS.md +102 -0
  188. package/dist/collection/components/mds-button/antipattern.md +126 -0
  189. package/dist/collection/components/mds-button/documentation.json +922 -0
  190. package/dist/collection/components/mds-button/mds-button.css +4 -1
  191. package/dist/collection/components/mds-button/mds-button.js +48 -8
  192. package/dist/collection/components/mds-button/pattern.md +172 -0
  193. package/dist/collection/components/mds-button-dropdown/AGENTS.md +88 -0
  194. package/dist/collection/components/mds-button-dropdown/antipattern.md +158 -0
  195. package/dist/collection/components/mds-button-dropdown/documentation.json +614 -0
  196. package/dist/collection/components/mds-button-dropdown/mds-button-dropdown.js +94 -6
  197. package/dist/collection/components/mds-button-dropdown/pattern.md +164 -0
  198. package/dist/collection/components/mds-button-group/AGENTS.md +33 -0
  199. package/dist/collection/components/mds-button-group/antipattern.md +105 -0
  200. package/dist/collection/components/mds-button-group/documentation.json +43 -0
  201. package/dist/collection/components/mds-button-group/pattern.md +89 -0
  202. package/dist/collection/components/mds-calendar/AGENTS.md +96 -0
  203. package/dist/collection/components/mds-calendar/antipattern.md +113 -0
  204. package/dist/collection/components/mds-calendar/documentation.json +626 -0
  205. package/dist/collection/components/mds-calendar/pattern.md +128 -0
  206. package/dist/collection/components/mds-calendar-cell/AGENTS.md +94 -0
  207. package/dist/collection/components/mds-calendar-cell/antipattern.md +58 -0
  208. package/dist/collection/components/mds-calendar-cell/documentation.json +539 -0
  209. package/dist/collection/components/mds-calendar-cell/pattern.md +82 -0
  210. package/dist/collection/components/mds-card/AGENTS.md +60 -0
  211. package/dist/collection/components/mds-card/antipattern.md +133 -0
  212. package/dist/collection/components/mds-card/documentation.json +117 -0
  213. package/dist/collection/components/mds-card/pattern.md +160 -0
  214. package/dist/collection/components/mds-card-content/AGENTS.md +34 -0
  215. package/dist/collection/components/mds-card-content/antipattern.md +110 -0
  216. package/dist/collection/components/mds-card-content/documentation.json +43 -0
  217. package/dist/collection/components/mds-card-content/pattern.md +91 -0
  218. package/dist/collection/components/mds-card-footer/AGENTS.md +34 -0
  219. package/dist/collection/components/mds-card-footer/antipattern.md +112 -0
  220. package/dist/collection/components/mds-card-footer/documentation.json +43 -0
  221. package/dist/collection/components/mds-card-footer/pattern.md +95 -0
  222. package/dist/collection/components/mds-card-header/AGENTS.md +38 -0
  223. package/dist/collection/components/mds-card-header/antipattern.md +114 -0
  224. package/dist/collection/components/mds-card-header/documentation.json +51 -0
  225. package/dist/collection/components/mds-card-header/pattern.md +143 -0
  226. package/dist/collection/components/mds-card-media/AGENTS.md +46 -0
  227. package/dist/collection/components/mds-card-media/antipattern.md +128 -0
  228. package/dist/collection/components/mds-card-media/documentation.json +56 -0
  229. package/dist/collection/components/mds-card-media/pattern.md +93 -0
  230. package/dist/collection/components/mds-chip/AGENTS.md +84 -0
  231. package/dist/collection/components/mds-chip/antipattern.md +119 -0
  232. package/dist/collection/components/mds-chip/documentation.json +535 -0
  233. package/dist/collection/components/mds-chip/pattern.md +166 -0
  234. package/dist/collection/components/mds-details/AGENTS.md +72 -0
  235. package/dist/collection/components/mds-details/antipattern.md +128 -0
  236. package/dist/collection/components/mds-details/documentation.json +153 -0
  237. package/dist/collection/components/mds-details/pattern.md +138 -0
  238. package/dist/collection/components/mds-dropdown/AGENTS.md +95 -0
  239. package/dist/collection/components/mds-dropdown/antipattern.md +137 -0
  240. package/dist/collection/components/mds-dropdown/documentation.json +701 -0
  241. package/dist/collection/components/mds-dropdown/mds-dropdown.js +4 -3
  242. package/dist/collection/components/mds-dropdown/pattern.md +201 -0
  243. package/dist/collection/components/mds-emoji/AGENTS.md +88 -0
  244. package/dist/collection/components/mds-emoji/antipattern.md +134 -0
  245. package/dist/collection/components/mds-emoji/documentation.json +506 -0
  246. package/dist/collection/components/mds-emoji/pattern.md +219 -0
  247. package/dist/collection/components/mds-entity/AGENTS.md +76 -0
  248. package/dist/collection/components/mds-entity/antipattern.md +112 -0
  249. package/dist/collection/components/mds-entity/documentation.json +365 -0
  250. package/dist/collection/components/mds-entity/pattern.md +125 -0
  251. package/dist/collection/components/mds-file/AGENTS.md +63 -0
  252. package/dist/collection/components/mds-file/antipattern.md +92 -0
  253. package/dist/collection/components/mds-file/documentation.json +484 -0
  254. package/dist/collection/components/mds-file/pattern.md +109 -0
  255. package/dist/collection/components/mds-file-preview/AGENTS.md +88 -0
  256. package/dist/collection/components/mds-file-preview/antipattern.md +129 -0
  257. package/dist/collection/components/mds-file-preview/documentation.json +780 -0
  258. package/dist/collection/components/mds-file-preview/mds-file-preview.js +6 -7
  259. package/dist/collection/components/mds-file-preview/pattern.md +164 -0
  260. package/dist/collection/components/mds-filter/AGENTS.md +72 -0
  261. package/dist/collection/components/mds-filter/antipattern.md +140 -0
  262. package/dist/collection/components/mds-filter/documentation.json +239 -0
  263. package/dist/collection/components/mds-filter/pattern.md +129 -0
  264. package/dist/collection/components/mds-filter-item/AGENTS.md +64 -0
  265. package/dist/collection/components/mds-filter-item/antipattern.md +127 -0
  266. package/dist/collection/components/mds-filter-item/documentation.json +240 -0
  267. package/dist/collection/components/mds-filter-item/pattern.md +125 -0
  268. package/dist/collection/components/mds-header/AGENTS.md +95 -0
  269. package/dist/collection/components/mds-header/antipattern.md +120 -0
  270. package/dist/collection/components/mds-header/documentation.json +491 -0
  271. package/dist/collection/components/mds-header/mds-header.js +17 -8
  272. package/dist/collection/components/mds-header/pattern.md +182 -0
  273. package/dist/collection/components/mds-header-bar/AGENTS.md +80 -0
  274. package/dist/collection/components/mds-header-bar/antipattern.md +119 -0
  275. package/dist/collection/components/mds-header-bar/documentation.json +251 -0
  276. package/dist/collection/components/mds-header-bar/pattern.md +134 -0
  277. package/dist/collection/components/mds-help/AGENTS.md +65 -0
  278. package/dist/collection/components/mds-help/antipattern.md +73 -0
  279. package/dist/collection/components/mds-help/documentation.json +228 -0
  280. package/dist/collection/components/mds-help/pattern.md +106 -0
  281. package/dist/collection/components/mds-horizontal-scroll/AGENTS.md +72 -0
  282. package/dist/collection/components/mds-horizontal-scroll/antipattern.md +120 -0
  283. package/dist/collection/components/mds-horizontal-scroll/documentation.json +279 -0
  284. package/dist/collection/components/mds-horizontal-scroll/pattern.md +154 -0
  285. package/dist/collection/components/mds-hr/AGENTS.md +27 -0
  286. package/dist/collection/components/mds-hr/antipattern.md +84 -0
  287. package/dist/collection/components/mds-hr/documentation.json +33 -0
  288. package/dist/collection/components/mds-hr/pattern.md +88 -0
  289. package/dist/collection/components/mds-icon/AGENTS.md +52 -0
  290. package/dist/collection/components/mds-icon/antipattern.md +118 -0
  291. package/dist/collection/components/mds-icon/documentation.json +205 -0
  292. package/dist/collection/components/mds-icon/mds-icon.js +29 -4
  293. package/dist/collection/components/mds-icon/pattern.md +135 -0
  294. package/dist/collection/components/mds-icon/services/icons-set.service.js +47 -18
  295. package/dist/collection/components/mds-img/AGENTS.md +78 -0
  296. package/dist/collection/components/mds-img/antipattern.md +106 -0
  297. package/dist/collection/components/mds-img/documentation.json +470 -0
  298. package/dist/collection/components/mds-img/mds-img.js +3 -3
  299. package/dist/collection/components/mds-img/pattern.md +128 -0
  300. package/dist/collection/components/mds-input/AGENTS.md +138 -0
  301. package/dist/collection/components/mds-input/antipattern.md +128 -0
  302. package/dist/collection/components/mds-input/documentation.json +1574 -0
  303. package/dist/collection/components/mds-input/mds-input.js +185 -30
  304. package/dist/collection/components/mds-input/meta/input-type/InputValidationManager.js +8 -1
  305. package/dist/collection/components/mds-input/meta/validators.js +100 -2
  306. package/dist/collection/components/mds-input/meta/validity.js +35 -0
  307. package/dist/collection/components/mds-input/pattern.md +252 -0
  308. package/dist/collection/components/mds-input-date/AGENTS.md +98 -0
  309. package/dist/collection/components/mds-input-date/antipattern.md +107 -0
  310. package/dist/collection/components/mds-input-date/documentation.json +638 -0
  311. package/dist/collection/components/mds-input-date/mds-input-date.js +130 -24
  312. package/dist/collection/components/mds-input-date/pattern.md +158 -0
  313. package/dist/collection/components/mds-input-date-range/AGENTS.md +90 -0
  314. package/dist/collection/components/mds-input-date-range/antipattern.md +168 -0
  315. package/dist/collection/components/mds-input-date-range/documentation.json +502 -0
  316. package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +13 -0
  317. package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +112 -9
  318. package/dist/collection/components/mds-input-date-range/pattern.md +122 -0
  319. package/dist/collection/components/mds-input-date-range-preselection/AGENTS.md +62 -0
  320. package/dist/collection/components/mds-input-date-range-preselection/antipattern.md +147 -0
  321. package/dist/collection/components/mds-input-date-range-preselection/documentation.json +176 -0
  322. package/dist/collection/components/mds-input-date-range-preselection/pattern.md +101 -0
  323. package/dist/collection/components/mds-input-field/AGENTS.md +60 -0
  324. package/dist/collection/components/mds-input-field/antipattern.md +115 -0
  325. package/dist/collection/components/mds-input-field/documentation.json +178 -0
  326. package/dist/collection/components/mds-input-field/pattern.md +95 -0
  327. package/dist/collection/components/mds-input-otp/AGENTS.md +48 -0
  328. package/dist/collection/components/mds-input-otp/antipattern.md +105 -0
  329. package/dist/collection/components/mds-input-otp/documentation.json +203 -0
  330. package/dist/collection/components/mds-input-otp/mds-input-otp.css +4 -1
  331. package/dist/collection/components/mds-input-otp/mds-input-otp.js +88 -15
  332. package/dist/collection/components/mds-input-otp/pattern.md +107 -0
  333. package/dist/collection/components/mds-input-range/AGENTS.md +84 -0
  334. package/dist/collection/components/mds-input-range/antipattern.md +127 -0
  335. package/dist/collection/components/mds-input-range/documentation.json +315 -0
  336. package/dist/collection/components/mds-input-range/mds-input-range.css +6 -2
  337. package/dist/collection/components/mds-input-range/mds-input-range.js +30 -13
  338. package/dist/collection/components/mds-input-range/pattern.md +110 -0
  339. package/dist/collection/components/mds-input-select/AGENTS.md +99 -0
  340. package/dist/collection/components/mds-input-select/antipattern.md +126 -0
  341. package/dist/collection/components/mds-input-select/documentation.json +552 -0
  342. package/dist/collection/components/mds-input-select/mds-input-select.js +171 -40
  343. package/dist/collection/components/mds-input-select/meta/event-detail.js +1 -0
  344. package/dist/collection/components/mds-input-select/pattern.md +168 -0
  345. package/dist/collection/components/mds-input-switch/AGENTS.md +106 -0
  346. package/dist/collection/components/mds-input-switch/antipattern.md +117 -0
  347. package/dist/collection/components/mds-input-switch/documentation.json +638 -0
  348. package/dist/collection/components/mds-input-switch/mds-input-switch.css +4 -1
  349. package/dist/collection/components/mds-input-switch/mds-input-switch.js +59 -16
  350. package/dist/collection/components/mds-input-switch/pattern.md +133 -0
  351. package/dist/collection/components/mds-input-tip/AGENTS.md +56 -0
  352. package/dist/collection/components/mds-input-tip/antipattern.md +108 -0
  353. package/dist/collection/components/mds-input-tip/documentation.json +160 -0
  354. package/dist/collection/components/mds-input-tip/pattern.md +125 -0
  355. package/dist/collection/components/mds-input-tip-item/AGENTS.md +58 -0
  356. package/dist/collection/components/mds-input-tip-item/antipattern.md +98 -0
  357. package/dist/collection/components/mds-input-tip-item/documentation.json +181 -0
  358. package/dist/collection/components/mds-input-tip-item/pattern.md +107 -0
  359. package/dist/collection/components/mds-input-upload/AGENTS.md +78 -0
  360. package/dist/collection/components/mds-input-upload/antipattern.md +144 -0
  361. package/dist/collection/components/mds-input-upload/documentation.json +425 -0
  362. package/dist/collection/components/mds-input-upload/mds-input-upload.css +15 -0
  363. package/dist/collection/components/mds-input-upload/mds-input-upload.js +181 -67
  364. package/dist/collection/components/mds-input-upload/pattern.md +165 -0
  365. package/dist/collection/components/mds-keyboard/AGENTS.md +76 -0
  366. package/dist/collection/components/mds-keyboard/antipattern.md +111 -0
  367. package/dist/collection/components/mds-keyboard/documentation.json +227 -0
  368. package/dist/collection/components/mds-keyboard/mds-keyboard.js +6 -3
  369. package/dist/collection/components/mds-keyboard/pattern.md +129 -0
  370. package/dist/collection/components/mds-keyboard-key/AGENTS.md +55 -0
  371. package/dist/collection/components/mds-keyboard-key/antipattern.md +117 -0
  372. package/dist/collection/components/mds-keyboard-key/documentation.json +450 -0
  373. package/dist/collection/components/mds-keyboard-key/mds-keyboard-key.js +8 -5
  374. package/dist/collection/components/mds-keyboard-key/pattern.md +98 -0
  375. package/dist/collection/components/mds-kpi/AGENTS.md +44 -0
  376. package/dist/collection/components/mds-kpi/antipattern.md +93 -0
  377. package/dist/collection/components/mds-kpi/documentation.json +54 -0
  378. package/dist/collection/components/mds-kpi/pattern.md +109 -0
  379. package/dist/collection/components/mds-kpi-item/AGENTS.md +62 -0
  380. package/dist/collection/components/mds-kpi-item/antipattern.md +119 -0
  381. package/dist/collection/components/mds-kpi-item/documentation.json +199 -0
  382. package/dist/collection/components/mds-kpi-item/pattern.md +115 -0
  383. package/dist/collection/components/mds-label/AGENTS.md +71 -0
  384. package/dist/collection/components/mds-label/antipattern.md +92 -0
  385. package/dist/collection/components/mds-label/documentation.json +388 -0
  386. package/dist/collection/components/mds-label/pattern.md +111 -0
  387. package/dist/collection/components/mds-list/AGENTS.md +33 -0
  388. package/dist/collection/components/mds-list/antipattern.md +117 -0
  389. package/dist/collection/components/mds-list/documentation.json +43 -0
  390. package/dist/collection/components/mds-list/pattern.md +104 -0
  391. package/dist/collection/components/mds-list-item/AGENTS.md +60 -0
  392. package/dist/collection/components/mds-list-item/antipattern.md +118 -0
  393. package/dist/collection/components/mds-list-item/documentation.json +200 -0
  394. package/dist/collection/components/mds-list-item/pattern.md +101 -0
  395. package/dist/collection/components/mds-mention/AGENTS.md +55 -0
  396. package/dist/collection/components/mds-mention/antipattern.md +86 -0
  397. package/dist/collection/components/mds-mention/documentation.json +203 -0
  398. package/dist/collection/components/mds-mention/mds-mention.js +3 -2
  399. package/dist/collection/components/mds-mention/pattern.md +91 -0
  400. package/dist/collection/components/mds-modal/AGENTS.md +107 -0
  401. package/dist/collection/components/mds-modal/antipattern.md +96 -0
  402. package/dist/collection/components/mds-modal/documentation.json +552 -0
  403. package/dist/collection/components/mds-modal/pattern.md +228 -0
  404. package/dist/collection/components/mds-note/AGENTS.md +68 -0
  405. package/dist/collection/components/mds-note/antipattern.md +99 -0
  406. package/dist/collection/components/mds-note/documentation.json +220 -0
  407. package/dist/collection/components/mds-note/pattern.md +108 -0
  408. package/dist/collection/components/mds-notification/AGENTS.md +67 -0
  409. package/dist/collection/components/mds-notification/antipattern.md +86 -0
  410. package/dist/collection/components/mds-notification/documentation.json +253 -0
  411. package/dist/collection/components/mds-notification/mds-notification.js +11 -8
  412. package/dist/collection/components/mds-notification/pattern.md +98 -0
  413. package/dist/collection/components/mds-paginator/AGENTS.md +57 -0
  414. package/dist/collection/components/mds-paginator/antipattern.md +95 -0
  415. package/dist/collection/components/mds-paginator/documentation.json +135 -0
  416. package/dist/collection/components/mds-paginator/pattern.md +92 -0
  417. package/dist/collection/components/mds-paginator-item/AGENTS.md +74 -0
  418. package/dist/collection/components/mds-paginator-item/antipattern.md +95 -0
  419. package/dist/collection/components/mds-paginator-item/documentation.json +206 -0
  420. package/dist/collection/components/mds-paginator-item/pattern.md +75 -0
  421. package/dist/collection/components/mds-policy-ai/AGENTS.md +58 -0
  422. package/dist/collection/components/mds-policy-ai/antipattern.md +97 -0
  423. package/dist/collection/components/mds-policy-ai/documentation.json +244 -0
  424. package/dist/collection/components/mds-policy-ai/pattern.md +102 -0
  425. package/dist/collection/components/mds-pref/AGENTS.md +50 -0
  426. package/dist/collection/components/mds-pref/antipattern.md +85 -0
  427. package/dist/collection/components/mds-pref/documentation.json +138 -0
  428. package/dist/collection/components/mds-pref/mds-pref.js +7 -2
  429. package/dist/collection/components/mds-pref/pattern.md +93 -0
  430. package/dist/collection/components/mds-pref-animation/AGENTS.md +48 -0
  431. package/dist/collection/components/mds-pref-animation/antipattern.md +67 -0
  432. package/dist/collection/components/mds-pref-animation/documentation.json +154 -0
  433. package/dist/collection/components/mds-pref-animation/mds-pref-animation.js +26 -2
  434. package/dist/collection/components/mds-pref-animation/pattern.md +86 -0
  435. package/dist/collection/components/mds-pref-consumption/AGENTS.md +47 -0
  436. package/dist/collection/components/mds-pref-consumption/antipattern.md +84 -0
  437. package/dist/collection/components/mds-pref-consumption/documentation.json +154 -0
  438. package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +26 -2
  439. package/dist/collection/components/mds-pref-consumption/pattern.md +70 -0
  440. package/dist/collection/components/mds-pref-contrast/AGENTS.md +50 -0
  441. package/dist/collection/components/mds-pref-contrast/antipattern.md +71 -0
  442. package/dist/collection/components/mds-pref-contrast/documentation.json +154 -0
  443. package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +24 -3
  444. package/dist/collection/components/mds-pref-contrast/pattern.md +82 -0
  445. package/dist/collection/components/mds-pref-language/AGENTS.md +56 -0
  446. package/dist/collection/components/mds-pref-language/antipattern.md +130 -0
  447. package/dist/collection/components/mds-pref-language/documentation.json +174 -0
  448. package/dist/collection/components/mds-pref-language/pattern.md +104 -0
  449. package/dist/collection/components/mds-pref-language-item/AGENTS.md +48 -0
  450. package/dist/collection/components/mds-pref-language-item/antipattern.md +99 -0
  451. package/dist/collection/components/mds-pref-language-item/documentation.json +122 -0
  452. package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +3 -2
  453. package/dist/collection/components/mds-pref-language-item/pattern.md +85 -0
  454. package/dist/collection/components/mds-pref-mode/AGENTS.md +53 -0
  455. package/dist/collection/components/mds-pref-mode/antipattern.md +104 -0
  456. package/dist/collection/components/mds-pref-mode/documentation.json +241 -0
  457. package/dist/collection/components/mds-pref-mode/mds-pref-mode.js +27 -4
  458. package/dist/collection/components/mds-pref-mode/pattern.md +94 -0
  459. package/dist/collection/components/mds-pref-theme/AGENTS.md +60 -0
  460. package/dist/collection/components/mds-pref-theme/antipattern.md +104 -0
  461. package/dist/collection/components/mds-pref-theme/documentation.json +277 -0
  462. package/dist/collection/components/mds-pref-theme/pattern.md +97 -0
  463. package/dist/collection/components/mds-pref-theme-item/AGENTS.md +60 -0
  464. package/dist/collection/components/mds-pref-theme-item/antipattern.md +98 -0
  465. package/dist/collection/components/mds-pref-theme-item/documentation.json +228 -0
  466. package/dist/collection/components/mds-pref-theme-item/mds-pref-theme-item.js +3 -2
  467. package/dist/collection/components/mds-pref-theme-item/pattern.md +98 -0
  468. package/dist/collection/components/mds-price-table/AGENTS.md +34 -0
  469. package/dist/collection/components/mds-price-table/antipattern.md +131 -0
  470. package/dist/collection/components/mds-price-table/documentation.json +43 -0
  471. package/dist/collection/components/mds-price-table/pattern.md +182 -0
  472. package/dist/collection/components/mds-price-table-features/AGENTS.md +61 -0
  473. package/dist/collection/components/mds-price-table-features/antipattern.md +152 -0
  474. package/dist/collection/components/mds-price-table-features/documentation.json +96 -0
  475. package/dist/collection/components/mds-price-table-features/pattern.md +157 -0
  476. package/dist/collection/components/mds-price-table-features-cell/AGENTS.md +69 -0
  477. package/dist/collection/components/mds-price-table-features-cell/antipattern.md +105 -0
  478. package/dist/collection/components/mds-price-table-features-cell/documentation.json +154 -0
  479. package/dist/collection/components/mds-price-table-features-cell/pattern.md +128 -0
  480. package/dist/collection/components/mds-price-table-features-row/AGENTS.md +43 -0
  481. package/dist/collection/components/mds-price-table-features-row/antipattern.md +135 -0
  482. package/dist/collection/components/mds-price-table-features-row/documentation.json +64 -0
  483. package/dist/collection/components/mds-price-table-features-row/pattern.md +125 -0
  484. package/dist/collection/components/mds-price-table-header/AGENTS.md +34 -0
  485. package/dist/collection/components/mds-price-table-header/antipattern.md +133 -0
  486. package/dist/collection/components/mds-price-table-header/documentation.json +43 -0
  487. package/dist/collection/components/mds-price-table-header/pattern.md +176 -0
  488. package/dist/collection/components/mds-price-table-list/AGENTS.md +63 -0
  489. package/dist/collection/components/mds-price-table-list/antipattern.md +133 -0
  490. package/dist/collection/components/mds-price-table-list/documentation.json +104 -0
  491. package/dist/collection/components/mds-price-table-list/pattern.md +134 -0
  492. package/dist/collection/components/mds-price-table-list-item/AGENTS.md +61 -0
  493. package/dist/collection/components/mds-price-table-list-item/antipattern.md +90 -0
  494. package/dist/collection/components/mds-price-table-list-item/documentation.json +145 -0
  495. package/dist/collection/components/mds-price-table-list-item/pattern.md +105 -0
  496. package/dist/collection/components/mds-progress/AGENTS.md +68 -0
  497. package/dist/collection/components/mds-progress/antipattern.md +94 -0
  498. package/dist/collection/components/mds-progress/documentation.json +375 -0
  499. package/dist/collection/components/mds-progress/pattern.md +139 -0
  500. package/dist/collection/components/mds-push-notification/AGENTS.md +88 -0
  501. package/dist/collection/components/mds-push-notification/antipattern.md +154 -0
  502. package/dist/collection/components/mds-push-notification/documentation.json +306 -0
  503. package/dist/collection/components/mds-push-notification/pattern.md +203 -0
  504. package/dist/collection/components/mds-push-notification-item/AGENTS.md +91 -0
  505. package/dist/collection/components/mds-push-notification-item/antipattern.md +129 -0
  506. package/dist/collection/components/mds-push-notification-item/documentation.json +586 -0
  507. package/dist/collection/components/mds-push-notification-item/pattern.md +201 -0
  508. package/dist/collection/components/mds-quote/AGENTS.md +51 -0
  509. package/dist/collection/components/mds-quote/antipattern.md +122 -0
  510. package/dist/collection/components/mds-quote/documentation.json +176 -0
  511. package/dist/collection/components/mds-quote/pattern.md +108 -0
  512. package/dist/collection/components/mds-radial-menu/AGENTS.md +87 -0
  513. package/dist/collection/components/mds-radial-menu/antipattern.md +104 -0
  514. package/dist/collection/components/mds-radial-menu/documentation.json +581 -0
  515. package/dist/collection/components/mds-radial-menu/pattern.md +150 -0
  516. package/dist/collection/components/mds-radial-menu-item/AGENTS.md +51 -0
  517. package/dist/collection/components/mds-radial-menu-item/antipattern.md +106 -0
  518. package/dist/collection/components/mds-radial-menu-item/documentation.json +294 -0
  519. package/dist/collection/components/mds-radial-menu-item/pattern.md +98 -0
  520. package/dist/collection/components/mds-radial-progress/AGENTS.md +58 -0
  521. package/dist/collection/components/mds-radial-progress/antipattern.md +99 -0
  522. package/dist/collection/components/mds-radial-progress/documentation.json +232 -0
  523. package/dist/collection/components/mds-radial-progress/pattern.md +132 -0
  524. package/dist/collection/components/mds-separator/AGENTS.md +39 -0
  525. package/dist/collection/components/mds-separator/antipattern.md +98 -0
  526. package/dist/collection/components/mds-separator/documentation.json +45 -0
  527. package/dist/collection/components/mds-separator/pattern.md +82 -0
  528. package/dist/collection/components/mds-spinner/AGENTS.md +49 -0
  529. package/dist/collection/components/mds-spinner/antipattern.md +93 -0
  530. package/dist/collection/components/mds-spinner/documentation.json +86 -0
  531. package/dist/collection/components/mds-spinner/pattern.md +102 -0
  532. package/dist/collection/components/mds-status-bar/AGENTS.md +75 -0
  533. package/dist/collection/components/mds-status-bar/antipattern.md +128 -0
  534. package/dist/collection/components/mds-status-bar/documentation.json +262 -0
  535. package/dist/collection/components/mds-status-bar/pattern.md +123 -0
  536. package/dist/collection/components/mds-stepper-bar/AGENTS.md +74 -0
  537. package/dist/collection/components/mds-stepper-bar/antipattern.md +123 -0
  538. package/dist/collection/components/mds-stepper-bar/documentation.json +208 -0
  539. package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +5 -3
  540. package/dist/collection/components/mds-stepper-bar/pattern.md +182 -0
  541. package/dist/collection/components/mds-stepper-bar-item/AGENTS.md +84 -0
  542. package/dist/collection/components/mds-stepper-bar-item/antipattern.md +115 -0
  543. package/dist/collection/components/mds-stepper-bar-item/documentation.json +453 -0
  544. package/dist/collection/components/mds-stepper-bar-item/pattern.md +203 -0
  545. package/dist/collection/components/mds-tab/AGENTS.md +109 -0
  546. package/dist/collection/components/mds-tab/antipattern.md +164 -0
  547. package/dist/collection/components/mds-tab/documentation.json +495 -0
  548. package/dist/collection/components/mds-tab/pattern.md +201 -0
  549. package/dist/collection/components/mds-tab-bar/AGENTS.md +46 -0
  550. package/dist/collection/components/mds-tab-bar/antipattern.md +105 -0
  551. package/dist/collection/components/mds-tab-bar/documentation.json +71 -0
  552. package/dist/collection/components/mds-tab-bar/pattern.md +87 -0
  553. package/dist/collection/components/mds-tab-bar-item/AGENTS.md +67 -0
  554. package/dist/collection/components/mds-tab-bar-item/antipattern.md +116 -0
  555. package/dist/collection/components/mds-tab-bar-item/documentation.json +210 -0
  556. package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +3 -2
  557. package/dist/collection/components/mds-tab-bar-item/pattern.md +110 -0
  558. package/dist/collection/components/mds-tab-item/AGENTS.md +82 -0
  559. package/dist/collection/components/mds-tab-item/antipattern.md +138 -0
  560. package/dist/collection/components/mds-tab-item/documentation.json +577 -0
  561. package/dist/collection/components/mds-tab-item/pattern.md +155 -0
  562. package/dist/collection/components/mds-table/AGENTS.md +90 -0
  563. package/dist/collection/components/mds-table/antipattern.md +169 -0
  564. package/dist/collection/components/mds-table/documentation.json +304 -0
  565. package/dist/collection/components/mds-table/pattern.md +288 -0
  566. package/dist/collection/components/mds-table-body/AGENTS.md +55 -0
  567. package/dist/collection/components/mds-table-body/antipattern.md +118 -0
  568. package/dist/collection/components/mds-table-body/documentation.json +122 -0
  569. package/dist/collection/components/mds-table-body/pattern.md +154 -0
  570. package/dist/collection/components/mds-table-cell/AGENTS.md +56 -0
  571. package/dist/collection/components/mds-table-cell/antipattern.md +100 -0
  572. package/dist/collection/components/mds-table-cell/documentation.json +104 -0
  573. package/dist/collection/components/mds-table-cell/pattern.md +168 -0
  574. package/dist/collection/components/mds-table-footer/AGENTS.md +33 -0
  575. package/dist/collection/components/mds-table-footer/antipattern.md +114 -0
  576. package/dist/collection/components/mds-table-footer/documentation.json +43 -0
  577. package/dist/collection/components/mds-table-footer/pattern.md +116 -0
  578. package/dist/collection/components/mds-table-header/AGENTS.md +61 -0
  579. package/dist/collection/components/mds-table-header/antipattern.md +157 -0
  580. package/dist/collection/components/mds-table-header/documentation.json +156 -0
  581. package/dist/collection/components/mds-table-header/pattern.md +158 -0
  582. package/dist/collection/components/mds-table-header-cell/AGENTS.md +51 -0
  583. package/dist/collection/components/mds-table-header-cell/antipattern.md +108 -0
  584. package/dist/collection/components/mds-table-header-cell/documentation.json +158 -0
  585. package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +2 -2
  586. package/dist/collection/components/mds-table-header-cell/pattern.md +145 -0
  587. package/dist/collection/components/mds-table-row/AGENTS.md +68 -0
  588. package/dist/collection/components/mds-table-row/antipattern.md +142 -0
  589. package/dist/collection/components/mds-table-row/documentation.json +252 -0
  590. package/dist/collection/components/mds-table-row/pattern.md +157 -0
  591. package/dist/collection/components/mds-text/AGENTS.md +64 -0
  592. package/dist/collection/components/mds-text/antipattern.md +113 -0
  593. package/dist/collection/components/mds-text/documentation.json +746 -0
  594. package/dist/collection/components/mds-text/mds-text.js +2 -1
  595. package/dist/collection/components/mds-text/pattern.md +139 -0
  596. package/dist/collection/components/mds-toast/AGENTS.md +78 -0
  597. package/dist/collection/components/mds-toast/antipattern.md +131 -0
  598. package/dist/collection/components/mds-toast/documentation.json +339 -0
  599. package/dist/collection/components/mds-toast/mds-toast.js +9 -3
  600. package/dist/collection/components/mds-toast/pattern.md +161 -0
  601. package/dist/collection/components/mds-tooltip/AGENTS.md +80 -0
  602. package/dist/collection/components/mds-tooltip/antipattern.md +108 -0
  603. package/dist/collection/components/mds-tooltip/documentation.json +483 -0
  604. package/dist/collection/components/mds-tooltip/mds-tooltip.js +4 -4
  605. package/dist/collection/components/mds-tooltip/pattern.md +128 -0
  606. package/dist/collection/components/mds-tree/AGENTS.md +88 -0
  607. package/dist/collection/components/mds-tree/antipattern.md +153 -0
  608. package/dist/collection/components/mds-tree/documentation.json +472 -0
  609. package/dist/collection/components/mds-tree/pattern.md +198 -0
  610. package/dist/collection/components/mds-tree-item/AGENTS.md +119 -0
  611. package/dist/collection/components/mds-tree-item/antipattern.md +152 -0
  612. package/dist/collection/components/mds-tree-item/documentation.json +646 -0
  613. package/dist/collection/components/mds-tree-item/pattern.md +201 -0
  614. package/dist/collection/components/mds-url-view/AGENTS.md +63 -0
  615. package/dist/collection/components/mds-url-view/antipattern.md +107 -0
  616. package/dist/collection/components/mds-url-view/documentation.json +209 -0
  617. package/dist/collection/components/mds-url-view/pattern.md +106 -0
  618. package/dist/collection/components/mds-usage/AGENTS.md +70 -0
  619. package/dist/collection/components/mds-usage/antipattern.md +87 -0
  620. package/dist/collection/components/mds-usage/documentation.json +156 -0
  621. package/dist/collection/components/mds-usage/pattern.md +117 -0
  622. package/dist/collection/components/mds-video-wall/AGENTS.md +65 -0
  623. package/dist/collection/components/mds-video-wall/antipattern.md +97 -0
  624. package/dist/collection/components/mds-video-wall/documentation.json +316 -0
  625. package/dist/collection/components/mds-video-wall/pattern.md +101 -0
  626. package/dist/collection/components/mds-zero/AGENTS.md +55 -0
  627. package/dist/collection/components/mds-zero/antipattern.md +106 -0
  628. package/dist/collection/components/mds-zero/documentation.json +82 -0
  629. package/dist/collection/components/mds-zero/pattern.md +118 -0
  630. package/dist/collection/dictionary/icon.js +1 -1
  631. package/dist/components/index.js +1 -1
  632. package/dist/components/mds-accordion-item.js +1 -1
  633. package/dist/components/mds-accordion-timer-item.js +1 -1
  634. package/dist/components/mds-accordion-timer.js +1 -1
  635. package/dist/components/mds-accordion.js +1 -1
  636. package/dist/components/mds-author.js +1 -1
  637. package/dist/components/mds-avatar-stack-item.js +1 -1
  638. package/dist/components/mds-avatar-stack.js +1 -1
  639. package/dist/components/mds-avatar.js +1 -1
  640. package/dist/components/mds-badge.js +1 -1
  641. package/dist/components/mds-banner.js +1 -1
  642. package/dist/components/mds-benchmark-bar.js +1 -1
  643. package/dist/components/mds-bibliography.js +1 -1
  644. package/dist/components/mds-breadcrumb-item.js +1 -1
  645. package/dist/components/mds-breadcrumb.js +1 -1
  646. package/dist/components/mds-button-dropdown.js +1 -1
  647. package/dist/components/mds-button-group.js +1 -1
  648. package/dist/components/mds-button.js +1 -1
  649. package/dist/components/mds-calendar-cell.js +1 -1
  650. package/dist/components/mds-calendar.js +1 -1
  651. package/dist/components/mds-card-content.js +1 -1
  652. package/dist/components/mds-card-footer.js +1 -1
  653. package/dist/components/mds-card-header.js +1 -1
  654. package/dist/components/mds-card-media.js +1 -1
  655. package/dist/components/mds-card.js +1 -1
  656. package/dist/components/mds-chip.js +1 -1
  657. package/dist/components/mds-details.js +1 -1
  658. package/dist/components/mds-dropdown.js +1 -1
  659. package/dist/components/mds-emoji.js +3 -3
  660. package/dist/components/mds-entity.js +1 -1
  661. package/dist/components/mds-file-preview.js +1 -1
  662. package/dist/components/mds-file.js +3 -3
  663. package/dist/components/mds-filter-item.js +1 -1
  664. package/dist/components/mds-filter.js +1 -1
  665. package/dist/components/mds-header-bar.js +1 -1
  666. package/dist/components/mds-header.js +1 -1
  667. package/dist/components/mds-help.js +1 -1
  668. package/dist/components/mds-horizontal-scroll.js +1 -1
  669. package/dist/components/mds-hr.js +1 -1
  670. package/dist/components/mds-icon.js +1 -1
  671. package/dist/components/mds-img.js +1 -1
  672. package/dist/components/mds-input-date-range-preselection.js +1 -1
  673. package/dist/components/mds-input-date-range.js +1 -1
  674. package/dist/components/mds-input-date.js +1 -1
  675. package/dist/components/mds-input-field.js +1 -1
  676. package/dist/components/mds-input-otp.js +1 -1
  677. package/dist/components/mds-input-range.js +1 -1
  678. package/dist/components/mds-input-select.js +1 -1
  679. package/dist/components/mds-input-switch.js +1 -1
  680. package/dist/components/mds-input-tip-item.js +1 -1
  681. package/dist/components/mds-input-tip.js +1 -1
  682. package/dist/components/mds-input-upload.js +1 -1
  683. package/dist/components/mds-input.js +1 -1
  684. package/dist/components/mds-keyboard-key.js +1 -1
  685. package/dist/components/mds-keyboard.js +1 -1
  686. package/dist/components/mds-kpi-item.js +1 -1
  687. package/dist/components/mds-kpi.js +1 -1
  688. package/dist/components/mds-label.js +1 -1
  689. package/dist/components/mds-list-item.js +1 -1
  690. package/dist/components/mds-list.js +1 -1
  691. package/dist/components/mds-mention.js +1 -1
  692. package/dist/components/mds-modal.js +1 -1
  693. package/dist/components/mds-note.js +1 -1
  694. package/dist/components/mds-notification.js +1 -1
  695. package/dist/components/mds-paginator-item.js +1 -1
  696. package/dist/components/mds-paginator.js +1 -1
  697. package/dist/components/mds-policy-ai.js +1 -1
  698. package/dist/components/mds-pref-animation.js +1 -1
  699. package/dist/components/mds-pref-consumption.js +1 -1
  700. package/dist/components/mds-pref-contrast.js +1 -1
  701. package/dist/components/mds-pref-language-item.js +1 -1
  702. package/dist/components/mds-pref-language.js +1 -1
  703. package/dist/components/mds-pref-mode.js +1 -1
  704. package/dist/components/mds-pref-theme-item.js +1 -1
  705. package/dist/components/mds-pref-theme.js +1 -1
  706. package/dist/components/mds-pref.js +1 -1
  707. package/dist/components/mds-price-table-features-cell.js +1 -1
  708. package/dist/components/mds-price-table-features-row.js +1 -1
  709. package/dist/components/mds-price-table-features.js +1 -1
  710. package/dist/components/mds-price-table-header.js +1 -1
  711. package/dist/components/mds-price-table-list-item.js +1 -1
  712. package/dist/components/mds-price-table-list.js +1 -1
  713. package/dist/components/mds-price-table.js +1 -1
  714. package/dist/components/mds-progress.js +1 -1
  715. package/dist/components/mds-push-notification-item.js +1 -1
  716. package/dist/components/mds-push-notification.js +1 -1
  717. package/dist/components/mds-quote.js +1 -1
  718. package/dist/components/mds-radial-menu-item.js +1 -1
  719. package/dist/components/mds-radial-menu.js +1 -1
  720. package/dist/components/mds-radial-progress.js +1 -1
  721. package/dist/components/mds-separator.js +1 -1
  722. package/dist/components/mds-spinner.js +1 -1
  723. package/dist/components/mds-status-bar.js +1 -1
  724. package/dist/components/mds-stepper-bar-item.js +1 -1
  725. package/dist/components/mds-stepper-bar.js +1 -1
  726. package/dist/components/mds-tab-bar-item.js +1 -1
  727. package/dist/components/mds-tab-bar.js +1 -1
  728. package/dist/components/mds-tab-item.js +1 -1
  729. package/dist/components/mds-tab.js +1 -1
  730. package/dist/components/mds-table-body.js +1 -1
  731. package/dist/components/mds-table-cell.js +1 -1
  732. package/dist/components/mds-table-footer.js +1 -1
  733. package/dist/components/mds-table-header-cell.js +1 -1
  734. package/dist/components/mds-table-header.js +1 -1
  735. package/dist/components/mds-table-row.js +1 -1
  736. package/dist/components/mds-table.js +1 -1
  737. package/dist/components/mds-text.js +1 -1
  738. package/dist/components/mds-toast.js +1 -1
  739. package/dist/components/mds-tooltip.js +1 -1
  740. package/dist/components/mds-tree-item.js +1 -1
  741. package/dist/components/mds-tree.js +1 -1
  742. package/dist/components/mds-url-view.js +1 -1
  743. package/dist/components/mds-usage.js +1 -1
  744. package/dist/components/mds-video-wall.js +1 -1
  745. package/dist/components/mds-zero.js +1 -1
  746. package/dist/components/p--miH951G.js +5 -0
  747. package/dist/components/p-1aH7xiMs.js +1 -0
  748. package/dist/components/p-B05zwjTY.js +1 -0
  749. package/dist/components/p-BOu_NOgd.js +1 -0
  750. package/dist/components/p-BTpjOy0A.js +1 -0
  751. package/dist/components/p-BVw5aqzn.js +1 -0
  752. package/dist/components/p-BW24ByN-.js +1 -0
  753. package/dist/components/p-BWpSxp3h.js +1 -0
  754. package/dist/components/p-BXPIlPIF.js +1 -0
  755. package/dist/components/p-BzvYQBdf.js +1 -0
  756. package/dist/components/p-C3Sn8bRc.js +1 -0
  757. package/dist/components/p-CGkSDkOY.js +1 -0
  758. package/dist/components/p-CIcshx6K.js +1 -0
  759. package/dist/components/p-CKS4r32k.js +1 -0
  760. package/dist/components/p-COkF_8bh.js +1 -0
  761. package/dist/components/p-CmHMhHMt.js +1 -0
  762. package/dist/components/p-Cnt6G6GK.js +1 -0
  763. package/dist/components/p-CsL9U6eU.js +1 -0
  764. package/dist/components/p-Cyj1BFxx.js +1 -0
  765. package/dist/components/p-DQqUzCGR.js +1 -0
  766. package/dist/components/p-DR46G4-6.js +1 -0
  767. package/dist/components/p-DcW0iRnZ.js +1 -0
  768. package/dist/components/p-DebgFlHq.js +1 -0
  769. package/dist/components/p-DmPLOktp.js +1 -0
  770. package/dist/components/p-Dpf8NWF9.js +1 -0
  771. package/dist/components/p-DwA-5c8G.js +1 -0
  772. package/dist/components/p-Dws02cT2.js +8 -0
  773. package/dist/components/p-K3QNYRhf.js +1 -0
  774. package/dist/components/p-PQ_EO5-U.js +1 -0
  775. package/dist/components/p-akEzGmDD.js +1 -0
  776. package/dist/components/p-bDVBqkn0.js +1 -0
  777. package/dist/components/p-faViX-qz.js +1 -0
  778. package/dist/components/p-pBvN1uAc.js +3 -0
  779. package/dist/components/p-wI0alRSO.js +1 -0
  780. package/dist/components/p-x_c_51aL.js +1 -0
  781. package/dist/components/p-zHpei4x6.js +1 -0
  782. package/dist/documentation.json +618 -360
  783. package/dist/esm/floating-controller-BTYkH_Ih.js +366 -0
  784. package/dist/esm/form-wI0alRSO.js +42 -0
  785. package/dist/esm/index-BhCZiGfL.js +196 -0
  786. package/dist/esm/index-BxPbQB28.js +5149 -0
  787. package/dist/esm/index.js +65 -23
  788. package/dist/esm/loader.js +3 -3
  789. package/dist/esm/locale-CVJm6KFD.js +814 -0
  790. package/dist/esm/magma-components.js +3 -3
  791. package/dist/esm/mds-accordion-item.entry.js +2 -2
  792. package/dist/esm/mds-accordion-timer-item.entry.js +2 -2
  793. package/dist/esm/mds-accordion-timer.entry.js +1 -1
  794. package/dist/esm/mds-accordion.entry.js +2 -2
  795. package/dist/esm/mds-author.entry.js +1 -1
  796. package/dist/esm/mds-avatar-stack-item.entry.js +1 -1
  797. package/dist/esm/mds-avatar-stack.entry.js +1 -1
  798. package/dist/esm/mds-avatar.entry.js +29 -34
  799. package/dist/esm/mds-badge.entry.js +5 -4
  800. package/dist/esm/mds-banner_3.entry.js +3 -3
  801. package/dist/esm/mds-benchmark-bar.entry.js +4 -3
  802. package/dist/esm/mds-bibliography.entry.js +5 -4
  803. package/dist/esm/mds-breadcrumb-item.entry.js +1 -1
  804. package/dist/esm/mds-breadcrumb.entry.js +3 -3
  805. package/dist/esm/mds-button-dropdown.entry.js +38 -4
  806. package/dist/esm/mds-button-group.entry.js +1 -1
  807. package/dist/esm/mds-button_3.entry.js +42 -15
  808. package/dist/esm/mds-calendar_2.entry.js +2 -2
  809. package/dist/esm/mds-card-content.entry.js +1 -1
  810. package/dist/esm/mds-card-footer.entry.js +1 -1
  811. package/dist/esm/mds-card-header.entry.js +1 -1
  812. package/dist/esm/mds-card-media.entry.js +1 -1
  813. package/dist/esm/mds-card.entry.js +2 -2
  814. package/dist/esm/mds-details.entry.js +2 -2
  815. package/dist/esm/mds-dropdown.entry.js +7 -6
  816. package/dist/esm/mds-emoji.entry.js +2 -2
  817. package/dist/esm/mds-entity.entry.js +3 -3
  818. package/dist/esm/mds-file-preview.entry.js +20 -20
  819. package/dist/esm/mds-file.entry.js +3 -3
  820. package/dist/esm/mds-filter-item.entry.js +2 -2
  821. package/dist/esm/mds-filter.entry.js +2 -2
  822. package/dist/esm/mds-header-bar.entry.js +2 -2
  823. package/dist/esm/mds-header.entry.js +19 -10
  824. package/dist/esm/mds-horizontal-scroll.entry.js +1 -1
  825. package/dist/esm/mds-hr.entry.js +2 -2
  826. package/dist/esm/mds-img.entry.js +6 -6
  827. package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
  828. package/dist/esm/mds-input-date-range.entry.js +95 -13
  829. package/dist/esm/mds-input-date.entry.js +124 -27
  830. package/dist/esm/mds-input-field.entry.js +1 -1
  831. package/dist/esm/mds-input-otp.entry.js +65 -19
  832. package/dist/esm/mds-input-range.entry.js +32 -16
  833. package/dist/esm/mds-input-select.entry.js +166 -35
  834. package/dist/esm/mds-input-switch_2.entry.js +63 -21
  835. package/dist/esm/mds-input-tip_2.entry.js +3 -3
  836. package/dist/esm/mds-input-upload.entry.js +141 -68
  837. package/dist/esm/mds-input.entry.js +320 -36
  838. package/dist/esm/mds-keyboard-key.entry.js +11 -8
  839. package/dist/esm/mds-keyboard.entry.js +9 -6
  840. package/dist/esm/mds-kpi-item.entry.js +2 -2
  841. package/dist/esm/mds-kpi.entry.js +1 -1
  842. package/dist/esm/mds-label.entry.js +3 -3
  843. package/dist/esm/mds-list-item.entry.js +2 -2
  844. package/dist/esm/mds-list.entry.js +1 -1
  845. package/dist/esm/mds-mention.entry.js +6 -5
  846. package/dist/esm/mds-modal.entry.js +2 -2
  847. package/dist/esm/mds-note.entry.js +3 -3
  848. package/dist/esm/mds-notification.entry.js +13 -10
  849. package/dist/esm/mds-paginator-item.entry.js +2 -2
  850. package/dist/esm/mds-paginator.entry.js +2 -2
  851. package/dist/esm/mds-policy-ai.entry.js +3 -3
  852. package/dist/esm/mds-pref-animation.entry.js +29 -5
  853. package/dist/esm/mds-pref-consumption.entry.js +29 -5
  854. package/dist/esm/mds-pref-contrast.entry.js +27 -6
  855. package/dist/esm/mds-pref-language-item.entry.js +6 -5
  856. package/dist/esm/mds-pref-language.entry.js +3 -3
  857. package/dist/esm/mds-pref-mode.entry.js +30 -7
  858. package/dist/esm/mds-pref-theme-item.entry.js +4 -3
  859. package/dist/esm/mds-pref-theme.entry.js +3 -3
  860. package/dist/esm/mds-pref.entry.js +10 -5
  861. package/dist/esm/mds-price-table-features-cell.entry.js +2 -2
  862. package/dist/esm/mds-price-table-features-row.entry.js +2 -2
  863. package/dist/esm/mds-price-table-features.entry.js +2 -2
  864. package/dist/esm/mds-price-table-header.entry.js +1 -1
  865. package/dist/esm/mds-price-table-list-item.entry.js +1 -1
  866. package/dist/esm/mds-price-table-list.entry.js +2 -2
  867. package/dist/esm/mds-price-table.entry.js +1 -1
  868. package/dist/esm/mds-progress_2.entry.js +2 -2
  869. package/dist/esm/mds-push-notification-item.entry.js +4 -4
  870. package/dist/esm/mds-push-notification.entry.js +2 -2
  871. package/dist/esm/mds-quote.entry.js +2 -2
  872. package/dist/esm/mds-radial-menu-item.entry.js +1 -1
  873. package/dist/esm/mds-radial-menu.entry.js +2 -2
  874. package/dist/esm/mds-separator.entry.js +2 -2
  875. package/dist/esm/mds-status-bar.entry.js +2 -2
  876. package/dist/esm/mds-stepper-bar-item.entry.js +3 -3
  877. package/dist/esm/mds-stepper-bar.entry.js +6 -4
  878. package/dist/esm/mds-tab-bar-item.entry.js +5 -4
  879. package/dist/esm/mds-tab-bar.entry.js +2 -2
  880. package/dist/esm/mds-tab_2.entry.js +2 -2
  881. package/dist/esm/mds-table-body.entry.js +2 -2
  882. package/dist/esm/mds-table-footer.entry.js +2 -2
  883. package/dist/esm/mds-table-header-cell.entry.js +4 -4
  884. package/dist/esm/mds-table-header.entry.js +3 -3
  885. package/dist/esm/mds-table-row.entry.js +3 -3
  886. package/dist/esm/mds-table.entry.js +3 -3
  887. package/dist/esm/mds-text.entry.js +4 -3
  888. package/dist/esm/mds-toast.entry.js +11 -5
  889. package/dist/esm/mds-tooltip.entry.js +7 -7
  890. package/dist/esm/mds-tree-item.entry.js +3 -3
  891. package/dist/esm/mds-tree.entry.js +1 -1
  892. package/dist/esm/mds-url-view.entry.js +3 -3
  893. package/dist/esm/mds-usage.entry.js +3 -3
  894. package/dist/esm/mds-video-wall.entry.js +1 -1
  895. package/dist/esm/mds-zero.entry.js +2 -2
  896. package/dist/esm/preference-DNNqH7BU.js +385 -0
  897. package/dist/esm-es5/floating-controller-BTYkH_Ih.js +66 -0
  898. package/dist/esm-es5/form-wI0alRSO.js +16 -0
  899. package/dist/esm-es5/index-BhCZiGfL.js +10 -0
  900. package/dist/esm-es5/index-BxPbQB28.js +371 -0
  901. package/dist/esm-es5/index.js +37 -26
  902. package/dist/esm-es5/loader.js +1 -1
  903. package/dist/esm-es5/locale-CVJm6KFD.js +230 -0
  904. package/dist/esm-es5/magma-components.js +2 -2
  905. package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
  906. package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
  907. package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
  908. package/dist/esm-es5/mds-accordion.entry.js +1 -1
  909. package/dist/esm-es5/mds-author.entry.js +1 -1
  910. package/dist/esm-es5/mds-avatar-stack-item.entry.js +1 -1
  911. package/dist/esm-es5/mds-avatar-stack.entry.js +1 -1
  912. package/dist/esm-es5/mds-avatar.entry.js +5 -3
  913. package/dist/esm-es5/mds-badge.entry.js +3 -4
  914. package/dist/esm-es5/mds-banner_3.entry.js +1 -1
  915. package/dist/esm-es5/mds-benchmark-bar.entry.js +3 -4
  916. package/dist/esm-es5/mds-bibliography.entry.js +2 -2
  917. package/dist/esm-es5/mds-breadcrumb-item.entry.js +1 -1
  918. package/dist/esm-es5/mds-breadcrumb.entry.js +2 -2
  919. package/dist/esm-es5/mds-button-dropdown.entry.js +10 -4
  920. package/dist/esm-es5/mds-button-group.entry.js +1 -1
  921. package/dist/esm-es5/mds-button_3.entry.js +14 -9
  922. package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
  923. package/dist/esm-es5/mds-card-content.entry.js +1 -1
  924. package/dist/esm-es5/mds-card-footer.entry.js +1 -1
  925. package/dist/esm-es5/mds-card-header.entry.js +1 -1
  926. package/dist/esm-es5/mds-card-media.entry.js +1 -1
  927. package/dist/esm-es5/mds-card.entry.js +1 -1
  928. package/dist/esm-es5/mds-details.entry.js +1 -1
  929. package/dist/esm-es5/mds-dropdown.entry.js +3 -3
  930. package/dist/esm-es5/mds-emoji.entry.js +1 -1
  931. package/dist/esm-es5/mds-entity.entry.js +1 -1
  932. package/dist/esm-es5/mds-file-preview.entry.js +16 -14
  933. package/dist/esm-es5/mds-file.entry.js +11 -11
  934. package/dist/esm-es5/mds-filter-item.entry.js +1 -1
  935. package/dist/esm-es5/mds-filter.entry.js +1 -1
  936. package/dist/esm-es5/mds-header-bar.entry.js +1 -1
  937. package/dist/esm-es5/mds-header.entry.js +8 -6
  938. package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
  939. package/dist/esm-es5/mds-hr.entry.js +1 -1
  940. package/dist/esm-es5/mds-img.entry.js +2 -2
  941. package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
  942. package/dist/esm-es5/mds-input-date-range.entry.js +35 -6
  943. package/dist/esm-es5/mds-input-date.entry.js +47 -7
  944. package/dist/esm-es5/mds-input-field.entry.js +1 -1
  945. package/dist/esm-es5/mds-input-otp.entry.js +21 -4
  946. package/dist/esm-es5/mds-input-range.entry.js +15 -7
  947. package/dist/esm-es5/mds-input-select.entry.js +39 -6
  948. package/dist/esm-es5/mds-input-switch_2.entry.js +24 -4
  949. package/dist/esm-es5/mds-input-tip_2.entry.js +1 -1
  950. package/dist/esm-es5/mds-input-upload.entry.js +43 -17
  951. package/dist/esm-es5/mds-input.entry.js +105 -22
  952. package/dist/esm-es5/mds-keyboard-key.entry.js +3 -1
  953. package/dist/esm-es5/mds-keyboard.entry.js +4 -2
  954. package/dist/esm-es5/mds-kpi-item.entry.js +1 -1
  955. package/dist/esm-es5/mds-kpi.entry.js +1 -1
  956. package/dist/esm-es5/mds-label.entry.js +1 -1
  957. package/dist/esm-es5/mds-list-item.entry.js +1 -1
  958. package/dist/esm-es5/mds-list.entry.js +1 -1
  959. package/dist/esm-es5/mds-mention.entry.js +2 -2
  960. package/dist/esm-es5/mds-modal.entry.js +1 -1
  961. package/dist/esm-es5/mds-note.entry.js +1 -1
  962. package/dist/esm-es5/mds-notification.entry.js +5 -3
  963. package/dist/esm-es5/mds-paginator-item.entry.js +1 -1
  964. package/dist/esm-es5/mds-paginator.entry.js +1 -1
  965. package/dist/esm-es5/mds-policy-ai.entry.js +1 -1
  966. package/dist/esm-es5/mds-pref-animation.entry.js +7 -1
  967. package/dist/esm-es5/mds-pref-consumption.entry.js +7 -1
  968. package/dist/esm-es5/mds-pref-contrast.entry.js +8 -2
  969. package/dist/esm-es5/mds-pref-language-item.entry.js +3 -3
  970. package/dist/esm-es5/mds-pref-language.entry.js +1 -1
  971. package/dist/esm-es5/mds-pref-mode.entry.js +10 -2
  972. package/dist/esm-es5/mds-pref-theme-item.entry.js +3 -3
  973. package/dist/esm-es5/mds-pref-theme.entry.js +1 -1
  974. package/dist/esm-es5/mds-pref.entry.js +6 -3
  975. package/dist/esm-es5/mds-price-table-features-cell.entry.js +1 -1
  976. package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
  977. package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
  978. package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
  979. package/dist/esm-es5/mds-price-table-list-item.entry.js +1 -1
  980. package/dist/esm-es5/mds-price-table-list.entry.js +1 -1
  981. package/dist/esm-es5/mds-price-table.entry.js +1 -1
  982. package/dist/esm-es5/mds-progress_2.entry.js +1 -1
  983. package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
  984. package/dist/esm-es5/mds-push-notification.entry.js +1 -1
  985. package/dist/esm-es5/mds-quote.entry.js +1 -1
  986. package/dist/esm-es5/mds-radial-menu-item.entry.js +1 -1
  987. package/dist/esm-es5/mds-radial-menu.entry.js +1 -1
  988. package/dist/esm-es5/mds-separator.entry.js +1 -1
  989. package/dist/esm-es5/mds-status-bar.entry.js +1 -1
  990. package/dist/esm-es5/mds-stepper-bar-item.entry.js +1 -1
  991. package/dist/esm-es5/mds-stepper-bar.entry.js +4 -4
  992. package/dist/esm-es5/mds-tab-bar-item.entry.js +3 -4
  993. package/dist/esm-es5/mds-tab-bar.entry.js +1 -1
  994. package/dist/esm-es5/mds-tab_2.entry.js +1 -1
  995. package/dist/esm-es5/mds-table-body.entry.js +1 -1
  996. package/dist/esm-es5/mds-table-footer.entry.js +1 -1
  997. package/dist/esm-es5/mds-table-header-cell.entry.js +2 -2
  998. package/dist/esm-es5/mds-table-header.entry.js +1 -1
  999. package/dist/esm-es5/mds-table-row.entry.js +1 -1
  1000. package/dist/esm-es5/mds-table.entry.js +1 -1
  1001. package/dist/esm-es5/mds-text.entry.js +2 -2
  1002. package/dist/esm-es5/mds-toast.entry.js +5 -3
  1003. package/dist/esm-es5/mds-tooltip.entry.js +3 -3
  1004. package/dist/esm-es5/mds-tree-item.entry.js +1 -1
  1005. package/dist/esm-es5/mds-tree.entry.js +1 -1
  1006. package/dist/esm-es5/mds-url-view.entry.js +1 -1
  1007. package/dist/esm-es5/mds-usage.entry.js +1 -1
  1008. package/dist/esm-es5/mds-video-wall.entry.js +1 -1
  1009. package/dist/esm-es5/mds-zero.entry.js +1 -1
  1010. package/dist/esm-es5/preference-DNNqH7BU.js +58 -0
  1011. package/dist/hydrate/index.js +1687 -459
  1012. package/dist/hydrate/index.mjs +1687 -459
  1013. package/dist/magma-components/index.esm.js +1 -1
  1014. package/dist/magma-components/magma-components.esm.js +1 -1
  1015. package/dist/magma-components/magma-components.js +1 -1
  1016. package/dist/magma-components/p-00e47e49.system.entry.js +14 -0
  1017. package/dist/magma-components/p-0141c597.system.entry.js +15 -0
  1018. package/dist/magma-components/p-021f96f8.entry.js +1 -0
  1019. package/dist/magma-components/p-0255924b.system.entry.js +22 -0
  1020. package/dist/magma-components/p-03c2060d.entry.js +1 -0
  1021. package/dist/magma-components/p-05014374.entry.js +1 -0
  1022. package/dist/magma-components/p-05f73994.entry.js +1 -0
  1023. package/dist/magma-components/p-0646392d.entry.js +1 -0
  1024. package/dist/magma-components/p-0a38e4ce.system.entry.js +1 -0
  1025. package/dist/magma-components/p-0a551e86.entry.js +1 -0
  1026. package/dist/magma-components/p-0a904a12.entry.js +1 -0
  1027. package/dist/magma-components/p-0a9fb138.system.entry.js +1 -0
  1028. package/dist/magma-components/p-106f39c6.entry.js +1 -0
  1029. package/dist/magma-components/p-10ad73e3.system.entry.js +19 -0
  1030. package/dist/magma-components/p-1150ffb8.system.entry.js +10 -0
  1031. package/dist/magma-components/p-12c5ae26.entry.js +1 -0
  1032. package/dist/magma-components/p-13a1d35f.entry.js +1 -0
  1033. package/dist/magma-components/p-15d4846d.entry.js +1 -0
  1034. package/dist/magma-components/p-1673225e.system.entry.js +8 -0
  1035. package/dist/magma-components/p-188f4b1d.system.entry.js +7 -0
  1036. package/dist/magma-components/p-18c8628c.entry.js +1 -0
  1037. package/dist/magma-components/p-1be45c75.entry.js +1 -0
  1038. package/dist/magma-components/p-1cb495d3.entry.js +1 -0
  1039. package/dist/magma-components/p-1e3d89cd.system.entry.js +1 -0
  1040. package/dist/magma-components/p-1e700f0a.entry.js +1 -0
  1041. package/dist/magma-components/p-20e4f7dd.system.entry.js +15 -0
  1042. package/dist/magma-components/p-21865dd2.entry.js +1 -0
  1043. package/dist/magma-components/p-218d8254.system.entry.js +1 -0
  1044. package/dist/magma-components/p-21c46e74.system.entry.js +4 -0
  1045. package/dist/magma-components/p-231b604f.system.entry.js +1 -0
  1046. package/dist/magma-components/p-2507f5cf.entry.js +1 -0
  1047. package/dist/magma-components/p-2723caa7.system.entry.js +13 -0
  1048. package/dist/magma-components/p-277444bc.entry.js +1 -0
  1049. package/dist/magma-components/p-283b0548.system.entry.js +102 -0
  1050. package/dist/magma-components/p-2c44c961.system.entry.js +10 -0
  1051. package/dist/magma-components/p-2ec0db8e.entry.js +1 -0
  1052. package/dist/magma-components/p-2f520704.entry.js +1 -0
  1053. package/dist/magma-components/p-30c3872d.entry.js +1 -0
  1054. package/dist/magma-components/p-314abfba.entry.js +1 -0
  1055. package/dist/magma-components/p-322a5452.entry.js +1 -0
  1056. package/dist/magma-components/p-3231a6a3.entry.js +1 -0
  1057. package/dist/magma-components/p-34401d35.entry.js +1 -0
  1058. package/dist/magma-components/p-35aa29c5.entry.js +1 -0
  1059. package/dist/magma-components/p-35ee2d77.entry.js +1 -0
  1060. package/dist/magma-components/p-36a67b51.entry.js +1 -0
  1061. package/dist/magma-components/p-3a1339bb.system.entry.js +4 -0
  1062. package/dist/magma-components/p-3d56e3f4.entry.js +1 -0
  1063. package/dist/magma-components/p-3e0eed90.system.entry.js +12 -0
  1064. package/dist/magma-components/p-3ecade3c.system.entry.js +11 -0
  1065. package/dist/magma-components/p-3eefca33.system.entry.js +16 -0
  1066. package/dist/magma-components/p-4211ce6c.system.entry.js +1 -0
  1067. package/dist/magma-components/p-436f9b27.system.entry.js +38 -0
  1068. package/dist/magma-components/p-439c9ce3.system.entry.js +10 -0
  1069. package/dist/magma-components/p-44e2a945.system.entry.js +1 -0
  1070. package/dist/magma-components/p-4658154f.entry.js +1 -0
  1071. package/dist/magma-components/p-474047fa.system.entry.js +10 -0
  1072. package/dist/magma-components/p-474c5d53.system.entry.js +11 -0
  1073. package/dist/magma-components/p-493fb2f4.system.entry.js +7 -0
  1074. package/dist/magma-components/p-4ac94b84.system.entry.js +32 -0
  1075. package/dist/magma-components/p-4c73f14b.system.entry.js +14 -0
  1076. package/dist/magma-components/p-4cb88b06.system.entry.js +1 -0
  1077. package/dist/magma-components/p-4dd6a39b.entry.js +1 -0
  1078. package/dist/magma-components/p-4e7f21ac.entry.js +1 -0
  1079. package/dist/magma-components/p-4f14a166.entry.js +1 -0
  1080. package/dist/magma-components/p-50ea11c9.system.entry.js +32 -0
  1081. package/dist/magma-components/p-514d0fcb.entry.js +1 -0
  1082. package/dist/magma-components/p-52793bdb.system.entry.js +1 -0
  1083. package/dist/magma-components/p-5299f709.system.entry.js +26 -0
  1084. package/dist/magma-components/p-57762bae.entry.js +1 -0
  1085. package/dist/magma-components/p-577db922.entry.js +1 -0
  1086. package/dist/magma-components/p-58b82b40.system.entry.js +10 -0
  1087. package/dist/magma-components/p-5a7267e8.system.entry.js +4 -0
  1088. package/dist/magma-components/p-5a911e7b.system.entry.js +13 -0
  1089. package/dist/magma-components/p-5ac9e2f4.entry.js +1 -0
  1090. package/dist/magma-components/p-5c94e0c2.system.entry.js +7 -0
  1091. package/dist/magma-components/p-5ccf493c.system.entry.js +7 -0
  1092. package/dist/magma-components/p-5d119459.entry.js +1 -0
  1093. package/dist/magma-components/p-5f1132b8.entry.js +1 -0
  1094. package/dist/magma-components/p-5fd04ce1.entry.js +1 -0
  1095. package/dist/magma-components/p-60f67c37.entry.js +1 -0
  1096. package/dist/magma-components/p-61bedbe7.system.entry.js +68 -0
  1097. package/dist/magma-components/p-632bc44c.entry.js +1 -0
  1098. package/dist/magma-components/p-64f78149.system.entry.js +1 -0
  1099. package/dist/magma-components/p-69c21eae.entry.js +1 -0
  1100. package/dist/magma-components/p-6a6326c6.entry.js +1 -0
  1101. package/dist/magma-components/p-6c18c40e.system.entry.js +89 -0
  1102. package/dist/magma-components/p-6c800411.entry.js +1 -0
  1103. package/dist/magma-components/p-6e03b83a.entry.js +1 -0
  1104. package/dist/magma-components/p-6ed05d99.entry.js +1 -0
  1105. package/dist/magma-components/p-6f74cdf5.system.entry.js +12 -0
  1106. package/dist/magma-components/p-6fdb3fe7.system.entry.js +27 -0
  1107. package/dist/magma-components/p-6ff8be3e.system.entry.js +30 -0
  1108. package/dist/magma-components/p-7-TP6wnI.js +1 -0
  1109. package/dist/magma-components/p-73fde271.system.entry.js +72 -0
  1110. package/dist/magma-components/p-74b51db8.entry.js +1 -0
  1111. package/dist/magma-components/p-76ecad2f.entry.js +18 -0
  1112. package/dist/magma-components/p-774ce1d2.entry.js +1 -0
  1113. package/dist/magma-components/p-77615947.system.entry.js +1 -0
  1114. package/dist/magma-components/p-7770b989.system.entry.js +1 -0
  1115. package/dist/magma-components/p-7787ebaf.system.entry.js +1 -0
  1116. package/dist/magma-components/p-789c1b93.system.entry.js +1 -0
  1117. package/dist/magma-components/p-7927010f.system.entry.js +25 -0
  1118. package/dist/magma-components/p-79421ee1.system.entry.js +11 -0
  1119. package/dist/magma-components/p-7ab15184.entry.js +1 -0
  1120. package/dist/magma-components/p-7afec7ee.entry.js +1 -0
  1121. package/dist/magma-components/p-7e085c82.entry.js +1 -0
  1122. package/dist/magma-components/p-7e7cf986.system.entry.js +7 -0
  1123. package/dist/magma-components/p-7ffda4f5.entry.js +1 -0
  1124. package/dist/magma-components/p-809adece.system.entry.js +17 -0
  1125. package/dist/magma-components/p-8183b7ed.entry.js +1 -0
  1126. package/dist/magma-components/p-832883c4.entry.js +1 -0
  1127. package/dist/magma-components/p-83394280.system.entry.js +32 -0
  1128. package/dist/magma-components/p-835fc007.entry.js +1 -0
  1129. package/dist/magma-components/p-837fbbf7.system.entry.js +1 -0
  1130. package/dist/magma-components/p-84645c60.system.entry.js +1 -0
  1131. package/dist/magma-components/p-86f4b6eb.system.entry.js +20 -0
  1132. package/dist/magma-components/p-87026d34.entry.js +1 -0
  1133. package/dist/magma-components/p-87faaa8e.system.entry.js +16 -0
  1134. package/dist/magma-components/p-88287207.system.entry.js +13 -0
  1135. package/dist/magma-components/p-883c223a.system.entry.js +4 -0
  1136. package/dist/magma-components/p-88f99a4f.system.entry.js +81 -0
  1137. package/dist/magma-components/p-8a3d2259.system.entry.js +17 -0
  1138. package/dist/magma-components/p-8aafbfdf.system.entry.js +49 -0
  1139. package/dist/magma-components/p-8afc9bc4.system.entry.js +2838 -0
  1140. package/dist/magma-components/p-8ca1d30d.system.entry.js +1 -0
  1141. package/dist/magma-components/p-8ccd187a.entry.js +1 -0
  1142. package/dist/magma-components/p-8d53bd61.system.entry.js +4 -0
  1143. package/dist/magma-components/p-8yWTOQiz.js +1 -0
  1144. package/dist/magma-components/p-90993b0b.system.entry.js +68 -0
  1145. package/dist/magma-components/p-915c5f06.system.entry.js +47 -0
  1146. package/dist/magma-components/p-91c4015f.system.entry.js +4 -0
  1147. package/dist/magma-components/p-91ff1560.system.entry.js +7 -0
  1148. package/dist/magma-components/p-92d9b537.entry.js +1 -0
  1149. package/dist/magma-components/p-932620b6.entry.js +1 -0
  1150. package/dist/magma-components/p-9344a234.entry.js +1 -0
  1151. package/dist/magma-components/p-93d39066.entry.js +1 -0
  1152. package/dist/magma-components/p-97f6166e.system.entry.js +28 -0
  1153. package/dist/magma-components/p-9d1cdb42.system.entry.js +15 -0
  1154. package/dist/magma-components/p-9dcfc247.entry.js +1 -0
  1155. package/dist/magma-components/p-9eb1e154.system.entry.js +14 -0
  1156. package/dist/magma-components/p-9fe14430.system.entry.js +7 -0
  1157. package/dist/magma-components/p-BPNsbMrg.system.js +67 -0
  1158. package/dist/magma-components/p-BS7eEvwu.system.js +17 -0
  1159. package/dist/magma-components/p-BTF_aRDG.system.js +231 -0
  1160. package/dist/magma-components/p-BpVYIPkx.js +1 -0
  1161. package/dist/magma-components/p-BxPbQB28.js +3 -0
  1162. package/dist/magma-components/p-CdsZyFQ-.system.js +10 -0
  1163. package/dist/magma-components/p-D7BrzK-C.system.js +90 -0
  1164. package/dist/magma-components/p-DaONbL_w.system.js +162 -0
  1165. package/dist/magma-components/p-Kv1yahtR.js +5 -0
  1166. package/dist/magma-components/p-ZDRIVCAt.system.js +5 -0
  1167. package/dist/magma-components/p-a41e52f7.entry.js +1 -0
  1168. package/dist/magma-components/p-a462aadd.entry.js +1 -0
  1169. package/dist/magma-components/p-a4a83a63.entry.js +1 -0
  1170. package/dist/magma-components/p-a64bbb36.system.entry.js +40 -0
  1171. package/dist/magma-components/p-a6af4083.system.entry.js +32 -0
  1172. package/dist/magma-components/p-a7e7f2c0.entry.js +1 -0
  1173. package/dist/magma-components/p-aba96089.entry.js +1 -0
  1174. package/dist/magma-components/p-ac81f63a.system.entry.js +913 -0
  1175. package/dist/magma-components/p-aed8b119.entry.js +1 -0
  1176. package/dist/magma-components/p-b24b5179.entry.js +1 -0
  1177. package/dist/magma-components/p-b295e4ab.system.entry.js +1 -0
  1178. package/dist/magma-components/p-b2c62b6e.system.entry.js +7 -0
  1179. package/dist/magma-components/p-b431ca8a.entry.js +1 -0
  1180. package/dist/magma-components/p-b5559b28.system.entry.js +1 -0
  1181. package/dist/magma-components/p-b626c69f.system.entry.js +1 -0
  1182. package/dist/magma-components/p-b897c97d.entry.js +1 -0
  1183. package/dist/magma-components/p-bab4c75e.system.entry.js +45 -0
  1184. package/dist/magma-components/p-bba04b08.system.entry.js +14 -0
  1185. package/dist/magma-components/p-bc53c19e.entry.js +8 -0
  1186. package/dist/magma-components/p-bf2fe278.system.entry.js +16 -0
  1187. package/dist/magma-components/p-c0136138.entry.js +1 -0
  1188. package/dist/magma-components/p-c166ec50.system.entry.js +47 -0
  1189. package/dist/magma-components/p-c22887f7.system.entry.js +90 -0
  1190. package/dist/magma-components/p-c28fce23.entry.js +1 -0
  1191. package/dist/magma-components/p-c34d9e61.system.entry.js +1 -0
  1192. package/dist/magma-components/p-c48bad95.entry.js +1 -0
  1193. package/dist/magma-components/p-cb2c5f1b.entry.js +1 -0
  1194. package/dist/magma-components/p-cc0c6ae7.entry.js +1 -0
  1195. package/dist/magma-components/p-cc2a09f2.system.entry.js +16 -0
  1196. package/dist/magma-components/p-cc9d9458.entry.js +1 -0
  1197. package/dist/magma-components/p-ccb14076.system.entry.js +217 -0
  1198. package/dist/magma-components/p-ccb6898a.system.entry.js +4 -0
  1199. package/dist/magma-components/p-d04ac65d.entry.js +1 -0
  1200. package/dist/magma-components/p-d07d227b.system.entry.js +8 -0
  1201. package/dist/magma-components/p-d1faf129.entry.js +1 -0
  1202. package/dist/magma-components/p-d282a929.entry.js +1 -0
  1203. package/dist/magma-components/p-d2f134ac.entry.js +1 -0
  1204. package/dist/magma-components/p-d47df503.system.entry.js +37 -0
  1205. package/dist/magma-components/p-d5bd6bef.entry.js +1 -0
  1206. package/dist/magma-components/p-d9804d2f.entry.js +1 -0
  1207. package/dist/magma-components/p-dc06b29e.entry.js +1 -0
  1208. package/dist/magma-components/p-dc59b764.entry.js +1 -0
  1209. package/dist/magma-components/p-dc7bada4.entry.js +1 -0
  1210. package/dist/magma-components/p-dcc3be64.system.entry.js +7 -0
  1211. package/dist/magma-components/p-dd58f9ee.entry.js +18 -0
  1212. package/dist/magma-components/p-de091be7.system.entry.js +7 -0
  1213. package/dist/magma-components/p-dfe8552c.system.entry.js +11 -0
  1214. package/dist/magma-components/p-e1e69217.system.entry.js +1 -0
  1215. package/dist/magma-components/p-e213640b.entry.js +1 -0
  1216. package/dist/magma-components/p-e2ef1d6f.entry.js +1 -0
  1217. package/dist/magma-components/p-e2ef5996.entry.js +1 -0
  1218. package/dist/magma-components/p-e7751639.entry.js +1 -0
  1219. package/dist/magma-components/p-e887a14c.entry.js +1 -0
  1220. package/dist/magma-components/p-e8cd2b93.system.entry.js +4 -0
  1221. package/dist/magma-components/p-e8ed096b.entry.js +1 -0
  1222. package/dist/magma-components/p-eaff7300.entry.js +1 -0
  1223. package/dist/magma-components/p-eb681207.system.entry.js +1 -0
  1224. package/dist/magma-components/p-ec9cc7b9.entry.js +1 -0
  1225. package/dist/magma-components/p-eca99a0a.system.entry.js +1 -0
  1226. package/dist/magma-components/p-ecd3c27f.entry.js +1 -0
  1227. package/dist/magma-components/p-ed897f9f.entry.js +1 -0
  1228. package/dist/magma-components/p-ee1e7f07.system.entry.js +3 -0
  1229. package/dist/magma-components/p-ef3424e3.entry.js +1 -0
  1230. package/dist/magma-components/p-f29a059d.system.entry.js +15 -0
  1231. package/dist/magma-components/p-f5bb8c0c.entry.js +1 -0
  1232. package/dist/magma-components/p-f654eafe.entry.js +1 -0
  1233. package/dist/magma-components/p-f733ae92.system.entry.js +16 -0
  1234. package/dist/magma-components/p-f8eb19b3.entry.js +1 -0
  1235. package/dist/magma-components/p-f8feee93.system.entry.js +4 -0
  1236. package/dist/magma-components/p-faa1f22c.entry.js +1 -0
  1237. package/dist/magma-components/p-ffa1a0b4.system.entry.js +1 -0
  1238. package/dist/magma-components/p-hVpoPUxI.system.js +58 -0
  1239. package/dist/magma-components/p-wI0alRSO.js +1 -0
  1240. package/dist/stats.json +3303 -2650
  1241. package/dist/types/common/form.d.ts +8 -1
  1242. package/dist/types/common/preference.d.ts +1 -1
  1243. package/dist/types/common/validity/index.d.ts +22 -0
  1244. package/dist/types/components/mds-avatar/mds-avatar.d.ts +2 -0
  1245. package/dist/types/components/mds-button/mds-button.d.ts +9 -0
  1246. package/dist/types/components/mds-button-dropdown/mds-button-dropdown.d.ts +23 -1
  1247. package/dist/types/components/mds-header/mds-header.d.ts +1 -0
  1248. package/dist/types/components/mds-icon/mds-icon.d.ts +5 -0
  1249. package/dist/types/components/mds-icon/services/icons-set.service.d.ts +10 -9
  1250. package/dist/types/components/mds-input/mds-input.d.ts +41 -2
  1251. package/dist/types/components/mds-input/meta/validators.d.ts +22 -0
  1252. package/dist/types/components/mds-input/meta/validity.d.ts +14 -0
  1253. package/dist/types/components/mds-input-date/mds-input-date.d.ts +38 -0
  1254. package/dist/types/components/mds-input-date-range/mds-input-date-range.d.ts +26 -0
  1255. package/dist/types/components/mds-input-otp/mds-input-otp.d.ts +21 -2
  1256. package/dist/types/components/mds-input-range/mds-input-range.d.ts +8 -1
  1257. package/dist/types/components/mds-input-select/mds-input-select.d.ts +42 -4
  1258. package/dist/types/components/mds-input-select/meta/event-detail.d.ts +8 -0
  1259. package/dist/types/components/mds-input-switch/mds-input-switch.d.ts +17 -0
  1260. package/dist/types/components/mds-input-upload/mds-input-upload.d.ts +27 -5
  1261. package/dist/types/components/mds-keyboard-key/meta/icons.d.ts +1 -1
  1262. package/dist/types/components/mds-pref-animation/mds-pref-animation.d.ts +10 -1
  1263. package/dist/types/components/mds-pref-consumption/mds-pref-consumption.d.ts +10 -1
  1264. package/dist/types/components/mds-pref-contrast/mds-pref-contrast.d.ts +10 -1
  1265. package/dist/types/components/mds-pref-mode/mds-pref-mode.d.ts +10 -1
  1266. package/dist/types/components/mds-toast/mds-toast.d.ts +1 -0
  1267. package/dist/types/components.d.ts +102 -19
  1268. package/package.json +33 -20
  1269. package/dist/cjs/floating-controller-Cd_vNLLD.js +0 -369
  1270. package/dist/cjs/form-DTCBh5WK.js +0 -22
  1271. package/dist/cjs/index--6wz7eWi.js +0 -5183
  1272. package/dist/cjs/locale-CB5_Z7PE.js +0 -816
  1273. package/dist/cjs/preference-eJcbLLAn.js +0 -389
  1274. package/dist/components/p--8aaJX-p.js +0 -1
  1275. package/dist/components/p-A9TZf0Ii.js +0 -1
  1276. package/dist/components/p-B2A_hlV2.js +0 -1
  1277. package/dist/components/p-B9DJLgwr.js +0 -1
  1278. package/dist/components/p-BH3bWzRT.js +0 -1
  1279. package/dist/components/p-BJNK4p33.js +0 -1
  1280. package/dist/components/p-BNHXZ-JR.js +0 -1
  1281. package/dist/components/p-BSxuG1vZ.js +0 -1
  1282. package/dist/components/p-BTHR4xXu.js +0 -1
  1283. package/dist/components/p-BhFTcUD0.js +0 -3
  1284. package/dist/components/p-BouRLCYL.js +0 -1
  1285. package/dist/components/p-Bss3F51Q.js +0 -5
  1286. package/dist/components/p-Bt4xX5ww.js +0 -1
  1287. package/dist/components/p-C03KYHGv.js +0 -1
  1288. package/dist/components/p-C58NKMEE.js +0 -1
  1289. package/dist/components/p-CBLAz3_J.js +0 -1
  1290. package/dist/components/p-CVgKDZPF.js +0 -1
  1291. package/dist/components/p-CVpjH8Un.js +0 -1
  1292. package/dist/components/p-Caksrfcd.js +0 -1
  1293. package/dist/components/p-CatD1iUY.js +0 -1
  1294. package/dist/components/p-CbufYCNj.js +0 -1
  1295. package/dist/components/p-Cehcn85x.js +0 -1
  1296. package/dist/components/p-ClKNADBg.js +0 -8
  1297. package/dist/components/p-CvIFS8oA.js +0 -1
  1298. package/dist/components/p-D3-GP4KF.js +0 -1
  1299. package/dist/components/p-D8I1RblC.js +0 -1
  1300. package/dist/components/p-DLE5TNTp.js +0 -1
  1301. package/dist/components/p-DaI5QqNu.js +0 -1
  1302. package/dist/components/p-Deh5Aia-.js +0 -1
  1303. package/dist/components/p-Dj_oN194.js +0 -1
  1304. package/dist/components/p-DmELzfvf.js +0 -1
  1305. package/dist/components/p-DtxB7DYE.js +0 -1
  1306. package/dist/components/p-cBZsPiMJ.js +0 -1
  1307. package/dist/components/p-sqRs6oj4.js +0 -1
  1308. package/dist/components/p-wq6nWuWE.js +0 -1
  1309. package/dist/esm/floating-controller-DVldZ5mh.js +0 -366
  1310. package/dist/esm/form-A9TZf0Ii.js +0 -19
  1311. package/dist/esm/index-DIiEV39g.js +0 -5149
  1312. package/dist/esm/locale-CbJbTW_c.js +0 -814
  1313. package/dist/esm/preference-CKerJx2M.js +0 -385
  1314. package/dist/esm-es5/floating-controller-DVldZ5mh.js +0 -66
  1315. package/dist/esm-es5/form-A9TZf0Ii.js +0 -8
  1316. package/dist/esm-es5/index-DIiEV39g.js +0 -371
  1317. package/dist/esm-es5/locale-CbJbTW_c.js +0 -230
  1318. package/dist/esm-es5/preference-CKerJx2M.js +0 -58
  1319. package/dist/magma-components/p-03be5c0c.entry.js +0 -1
  1320. package/dist/magma-components/p-0715a2cb.system.entry.js +0 -12
  1321. package/dist/magma-components/p-071f18c6.system.entry.js +0 -27
  1322. package/dist/magma-components/p-0798b0bf.system.entry.js +0 -24
  1323. package/dist/magma-components/p-07fde74d.system.entry.js +0 -39
  1324. package/dist/magma-components/p-086fb3aa.entry.js +0 -1
  1325. package/dist/magma-components/p-0a088e7d.system.entry.js +0 -10
  1326. package/dist/magma-components/p-0a691082.entry.js +0 -1
  1327. package/dist/magma-components/p-0ad3b4da.system.entry.js +0 -102
  1328. package/dist/magma-components/p-0af8d821.entry.js +0 -1
  1329. package/dist/magma-components/p-0ec21574.system.entry.js +0 -10
  1330. package/dist/magma-components/p-0f6bb54d.system.entry.js +0 -22
  1331. package/dist/magma-components/p-102d3bd3.system.entry.js +0 -1
  1332. package/dist/magma-components/p-10704ede.system.entry.js +0 -4
  1333. package/dist/magma-components/p-15f63bf3.entry.js +0 -1
  1334. package/dist/magma-components/p-16e9fb14.system.entry.js +0 -7
  1335. package/dist/magma-components/p-1780b8ba.entry.js +0 -1
  1336. package/dist/magma-components/p-181dfb04.entry.js +0 -1
  1337. package/dist/magma-components/p-184720be.system.entry.js +0 -1
  1338. package/dist/magma-components/p-18f7b970.system.entry.js +0 -4
  1339. package/dist/magma-components/p-1a8c5086.system.entry.js +0 -19
  1340. package/dist/magma-components/p-1afc0452.entry.js +0 -1
  1341. package/dist/magma-components/p-1c0a7e24.system.entry.js +0 -30
  1342. package/dist/magma-components/p-1cce738a.system.entry.js +0 -32
  1343. package/dist/magma-components/p-1dcfb13e.entry.js +0 -1
  1344. package/dist/magma-components/p-1df6ac96.system.entry.js +0 -7
  1345. package/dist/magma-components/p-209063b6.system.entry.js +0 -50
  1346. package/dist/magma-components/p-216f95cc.system.entry.js +0 -1
  1347. package/dist/magma-components/p-21891a24.entry.js +0 -1
  1348. package/dist/magma-components/p-21d6687a.system.entry.js +0 -7
  1349. package/dist/magma-components/p-231505e8.entry.js +0 -1
  1350. package/dist/magma-components/p-23e61db9.system.entry.js +0 -4
  1351. package/dist/magma-components/p-241dbf61.entry.js +0 -1
  1352. package/dist/magma-components/p-25935d33.system.entry.js +0 -1
  1353. package/dist/magma-components/p-27ea99ee.entry.js +0 -8
  1354. package/dist/magma-components/p-284c40cd.system.entry.js +0 -4
  1355. package/dist/magma-components/p-29684655.system.entry.js +0 -16
  1356. package/dist/magma-components/p-2b73fee6.entry.js +0 -1
  1357. package/dist/magma-components/p-2d5aadba.system.entry.js +0 -7
  1358. package/dist/magma-components/p-2de17848.entry.js +0 -1
  1359. package/dist/magma-components/p-34482514.entry.js +0 -1
  1360. package/dist/magma-components/p-34c0890e.entry.js +0 -1
  1361. package/dist/magma-components/p-3635eca6.system.entry.js +0 -1
  1362. package/dist/magma-components/p-3b0c1202.entry.js +0 -1
  1363. package/dist/magma-components/p-3d8e63a2.system.entry.js +0 -63
  1364. package/dist/magma-components/p-3db23b5f.system.entry.js +0 -16
  1365. package/dist/magma-components/p-3ec7d3ea.entry.js +0 -1
  1366. package/dist/magma-components/p-3f7d3060.system.entry.js +0 -42
  1367. package/dist/magma-components/p-40563e33.entry.js +0 -1
  1368. package/dist/magma-components/p-41bf6f25.system.entry.js +0 -81
  1369. package/dist/magma-components/p-421a630e.entry.js +0 -1
  1370. package/dist/magma-components/p-4297da23.system.entry.js +0 -1
  1371. package/dist/magma-components/p-4299b76b.system.entry.js +0 -4
  1372. package/dist/magma-components/p-4543501c.entry.js +0 -1
  1373. package/dist/magma-components/p-454c4774.entry.js +0 -1
  1374. package/dist/magma-components/p-4616bc07.entry.js +0 -1
  1375. package/dist/magma-components/p-46786d71.system.entry.js +0 -14
  1376. package/dist/magma-components/p-470e5ac8.system.entry.js +0 -1
  1377. package/dist/magma-components/p-481008e9.system.entry.js +0 -13
  1378. package/dist/magma-components/p-48d37230.entry.js +0 -1
  1379. package/dist/magma-components/p-4b3a8132.system.entry.js +0 -13
  1380. package/dist/magma-components/p-4c8316a8.entry.js +0 -1
  1381. package/dist/magma-components/p-4c95442e.entry.js +0 -1
  1382. package/dist/magma-components/p-4e4bdbf8.entry.js +0 -1
  1383. package/dist/magma-components/p-4e5ab0e4.system.entry.js +0 -16
  1384. package/dist/magma-components/p-4f107cb2.system.entry.js +0 -2838
  1385. package/dist/magma-components/p-54b995c2.system.entry.js +0 -4
  1386. package/dist/magma-components/p-56ad5bf2.entry.js +0 -1
  1387. package/dist/magma-components/p-59de81ac.entry.js +0 -1
  1388. package/dist/magma-components/p-5a7ead55.system.entry.js +0 -37
  1389. package/dist/magma-components/p-5e43274a.system.entry.js +0 -15
  1390. package/dist/magma-components/p-5f545f85.system.entry.js +0 -1
  1391. package/dist/magma-components/p-61a5ac3d.system.entry.js +0 -17
  1392. package/dist/magma-components/p-636cc471.entry.js +0 -1
  1393. package/dist/magma-components/p-66ce2dee.entry.js +0 -1
  1394. package/dist/magma-components/p-67d80d37.system.entry.js +0 -1
  1395. package/dist/magma-components/p-6937f340.entry.js +0 -1
  1396. package/dist/magma-components/p-69d1b815.entry.js +0 -1
  1397. package/dist/magma-components/p-6b7e449f.entry.js +0 -1
  1398. package/dist/magma-components/p-6c417ea1.system.entry.js +0 -913
  1399. package/dist/magma-components/p-6cd7cfe3.entry.js +0 -1
  1400. package/dist/magma-components/p-6ce60d59.entry.js +0 -1
  1401. package/dist/magma-components/p-6cf760ea.system.entry.js +0 -45
  1402. package/dist/magma-components/p-6dc27543.entry.js +0 -1
  1403. package/dist/magma-components/p-6de37588.entry.js +0 -1
  1404. package/dist/magma-components/p-6edc4f16.system.entry.js +0 -14
  1405. package/dist/magma-components/p-6f6b5eb5.entry.js +0 -1
  1406. package/dist/magma-components/p-7090184f.entry.js +0 -1
  1407. package/dist/magma-components/p-716ad14c.entry.js +0 -1
  1408. package/dist/magma-components/p-71804224.entry.js +0 -1
  1409. package/dist/magma-components/p-735dc594.system.entry.js +0 -1
  1410. package/dist/magma-components/p-739fdf76.system.entry.js +0 -1
  1411. package/dist/magma-components/p-74b0902a.entry.js +0 -1
  1412. package/dist/magma-components/p-7530a2f2.entry.js +0 -1
  1413. package/dist/magma-components/p-75dd012a.system.entry.js +0 -11
  1414. package/dist/magma-components/p-75fcf1a4.entry.js +0 -1
  1415. package/dist/magma-components/p-76ae22d6.entry.js +0 -1
  1416. package/dist/magma-components/p-78248693.entry.js +0 -1
  1417. package/dist/magma-components/p-78fef00a.entry.js +0 -1
  1418. package/dist/magma-components/p-7c0d202c.entry.js +0 -1
  1419. package/dist/magma-components/p-7fc29447.entry.js +0 -1
  1420. package/dist/magma-components/p-81b72b6e.entry.js +0 -1
  1421. package/dist/magma-components/p-859ab5a2.entry.js +0 -18
  1422. package/dist/magma-components/p-896ae0ee.entry.js +0 -1
  1423. package/dist/magma-components/p-89a3bc7a.system.entry.js +0 -16
  1424. package/dist/magma-components/p-8b7fa8d7.entry.js +0 -1
  1425. package/dist/magma-components/p-8c4fb7ec.system.entry.js +0 -30
  1426. package/dist/magma-components/p-8dff6606.system.entry.js +0 -11
  1427. package/dist/magma-components/p-8e40eda3.system.entry.js +0 -9
  1428. package/dist/magma-components/p-91b9d4e7.system.entry.js +0 -4
  1429. package/dist/magma-components/p-92e1001f.entry.js +0 -1
  1430. package/dist/magma-components/p-9378b373.system.entry.js +0 -49
  1431. package/dist/magma-components/p-960dc9b5.system.entry.js +0 -15
  1432. package/dist/magma-components/p-9626eaff.system.entry.js +0 -134
  1433. package/dist/magma-components/p-9741d95e.system.entry.js +0 -7
  1434. package/dist/magma-components/p-97ea9e6e.system.entry.js +0 -68
  1435. package/dist/magma-components/p-9846fe89.system.entry.js +0 -1
  1436. package/dist/magma-components/p-998721b9.system.entry.js +0 -1
  1437. package/dist/magma-components/p-9a5296c0.system.entry.js +0 -7
  1438. package/dist/magma-components/p-9b2ee3fe.entry.js +0 -1
  1439. package/dist/magma-components/p-9be4a736.entry.js +0 -1
  1440. package/dist/magma-components/p-9ca7932d.system.entry.js +0 -8
  1441. package/dist/magma-components/p-9d86477d.system.entry.js +0 -1
  1442. package/dist/magma-components/p-9e3bc553.system.entry.js +0 -26
  1443. package/dist/magma-components/p-9e58467e.system.entry.js +0 -10
  1444. package/dist/magma-components/p-9e9a1ebd.system.entry.js +0 -15
  1445. package/dist/magma-components/p-A9TZf0Ii.js +0 -1
  1446. package/dist/magma-components/p-BFnx_0hM.js +0 -5
  1447. package/dist/magma-components/p-BbMKuVem.js +0 -1
  1448. package/dist/magma-components/p-C2FHijr2.system.js +0 -231
  1449. package/dist/magma-components/p-CBam2PI8.system.js +0 -79
  1450. package/dist/magma-components/p-CDTiTqY0.system.js +0 -58
  1451. package/dist/magma-components/p-CI85vVs8.system.js +0 -9
  1452. package/dist/magma-components/p-CnXBPjmc.system.js +0 -5
  1453. package/dist/magma-components/p-DB8Rm54c.js +0 -1
  1454. package/dist/magma-components/p-DIiEV39g.js +0 -3
  1455. package/dist/magma-components/p-DmC-b-ZK.system.js +0 -67
  1456. package/dist/magma-components/p-MGv0i39Y.system.js +0 -162
  1457. package/dist/magma-components/p-a3279a73.system.entry.js +0 -11
  1458. package/dist/magma-components/p-a3b0f586.entry.js +0 -1
  1459. package/dist/magma-components/p-a3fc2ea4.system.entry.js +0 -39
  1460. package/dist/magma-components/p-a5ac5e0b.entry.js +0 -1
  1461. package/dist/magma-components/p-a8ec3080.system.entry.js +0 -27
  1462. package/dist/magma-components/p-a906a02f.system.entry.js +0 -16
  1463. package/dist/magma-components/p-a93b2a39.entry.js +0 -1
  1464. package/dist/magma-components/p-aa267e7b.entry.js +0 -1
  1465. package/dist/magma-components/p-ab9095ae.system.entry.js +0 -4
  1466. package/dist/magma-components/p-ac544ab1.entry.js +0 -1
  1467. package/dist/magma-components/p-ace198e9.entry.js +0 -1
  1468. package/dist/magma-components/p-ad3983b2.entry.js +0 -1
  1469. package/dist/magma-components/p-af41c8b8.system.entry.js +0 -1
  1470. package/dist/magma-components/p-af45f0a5.system.entry.js +0 -20
  1471. package/dist/magma-components/p-b23a6c83.entry.js +0 -1
  1472. package/dist/magma-components/p-b35c26f8.entry.js +0 -18
  1473. package/dist/magma-components/p-b3a3578c.entry.js +0 -1
  1474. package/dist/magma-components/p-b49e0321.system.entry.js +0 -1
  1475. package/dist/magma-components/p-b71e0d51.entry.js +0 -1
  1476. package/dist/magma-components/p-b8d4a14e.entry.js +0 -1
  1477. package/dist/magma-components/p-b9fecfd5.entry.js +0 -1
  1478. package/dist/magma-components/p-ba035f90.entry.js +0 -1
  1479. package/dist/magma-components/p-bc51d310.system.entry.js +0 -1
  1480. package/dist/magma-components/p-bd490a8e.entry.js +0 -1
  1481. package/dist/magma-components/p-be198039.system.entry.js +0 -4
  1482. package/dist/magma-components/p-be692266.system.entry.js +0 -13
  1483. package/dist/magma-components/p-bf7168b4.entry.js +0 -1
  1484. package/dist/magma-components/p-bf84d9fa.entry.js +0 -1
  1485. package/dist/magma-components/p-c1fb2eb7.entry.js +0 -1
  1486. package/dist/magma-components/p-c4e58240.entry.js +0 -1
  1487. package/dist/magma-components/p-c573de10.entry.js +0 -1
  1488. package/dist/magma-components/p-c6be3db7.system.entry.js +0 -1
  1489. package/dist/magma-components/p-c70d7159.entry.js +0 -1
  1490. package/dist/magma-components/p-c7517884.system.entry.js +0 -38
  1491. package/dist/magma-components/p-c9be79bd.entry.js +0 -1
  1492. package/dist/magma-components/p-c9e12c2b.system.entry.js +0 -7
  1493. package/dist/magma-components/p-cb6a1908.entry.js +0 -1
  1494. package/dist/magma-components/p-cbd5aef4.system.entry.js +0 -14
  1495. package/dist/magma-components/p-cd21137b.system.entry.js +0 -1
  1496. package/dist/magma-components/p-cd5866c8.entry.js +0 -1
  1497. package/dist/magma-components/p-ce0ecc75.system.entry.js +0 -15
  1498. package/dist/magma-components/p-ce4e1a41.system.entry.js +0 -1
  1499. package/dist/magma-components/p-d3116844.entry.js +0 -1
  1500. package/dist/magma-components/p-d38165ed.system.entry.js +0 -1
  1501. package/dist/magma-components/p-d3933a22.entry.js +0 -1
  1502. package/dist/magma-components/p-d44c49d6.system.entry.js +0 -8
  1503. package/dist/magma-components/p-d4a529ce.entry.js +0 -1
  1504. package/dist/magma-components/p-d6d4aa1a.entry.js +0 -1
  1505. package/dist/magma-components/p-d81e7100.system.entry.js +0 -15
  1506. package/dist/magma-components/p-d8c27f4b.entry.js +0 -1
  1507. package/dist/magma-components/p-d921d876.entry.js +0 -1
  1508. package/dist/magma-components/p-da1ac3e1.entry.js +0 -1
  1509. package/dist/magma-components/p-ddbdce09.entry.js +0 -1
  1510. package/dist/magma-components/p-de6bc3c8.entry.js +0 -1
  1511. package/dist/magma-components/p-df2b7607.system.entry.js +0 -4
  1512. package/dist/magma-components/p-e05d2df8.system.entry.js +0 -4
  1513. package/dist/magma-components/p-e0b2ef8f.system.entry.js +0 -1
  1514. package/dist/magma-components/p-e0c50a2d.entry.js +0 -1
  1515. package/dist/magma-components/p-e1277efe.system.entry.js +0 -1
  1516. package/dist/magma-components/p-e1e6dd97.entry.js +0 -1
  1517. package/dist/magma-components/p-e2f7a9bd.system.entry.js +0 -1
  1518. package/dist/magma-components/p-e3e893c4.entry.js +0 -1
  1519. package/dist/magma-components/p-e4868ade.entry.js +0 -1
  1520. package/dist/magma-components/p-e5c6f9a9.system.entry.js +0 -7
  1521. package/dist/magma-components/p-e5da7036.entry.js +0 -1
  1522. package/dist/magma-components/p-e6dccab5.system.entry.js +0 -1
  1523. package/dist/magma-components/p-ec59ec9a.entry.js +0 -1
  1524. package/dist/magma-components/p-eddcef53.system.entry.js +0 -1
  1525. package/dist/magma-components/p-eed00e7f.system.entry.js +0 -1
  1526. package/dist/magma-components/p-ef8cb401.entry.js +0 -1
  1527. package/dist/magma-components/p-efe8d359.entry.js +0 -1
  1528. package/dist/magma-components/p-f070a5b5.system.entry.js +0 -11
  1529. package/dist/magma-components/p-f0a168f4.system.entry.js +0 -13
  1530. package/dist/magma-components/p-f1462410.system.entry.js +0 -9
  1531. package/dist/magma-components/p-f23d4974.entry.js +0 -1
  1532. package/dist/magma-components/p-f542246f.system.entry.js +0 -1
  1533. package/dist/magma-components/p-f5c680dd.entry.js +0 -1
  1534. package/dist/magma-components/p-f60c6e8e.system.entry.js +0 -40
  1535. package/dist/magma-components/p-f8369939.entry.js +0 -1
  1536. package/dist/magma-components/p-f97ede3e.system.entry.js +0 -19
  1537. package/dist/magma-components/p-f97ff5b2.entry.js +0 -1
  1538. package/dist/magma-components/p-fe1662e8.system.entry.js +0 -28
  1539. package/dist/magma-components/p-ff133cbd.entry.js +0 -1
  1540. package/dist/magma-components/p-fff44704.entry.js +0 -1
@@ -7863,9 +7863,25 @@ class MdsAvatar {
7863
7863
  this.handleImgLoadSuccess = () => {
7864
7864
  this.loaded = true;
7865
7865
  };
7866
+ // a removed attribute or a null bound by a framework counts as not set, like '' or 0
7867
+ this.hasCount = () => {
7868
+ var _a;
7869
+ const count = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
7870
+ return count !== 0 && !Number.isNaN(count);
7871
+ };
7872
+ this.checkTexts = () => {
7873
+ var _a;
7874
+ const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
7875
+ if (initials !== '')
7876
+ this.checkText(initials);
7877
+ if (this.hasCount())
7878
+ this.checkText(String(this.count));
7879
+ };
7866
7880
  this.checkInitialsVariant = () => {
7867
- if (this.initials !== undefined && this.initials !== '') {
7868
- let cleanedInitials = this.initials
7881
+ var _a;
7882
+ const initials = (_a = this.initials) !== null && _a !== void 0 ? _a : '';
7883
+ if (initials !== '') {
7884
+ let cleanedInitials = initials
7869
7885
  .toLowerCase()
7870
7886
  .replace(/[^a-zA-Z0-9]+/g, '')
7871
7887
  .substring(0, 2);
@@ -7886,21 +7902,13 @@ class MdsAvatar {
7886
7902
  if (this.src !== undefined) {
7887
7903
  this.loaded = false;
7888
7904
  }
7889
- if (this.initials !== undefined && this.initials !== '') {
7890
- this.checkText(this.initials);
7891
- }
7892
- if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count)) {
7893
- this.checkText(this.count.toString());
7894
- }
7905
+ this.checkTexts();
7895
7906
  }
7896
7907
  componentDidRender() {
7897
7908
  if (this.textChanged) {
7898
7909
  // placed here becase @Watch('initials') is fired
7899
7910
  // BEFORE the element .fit is attached on shDOM
7900
- if (this.initials !== undefined && this.initials !== '')
7901
- this.checkText(this.initials);
7902
- if (this.count !== undefined && this.count !== 0 && !Number.isNaN(this.count))
7903
- this.checkText(this.count.toString());
7911
+ this.checkTexts();
7904
7912
  this.textChanged = false;
7905
7913
  }
7906
7914
  }
@@ -7923,26 +7931,13 @@ class MdsAvatar {
7923
7931
  }
7924
7932
  }
7925
7933
  render() {
7926
- return (hAsync(Host, { key: '09e30ddb558c31aa23749b4bf3d5190a30b605c7', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast }, hAsync("div", { key: '1d99eceedcc2dc604afcd887a2d767d61fced5e1', class: clsx('avatar', this.initials &&
7927
- !this.fallback &&
7928
- (this.src === undefined || this.src === '') &&
7929
- 'avatar--initials', (this.fallback ||
7930
- ((this.icon === undefined || this.icon === '') &&
7931
- (this.initials === undefined || this.initials === '') &&
7932
- (this.src === undefined || this.src === ''))) &&
7933
- 'avatar--fallback', this.icon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, this.initials &&
7934
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
7935
- !this.fallback &&
7936
- (this.src === undefined || this.src === '') && (hAsync("div", { key: '08dd0918a258022793f5331a9de7b2460a2e1404', class: "initials-text" }, hAsync("span", { key: '69379497bb9096cea56b366c52ba5372adb5506d', class: "fit" }, this.initials.substring(0, 2)))), this.count && !this.fallback && (this.src === undefined || this.src === '') && (hAsync("div", { key: '07c1e94db40562b8a2467605591236433fd6af39', class: "initials-text" }, hAsync("span", { key: '36c2b72540c03d140f97d64304d46583419d23df', class: "fit" }, "+", this.count))), this.src &&
7937
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
7938
- !this.fallback &&
7939
- (this.icon === undefined || this.icon === '') && (hAsync("mds-img", { key: '9d6a6d4a12a5142686aede6e9f9a974f592b674f', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), this.icon &&
7940
- (this.initials === undefined || this.initials === '') &&
7941
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) && (hAsync("mds-icon", { key: 'b37eae32b77654190b14d8b046d2f9a51801ae2a', class: "icon", part: "icon", name: this.icon })), (this.fallback ||
7942
- ((this.icon === undefined || this.icon === '') &&
7943
- (this.initials === undefined || this.initials === '') &&
7944
- (this.count === undefined || this.count === 0 || Number.isNaN(this.count)) &&
7945
- (this.src === undefined || this.src === ''))) && (hAsync("i", { key: '18d842d4aea1f73adef926ff74a896a9d8a52bc6', class: "fallback-icon", innerHTML: miBaselinePerson })))));
7934
+ var _a, _b, _c, _d;
7935
+ const hasCount = this.hasCount();
7936
+ const icon = (_a = this.icon) !== null && _a !== void 0 ? _a : '';
7937
+ const hasIcon = icon !== '';
7938
+ const hasInitials = ((_b = this.initials) !== null && _b !== void 0 ? _b : '') !== '';
7939
+ const hasSrc = ((_c = this.src) !== null && _c !== void 0 ? _c : '') !== '';
7940
+ return (hAsync(Host, { key: '87e19218bbfe6e9c79f5edd7b4dd0350572b4f84', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast }, hAsync("div", { key: 'b8775a55b682778312539df8ba0d8107075873e1', class: clsx('avatar', hasInitials && !this.fallback && !hasSrc && 'avatar--initials', (this.fallback || (!hasIcon && !hasInitials && !hasSrc)) && 'avatar--fallback', hasIcon && 'avatar--icon', this.loaded ? 'avatar--loaded' : 'avatar--pending'), part: "wrapper" }, hasInitials && !hasCount && !this.fallback && !hasSrc && (hAsync("div", { key: 'acea5faae52d0cfaaa8f03788a22c89c8f0095ad', class: "initials-text" }, hAsync("span", { key: 'aedd03f85b197fc6ed24b4a0238804856145aa4c', class: "fit" }, (_d = this.initials) === null || _d === void 0 ? void 0 : _d.substring(0, 2)))), hasCount && !this.fallback && !hasSrc && (hAsync("div", { key: 'dd8af02204937c6558ab63b26d5993aa34e4df37', class: "initials-text" }, hAsync("span", { key: 'fdf6930557054172bea785b8c6be0decb743887a', class: "fit" }, "+", this.count))), hasSrc && !hasCount && !this.fallback && !hasIcon && (hAsync("mds-img", { key: '4519cc0bd3e701abf9d7bdaf0189f2ca3bcd86ed', class: "image", loading: "lazy", onMdsImgLoadError: this.handleImgLoadError, onMdsImgLoadSuccess: this.handleImgLoadSuccess, part: "media", src: this.src })), hasIcon && !hasInitials && !hasCount && (hAsync("mds-icon", { key: '5958962b68d5797dd46f1322b0e12717bf70c93e', class: "icon", part: "icon", name: icon })), (this.fallback || (!hasIcon && !hasInitials && !hasCount && !hasSrc)) && (hAsync("i", { key: 'e6509636da3e20d93144dde5f3ecce6f1cfc5506', class: "fallback-icon", innerHTML: miBaselinePerson })))));
7946
7941
  }
7947
7942
  get element() { return getElement(this); }
7948
7943
  static get watchers() { return {
@@ -8060,8 +8055,9 @@ class MdsBadge {
8060
8055
  */
8061
8056
  this.typography = 'option';
8062
8057
  this.onSlotChangeHandler = () => {
8058
+ var _a;
8063
8059
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
8064
- if (this.label !== undefined && this.label !== '')
8060
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
8065
8061
  return;
8066
8062
  this.label = readSlottedLabel(this.host);
8067
8063
  };
@@ -8070,7 +8066,7 @@ class MdsBadge {
8070
8066
  this.label = sanitizeLabel(newValue);
8071
8067
  }
8072
8068
  render() {
8073
- return (hAsync(Host, { key: '86aa308e28dc28decde0195a23c8551084c36ed1', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-text", { key: '32566dfede9c11a1de5ba48051cc5e2dffe4f35e', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || hAsync("slot", { key: 'e7055d4c61bfc4ea0876cc849a829ae0ce77c5d2', onSlotchange: this.onSlotChangeHandler }))));
8069
+ return (hAsync(Host, { key: '30205c3754c77ad904a3a01a695ec9daf058bd81', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-text", { key: '3a850df57ca87e8efbf505094f3d1e4e309deb42', tag: "span", typography: this.typography, variant: "info", text: this.label }, this.label || hAsync("slot", { key: '99531173211bd788d288b9d20d36d5eb7b2dc95e', onSlotchange: this.onSlotChangeHandler }))));
8074
8070
  }
8075
8071
  get host() { return getElement(this); }
8076
8072
  static get watchers() { return {
@@ -8957,22 +8953,22 @@ let Locale$1 = class Locale {
8957
8953
  };
8958
8954
 
8959
8955
  const cancel$7 = "Ακύρωση";
8960
- var localeEl$w = {
8956
+ var localeEl$x = {
8961
8957
  cancel: cancel$7
8962
8958
  };
8963
8959
 
8964
8960
  const cancel$6 = "Cancel";
8965
- var localeEn$w = {
8961
+ var localeEn$x = {
8966
8962
  cancel: cancel$6
8967
8963
  };
8968
8964
 
8969
8965
  const cancel$5 = "Cancelar";
8970
- var localeEs$w = {
8966
+ var localeEs$x = {
8971
8967
  cancel: cancel$5
8972
8968
  };
8973
8969
 
8974
8970
  const cancel$4 = "Annulla";
8975
- var localeIt$x = {
8971
+ var localeIt$y = {
8976
8972
  cancel: cancel$4
8977
8973
  };
8978
8974
 
@@ -8989,10 +8985,10 @@ class MdsBanner {
8989
8985
  this.closeEvent = createEvent(this, "mdsBannerClose", 7);
8990
8986
  this.km = new KeyboardManager();
8991
8987
  this.t = new Locale$1({
8992
- el: localeEl$w,
8993
- en: localeEn$w,
8994
- es: localeEs$w,
8995
- it: localeIt$x,
8988
+ el: localeEl$x,
8989
+ en: localeEn$x,
8990
+ es: localeEs$x,
8991
+ it: localeIt$y,
8996
8992
  });
8997
8993
  /**
8998
8994
  * Sets the theme variant colors
@@ -9121,8 +9117,9 @@ class MdsBenchmarkBar {
9121
9117
  */
9122
9118
  this.size = 'md';
9123
9119
  this.onSlotChangeHandler = () => {
9120
+ var _a;
9124
9121
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
9125
- if (this.label !== undefined && this.label !== '')
9122
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
9126
9123
  return;
9127
9124
  this.label = readSlottedLabel(this.host);
9128
9125
  };
@@ -9132,7 +9129,7 @@ class MdsBenchmarkBar {
9132
9129
  }
9133
9130
  render() {
9134
9131
  var _a;
9135
- return (hAsync(Host, { key: '1c2d9a434915c3bd3487e3accddc100cb457178b' }, hAsync("div", { key: '809bfc18d2042c97685adb031b65f3444a1ba3c4', class: "infos" }, hAsync("mds-text", { key: 'f328a5c085a268ac48839e9553fe48a0d57873f8', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || hAsync("slot", { key: 'd61cde55186ab7d8aa186fb740b35fb9e5e964f4', onSlotchange: this.onSlotChangeHandler })), hAsync("mds-text", { key: '2f0145a1c718cb646fb28e05e6f828c196c8902e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), hAsync("mds-progress", { key: 'ad484ee140a19ccde21e5a50df8532c03508350a', "aria-labelledby": "label", "aria-valuetext": this.alias, class: "progress", variant: this.variant, progress: this.value / 100, size: this.size, part: "progress-bar" })));
9132
+ return (hAsync(Host, { key: 'e07ff600bed598dc0d97144ef596c2a2010efbbd' }, hAsync("div", { key: 'd3493800ec6d4f20e36d38132f10a3b67f565006', class: "infos" }, hAsync("mds-text", { key: '07423f38822e314059dcee2cda38abffbea3bb62', typography: this.typography, class: "label", id: "label", truncate: "word" }, this.label || hAsync("slot", { key: 'e4aff25b3be0d2f87aefb2a88dd6050715c74d56', onSlotchange: this.onSlotChangeHandler })), hAsync("mds-text", { key: '8b1ec4a01389199b881f46a69ccee96c8867446e', typography: this.typography, class: "value", truncate: "word" }, (_a = this.alias) !== null && _a !== void 0 ? _a : this.value)), hAsync("mds-progress", { key: 'bc44dc2a31dd43599393df1129671da224f45f43', "aria-labelledby": "label", "aria-valuetext": this.alias, class: "progress", variant: this.variant, progress: this.value / 100, size: this.size, part: "progress-bar" })));
9136
9133
  }
9137
9134
  get host() { return getElement(this); }
9138
9135
  static get watchers() { return {
@@ -9243,7 +9240,7 @@ class MdsBibliography {
9243
9240
  return `${lastName}${lastName !== '' ? ',' : ''} ${formattedFirstName}`;
9244
9241
  };
9245
9242
  this.formatAuthors = (author) => {
9246
- var _a;
9243
+ var _a, _b;
9247
9244
  const authorName = author.replace(/"/g, "'");
9248
9245
  const splitNames = new RegExp(/([A-Za-z ]{2,})/g);
9249
9246
  const fullName = (_a = authorName.match(splitNames)) !== null && _a !== void 0 ? _a : authorName;
@@ -9259,7 +9256,7 @@ class MdsBibliography {
9259
9256
  };
9260
9257
  }
9261
9258
  const firstName = fullName[0].split(' ')[0].trim();
9262
- const lastName = fullName[0].split(' ')[1] !== '' ? fullName[0].split(' ')[1].trim() : '';
9259
+ const lastName = ((_b = fullName[0].split(' ')[1]) !== null && _b !== void 0 ? _b : '').trim();
9263
9260
  return {
9264
9261
  apa: this.fullNameAPA(firstName, lastName),
9265
9262
  firstName,
@@ -9292,7 +9289,8 @@ class MdsBibliography {
9292
9289
  };
9293
9290
  }
9294
9291
  render() {
9295
- return (hAsync(Host, { key: '23f59847854d7d9a89b7dd2750e436d8f02e3d14' }, hAsync("mds-text", { key: 'b894fe2efb2a5fcb6efed4e71efc21bd226e05fe', typography: this.typography, variant: this.variant }, this.author && hAsync("span", { key: 'c4643d727585acf555ddd35a75b899694e5c9402' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (hAsync("span", { key: '6dbda3e1aaeac89017d1fed6d8ff2cd832693199' }, this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, this.name, ".")))) : (hAsync("b", null, hAsync("i", null, this.name, "."))), this.location && (hAsync("span", { key: '340b4ecae707224b88baf69235b669ecee608e28' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (hAsync("span", { key: '54d44315bbf6859e10136f0cbd73d5a56cbd3af9' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && hAsync("time", { key: '642f54d9348dd05fe0867ef2259c1ed720987b9c', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (hAsync("span", { key: '1a6caf7ae4b454bf05b924e56c9aad6e882efe98' }, this.date && hAsync("time", { key: '2dbce299a5459cff5da64ac87925947bcddb2336', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, " ", this.name, ".")))) : (hAsync("b", null, hAsync("i", null, " ", this.name, "."))), this.location && (hAsync("span", { key: 'c9f7127424939df3e352479e48a298e964ec4d06' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && hAsync("span", { key: 'abb5252ecfb00b5b00c37c1e8063a2c00ea03cc2' }, " ", this.publisher, "."))), this.format === 'turabian' && (hAsync("span", { key: '91cebf4a49774b5f09f5947378b08c54150c6768' }, this.name && ' ', this.name !== undefined && this.name !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, " ", this.name, ".")))) : (hAsync("b", null, hAsync("i", null, " ", this.name, "."))), this.location && (hAsync("span", { key: '102f8ccc46702f490624d0de0e0dfc1b69a1ce66' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (hAsync("span", { key: 'f263f731ce15c53982f10273a9918854e9e14564' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && hAsync("time", { key: 'fcb9f7211479b4f78a056117f81589d4011ac0fc', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
9292
+ var _a, _b, _c;
9293
+ return (hAsync(Host, { key: '4fe352d77a5ceea45f9b82d11fbb4ffe2d887aef' }, hAsync("mds-text", { key: '30052872c829ff3b2c142cd54cb64eebcd558f76', typography: this.typography, variant: this.variant }, this.author && hAsync("span", { key: '14d5043a19e193f34a4502029d7dc21fe2ae8083' }, this.showAuthors(this.normalizeAuthors(this.author))), this.format === 'mla' && (hAsync("span", { key: '7b903d623a57baf664c7cd425e78d7a17fca8331' }, this.name && ' ', ((_a = this.name) !== null && _a !== void 0 ? _a : '') !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, this.name, ".")))) : (hAsync("b", null, hAsync("i", null, this.name, "."))), this.location && (hAsync("span", { key: '9c52f22dd20cafb9eb7df4835c2f5a99ca71a1a6' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && (hAsync("span", { key: '3ff1124122ef8d52079fa7337ed51f116fa1f266' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && hAsync("time", { key: 'ac4e6e1506bbca2633c95593d44df61622b6e040', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))), this.format === 'apa' && (hAsync("span", { key: '71558449f856a09fda8b02f2808c93b1dd72c532' }, this.date && hAsync("time", { key: 'f952a6c0f8be0cbf83a8d04ff13e08b3221cbdc4', dateTime: this.date }, " (", this.dateFormatAPA(this.date), ")."), this.name && ' ', ((_b = this.name) !== null && _b !== void 0 ? _b : '') !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, " ", this.name, ".")))) : (hAsync("b", null, hAsync("i", null, " ", this.name, "."))), this.location && (hAsync("span", { key: 'ecead881a08e1f08ebe0c08f5016414238b0c0aa' }, ' ', this.location, this.publisher !== undefined ? ':' : '.')), this.publisher && hAsync("span", { key: '7f5caaaecb02bdda257974de0439d0c15e4ebd71' }, " ", this.publisher, "."))), this.format === 'turabian' && (hAsync("span", { key: 'e2869b0cbf35ddb64020edfb9aeab7a5bd94e56d' }, this.name && ' ', ((_c = this.name) !== null && _c !== void 0 ? _c : '') !== '' && this.url !== null ? (hAsync("a", { class: "link", href: this.url, target: "_blank", rel: this.rel }, hAsync("b", null, hAsync("i", null, " ", this.name, ".")))) : (hAsync("b", null, hAsync("i", null, " ", this.name, "."))), this.location && (hAsync("span", { key: '1de156ae83032c28eef77b059c52beed6f7bb8a8' }, ' ', this.location, this.publisher !== undefined ? ':' : ',')), this.publisher && (hAsync("span", { key: 'c82b2387e90227b129d5078561c60492901fb9e3' }, ' ', this.publisher, this.date !== undefined ? ',' : '.')), this.date && hAsync("time", { key: 'fe9da6c7294ee249a0d892cf882a387ba0196159', dateTime: this.date }, " ", this.dateFormatMLA(this.date), "."))))));
9296
9294
  }
9297
9295
  static get style() { return mdsBibliographyCss(); }
9298
9296
  static get cmpMeta() { return {
@@ -9319,22 +9317,22 @@ class MdsBibliography {
9319
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>`;
9320
9318
 
9321
9319
  const back$3 = "Πήγαινε πίσω";
9322
- var localeEl$v = {
9320
+ var localeEl$w = {
9323
9321
  back: back$3
9324
9322
  };
9325
9323
 
9326
9324
  const back$2 = "Go back";
9327
- var localeEn$v = {
9325
+ var localeEn$w = {
9328
9326
  back: back$2
9329
9327
  };
9330
9328
 
9331
9329
  const back$1 = "Volver atrás";
9332
- var localeEs$v = {
9330
+ var localeEs$w = {
9333
9331
  back: back$1
9334
9332
  };
9335
9333
 
9336
9334
  const back = "Indietro";
9337
- var localeIt$w = {
9335
+ var localeIt$x = {
9338
9336
  back: back
9339
9337
  };
9340
9338
 
@@ -9349,10 +9347,10 @@ class MdsBreadcrumb {
9349
9347
  this.changedEvent = createEvent(this, "mdsBreadcrumbChange", 7);
9350
9348
  this.kb = new KeyboardManager();
9351
9349
  this.t = new Locale$1({
9352
- el: localeEl$v,
9353
- en: localeEn$v,
9354
- es: localeEs$v,
9355
- it: localeIt$w,
9350
+ el: localeEl$w,
9351
+ en: localeEn$w,
9352
+ es: localeEs$w,
9353
+ it: localeIt$x,
9356
9354
  });
9357
9355
  /**
9358
9356
  * Hides the back arrow button
@@ -9545,12 +9543,53 @@ const isIconFormatIsSVG = (icon) => {
9545
9543
  return icon.startsWith(MARKUP_SVG_ICON);
9546
9544
  };
9547
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
+
9548
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>`;
9549
9588
 
9550
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>
9551
9590
  `;
9552
9591
 
9553
- 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}}`;
9554
9593
 
9555
9594
  /**
9556
9595
  * @slot - Add `text string` to this slot, **avoid** to add `HTML elements` or `components` here.
@@ -9601,9 +9640,9 @@ class MdsButton {
9601
9640
  */
9602
9641
  this.truncate = 'word';
9603
9642
  this.handleRequestSubmitForm = (e) => {
9604
- var _a;
9605
9643
  e.preventDefault();
9606
- (_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);
9607
9646
  };
9608
9647
  this.handleReset = (e) => {
9609
9648
  var _a;
@@ -9624,8 +9663,9 @@ class MdsButton {
9624
9663
  throw Error('Object window is not defined');
9625
9664
  };
9626
9665
  this.onSlotChangeHandler = () => {
9666
+ var _a;
9627
9667
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
9628
- if (this.label !== undefined && this.label !== '')
9668
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
9629
9669
  return;
9630
9670
  this.label = readSlottedLabel(this.host);
9631
9671
  };
@@ -9682,8 +9722,9 @@ class MdsButton {
9682
9722
  }
9683
9723
  }
9684
9724
  componentWillLoad() {
9725
+ var _a;
9685
9726
  this.handleVariantChange(this.variant);
9686
- if (this.href !== undefined && this.href !== '') {
9727
+ if (((_a = this.href) !== null && _a !== void 0 ? _a : '') !== '') {
9687
9728
  this.host.addEventListener('click', (e) => {
9688
9729
  var _a;
9689
9730
  e.preventDefault();
@@ -9706,6 +9747,7 @@ class MdsButton {
9706
9747
  }
9707
9748
  }
9708
9749
  componentDidLoad() {
9750
+ var _a;
9709
9751
  this.km.addElement(this.host);
9710
9752
  if (!this.await) {
9711
9753
  this.km.attachClickBehavior();
@@ -9723,9 +9765,7 @@ class MdsButton {
9723
9765
  if (this.label === '') {
9724
9766
  this.label = undefined;
9725
9767
  }
9726
- if ((this.label === undefined || this.label === '') &&
9727
- this.icon !== undefined &&
9728
- this.icon !== '') {
9768
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') === '' && this.icon != null && this.icon !== '') {
9729
9769
  const iconTitle = unslugName(this.icon);
9730
9770
  if (!this.host.hasAttribute('aria-label')) {
9731
9771
  setAttributeIfEmpty(this.host, 'title', iconTitle);
@@ -9754,7 +9794,7 @@ class MdsButton {
9754
9794
  render() {
9755
9795
  var _a;
9756
9796
  this.typography = ((_a = buttonSizeTypographyVariant[this.size]) !== null && _a !== void 0 ? _a : buttonSizeTypographyVariant.md);
9757
- return (hAsync(Host, { key: 'b78ea9e82edc7fb1e05d3fb3f7d9c9d08589ec2b', onMouseDown: this.mouseDown, onMouseUp: this.mouseUp, onMouseOut: this.mouseUp, tabindex: "0", "pref-animation": preferenceStore.state.animation, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: '6e93d60b23f794a489b2ce2b55d51c000008aef4', class: "await" }, hAsync("mds-spinner", { key: 'ae40c10546682ad904552560c4a0a5ab95af8f48', class: "spinner", running: this.await })), this.icon && this.iconPosition === 'left' && (hAsync("mds-icon", { key: 'b44d109ca1c92f9d9680c1ae5b36a3e08347008a', "aria-hidden": "true", class: "icon", name: this.icon, part: "icon" })), hAsync("mds-text", { key: '9e5c7ea8c1985633b22217d2fae8ada8b4b9d02e', class: "text", part: "label", tag: "span", typography: this.typography, truncate: this.truncate, animation: this.animation, text: this.label }, this.label || hAsync("slot", { key: '856dede502b5a35d80b77c6ddb39b7e9c4d4b4f3', onSlotchange: this.onSlotChangeHandler })), hAsync("slot", { key: 'bf4ee1f6ecf7c9a4cab0797aba08c97e55751b2d', name: "notification" }), this.icon && this.iconPosition === 'right' && (hAsync("mds-icon", { key: '6e5dfeb55023770a487dead1300cad6813e08694', "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" }))));
9758
9798
  }
9759
9799
  static get formAssociated() { return true; }
9760
9800
  get host() { return getElement(this); }
@@ -9788,6 +9828,8 @@ class MdsButton {
9788
9828
  "icon": [1537],
9789
9829
  "iconPosition": [513, "icon-position"],
9790
9830
  "type": [513],
9831
+ "name": [513],
9832
+ "value": [513],
9791
9833
  "variant": [513],
9792
9834
  "tone": [513],
9793
9835
  "size": [513],
@@ -9800,7 +9842,7 @@ class MdsButton {
9800
9842
  },
9801
9843
  "$listeners$": undefined,
9802
9844
  "$lazyBundleId$": "-",
9803
- "$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"]]
9804
9846
  }; }
9805
9847
  }
9806
9848
 
@@ -9814,10 +9856,22 @@ const mdsButtonDropdownCss = () => `@layer reset,vendor,theme,base,components,ut
9814
9856
  class MdsButtonDropdown {
9815
9857
  constructor(hostRef) {
9816
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;
9817
9870
  /**
9818
- * 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'`
9819
9873
  */
9820
- this.type = 'submit';
9874
+ this.type = 'button';
9821
9875
  /**
9822
9876
  * Specifies the color variant for the button
9823
9877
  */
@@ -9838,19 +9892,42 @@ class MdsButtonDropdown {
9838
9892
  * Specifies if the text shoud be truncated or should behave as a normal text
9839
9893
  */
9840
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;
9841
9915
  }
9842
9916
  render() {
9843
- 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' }))));
9844
9918
  }
9919
+ static get formAssociated() { return true; }
9845
9920
  static get style() { return mdsButtonDropdownCss(); }
9846
9921
  static get cmpMeta() { return {
9847
- "$flags$": 265,
9922
+ "$flags$": 329,
9848
9923
  "$tagName$": "mds-button-dropdown",
9849
9924
  "$members$": {
9850
9925
  "label": [1],
9851
9926
  "autoFocus": [4, "auto-focus"],
9852
9927
  "icon": [1537],
9853
9928
  "type": [513],
9929
+ "name": [513],
9930
+ "value": [513],
9854
9931
  "variant": [513],
9855
9932
  "tone": [513],
9856
9933
  "size": [513],
@@ -9859,11 +9936,12 @@ class MdsButtonDropdown {
9859
9936
  "await": [1540],
9860
9937
  "href": [513],
9861
9938
  "target": [1],
9862
- "truncate": [513]
9939
+ "truncate": [513],
9940
+ "formDisabled": [32]
9863
9941
  },
9864
9942
  "$listeners$": undefined,
9865
9943
  "$lazyBundleId$": "-",
9866
- "$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"]]
9867
9945
  }; }
9868
9946
  }
9869
9947
 
@@ -18846,22 +18924,22 @@ class MdsCardMedia {
18846
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>`;
18847
18925
 
18848
18926
  const deleteLabel$7 = "Αφαίρεση";
18849
- var localeEl$u = {
18927
+ var localeEl$v = {
18850
18928
  deleteLabel: deleteLabel$7
18851
18929
  };
18852
18930
 
18853
18931
  const deleteLabel$6 = "Remove";
18854
- var localeEn$u = {
18932
+ var localeEn$v = {
18855
18933
  deleteLabel: deleteLabel$6
18856
18934
  };
18857
18935
 
18858
18936
  const deleteLabel$5 = "Eliminar";
18859
- var localeEs$u = {
18937
+ var localeEs$v = {
18860
18938
  deleteLabel: deleteLabel$5
18861
18939
  };
18862
18940
 
18863
18941
  const deleteLabel$4 = "Rimuovi";
18864
- var localeIt$v = {
18942
+ var localeIt$w = {
18865
18943
  deleteLabel: deleteLabel$4
18866
18944
  };
18867
18945
 
@@ -18875,10 +18953,10 @@ class MdsChip {
18875
18953
  this.selectEvent = createEvent(this, "mdsChipSelect", 7);
18876
18954
  this.km = new KeyboardManager();
18877
18955
  this.t = new Locale$1({
18878
- el: localeEl$u,
18879
- en: localeEn$u,
18880
- es: localeEs$u,
18881
- it: localeIt$v,
18956
+ el: localeEl$v,
18957
+ en: localeEn$v,
18958
+ es: localeEs$v,
18959
+ it: localeIt$w,
18882
18960
  });
18883
18961
  /**
18884
18962
  * Sets the component disabled status
@@ -19135,8 +19213,8 @@ var arrowSvg$1 = `<svg width="30" height="16" viewBox="0 0 30 16" xmlns="http://
19135
19213
  const sides = ['top', 'right', 'bottom', 'left'];
19136
19214
  const alignments = ['start', 'end'];
19137
19215
  const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
19138
- const min = Math.min;
19139
- const max = Math.max;
19216
+ const min$4 = Math.min;
19217
+ const max$4 = Math.max;
19140
19218
  const round = Math.round;
19141
19219
  const floor = Math.floor;
19142
19220
  const createCoords = v => ({
@@ -19150,7 +19228,7 @@ const oppositeSideMap = {
19150
19228
  top: 'bottom'
19151
19229
  };
19152
19230
  function clamp$1(start, value, end) {
19153
- return max(start, min(value, end));
19231
+ return max$4(start, min$4(value, end));
19154
19232
  }
19155
19233
  function evaluate(value, param) {
19156
19234
  return typeof value === 'function' ? value(param) : value;
@@ -19526,8 +19604,8 @@ const arrow$1 = options => ({
19526
19604
  // If the padding is large enough that it causes the arrow to no longer be
19527
19605
  // centered, modify the padding so that it is centered.
19528
19606
  const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
19529
- const minPadding = min(paddingObject[minProp], largestPossiblePadding);
19530
- const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
19607
+ const minPadding = min$4(paddingObject[minProp], largestPossiblePadding);
19608
+ const maxPadding = min$4(paddingObject[maxProp], largestPossiblePadding);
19531
19609
 
19532
19610
  // Make sure the arrow doesn't overflow the floating element if the center
19533
19611
  // point is outside the floating element's bounds.
@@ -20314,12 +20392,12 @@ function getDocumentRect(element) {
20314
20392
  const html = getDocumentElement(element);
20315
20393
  const scroll = getNodeScroll(element);
20316
20394
  const body = element.ownerDocument.body;
20317
- const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
20318
- 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);
20319
20397
  let x = -scroll.scrollLeft + getWindowScrollBarX(element);
20320
20398
  const y = -scroll.scrollTop;
20321
20399
  if (getComputedStyle$1(body).direction === 'rtl') {
20322
- x += max(html.clientWidth, body.clientWidth) - width;
20400
+ x += max$4(html.clientWidth, body.clientWidth) - width;
20323
20401
  }
20324
20402
  return {
20325
20403
  width,
@@ -20446,10 +20524,10 @@ function getClippingRect(_ref) {
20446
20524
  const firstClippingAncestor = clippingAncestors[0];
20447
20525
  const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
20448
20526
  const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
20449
- accRect.top = max(rect.top, accRect.top);
20450
- accRect.right = min(rect.right, accRect.right);
20451
- accRect.bottom = min(rect.bottom, accRect.bottom);
20452
- 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);
20453
20531
  return accRect;
20454
20532
  }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
20455
20533
  return {
@@ -20626,7 +20704,7 @@ function observeMove(element, onMove) {
20626
20704
  const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
20627
20705
  const options = {
20628
20706
  rootMargin,
20629
- threshold: max(0, min(1, threshold)) || 1
20707
+ threshold: max$4(0, min$4(1, threshold)) || 1
20630
20708
  };
20631
20709
  let isFirstUpdate = true;
20632
20710
  function handleObserve(entries) {
@@ -21451,7 +21529,8 @@ class MdsDropdown {
21451
21529
  this.floatingController.updatePosition();
21452
21530
  }
21453
21531
  targetChanged() {
21454
- if (this.target === '' || this.floatingController == null)
21532
+ var _a;
21533
+ if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '' || this.floatingController == null)
21455
21534
  return;
21456
21535
  const caller = this.floatingController.updateCaller(this.target);
21457
21536
  if (!caller)
@@ -21520,9 +21599,9 @@ class MdsDropdown {
21520
21599
  this.km.detachEscapeBehavior();
21521
21600
  }
21522
21601
  render() {
21523
- return (hAsync(Host, { key: '909529db1b7f90da7fef23235ac276e133aef6cf', style: {
21602
+ return (hAsync(Host, { key: '42bb1259088a7cc15869cd0cbf007ce9f34331cb', style: {
21524
21603
  zIndex: `${this.zIndex}`,
21525
- }, "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: 'fe65713f1e3f849a57f05ad7e3be0eede40198d4', class: "arrow", innerHTML: arrowSvg$1 }), hAsync("slot", { key: '2c438ff28af51844e5e399e07b31773edf745447' })));
21604
+ }, "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: '6a2caa47a6dca50fe6ae209229daddcd7791473d', class: "arrow", innerHTML: arrowSvg$1 }), hAsync("slot", { key: '656a32363daa94dc4433cd5fb86d689d80502221' })));
21526
21605
  }
21527
21606
  get host() { return getElement(this); }
21528
21607
  static get watchers() { return {
@@ -28686,7 +28765,7 @@ class MdsEmoji {
28686
28765
  }; }
28687
28766
  }
28688
28767
 
28689
- const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-spinner):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:calc(var(--spacing,.0025rem)*0);justify-content:center;min-width:0;white-space:nowrap}.details{align-items:baseline;color:var(--mds-entity-detail-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));display:flex;gap:calc(var(--spacing,.0025rem)*100)}.details--hidden{display:none}.actions{align-items:center;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.actions--hidden{display:none}::slotted([slot=action]){aspect-ratio:var(--aspect-square,1/1);height:auto;width:calc(var(--spacing,.0025rem)*1100)}::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title{display:flex;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([pref-contrast=more]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}}`;
28768
+ const mdsEntityCss = () => `@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-avatar,mds-spinner):not(:is([hydrated],.hydrated)){animation-duration:0s;border-color:#0000;box-shadow:0 0 #0000;opacity:0;outline-color:#0000;transition-delay:.1s;transition-duration:0s;visibility:hidden}:host{--mds-entity-background:rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248))));--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-detail-color:rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73))));--mds-entity-icon-background:rgb(var(--label-blue-09,216 222 254));--mds-entity-icon-radius:var(--radius-md,12px);--mds-entity-icon-color:rgb(var(--label-blue-04,63 94 248));align-items:stretch;background-color:var(--mds-entity-background,rgb(var(--magma-surface-raised,var(--magma-tint-raised,var(--surface-neutral-raised,248 248 248)))));border-radius:var(--radius-lg,16px);-webkit-box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);box-shadow:var(--shadow-outline-weak,0 0 0 1px #0000000d,0 1px 2px 0 #0000000d);color:var(--mds-entity-color,rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5)))));display:flex;gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.delete,.preview,.spinner{border-radius:var(--radius-md,12px);flex-shrink:0;width:calc(var(--spacing,.0025rem)*1100)}.preview{--mds-avatar-radius:var(--mds-entity-icon-radius,var(--radius-md,12px))}.preview:not([variant]){--mds-avatar-color:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)));--mds-avatar-background-color:var(--mds-entity-icon-background,rgb(var(--label-blue-09,216 222 254)))}.preview,.spinner{align-items:center;aspect-ratio:var(--aspect-square,1/1);display:inline-flex;justify-content:center}.spinner{background-color:#0000;display:none;fill:var(--mds-entity-icon-color,rgb(var(--label-blue-04,63 94 248)))}:host([await]:not([await=false])) .spinner{display:inline-flex}mds-spinner{height:calc(var(--spacing,.0025rem)*900);width:calc(var(--spacing,.0025rem)*900)}.infos{display:flex;flex-direction:column;flex-grow:1;gap:0;justify-content:center;min-width:0;white-space:nowrap}.details{align-items:baseline;color:var(--mds-entity-detail-color,rgb(var(--magma-text-muted,var(--magma-tint-text-muted,var(--text-neutral-muted,73 73 73)))));display:flex;gap:calc(var(--spacing,.0025rem)*100)}.details--hidden{display:none}.actions{align-items:center;display:flex;gap:calc(var(--spacing,.0025rem)*200)}.actions--hidden{display:none}::slotted([slot=action]){aspect-ratio:var(--aspect-square,1/1);height:auto;width:calc(var(--spacing,.0025rem)*1100)}::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.title{display:flex;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([pref-contrast=more]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-entity-color:rgb(var(--magma-text-default,var(--magma-tint-text-default,var(--text-neutral-default,5 5 5))));--mds-entity-icon-background:rgb(var(--label-blue-08,200 210 253));--mds-entity-icon-color:rgb(var(--label-blue-03,11 51 246))}}`;
28690
28769
 
28691
28770
  /**
28692
28771
  * @slot - Add `text string`, `HTML elements` or `components` to this slot.
@@ -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
  /**
@@ -36922,13 +37001,13 @@ class MdsFile {
36922
37001
  }; }
36923
37002
  }
36924
37003
 
36925
- /**
36926
- * filesize
36927
- *
36928
- * @copyright 2023 Jason Mulligan <jason.mulligan@avoidwork.com>
36929
- * @license BSD-3-Clause
36930
- * @version 10.1.0
36931
- */
37004
+ /**
37005
+ * filesize
37006
+ *
37007
+ * @copyright 2024 Jason Mulligan <jason.mulligan@avoidwork.com>
37008
+ * @license BSD-3-Clause
37009
+ * @version 10.1.6
37010
+ */
36932
37011
  const ARRAY = "array";
36933
37012
  const BIT = "bit";
36934
37013
  const BITS = "bits";
@@ -37091,9 +37170,10 @@ const STRINGS = {
37091
37170
  result[0] = result[0].toString().replace(PERIOD, separator);
37092
37171
  }
37093
37172
 
37094
- if (pad && Number.isInteger(result[0]) === false && round > 0) {
37095
- const x = separator || PERIOD,
37096
- tmp = result[0].toString().split(x),
37173
+ if (pad && round > 0) {
37174
+ const i = result[0].toString(),
37175
+ x = separator || ((i.match(/(\D)/g) || []).pop() || PERIOD),
37176
+ tmp = i.toString().split(x),
37097
37177
  s = tmp[1] || EMPTY,
37098
37178
  l = s.length,
37099
37179
  n = round - l;
@@ -37115,22 +37195,22 @@ const STRINGS = {
37115
37195
  }
37116
37196
 
37117
37197
  const remove$a = "Αφαιρέστε το αρχείο από την ουρά μεταφόρτωσης";
37118
- var localeEl$s = {
37198
+ var localeEl$t = {
37119
37199
  remove: remove$a
37120
37200
  };
37121
37201
 
37122
37202
  const remove$9 = "Remove file from upload queue";
37123
- var localeEn$s = {
37203
+ var localeEn$t = {
37124
37204
  remove: remove$9
37125
37205
  };
37126
37206
 
37127
37207
  const remove$8 = "Eliminar archivo de la cola de carga";
37128
- var localeEs$s = {
37208
+ var localeEs$t = {
37129
37209
  remove: remove$8
37130
37210
  };
37131
37211
 
37132
37212
  const remove$7 = "Rimuovi file dalla coda di upload";
37133
- var localeIt$t = {
37213
+ var localeIt$u = {
37134
37214
  remove: remove$7
37135
37215
  };
37136
37216
 
@@ -37142,10 +37222,10 @@ class MdsFilePreview {
37142
37222
  this.downloadedEvent = createEvent(this, "mdsFileDownload", 7);
37143
37223
  this.deletedEvent = createEvent(this, "mdsFileDelete", 7);
37144
37224
  this.t = new Locale$1({
37145
- el: Object.assign(Object.assign({}, localeEl$s), fileDescriptionLocaleEl),
37146
- en: Object.assign(Object.assign({}, localeEn$s), fileDescriptionLocaleEn),
37147
- es: Object.assign(Object.assign({}, localeEs$s), fileDescriptionLocaleEs),
37148
- 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),
37149
37229
  });
37150
37230
  /**
37151
37231
  * Truncates the filename shown
@@ -37188,13 +37268,12 @@ class MdsFilePreview {
37188
37268
  card === null || card === void 0 ? void 0 : card.removeEventListener('click', this.onClickDownloadEvent);
37189
37269
  }
37190
37270
  render() {
37191
- var _a, _b, _c;
37192
- return (hAsync(Host, { key: '389451c485ded68d3d3d99e950ec2e2ad08f4ac9', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.deletable && (hAsync("mds-button", { key: 'e04b3974185c09a3d9407b74168a37afce9d23de', title: this.t.get('remove'), class: "action-delete", icon: miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), hAsync("div", { key: 'f899421ec875a83f2593890e0a736759b903b24f', class: "card", part: "card", onClick: this.onClickDownloadEvent }, this.src !== undefined &&
37193
- this.src !== '' &&
37194
- (this.message === undefined || this.message === '') &&
37195
- getExtensionInfos(this.filename, this.suffix).preview ? (hAsync("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (hAsync("div", { class: clsx('preview', this.message === undefined || this.message === ''
37196
- ? 'preview--icon'
37197
- : 'preview--status') }, this.icon !== undefined && this.icon !== '' ? (hAsync("mds-icon", { class: "icon", name: this.icon })) : (hAsync("mds-icon", { class: "icon", name: getFormatsVariant(this.filename, this.suffix).icon })), this.message && (hAsync("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), hAsync("mds-text", { key: '32d3359b9c41a845001e17987ce703219ba29843', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), hAsync("div", { key: '79e555cedfc5d35b2d54ec6a3aee7591cc0edf2e', class: clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (hAsync("mds-text", { key: '84e7d78e1d0639e637173a1c781a61f21e459b6d', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (hAsync("mds-text", { key: '8945ff2c6224b7a4803390eae2fc12474903a3dd', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), getSuffix(this.filename, this.suffix) && (hAsync("mds-badge", { key: '5581cb1f4d13f6f15f28c0957094dcd5982f0a0f', variant: getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_a = this.description) !== null && _a !== void 0 ? _a : this.t.get(this.getDefaultKeyDescription()) }, getSuffix(this.filename, this.suffix))), (this.filesize === undefined || this.filesize === '') && (hAsync("mds-text", { key: 'd743b838cc6fa9fed0f5cdf7914c7652bfc3e1ac', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_b = this.description) !== null && _b !== void 0 ? _b : this.t.get(this.getDefaultKeyDescription()) }, (_c = this.description) !== null && _c !== void 0 ? _c : this.t.get(this.getDefaultKeyDescription())))))));
37271
+ var _a, _b, _c, _d, _e, _f, _g;
37272
+ // a removed attribute or a null bound by a framework counts as not set, like an empty value
37273
+ const hasMessage = ((_a = this.message) !== null && _a !== void 0 ? _a : '') !== '';
37274
+ return (hAsync(Host, { key: '4450e7351e840c4b0f7d72c9b1bc441d9087ad7e', "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, this.deletable && (hAsync("mds-button", { key: '8f1d4ced62f8c479a5e1c324b5ce940cf7aa2d84', title: this.t.get('remove'), class: "action-delete", icon: miBaselineCancel, variant: "light", onClick: this.onClickDeletedEvent })), hAsync("div", { key: '45d38745f7466b0da5b8f2724879ef46d6826bfd', class: "card", part: "card", onClick: this.onClickDownloadEvent }, ((_b = this.src) !== null && _b !== void 0 ? _b : '') !== '' &&
37275
+ !hasMessage &&
37276
+ getExtensionInfos(this.filename, this.suffix).preview ? (hAsync("mds-img", { src: this.src, class: "preview preview--image", "aspect-ratio": "1/1" })) : (hAsync("div", { class: clsx('preview', hasMessage ? 'preview--status' : 'preview--icon') }, ((_c = this.icon) !== null && _c !== void 0 ? _c : '') !== '' ? (hAsync("mds-icon", { class: "icon", name: this.icon })) : (hAsync("mds-icon", { class: "icon", name: getFormatsVariant(this.filename, this.suffix).icon })), this.message && (hAsync("mds-text", { class: "message", typography: "caption", variant: "info" }, this.message)))), hAsync("mds-text", { key: 'e87d673948267ccf70636d4c2940fb8885f2fb96', class: "file-name", typography: "h6", variant: "title", truncate: this.truncate, title: this.filename }, this.filename), hAsync("div", { key: '25e05eb7f5bef19a392b87401f2e780bd8e605cd', class: clsx('infos', this.filesize && 'infos--has-file-size') }, this.filesize && this.filesize === Number(this.filesize).toString() && (hAsync("mds-text", { key: 'cdd7ebbbc99f90caee0c49d74a4b8f4ce0769a2a', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, filesize(Number(this.filesize), { standard: 'jedec' }))), this.filesize && this.filesize !== Number(this.filesize).toString() && (hAsync("mds-text", { key: '381998bfae5b4d76fed78c70f38ef2aab5d13f9e', class: "file-size", truncate: "word", typography: "caption", variant: "info" }, this.filesize)), getSuffix(this.filename, this.suffix) && (hAsync("mds-badge", { key: '89f980cf0ec10d220c83f5a6e8ded4a4d9491a0c', variant: getFormatsVariant(this.filename, this.suffix).variant, tone: "weak", class: "suffix", title: (_d = this.description) !== null && _d !== void 0 ? _d : this.t.get(this.getDefaultKeyDescription()) }, getSuffix(this.filename, this.suffix))), ((_e = this.filesize) !== null && _e !== void 0 ? _e : '') === '' && (hAsync("mds-text", { key: 'f29356eb97dbb5bc137d3d278176633ce938111f', class: "description", truncate: "word", typography: "caption", variant: "info", title: (_f = this.description) !== null && _f !== void 0 ? _f : this.t.get(this.getDefaultKeyDescription()) }, (_g = this.description) !== null && _g !== void 0 ? _g : this.t.get(this.getDefaultKeyDescription())))))));
37198
37277
  }
37199
37278
  get host() { return getElement(this); }
37200
37279
  static get watchers() { return {
@@ -37449,12 +37528,19 @@ class MdsHeader {
37449
37528
  this.closedEvent.emit({ bar: this.headerBar });
37450
37529
  this.headerBar.setOpened(false);
37451
37530
  };
37531
+ // a removed attribute leaves null, which turns the auto hide off like 0
37532
+ this.getAutoHide = () => {
37533
+ var _a;
37534
+ const autoHide = (_a = this.autoHide) !== null && _a !== void 0 ? _a : 0;
37535
+ return Number.isNaN(autoHide) ? 0 : autoHide;
37536
+ };
37452
37537
  this.handleVisibility = () => {
37453
- if (this.autoHide === undefined || this.autoHide === 0 || Number.isNaN(this.autoHide)) {
37538
+ const autoHide = this.getAutoHide();
37539
+ if (autoHide === 0) {
37454
37540
  return;
37455
37541
  }
37456
37542
  // reset var if the page is scrolled to top
37457
- if (window.scrollY < this.autoHide) {
37543
+ if (window.scrollY < autoHide) {
37458
37544
  this.visibility = 'visible';
37459
37545
  this.relativeThresholdUp = 0;
37460
37546
  this.relativeTresholdDown = 0;
@@ -37471,9 +37557,9 @@ class MdsHeader {
37471
37557
  this.relativePosition = this.relativeThresholdUp;
37472
37558
  }
37473
37559
  // set hidden for the first scroll from top
37474
- if (this.relativePosition < this.autoHide && this.autoHide - window.scrollY <= 0) {
37560
+ if (this.relativePosition < autoHide && autoHide - window.scrollY <= 0) {
37475
37561
  this.visibility = 'hidden';
37476
- this.relativePosition = this.autoHide;
37562
+ this.relativePosition = autoHide;
37477
37563
  }
37478
37564
  // update respective threshold if page is scrolled up or down
37479
37565
  if (window.scrollY > this.relativeThresholdUp) {
@@ -37484,11 +37570,13 @@ class MdsHeader {
37484
37570
  }
37485
37571
  };
37486
37572
  this.sanitizeAppearance = () => {
37487
- if (this.appearanceSet === undefined || this.appearanceSet === '') {
37573
+ var _a;
37574
+ const appearanceSet = (_a = this.appearanceSet) !== null && _a !== void 0 ? _a : '';
37575
+ if (appearanceSet === '') {
37488
37576
  return [this.appearance];
37489
37577
  }
37490
37578
  const regex = /\b(\w+)\b/g;
37491
- const matches = this.appearanceSet.match(regex);
37579
+ const matches = appearanceSet.match(regex);
37492
37580
  if (matches) {
37493
37581
  return matches;
37494
37582
  }
@@ -37505,7 +37593,7 @@ class MdsHeader {
37505
37593
  this.handleScroll = () => {
37506
37594
  if (typeof window === 'undefined')
37507
37595
  return;
37508
- if (this.autoHide !== undefined && this.autoHide !== 0 && !Number.isNaN(this.autoHide)) {
37596
+ if (this.getAutoHide() !== 0) {
37509
37597
  this.handleVisibility();
37510
37598
  }
37511
37599
  if (this.sanitizedAppearance.length > 1) {
@@ -37584,7 +37672,7 @@ class MdsHeader {
37584
37672
  }
37585
37673
  }
37586
37674
  render() {
37587
- return (hAsync(Host, { key: 'c6555033c0158d17685d8b7162c45866f8037285', "pref-consumption": preferenceStore.state.consumption, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, !this.hideBackdrop && (hAsync("div", { key: 'fe183e0caf03b46b982bc18efb99ec0919c33f7a', class: "backdrop" }, hAsync("div", { key: '466c441e5e99830a95c2a4042e7f35dcc9e939de', class: "backdrop-blur-item" }), hAsync("div", { key: 'f4908f6ad7b260300bb8e21941c3af23ab922fd1', class: "backdrop-blur-item" }), hAsync("div", { key: 'f303889b90a8e6ea16689c90795890c365f949be', class: "backdrop-blur-item" }), hAsync("div", { key: '8f48b4a5aaeaf05e8631188e2153fbd9da9a5b1b', class: "backdrop-blur-item" }), hAsync("div", { key: '8355bc57ae5af9b902bd58e0ad4a67a492871333', class: "backdrop-blur-item" }), hAsync("div", { key: 'ff5c243df68a4dd26baa862abe2a50050e9ed386', class: "backdrop-blur-item" }), hAsync("div", { key: '0f7c9da08faf5ddc14bd34a098003ebe73911b99', class: "backdrop-blur-item" }), hAsync("div", { key: 'b36c0beab493efd6736294a5a934556107a6fc13', class: "backdrop-blur-item" }), hAsync("div", { key: '9e39753de2c9f661b3d91cca248e4f222a7e09f3', class: "backdrop-blur-item" }), hAsync("div", { key: '2dbec569325d216a9ef2d414f49b44e6da95db37', class: "backdrop-blur-item" }))), hAsync("slot", { key: 'd57ef1616405d7f4fb41b4ab7e948b22fb85f409' }), this.hasMenu && (hAsync("div", { key: '3c252d5e09ae4c93e9909533f2d990d18b31e647', class: "menu", part: "menu" }, hAsync("mds-modal", { key: '2016f4000527a86b15ca0959347dc229db59f2ad', class: "modal", opened: this.isOpened, onMdsModalClose: this.close, position: "right" }, hAsync("slot", { key: 'bb7115881458039e1483caf152901c2d35adc44f', name: "menu" }))))));
37675
+ return (hAsync(Host, { key: 'f672f81878e181d21c234188d2ad02ded1bdb039', "pref-consumption": preferenceStore.state.consumption, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, !this.hideBackdrop && (hAsync("div", { key: '6bf87ed021bcdb62c728fbee3818a8ad11895b06', class: "backdrop" }, hAsync("div", { key: '6a3ad84c2e41313c14531b514b2752f972986ec4', class: "backdrop-blur-item" }), hAsync("div", { key: 'b8031f912733bcc01f47ae28e756ae9f9f184bf1', class: "backdrop-blur-item" }), hAsync("div", { key: 'b9fddc9c2c459bc1b16ef7cc4fe0dd62c6ae0357', class: "backdrop-blur-item" }), hAsync("div", { key: 'fb97781789e0773d35b31744a3f28bd23816e9eb', class: "backdrop-blur-item" }), hAsync("div", { key: '1d464ccd4d846ac79d1b0ea303ab66f41af84116', class: "backdrop-blur-item" }), hAsync("div", { key: '7ab61f7f2f21da6ad94408442237b8e2a16d32c1', class: "backdrop-blur-item" }), hAsync("div", { key: '90fb7f3244c8047c6a576288dad756451de07cdf', class: "backdrop-blur-item" }), hAsync("div", { key: '955ff4ac62f6a5e50726fcf5d097202622e760d2', class: "backdrop-blur-item" }), hAsync("div", { key: '49e995993b74ce17e06c3a05004e7411442dd694', class: "backdrop-blur-item" }), hAsync("div", { key: 'd0c693752ed5b8eee3f0c6925e158168b4e06822', class: "backdrop-blur-item" }))), hAsync("slot", { key: '564de9025f4cdc11edb1dadf27c0c3e03be5d06d' }), this.hasMenu && (hAsync("div", { key: 'c6cd25b6e417675a67662bbe4e2a8f0c89e1fd74', class: "menu", part: "menu" }, hAsync("mds-modal", { key: 'cb330659a98adcf88e8af18097450edb71cb1423', class: "modal", opened: this.isOpened, onMdsModalClose: this.close, position: "right" }, hAsync("slot", { key: 'd4f1dbcaee3303ad4c2130d7f7d64be3486bdc19', name: "menu" }))))));
37588
37676
  }
37589
37677
  get host() { return getElement(this); }
37590
37678
  static get watchers() { return {
@@ -37989,10 +38077,23 @@ function promisifyRequest(request) {
37989
38077
  });
37990
38078
  }
37991
38079
  function createStore(dbName, storeName) {
37992
- const request = indexedDB.open(dbName);
37993
- request.onupgradeneeded = () => request.result.createObjectStore(storeName);
37994
- const dbp = promisifyRequest(request);
37995
- return (txMode, callback) => dbp.then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
38080
+ let dbp;
38081
+ const getDB = () => {
38082
+ if (dbp)
38083
+ return dbp;
38084
+ const request = indexedDB.open(dbName);
38085
+ request.onupgradeneeded = () => request.result.createObjectStore(storeName);
38086
+ dbp = promisifyRequest(request);
38087
+ dbp.then((db) => {
38088
+ // It seems like Safari sometimes likes to just close the connection.
38089
+ // It's supposed to fire this event when that happens. Let's hope it does!
38090
+ db.onclose = () => (dbp = undefined);
38091
+ }, () => {
38092
+ dbp = undefined;
38093
+ });
38094
+ return dbp;
38095
+ };
38096
+ return (txMode, callback) => getDB().then((db) => callback(db.transaction(storeName, txMode).objectStore(storeName)));
37996
38097
  }
37997
38098
  let defaultGetStoreFunc;
37998
38099
  function defaultGetStore() {
@@ -38076,7 +38177,7 @@ class IconsSetController {
38076
38177
  this._iconsSets = new Map();
38077
38178
  this._svgPathUpdate = 'mdsIconSvgPathUpdate';
38078
38179
  this.cacheExp = 60 * 60 * 1000 * 24;
38079
- this.listeners = [];
38180
+ this.listeners = new Set();
38080
38181
  this.memoryCache = {};
38081
38182
  // Try to retrieve svg from cache
38082
38183
  this.isCacheAvailable = async (url) => {
@@ -38155,29 +38256,46 @@ class IconsSetController {
38155
38256
  return { set: this._iconsSets.get(iconName.split('/')[0]) };
38156
38257
  }
38157
38258
  /**
38158
- * recognize svg path pattern and set host and svgPath variable
38259
+ * Sets the directory of the svg files. Query and fragment are dropped: the icon name is
38260
+ * appended to the path.
38159
38261
  *
38160
- * input path: https://www.abc.com/svg/path
38161
- * svgPath = https://www.abc.com/svg/path
38262
+ * input path: https://www.abc.com/svg/path/
38263
+ * svgPath = https://www.abc.com/svg/path/
38162
38264
  *
38163
- * input path: localhost:9000/svg/path
38164
- * svgPath = localhost:9000/svg/path
38265
+ * input path: localhost:9000/svg/path/
38266
+ * svgPath = //localhost:9000/svg/path/ (with the protocol of the page)
38165
38267
  *
38166
- * input path: /svg/path
38167
- * svgPath = {window.location.host}/svg/path
38268
+ * input path: /svg/path/ or svg/path/
38269
+ * svgPath = unchanged, resolved by `fetch` against the document base URL on each request
38168
38270
  *
38169
- * input path: svg/path
38271
+ * input path: empty or not a URL
38170
38272
  * throw error
38171
- *
38172
38273
  */
38173
38274
  setSvgPath(svgPath) {
38174
- const reg = /^(((https?:\/\/)?[.\w]+(:\d+)?)|\/)([\w/-]+)*/;
38175
- const match = reg.exec(svgPath);
38176
- if (!match) {
38177
- throw Error(`Svg path not recognize ${svgPath}, ensure is a absolute path starting with '/' or a url`);
38275
+ const error = Error(`Svg path not recognize ${svgPath}, ensure is a absolute path starting with '/' or a url`);
38276
+ if (typeof svgPath !== 'string' || svgPath.trim() === '') {
38277
+ throw error;
38278
+ }
38279
+ const value = svgPath.trim();
38280
+ // a host with a port and no scheme (`localhost:9000/svg/`) would be read as the scheme `localhost:`
38281
+ const path = /^[\w.-]+:\d+(\/|$)/.test(value) ? `//${value}` : value;
38282
+ let url;
38283
+ try {
38284
+ // the placeholder base only validates a path, which is kept as it is
38285
+ url = new URL(path, 'http://localhost/');
38286
+ }
38287
+ catch (_a) {
38288
+ throw error;
38178
38289
  }
38179
38290
  if (typeof window !== 'undefined') {
38180
- this._svgPath = match[1] ? match[0] : window.location.origin.concat(match[0]);
38291
+ if (/^[a-z][a-z\d+.-]*:/i.test(path)) {
38292
+ url.search = '';
38293
+ url.hash = '';
38294
+ this._svgPath = url.href;
38295
+ }
38296
+ else {
38297
+ this._svgPath = path.replace(/[?#].*$/, '');
38298
+ }
38181
38299
  window.dispatchEvent(new Event(this._svgPathUpdate));
38182
38300
  }
38183
38301
  }
@@ -38185,7 +38303,10 @@ class IconsSetController {
38185
38303
  return this._svgPath;
38186
38304
  }
38187
38305
  registerListener(callback) {
38188
- this.listeners.push(callback);
38306
+ this.listeners.add(callback);
38307
+ }
38308
+ unregisterListener(callback) {
38309
+ this.listeners.delete(callback);
38189
38310
  }
38190
38311
  setUpListener() {
38191
38312
  if (typeof window !== 'undefined') {
@@ -38205,6 +38326,10 @@ class IconsSetController {
38205
38326
  if (Build.isServer && !Build.isTesting) {
38206
38327
  return '';
38207
38328
  }
38329
+ // an icon without the attribute passes an undefined (or null) name: there is nothing to load
38330
+ if (!name) {
38331
+ return '';
38332
+ }
38208
38333
  try {
38209
38334
  if (!this._svgPath && typeof window === 'undefined') {
38210
38335
  throw Error('Cant find svgPath, ensure you set it');
@@ -38226,9 +38351,14 @@ class IconsSetController {
38226
38351
  }
38227
38352
  }
38228
38353
  const src = this._svgPath && !name.startsWith('http') ? this._svgPath.concat(name, '.svg') : name;
38354
+ // Memory first: every instance of an icon already loaded skips the IndexedDB round-trip
38355
+ if (this.memoryCache[src]) {
38356
+ return this.memoryCache[src];
38357
+ }
38229
38358
  const lsCache = await this.isCacheAvailable(src);
38230
- if (this.memoryCache[src] || lsCache) {
38231
- return this.memoryCache[src] || lsCache;
38359
+ if (lsCache) {
38360
+ this.memoryCache[src] = lsCache;
38361
+ return lsCache;
38232
38362
  }
38233
38363
  const response = await fetch(src);
38234
38364
  if (!response.ok) {
@@ -38259,14 +38389,31 @@ const mdsIconCss = () => `@layer reset,vendor,theme,base,components,utilities;:h
38259
38389
  class MdsIcon {
38260
38390
  constructor(hostRef) {
38261
38391
  registerInstance(this, hostRef);
38392
+ // Each update supersedes the ones still loading: only the latest one sets the svg
38393
+ this.lastUpdate = 0;
38394
+ this.wasDisconnected = false;
38395
+ this.onSvgPathUpdate = () => {
38396
+ this.updateIcon();
38397
+ };
38262
38398
  this.convertBase64ToSvg = () => {
38263
38399
  const svgBase64 = this.name.replace(BASE64_SVG_ICON, '').replace(/=/i, '');
38264
38400
  return atob(svgBase64);
38265
38401
  };
38266
38402
  }
38403
+ connectedCallback() {
38404
+ IconsSetService.registerListener(this.onSvgPathUpdate);
38405
+ // the svg path may have changed while the icon was out of the page
38406
+ if (this.wasDisconnected) {
38407
+ this.wasDisconnected = false;
38408
+ this.updateIcon();
38409
+ }
38410
+ }
38411
+ disconnectedCallback() {
38412
+ IconsSetService.unregisterListener(this.onSvgPathUpdate);
38413
+ this.wasDisconnected = true;
38414
+ }
38267
38415
  componentWillLoad() {
38268
38416
  this.updateIcon();
38269
- IconsSetService.registerListener(() => this.updateIcon());
38270
38417
  }
38271
38418
  /**
38272
38419
  * Set the path to the directory of svg files
@@ -38277,8 +38424,13 @@ class MdsIcon {
38277
38424
  return Promise.resolve();
38278
38425
  }
38279
38426
  async updateIcon() {
38280
- if (this.name === '')
38427
+ var _a;
38428
+ const update = ++this.lastUpdate;
38429
+ // `name` is undefined (or null) at runtime when the attribute is missing or removed
38430
+ if (((_a = this.name) !== null && _a !== void 0 ? _a : '') === '') {
38431
+ this.svgHTML = '';
38281
38432
  return Promise.resolve();
38433
+ }
38282
38434
  if (isIconFormatIsBase64(this.name)) {
38283
38435
  this.svgHTML = this.convertBase64ToSvg();
38284
38436
  return Promise.resolve();
@@ -38287,10 +38439,13 @@ class MdsIcon {
38287
38439
  this.svgHTML = this.name;
38288
38440
  return Promise.resolve();
38289
38441
  }
38290
- this.svgHTML = await IconsSetService.fetchSvg(this.name);
38442
+ const svgHTML = await IconsSetService.fetchSvg(this.name);
38443
+ if (update === this.lastUpdate) {
38444
+ this.svgHTML = svgHTML;
38445
+ }
38291
38446
  }
38292
38447
  render() {
38293
- return (hAsync(Host, { key: '8d95b94dbe7f22e136567cb681e44479f5c1be7a' }, this.svgHTML && hAsync("i", { key: 'e9808177023e9521abf570b85302b65e43f9e0d8', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
38448
+ return (hAsync(Host, { key: '9544b1ca2b153e95f6710e0bbed762048676fb48' }, this.svgHTML && hAsync("i", { key: '745b56492d69be55e449b94633b09391972e3d79', "aria-hidden": "true", class: "icon", part: "svg", innerHTML: this.svgHTML })));
38294
38449
  }
38295
38450
  get hostElement() { return getElement(this); }
38296
38451
  static get watchers() { return {
@@ -38317,22 +38472,22 @@ class MdsIcon {
38317
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>`;
38318
38473
 
38319
38474
  const clickToLoad$3 = "Φόρτωση εικόνας";
38320
- var localeEl$r = {
38475
+ var localeEl$s = {
38321
38476
  clickToLoad: clickToLoad$3
38322
38477
  };
38323
38478
 
38324
38479
  const clickToLoad$2 = "Load image";
38325
- var localeEn$r = {
38480
+ var localeEn$s = {
38326
38481
  clickToLoad: clickToLoad$2
38327
38482
  };
38328
38483
 
38329
38484
  const clickToLoad$1 = "Cargar imagen";
38330
- var localeEs$r = {
38485
+ var localeEs$s = {
38331
38486
  clickToLoad: clickToLoad$1
38332
38487
  };
38333
38488
 
38334
38489
  const clickToLoad = "Carica immagine";
38335
- var localeIt$s = {
38490
+ var localeIt$t = {
38336
38491
  clickToLoad: clickToLoad
38337
38492
  };
38338
38493
 
@@ -38347,10 +38502,10 @@ class MdsImg {
38347
38502
  this.imageError = false;
38348
38503
  this.consumptionMode = 'high';
38349
38504
  this.t = new Locale$1({
38350
- el: localeEl$r,
38351
- en: localeEn$r,
38352
- es: localeEs$r,
38353
- it: localeIt$s,
38505
+ el: localeEl$s,
38506
+ en: localeEn$s,
38507
+ es: localeEs$s,
38508
+ it: localeIt$t,
38354
38509
  });
38355
38510
  /**
38356
38511
  * Specifies an alternate text for an image
@@ -38419,14 +38574,14 @@ class MdsImg {
38419
38574
  this.imageError = false;
38420
38575
  }
38421
38576
  componentWillLoad() {
38422
- var _a;
38577
+ var _a, _b;
38423
38578
  this.consumptionMode =
38424
38579
  (_a = localStorage.getItem('mdsPrefConsumption')) !== null && _a !== void 0 ? _a : 'high';
38425
- if (this.srcsetConsumption !== undefined && this.srcsetConsumption !== '') {
38580
+ if (this.srcsetConsumption != null && this.srcsetConsumption !== '') {
38426
38581
  this.srcsetConsumptionData = this.formatConsumptionData(this.srcsetConsumption);
38427
38582
  }
38428
38583
  this.image = this.host.querySelector('img');
38429
- if (this.alt === '') {
38584
+ if (((_b = this.alt) !== null && _b !== void 0 ? _b : '') === '') {
38430
38585
  this.alt = this.autoAltName();
38431
38586
  }
38432
38587
  }
@@ -38502,22 +38657,196 @@ var miOutlineMicOff = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height
38502
38657
 
38503
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>`;
38504
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);
38505
38836
  /**
38506
- * Safe wrappers around ElementInternals methods. In Stencil's hydrate/SSR
38507
- * runtime (and in mock-doc spec tests) `@AttachInternals()` returns an inert
38508
- * proxy whose members are all `undefined`, so direct calls like
38509
- * `internals.setFormValue(...)` throw. Property reads (`internals.form`) are
38510
- * 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
38511
38843
  */
38512
- const setFormValue = (internals, value) => {
38513
- if (typeof (internals === null || internals === void 0 ? void 0 : internals.setFormValue) === 'function') {
38514
- internals.setFormValue(value);
38515
- }
38516
- };
38517
- const setValidity = (internals, flags, message, anchor) => {
38518
- if (typeof (internals === null || internals === void 0 ? void 0 : internals.setValidity) === 'function') {
38519
- internals.setValidity(flags, message, anchor);
38844
+ const updateValidity = (internals, problem, anchor) => {
38845
+ if (problem === undefined) {
38846
+ setValidity(internals, {});
38847
+ return;
38520
38848
  }
38849
+ setValidity(internals, { [flags[problem.rule]]: true }, validityMessage(problem), anchor);
38521
38850
  };
38522
38851
 
38523
38852
  const decrease$3 = "Μείωση";
@@ -38634,6 +38963,97 @@ const minLenghtValidator = (length) => {
38634
38963
  : null;
38635
38964
  };
38636
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
+ };
38637
39057
  const isbnValidatorFn = (input) => {
38638
39058
  if (input === '')
38639
39059
  return null; // don't validate empty values to allow optional controls
@@ -38683,11 +39103,18 @@ class Validator {
38683
39103
  removeValidator(validator) {
38684
39104
  this._validators = this._validators.filter((v) => !this._hasValidator(validator, v));
38685
39105
  }
38686
- 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) {
38687
39111
  const res = this._validators
38688
39112
  .map((v) => v(value))
38689
39113
  .reduce((prev, curr) => (Object.assign(Object.assign({}, prev), curr)), NullValidator);
38690
- 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);
38691
39118
  this.isValid = !this._errors;
38692
39119
  }
38693
39120
  get errors() {
@@ -38737,11 +39164,17 @@ function createInputValidationManager(type) {
38737
39164
  case 'tel':
38738
39165
  inputManager = new InputValidationManager('');
38739
39166
  break;
39167
+ case 'email':
39168
+ inputManager = new InputValidationManager('');
39169
+ inputManager.validator.addValidator(emailValidatorFn);
39170
+ break;
38740
39171
  case 'url':
38741
39172
  inputManager = new InputValidationManager('');
39173
+ inputManager.validator.addValidator(urlValidatorFn);
38742
39174
  break;
38743
39175
  case 'cc':
38744
39176
  inputManager = new InputValidationManager(InputMaskPattern.CC_MASK);
39177
+ inputManager.validator.addValidator(ccValidatorFn);
38745
39178
  break;
38746
39179
  case 'cf':
38747
39180
  inputManager = new InputValidationManager(InputMaskPattern.CF_MASK);
@@ -38766,6 +39199,7 @@ function createInputValidationManager(type) {
38766
39199
  break;
38767
39200
  case 'piva':
38768
39201
  inputManager = new InputValidationManager('');
39202
+ inputManager.validator.addValidator(pivaValidatorFn);
38769
39203
  break;
38770
39204
  default:
38771
39205
  inputManager = new InputValidationManager('');
@@ -38773,6 +39207,42 @@ function createInputValidationManager(type) {
38773
39207
  return inputManager;
38774
39208
  }
38775
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
+
38776
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))))}}`;
38777
39247
 
38778
39248
  class MdsInput {
@@ -38791,19 +39261,29 @@ class MdsInput {
38791
39261
  this.internals = hostRef.$hostElement$.attachInternals();
38792
39262
  hostRef.$hostElement$["s-ei"] = this.internals;
38793
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;
38794
39272
  this.speechToTextLabelKey = 'speechToTextOn';
38795
39273
  this.speechToTextIcon = miOutlineMic;
38796
39274
  this.hasFocus = false;
38797
39275
  this.isRecording = false;
38798
39276
  this.countVariant = 'count-empty';
38799
39277
  this.isPasswordVisible = false;
38800
- // private valuePristine?: string
38801
39278
  this.t = new Locale$1({
38802
39279
  el: localeEl$q,
38803
39280
  en: localeEn$q,
38804
39281
  es: localeEs$q,
38805
39282
  it: localeIt$r,
38806
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;
38807
39287
  /**
38808
39288
  * Specifies whether the element should have autocomplete enabled
38809
39289
  */
@@ -38852,6 +39332,9 @@ class MdsInput {
38852
39332
  * Specifies the value of the input element
38853
39333
  */
38854
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;
38855
39338
  this.countMaxLength = () => {
38856
39339
  var _a, _b, _c;
38857
39340
  if (this.maxlength === undefined || this.maxlength === 0 || Number.isNaN(this.maxlength))
@@ -38888,6 +39371,8 @@ class MdsInput {
38888
39371
  this.value = input.value;
38889
39372
  setFormValue(this.internals, this.value);
38890
39373
  }
39374
+ };
39375
+ this.onKeyDown = (ev) => {
38891
39376
  this.keyDownEvent.emit(ev);
38892
39377
  };
38893
39378
  this.onBlur = () => {
@@ -38909,18 +39394,21 @@ class MdsInput {
38909
39394
  }
38910
39395
  };
38911
39396
  this.stepUp = () => {
38912
- if (this.nativeInput && !this.readonly && !this.disabled) {
39397
+ if (this.nativeInput && this.canEdit()) {
38913
39398
  this.nativeInput.stepUp();
38914
39399
  this.value = this.nativeInput.value;
38915
39400
  }
38916
39401
  };
38917
39402
  this.stepDown = () => {
38918
- if (this.nativeInput && !this.readonly && !this.disabled) {
39403
+ if (this.nativeInput && this.canEdit()) {
38919
39404
  this.nativeInput.stepDown();
38920
39405
  this.value = this.nativeInput.value;
38921
39406
  }
38922
39407
  };
38923
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;
38924
39412
  this.isRecording = !this.isRecording;
38925
39413
  if (!this.isRecording) {
38926
39414
  this.speechToTextLabelKey = 'speechToTextOn';
@@ -38951,11 +39439,12 @@ class MdsInput {
38951
39439
  const SpeechRecognition =
38952
39440
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
38953
39441
  (_c = window.SpeechRecognition) !== null && _c !== void 0 ? _c : window.webkitSpeechRecognition;
38954
- this.value = '';
38955
39442
  if (!SpeechRecognition) {
38956
39443
  this.onSpeechRecognitionError();
38957
39444
  return;
38958
39445
  }
39446
+ // the dictation replaces the value, once it can start
39447
+ this.value = '';
38959
39448
  this.recognition = new SpeechRecognition();
38960
39449
  this.recognition.continuous = true;
38961
39450
  this.recognition.lang = navigator.language || 'it-IT';
@@ -38965,6 +39454,12 @@ class MdsInput {
38965
39454
  let progress = 0; // need to save position progress on speech results
38966
39455
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
38967
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
+ }
38968
39463
  const speechResult = event.results;
38969
39464
  const interimResult = speechResult[progress];
38970
39465
  if (interimResult.isFinal) {
@@ -38989,15 +39484,27 @@ class MdsInput {
38989
39484
  }
38990
39485
  };
38991
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
+ */
38992
39494
  formResetCallback() {
38993
- 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';
38994
39501
  }
38995
39502
  connectedCallback() {
38996
39503
  this.datalistId = `datalist-${hashRandomValue()}`;
38997
39504
  }
38998
39505
  componentWillLoad() {
38999
- // this.valuePristine = this.value
39000
- var _a;
39506
+ var _a, _b, _c;
39507
+ this.defaultValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
39001
39508
  // If the mds-input has a tabindex attribute we get the value
39002
39509
  // and pass it down to the native input, then remove it from the
39003
39510
  // mds-input to avoid causing tabbing twice on the same element
@@ -39006,31 +39513,109 @@ class MdsInput {
39006
39513
  this.tabindex = tabindex !== null ? parseInt(tabindex) : undefined;
39007
39514
  this.el.removeAttribute('tabindex');
39008
39515
  }
39009
- 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);
39010
39517
  this.maxLengthChanged(this.maxlength);
39011
- this.isValid = !(this.required && this.value === '');
39518
+ this.buildValidation();
39519
+ this.isValid = !(this.required && ((_c = this.value) !== null && _c !== void 0 ? _c : '') === '');
39012
39520
  }
39013
39521
  componentDidLoad() {
39014
- var _a, _b, _c;
39015
- this.inputValidation = createInputValidationManager(this.type);
39016
- this.setValidators();
39017
- (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.setAttribute('pattern', String(this.inputValidation.pattern));
39522
+ var _a, _b;
39018
39523
  if (this.autofocus) {
39019
- (_b = this.nativeInput) === null || _b === void 0 ? void 0 : _b.focus();
39524
+ (_a = this.nativeInput) === null || _a === void 0 ? void 0 : _a.focus();
39020
39525
  }
39021
- 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();
39022
39531
  }
39023
- 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);
39024
39543
  if (this.required)
39025
- this.inputValidation.validator.addValidator(requiredValidor);
39026
- if (this.max !== '' && Number(this.max) !== 0 && !Number.isNaN(Number(this.max)))
39027
- this.inputValidation.validator.addValidator(maxValidator(Number(this.max)));
39028
- if (this.min !== '' && Number(this.min) !== 0 && !Number.isNaN(Number(this.min)))
39029
- 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));
39030
39549
  if (this.maxlength !== undefined && this.maxlength !== 0 && !Number.isNaN(this.maxlength))
39031
- this.inputValidation.validator.addValidator(maxLenghtValidator(this.maxlength));
39550
+ validator.addValidator(maxLenghtValidator(this.maxlength));
39032
39551
  if (this.minlength !== undefined && this.minlength !== 0 && !Number.isNaN(this.minlength))
39033
- 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';
39034
39619
  }
39035
39620
  /**
39036
39621
  * Emits the change event when the component value changes
@@ -39039,6 +39624,7 @@ class MdsInput {
39039
39624
  var _a;
39040
39625
  this.changeEvent.emit({ value: this.value });
39041
39626
  setFormValue(this.internals, (_a = this.value) !== null && _a !== void 0 ? _a : null);
39627
+ this.updateFormValidity();
39042
39628
  if (this.maxlength !== undefined) {
39043
39629
  this.countMaxLength();
39044
39630
  }
@@ -39067,7 +39653,9 @@ class MdsInput {
39067
39653
  * @param validator the validator function to add
39068
39654
  */
39069
39655
  async addValidator(validator) {
39656
+ this.customValidators.push(validator);
39070
39657
  this.inputValidation.validator.addValidator(validator);
39658
+ this.updateFormValidity();
39071
39659
  return Promise.resolve();
39072
39660
  }
39073
39661
  /**
@@ -39075,7 +39663,9 @@ class MdsInput {
39075
39663
  * @param validator the validator function to remove
39076
39664
  */
39077
39665
  async removeValidator(validator) {
39666
+ this.customValidators = this.customValidators.filter((custom) => custom !== validator);
39078
39667
  this.inputValidation.validator.removeValidator(validator);
39668
+ this.updateFormValidity();
39079
39669
  }
39080
39670
  /**
39081
39671
  * Returns if validator is presen
@@ -39093,11 +39683,13 @@ class MdsInput {
39093
39683
  return Promise.resolve(this.inputValidation.validator.errors);
39094
39684
  }
39095
39685
  validateInput() {
39686
+ var _a, _b;
39096
39687
  // validate input only when atleast one validator is present
39097
39688
  if (this.inputValidation.validator.hasValidator()) {
39098
- 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 : '');
39099
39691
  // set variant attribute
39100
- if (this.value === '' && !this.required)
39692
+ if (((_b = this.value) !== null && _b !== void 0 ? _b : '') === '' && !this.required)
39101
39693
  this.variant = 'primary';
39102
39694
  else
39103
39695
  this.variant = this.isValid ? 'success' : 'error';
@@ -39133,22 +39725,42 @@ class MdsInput {
39133
39725
  }
39134
39726
  render() {
39135
39727
  var _a, _b, _c;
39136
- return (hAsync(Host, { key: 'd5cb1993ef8dc636decfd98fe40c11ca5ead80b5', "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: '7489e9436bf3d4d3c7c64d363c90cca1ef742681', 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: '5ec4c32ddf38d0d0d21e248c417f0aaa544f0fdd', class: "counter counter--vertical" }, hAsync("mds-button", { key: '6ba7a4966bd9b251ac88383b2ee35eedef227b51', 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: '4214a635b2c36e540ed236db7aeec28573b72417', 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: '5881e589300af8b7e7bcaaf9431ceedd548dc569', 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: '4a0d54eb936783121616057e69de1d2f3c512a63', 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: '0254dd0ee9093d872b5151b63317b18cf0ecb324', class: "password-mask" }, hAsync("div", { key: '5e76f0773a27c1af16898fa32d4e5f8a5fd52b27', 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: 'c8d5eb731302b2ce7066e2399004cbaf68750372', 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: '0302e0c8ed7f9ef2d23d79b7d233b839ad6d4846', position: "top", active: this.hasFocus, part: "tip-top" }, this.disabled && hAsync("mds-input-tip-item", { key: '43859d4bab0a03af8c314d44b98484f221f3eae7', expanded: true, variant: "disabled" }), this.readonly && hAsync("mds-input-tip-item", { key: '23a46a6d493476c0a3eba8d4a27a64002f8ad11f', expanded: true, variant: "readonly" }), this.required && (hAsync("mds-input-tip-item", { key: 'a2d7405948372ebd86f548b134cc433cc43ec666', expanded: this.hasFocus, variant: this.isValid ? 'required-success' : 'required' }))), hAsync("mds-input-tip", { key: '535b4b714af5376f2a5d525bcaa6347a97415411', position: "bottom", active: this.hasFocus, part: "tip-bottom" }, this.tip && (hAsync("mds-input-tip-item", { key: 'f6c0d41fdf1a0abf55b6a34023846f4fef8b3016', expanded: true, variant: "text" }, this.tip)), this.maxlength && (hAsync("mds-input-tip-item", { key: 'ce680bf5a5693e4203a6827851abab1d24a5d67a', part: "tip-count", expanded: true, variant: this.countVariant }, this.currentLengthLabel))), this.datalist && (hAsync("datalist", { key: 'a52dbc0541033e86a84a455c0830ae8b7f2b7ebf', 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) => {
39137
39729
  return hAsync("option", { key: i, value: element });
39138
- }))), this.icon && !this.await && (hAsync("mds-icon", { key: '4a6014e3b245f8fe513acd4e6269e7afa606343d', class: clsx('icon', this.variant), name: this.icon })), hAsync("mds-spinner", { key: 'bff5454113674d2c8497dd0ed658544b17dafbb1', 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) })));
39139
39731
  }
39140
39732
  static get formAssociated() { return true; }
39141
39733
  get el() { return getElement(this); }
39142
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
+ }],
39143
39758
  "value": [{
39144
39759
  "valueChanged": 0
39145
39760
  }],
39146
39761
  "variant": [{
39147
39762
  "variantChanged": 0
39148
39763
  }],
39149
- "maxlength": [{
39150
- "maxLengthChanged": 0
39151
- }],
39152
39764
  "disabled": [{
39153
39765
  "disabledChanged": 0
39154
39766
  }]
@@ -39188,6 +39800,7 @@ class MdsInput {
39188
39800
  "currentLengthLabel": [32],
39189
39801
  "countVariant": [32],
39190
39802
  "isPasswordVisible": [32],
39803
+ "formDisabled": [32],
39191
39804
  "addValidator": [64],
39192
39805
  "removeValidator": [64],
39193
39806
  "hasValidator": [64],
@@ -39195,7 +39808,7 @@ class MdsInput {
39195
39808
  "setFocus": [64],
39196
39809
  "getInputElement": [64]
39197
39810
  },
39198
- "$listeners$": undefined,
39811
+ "$listeners$": [[0, "invalid", "invalidHandler"]],
39199
39812
  "$lazyBundleId$": "-",
39200
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"]]
39201
39814
  }; }
@@ -39218,8 +39831,15 @@ class MdsInputDate {
39218
39831
  this.internals = hostRef.$hostElement$.attachInternals();
39219
39832
  hostRef.$hostElement$["s-ei"] = this.internals;
39220
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;
39221
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 = '';
39222
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
39223
39843
  this.touched = false;
39224
39844
  /**
39225
39845
  * Specifies the value of the input
@@ -39263,6 +39883,7 @@ class MdsInputDate {
39263
39883
  this.required = false;
39264
39884
  this.calendarKey = 0;
39265
39885
  this.hasFocus = false;
39886
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
39266
39887
  this.handleChange = (event) => {
39267
39888
  const input = event.target;
39268
39889
  this.touched = true;
@@ -39274,6 +39895,7 @@ class MdsInputDate {
39274
39895
  this.onBlur = (ev) => {
39275
39896
  const input = ev.target;
39276
39897
  this.hasFocus = false;
39898
+ this.touched = true;
39277
39899
  this.value = input.value;
39278
39900
  this.validateValue(input.validity.badInput);
39279
39901
  };
@@ -39292,6 +39914,7 @@ class MdsInputDate {
39292
39914
  this.calendarKey += 1;
39293
39915
  };
39294
39916
  this.handleCalendarChange = (ev) => {
39917
+ this.touched = true;
39295
39918
  this.value = ev.detail.startDate;
39296
39919
  if (this.delay === 0)
39297
39920
  return;
@@ -39307,27 +39930,67 @@ class MdsInputDate {
39307
39930
  this.valueChange.emit(this.value);
39308
39931
  this.validateValue();
39309
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
+ */
39310
39937
  validateValue(hasBadInput = false) {
39311
39938
  const date = DateTime.fromISO(this.value);
39312
39939
  const hasValue = Boolean(this.value);
39313
39940
  const hasInvalidValue = hasValue && !date.isValid;
39314
- const isMissingRequiredValue = this.required && !hasValue;
39315
- const outOfRange = date.isValid &&
39316
- ((this.max && DateTime.fromISO(this.max) < date) ||
39317
- (this.min && DateTime.fromISO(this.min) > date));
39318
- if (hasBadInput || hasInvalidValue || isMissingRequiredValue || outOfRange) {
39319
- this.isValid = false;
39320
- this.variant = 'error';
39321
- setFormValue(this.internals, null);
39322
- 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) } };
39323
39970
  }
39324
- else {
39325
- this.isValid = true;
39326
- this.variant = 'primary';
39327
- setFormValue(this.internals, this.value);
39328
- 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) } };
39329
39973
  }
39330
- 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();
39331
39994
  }
39332
39995
  /**
39333
39996
  * Sets focus on the underlying input element.
@@ -39353,30 +40016,75 @@ class MdsInputDate {
39353
40016
  async getErrors() {
39354
40017
  return Promise.resolve(this.isValid ? null : { error: '' });
39355
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
+ */
39356
40026
  formResetCallback() {
39357
- 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';
39358
40038
  }
39359
40039
  componentWillLoad() {
39360
40040
  this.isSlotted = !(this.host.getAttribute('slot') === null || this.host.getAttribute('slot') === '');
39361
40041
  this.value = this.value || '';
39362
- // Se max è precedente a min, imposto max uguale a min
39363
- if (this.min !== null && this.min !== '' && this.max !== null && this.max !== '') {
39364
- const minDate = DateTime.fromISO(this.min);
39365
- const maxDate = DateTime.fromISO(this.max);
39366
- if (maxDate < minDate) {
39367
- this.max = this.min;
39368
- }
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;
39369
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;
39370
40067
  this.validateValue();
39371
40068
  }
39372
40069
  render() {
39373
- 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 } : {})))))));
39374
40073
  }
39375
40074
  static get formAssociated() { return true; }
39376
40075
  get host() { return getElement(this); }
39377
40076
  static get watchers() { return {
39378
40077
  "value": [{
39379
40078
  "handleValue": 0
40079
+ }],
40080
+ "max": [{
40081
+ "validationRulesChanged": 0
40082
+ }],
40083
+ "min": [{
40084
+ "validationRulesChanged": 0
40085
+ }],
40086
+ "required": [{
40087
+ "validationRulesChanged": 0
39380
40088
  }]
39381
40089
  }; }
39382
40090
  static get style() { return mdsInputDateCss(); }
@@ -39395,6 +40103,7 @@ class MdsInputDate {
39395
40103
  "disabled": [516],
39396
40104
  "readonly": [516],
39397
40105
  "required": [516],
40106
+ "formDisabled": [32],
39398
40107
  "empty": [32],
39399
40108
  "isValid": [32],
39400
40109
  "touched": [32],
@@ -39405,7 +40114,7 @@ class MdsInputDate {
39405
40114
  "setValue": [64],
39406
40115
  "getErrors": [64]
39407
40116
  },
39408
- "$listeners$": undefined,
40117
+ "$listeners$": [[0, "invalid", "invalidHandler"]],
39409
40118
  "$lazyBundleId$": "-",
39410
40119
  "$attrsToReflect$": [["value", "value"], ["name", "name"], ["variant", "variant"], ["min", "min"], ["max", "max"], ["delay", "delay"], ["hideToday", "hide-today"], ["disabled", "disabled"], ["readonly", "readonly"], ["required", "required"]]
39411
40120
  }; }
@@ -39455,7 +40164,7 @@ var localeIt$q = {
39455
40164
  to: to
39456
40165
  };
39457
40166
 
39458
- 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))))}}`;
39459
40168
 
39460
40169
  /**
39461
40170
  * @slot calendar-preselection - Add `HTML elements` or `components` to this slot.
@@ -39478,6 +40187,9 @@ class MdsInputDateRange {
39478
40187
  this.internalEndDate = '';
39479
40188
  this.visibleCalendarDate = '';
39480
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;
39481
40193
  this.t = new Locale$1({
39482
40194
  el: localeEl$p,
39483
40195
  en: localeEn$p,
@@ -39517,6 +40229,12 @@ class MdsInputDateRange {
39517
40229
  * Enables the linked dual-calendar range picker behavior.
39518
40230
  */
39519
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;
39520
40238
  this.lastEmittedStartDate = null;
39521
40239
  this.lastEmittedEndDate = null;
39522
40240
  this.initialStartDate = '';
@@ -39568,6 +40286,7 @@ class MdsInputDateRange {
39568
40286
  setAttributeIfEmpty(field, 'aria-label', ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${part}` : part);
39569
40287
  });
39570
40288
  };
40289
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
39571
40290
  this.handleCalendarHover = (ev) => {
39572
40291
  if (this.internalStartDate === '' || this.internalEndDate !== '') {
39573
40292
  this.clearHoverPreview();
@@ -39693,12 +40412,23 @@ class MdsInputDateRange {
39693
40412
  this.hoveredCalendarDate = null;
39694
40413
  this.syncCalendarsHoverAttributes();
39695
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
+ }
39696
40422
  getEmittableDateRangeDetail() {
39697
40423
  const startDate = DateTime.fromISO(this.internalStartDate);
39698
40424
  const endDate = DateTime.fromISO(this.internalEndDate);
39699
40425
  if (!startDate.isValid || !endDate.isValid) {
39700
40426
  return null;
39701
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
+ }
39702
40432
  return {
39703
40433
  startDate: this.internalStartDate,
39704
40434
  endDate: this.internalEndDate,
@@ -39723,11 +40453,53 @@ class MdsInputDateRange {
39723
40453
  handleEndDateChange(newValue) {
39724
40454
  this.syncExternalDate('end', newValue);
39725
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
+ }
39726
40496
  componentWillLoad() {
39727
- this.internalStartDate = this.startDate;
39728
- this.internalEndDate = this.endDate;
39729
- this.initialStartDate = this.startDate;
39730
- this.initialEndDate = this.endDate;
40497
+ var _a, _b;
40498
+ // a null bound by a framework counts as no date, as the watchers already do
40499
+ this.internalStartDate = (_a = this.startDate) !== null && _a !== void 0 ? _a : '';
40500
+ this.internalEndDate = (_b = this.endDate) !== null && _b !== void 0 ? _b : '';
40501
+ this.initialStartDate = this.internalStartDate;
40502
+ this.initialEndDate = this.internalEndDate;
39731
40503
  this.visibleCalendarDate = this.resolveVisibleCalendarDate(this.internalStartDate, this.internalEndDate);
39732
40504
  // Se max è precedente a min, imposto max uguale a min
39733
40505
  if (this.min !== null && this.min !== '' && this.max !== null && this.max !== '') {
@@ -39772,6 +40544,8 @@ class MdsInputDateRange {
39772
40544
  else {
39773
40545
  this.internalEndDate = event.start;
39774
40546
  }
40547
+ // a preset ending before it starts snaps its end to the start, as a typed range does
40548
+ this.validateDateRange();
39775
40549
  this.updateInputValue('end', this.internalEndDate);
39776
40550
  this.syncFormValue();
39777
40551
  const calendars = this.getCalendars();
@@ -39785,13 +40559,23 @@ class MdsInputDateRange {
39785
40559
  componentDidLoad() {
39786
40560
  var _a;
39787
40561
  this.nameSlottedFields();
40562
+ this.forwardRange(false);
40563
+ this.forwardDisabled(false);
39788
40564
  this.updateInputListeners();
39789
40565
  this.updateInputValue('start', this.internalStartDate);
39790
40566
  this.updateInputValue('end', this.internalEndDate);
40567
+ // a preset matching the dates of load shows selected from the start
40568
+ this.checkPreselections();
39791
40569
  this.syncFormValue();
39792
40570
  this.host.addEventListener('focusout', this.handleFocusOut);
39793
40571
  (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.addEventListener('mdsCalendarHover', this.handleCalendarHover);
39794
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
+ }
39795
40579
  formResetCallback() {
39796
40580
  this.clearHoverPreview();
39797
40581
  this.internalStartDate = this.initialStartDate;
@@ -39823,9 +40607,7 @@ class MdsInputDateRange {
39823
40607
  this.syncFormValue();
39824
40608
  }
39825
40609
  updateInputValue(slotName, newValue) {
39826
- var _a;
39827
- const slot = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`slot[name="${slotName}"]`);
39828
- const input = slot === null || slot === void 0 ? void 0 : slot.assignedElements()[0];
40610
+ const input = this.slottedField(slotName);
39829
40611
  if (input != null) {
39830
40612
  this.syncingInputSlots.add(slotName);
39831
40613
  input.setValue(newValue).finally(() => {
@@ -39909,7 +40691,7 @@ class MdsInputDateRange {
39909
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 } : {})))));
39910
40692
  }
39911
40693
  render() {
39912
- return (hAsync(Host, { key: '0b4803ed205a3f80ed75d736155922bb9a89f75f', 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: '22e8c579d83fa509c95c370900c4fb505d84b208', class: "inputs" }, hAsync("div", { key: '6c5723d097ca2d34d7b3ec54f45651f4ba1e44d2', class: "input-element" }, hAsync("mds-text", { key: 'a3024c5b10350d669780e793dc968559bdc8872e', class: "date-label", typography: "detail", onClick: this.focusStartDateInput }, this.t.get('from')), hAsync("div", { key: '60b90b73a958b948b797db6e4a1a19cbaf39b1da', class: "input-wrapper" }, hAsync("slot", { key: 'e4c1d1883f4450dc48f0a076838c676909b28002', name: "start" }))), hAsync("div", { key: '0372128ff074223195d2d78271a12182dfd36e3c', class: "input-element" }, hAsync("mds-text", { key: '0f76780975b2f7967ee293fc7abcd8cc6c88d621', class: "date-label", typography: "detail", onClick: this.focusEndDateInput }, this.t.get('to')), hAsync("div", { key: '9c53027e6b5350e8717039b725739fa3f65c1fda', class: "input-wrapper" }, hAsync("slot", { key: '121672e05c51699522826cca5785e3f691ae06c9', name: "end" })))), hAsync("div", { key: '4a5d117a67f835f88a6f80806330b6c95d8890f9', class: "action-open-calendar-wrapper" }, hAsync("mds-button", { key: 'b1a69bc2672f8e525372d2df000937f84f5156c6', class: "action-open-calendar", variant: "dark", tone: "text", icon: miBaselineCalendarToday, id: "calendar-dropdown", onClick: this.handleOpenCalendarClick })), hAsync("mds-dropdown", { key: 'af1380b78a263024355729655be085f6ad707fbe', 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())));
39913
40695
  }
39914
40696
  syncFormValue() {
39915
40697
  var _a, _b, _c, _d;
@@ -39929,6 +40711,15 @@ class MdsInputDateRange {
39929
40711
  }],
39930
40712
  "endDate": [{
39931
40713
  "handleEndDateChange": 0
40714
+ }],
40715
+ "min": [{
40716
+ "handleRangeChange": 0
40717
+ }],
40718
+ "max": [{
40719
+ "handleRangeChange": 0
40720
+ }],
40721
+ "disabled": [{
40722
+ "handleDisabledChange": 0
39932
40723
  }]
39933
40724
  }; }
39934
40725
  static get style() { return mdsInputDateRangeCss(); }
@@ -39945,17 +40736,19 @@ class MdsInputDateRange {
39945
40736
  "hideToday": [516, "hide-today"],
39946
40737
  "dualCalendar": [516, "dual-calendar"],
39947
40738
  "name": [513],
40739
+ "disabled": [516],
39948
40740
  "calendarKey": [32],
39949
40741
  "internalStartDate": [32],
39950
40742
  "internalEndDate": [32],
39951
40743
  "visibleCalendarDate": [32],
39952
40744
  "dropdownRef": [32],
39953
40745
  "hasPreselection": [32],
40746
+ "formDisabled": [32],
39954
40747
  "preselect": [64]
39955
40748
  },
39956
40749
  "$listeners$": undefined,
39957
40750
  "$lazyBundleId$": "-",
39958
- "$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"]]
39959
40752
  }; }
39960
40753
  }
39961
40754
 
@@ -40109,7 +40902,7 @@ var localeIt$p = {
40109
40902
  digit: digit
40110
40903
  };
40111
40904
 
40112
- 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}`;
40113
40906
 
40114
40907
  class MdsInputOtp {
40115
40908
  constructor(hostRef) {
@@ -40121,6 +40914,13 @@ class MdsInputOtp {
40121
40914
  this.internals = hostRef.$hostElement$.attachInternals();
40122
40915
  hostRef.$hostElement$["s-ei"] = this.internals;
40123
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;
40124
40924
  this.t = new Locale$1({
40125
40925
  el: localeEl$o,
40126
40926
  en: localeEn$o,
@@ -40136,26 +40936,29 @@ class MdsInputOtp {
40136
40936
  */
40137
40937
  this.autosubmit = false;
40138
40938
  /**
40139
- * 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
40140
40946
  */
40141
40947
  this.value = '';
40142
- this.getOtpCode = () => {
40143
- const inputs = Array.from(this.element.shadowRoot.querySelectorAll('mds-input'));
40144
- const otpCode = inputs.map((input) => input.value).join('');
40145
- return otpCode;
40146
- };
40948
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
40147
40949
  this.setOtpDigit = (currentInput, digit) => {
40148
- currentInput.value = digit;
40149
- const otpCode = this.getOtpCode();
40150
- this.value = otpCode;
40151
- 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();
40152
40955
  };
40153
40956
  this.submit = (currentInput) => {
40154
- var _a;
40155
- 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;
40156
40959
  currentInput.blur();
40157
40960
  if (this.autosubmit && isOtpCompleted) {
40158
- (_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();
40159
40962
  }
40160
40963
  };
40161
40964
  this.handleKeyDown = (e) => {
@@ -40205,11 +41008,47 @@ class MdsInputOtp {
40205
41008
  return ((_a = this.accessibleName) !== null && _a !== void 0 ? _a : '') !== '' ? `${this.accessibleName}, ${digit}` : digit;
40206
41009
  };
40207
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
+ }
40208
41039
  render() {
40209
- 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
+ })));
40210
41044
  }
40211
41045
  static get formAssociated() { return true; }
40212
41046
  get element() { return getElement(this); }
41047
+ static get watchers() { return {
41048
+ "value": [{
41049
+ "valueChanged": 0
41050
+ }]
41051
+ }; }
40213
41052
  static get style() { return mdsInputOtpCss(); }
40214
41053
  static get cmpMeta() { return {
40215
41054
  "$flags$": 73,
@@ -40218,15 +41057,18 @@ class MdsInputOtp {
40218
41057
  "accessibleName": [1, "aria-label"],
40219
41058
  "length": [2],
40220
41059
  "autosubmit": [516],
40221
- "value": [1537]
41060
+ "disabled": [516],
41061
+ "value": [1537],
41062
+ "digits": [32],
41063
+ "formDisabled": [32]
40222
41064
  },
40223
41065
  "$listeners$": undefined,
40224
41066
  "$lazyBundleId$": "-",
40225
- "$attrsToReflect$": [["autosubmit", "autosubmit"], ["value", "value"]]
41067
+ "$attrsToReflect$": [["autosubmit", "autosubmit"], ["disabled", "disabled"], ["value", "value"]]
40226
41068
  }; }
40227
41069
  }
40228
41070
 
40229
- 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))))}}`;
40230
41072
 
40231
41073
  /**
40232
41074
  * @part header - The element containing the labels displayed over the input element
@@ -40244,6 +41086,9 @@ class MdsInputRange {
40244
41086
  this.internals = hostRef.$hostElement$.attachInternals();
40245
41087
  hostRef.$hostElement$["s-ei"] = this.internals;
40246
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;
40247
41092
  /**
40248
41093
  * The greatest value in the range of permitted values
40249
41094
  */
@@ -40258,25 +41103,31 @@ class MdsInputRange {
40258
41103
  */
40259
41104
  this.step = 1;
40260
41105
  this.onInput = () => {
40261
- if (Number.isNaN(this.inputElement.value))
40262
- throw Error(`Entered value ${this.inputElement.value} is not a Number`);
41106
+ // a range input always holds a number: the browser sanitizes anything else
40263
41107
  // trigger valueChanged that update progress and emit event
40264
41108
  this.value = Number(this.inputElement.value);
40265
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;
40266
41116
  }
40267
41117
  calculateProgress() {
40268
41118
  // validate value
40269
41119
  let v = Number(this.inputElement.value);
41120
+ const step = this.allowedStep();
40270
41121
  // multiplier is needed to manage decimal value and step, so we can work with integer value and avoid decimal division
40271
- const multiplier = Math.pow(10, this.decimalPlaces);
41122
+ const multiplier = Math.pow(10, this.countDecimals(step));
40272
41123
  if (v > this.max)
40273
41124
  v = this.max;
40274
41125
  else if (v < this.min)
40275
41126
  v = this.min;
40276
- if (((v - this.min) * multiplier) % (this.step * multiplier) !== 0) {
41127
+ if (((v - this.min) * multiplier) % (step * multiplier) !== 0) {
40277
41128
  v =
40278
- (Math.round((v * multiplier - this.min * multiplier) / (this.step * multiplier)) *
40279
- (this.step * multiplier) +
41129
+ (Math.round((v * multiplier - this.min * multiplier) / (step * multiplier)) *
41130
+ (step * multiplier) +
40280
41131
  this.min * multiplier) /
40281
41132
  multiplier;
40282
41133
  }
@@ -40315,24 +41166,31 @@ class MdsInputRange {
40315
41166
  this.calculateProgress();
40316
41167
  }
40317
41168
  stepChanged() {
40318
- if (this.step <= 0)
40319
- throw Error('step cant be negative or zero');
40320
- this.decimalPlaces = this.countDecimals(this.step);
40321
41169
  this.calculateProgress();
40322
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. */
40323
41175
  formResetCallback() {
40324
- 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;
40325
41184
  }
40326
41185
  componentDidLoad() {
40327
41186
  var _a;
40328
- this.decimalPlaces = this.countDecimals(this.step);
40329
41187
  this.onInput(); // define value
40330
41188
  this.label = (_a = this.element.textContent) !== null && _a !== void 0 ? _a : '';
40331
41189
  this.calculateProgress();
40332
41190
  }
40333
41191
  render() {
40334
41192
  var _a;
40335
- 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 }))));
40336
41194
  }
40337
41195
  static get formAssociated() { return true; }
40338
41196
  get element() { return getElement(this); }
@@ -40365,7 +41223,8 @@ class MdsInputRange {
40365
41223
  "step": [2],
40366
41224
  "disabled": [1540],
40367
41225
  "value": [1538],
40368
- "progress": [32]
41226
+ "progress": [32],
41227
+ "formDisabled": [32]
40369
41228
  },
40370
41229
  "$listeners$": undefined,
40371
41230
  "$lazyBundleId$": "-",
@@ -40391,8 +41250,14 @@ class MdsInputSelect {
40391
41250
  this.internals = hostRef.$hostElement$.attachInternals();
40392
41251
  hostRef.$hostElement$["s-ei"] = this.internals;
40393
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;
40394
41256
  // @State() selected: boolean
40395
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;
40396
41261
  /**
40397
41262
  * If true, the element is displayed as disabled
40398
41263
  */
@@ -40413,11 +41278,10 @@ class MdsInputSelect {
40413
41278
  * Specifies the value of the component
40414
41279
  */
40415
41280
  this.value = '';
40416
- this.onInput = (ev) => {
40417
- const input = ev.target;
40418
- if (input) {
40419
- this.value = input.value;
40420
- }
41281
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
41282
+ this.onInput = () => {
41283
+ this.adoptSelection();
41284
+ this.syncSelection();
40421
41285
  };
40422
41286
  this.onBlur = () => {
40423
41287
  this.hasFocus = false;
@@ -40425,6 +41289,9 @@ class MdsInputSelect {
40425
41289
  this.onFocus = () => {
40426
41290
  this.hasFocus = true;
40427
41291
  };
41292
+ // a removed attribute or a null bound by a framework counts as no placeholder, like ''
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; };
40428
41295
  this.emptyOptions = () => {
40429
41296
  var _a;
40430
41297
  const select = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('select');
@@ -40433,10 +41300,10 @@ class MdsInputSelect {
40433
41300
  return;
40434
41301
  }
40435
41302
  options.forEach((option, index) => {
40436
- if (this.placeholder === undefined || this.placeholder === '') {
41303
+ if (!this.hasPlaceholder()) {
40437
41304
  option.remove();
40438
41305
  }
40439
- if (this.placeholder !== undefined && this.placeholder !== '' && index > 0) {
41306
+ if (this.hasPlaceholder() && index > 0) {
40440
41307
  option.remove();
40441
41308
  }
40442
41309
  });
@@ -40448,30 +41315,18 @@ class MdsInputSelect {
40448
41315
  if (options == null) {
40449
41316
  return;
40450
41317
  }
40451
- if ((this.placeholder === undefined || this.placeholder === '') && options.length > 0) {
41318
+ if (!this.hasPlaceholder() && options.length > 0) {
40452
41319
  this.emptyOptions();
40453
41320
  }
40454
- if (this.placeholder !== undefined && this.placeholder !== '' && options.length > 1) {
41321
+ if (this.hasPlaceholder() && options.length > 1) {
40455
41322
  this.emptyOptions();
40456
41323
  }
40457
41324
  elements === null || elements === void 0 ? void 0 : elements.forEach((element) => {
40458
41325
  var _a;
40459
41326
  (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.appendChild(element.cloneNode(true));
40460
41327
  });
40461
- this.setCurrentValue();
40462
- };
40463
- this.setCurrentValue = () => {
40464
- var _a;
40465
- if (this.selectEl == null)
40466
- return;
40467
- if (this.value != null && this.value !== '' && this.value !== 0 && !Number.isNaN(this.value)) {
40468
- this.selectEl.querySelectorAll('option').forEach((element) => {
40469
- element.selected = element.value === this.value;
40470
- });
40471
- }
40472
- else if (this.placeholder === undefined || this.placeholder === '') {
40473
- this.value = (_a = this.selectEl) === null || _a === void 0 ? void 0 : _a.querySelectorAll('option')[0].value;
40474
- }
41328
+ this.applySelection(true);
41329
+ this.syncSelection();
40475
41330
  };
40476
41331
  }
40477
41332
  /**
@@ -40485,10 +41340,67 @@ class MdsInputSelect {
40485
41340
  * Emits the change event when the component value changes
40486
41341
  */
40487
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) {
40488
41382
  var _a, _b, _c;
40489
- this.changeEvent.emit({ value: (_a = this.value) === null || _a === void 0 ? void 0 : _a.toString() });
40490
- this.setCurrentValue();
40491
- 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);
40492
41404
  }
40493
41405
  disabledChanged(newValue) {
40494
41406
  /**
@@ -40508,11 +41420,15 @@ class MdsInputSelect {
40508
41420
  * @param oldValue placeholder old value
40509
41421
  */
40510
41422
  placeholderChanged(newValue, oldValue) {
40511
- if (newValue !== undefined && newValue !== '' && (oldValue === undefined || oldValue === '')) {
40512
- let defaultOption = document.querySelector('.placeholder-option');
41423
+ if (this.selectEl == null)
41424
+ return;
41425
+ if (newValue != null && newValue !== '' && (oldValue !== null && oldValue !== void 0 ? oldValue : '') === '') {
41426
+ // the placeholder of this select, in its shadow root, not one of the page
41427
+ let defaultOption = this.placeholderOption();
40513
41428
  if (defaultOption)
40514
41429
  defaultOption.remove();
40515
41430
  defaultOption = document.createElement('option');
41431
+ defaultOption.className = 'placeholder-option';
40516
41432
  this.selectEl.insertBefore(defaultOption, this.selectEl.firstChild);
40517
41433
  defaultOption.value = '';
40518
41434
  defaultOption.text = newValue;
@@ -40527,8 +41443,29 @@ class MdsInputSelect {
40527
41443
  defaultOption.disabled = true;
40528
41444
  }
40529
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
+ */
40530
41453
  formResetCallback() {
40531
- 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();
40532
41469
  }
40533
41470
  componentWillLoad() {
40534
41471
  // needed for react component, this prop should be used as default-value html attributo instead of defaultValue prop
@@ -40538,19 +41475,64 @@ class MdsInputSelect {
40538
41475
  !Number.isNaN(this.defaultValue)) {
40539
41476
  this.value = this.defaultValue;
40540
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();
40541
41483
  }
40542
41484
  componentDidLoad() {
40543
- 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)) {
40544
41490
  setFormValue(this.internals, this.value.toString());
40545
41491
  }
40546
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
+ }
40547
41528
  render() {
40548
- return (hAsync(Host, { key: 'b561106215eaf3c4627be567b2012df33869ca57', "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: '2c08f43c6eb2158fcf14d47bae513275a8e6984d', "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: '784153070f787d18874602fea5a966ef0780d499', 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 &&
40549
41531
  this.defaultValue !== '' &&
40550
41532
  this.defaultValue !== 0 &&
40551
41533
  !Number.isNaN(this.defaultValue)
40552
41534
  ? undefined
40553
- : true }, this.placeholder)), hAsync("div", { key: 'a00dc86d1ab765f58b28379fa9f34907e6fec0ef', class: "icon-container" }, hAsync("mds-icon", { key: 'beacd0d5a5c970c0a9ec733b2ec1b9670a27e83e', class: "icon", name: miBaselineKeyboardArrowDown })), hAsync("div", { key: 'adcdc196b279e17e2e418b8dfedb1f4c1e0e0a72', class: "option-container" }, hAsync("slot", { key: 'a108fe3bab7f65bf69f7e7caea89fe4d2d5d44ba', onSlotchange: this.onSlotChangeHandler })), hAsync("mds-input-tip", { key: '63273ebf58279dcda1671e30e7d6ab24ccfe4132', position: "top", active: this.hasFocus, part: "tip-top" }, this.disabled && hAsync("mds-input-tip-item", { key: 'af787ee323723818934e6007f984d630212a36f5', expanded: true, variant: "disabled" }), this.required && (hAsync("mds-input-tip-item", { key: '50b4e96405e0adcdccc47f00e9d07c50f4117501', 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' })))));
40554
41536
  }
40555
41537
  static get formAssociated() { return true; }
40556
41538
  get host() { return getElement(this); }
@@ -40558,6 +41540,12 @@ class MdsInputSelect {
40558
41540
  "value": [{
40559
41541
  "valueChanged": 0
40560
41542
  }],
41543
+ "required": [{
41544
+ "requiredChanged": 0
41545
+ }],
41546
+ "name": [{
41547
+ "nameChanged": 0
41548
+ }],
40561
41549
  "disabled": [{
40562
41550
  "disabledChanged": 0
40563
41551
  }],
@@ -40583,6 +41571,7 @@ class MdsInputSelect {
40583
41571
  "defaultValue": [520, "default-value"],
40584
41572
  "variant": [513],
40585
41573
  "hasFocus": [32],
41574
+ "formDisabled": [32],
40586
41575
  "setValue": [64]
40587
41576
  },
40588
41577
  "$listeners$": undefined,
@@ -40652,7 +41641,7 @@ var localeIt$o = {
40652
41641
  unselect: unselect
40653
41642
  };
40654
41643
 
40655
- 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))))}}`;
40656
41645
 
40657
41646
  /**
40658
41647
  * @slot - Put text string or elements here
@@ -40668,7 +41657,13 @@ class MdsInputSwitch {
40668
41657
  this.internals = hostRef.$hostElement$.attachInternals();
40669
41658
  hostRef.$hostElement$["s-ei"] = this.internals;
40670
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;
40671
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;
40672
41667
  this.dirty = false;
40673
41668
  this.hasText = false;
40674
41669
  this.t = new Locale$1({
@@ -40701,27 +41696,35 @@ class MdsInputSwitch {
40701
41696
  * Specifies the value of the input element
40702
41697
  */
40703
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
+ */
40704
41703
  this.uncheckSiblings = () => {
40705
- const elements = document.querySelectorAll(`mds-input-switch[name="${this.name}"]`);
40706
- elements.forEach((element) => {
40707
- 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) {
40708
41715
  element.checked = false;
40709
41716
  }
40710
41717
  });
40711
41718
  };
40712
41719
  this.handleInputOnChange = (e) => {
40713
- var _a, _b;
41720
+ var _a;
40714
41721
  const { value } = e.target;
40715
41722
  e.preventDefault();
40716
41723
  e.stopPropagation();
40717
41724
  const input = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.getElementById('field');
40718
41725
  this.checked = input.checked;
40719
41726
  this.indeterminate = false;
40720
- if (this.type === 'radio') {
40721
- this.uncheckSiblings();
40722
- }
40723
41727
  this.changeEvent.emit({ name: this.name, checked: this.checked, value });
40724
- setFormValue(this.internals, this.checked ? ((_b = this.value) !== null && _b !== void 0 ? _b : null) : null);
40725
41728
  };
40726
41729
  this.handleDirty = () => {
40727
41730
  this.dirty = true;
@@ -40732,6 +41735,12 @@ class MdsInputSwitch {
40732
41735
  this.km.addElement((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.field'));
40733
41736
  this.km.attachClickBehavior();
40734
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);
40735
41744
  }
40736
41745
  disabledChanged(newValue) {
40737
41746
  /**
@@ -40739,31 +41748,50 @@ class MdsInputSwitch {
40739
41748
  * if solved, please check mds-button, mds-input, mds-input-*
40740
41749
  * https://github.com/ionic-team/stencil/issues/5461
40741
41750
  */
40742
- if (newValue) {
40743
- setFormValue(this.internals, null);
40744
- return;
40745
- }
40746
41751
  if (newValue === false) {
41752
+ // the watcher runs again with undefined
40747
41753
  this.disabled = undefined;
41754
+ return;
40748
41755
  }
41756
+ this.updateFormValue();
40749
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
+ */
40750
41762
  checkedChanged(newValue) {
40751
41763
  if (newValue === false) {
41764
+ // the watcher runs again with undefined
40752
41765
  this.checked = undefined;
41766
+ return;
40753
41767
  }
41768
+ if (newValue && this.type === 'radio')
41769
+ this.uncheckSiblings();
41770
+ this.updateFormValue();
41771
+ }
41772
+ valueChanged() {
41773
+ this.updateFormValue();
40754
41774
  }
40755
41775
  explicitChanged(newValue) {
40756
41776
  if (newValue === false) {
40757
41777
  this.explicit = undefined;
40758
41778
  }
40759
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. */
40760
41784
  formResetCallback() {
40761
- setFormValue(this.internals, '');
41785
+ this.checked = this.loadChecked ? true : undefined;
41786
+ this.updateFormValue();
41787
+ }
41788
+ componentWillLoad() {
41789
+ this.loadChecked = this.checked === true;
40762
41790
  }
40763
41791
  componentDidLoad() {
40764
- var _a, _b;
41792
+ var _a;
40765
41793
  this.label = (_a = this.host.textContent) !== null && _a !== void 0 ? _a : '';
40766
- setFormValue(this.internals, this.checked ? ((_b = this.value) !== null && _b !== void 0 ? _b : null) : null);
41794
+ this.updateFormValue();
40767
41795
  this.checkFocusElement();
40768
41796
  this.hasText = hasSlotted(this.host);
40769
41797
  }
@@ -40771,7 +41799,7 @@ class MdsInputSwitch {
40771
41799
  var _a;
40772
41800
  const { iconChecked, iconUnchecked, iconIndeterminate } = inputSwitchIconVariant[this.type];
40773
41801
  const iconCheckedUser = this.icon !== '' ? this.icon : iconChecked;
40774
- 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' })))));
40775
41803
  }
40776
41804
  static get formAssociated() { return true; }
40777
41805
  get host() { return getElement(this); }
@@ -40782,6 +41810,9 @@ class MdsInputSwitch {
40782
41810
  "checked": [{
40783
41811
  "checkedChanged": 0
40784
41812
  }],
41813
+ "value": [{
41814
+ "valueChanged": 0
41815
+ }],
40785
41816
  "explicit": [{
40786
41817
  "explicitChanged": 0
40787
41818
  }]
@@ -40803,6 +41834,7 @@ class MdsInputSwitch {
40803
41834
  "typography": [513],
40804
41835
  "variant": [513],
40805
41836
  "value": [1537],
41837
+ "formDisabled": [32],
40806
41838
  "dirty": [32],
40807
41839
  "hasText": [32]
40808
41840
  },
@@ -41233,8 +42265,9 @@ var localeIt$m = {
41233
42265
  sortByStatus: sortByStatus
41234
42266
  };
41235
42267
 
41236
- 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))))}`;
41237
42269
 
42270
+ const isSort = (value) => value === 'date' || value === 'status';
41238
42271
  class MdsInputUpload {
41239
42272
  constructor(hostRef) {
41240
42273
  registerInstance(this, hostRef);
@@ -41249,6 +42282,8 @@ class MdsInputUpload {
41249
42282
  this.fileUploaded = 0;
41250
42283
  this.cssMinCols = 1000;
41251
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();
41252
42287
  this.t = new Locale$1({
41253
42288
  el: localeEl$l,
41254
42289
  en: localeEn$l,
@@ -41259,10 +42294,21 @@ class MdsInputUpload {
41259
42294
  this.files = [];
41260
42295
  this.progress = 0;
41261
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;
41262
42302
  /**
41263
42303
  * Defines the file types the file input should accept
41264
42304
  */
41265
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;
41266
42312
  /**
41267
42313
  * Specifies the max size of a single file that can be uploaded in MB
41268
42314
  */
@@ -41271,6 +42317,7 @@ class MdsInputUpload {
41271
42317
  * Specifies the max number of files that can be uploaded
41272
42318
  */
41273
42319
  this.maxFiles = 1;
42320
+ this.isDisabled = () => !!this.disabled || this.formDisabled;
41274
42321
  this.updateCSSCustomProps = () => {
41275
42322
  if (typeof window === 'undefined')
41276
42323
  return;
@@ -41278,37 +42325,44 @@ class MdsInputUpload {
41278
42325
  this.cssMinCols = Number(elementStyles.getPropertyValue('--mds-input-upload-min-cols'));
41279
42326
  };
41280
42327
  this.onDropHandler = (event) => {
41281
- if (this.nativeInput && event.dataTransfer) {
41282
- this.update(this.nativeInput, this.prepareFiles(event.dataTransfer.files));
41283
- }
41284
42328
  event.preventDefault();
42329
+ this.dragging = false;
42330
+ if (event.dataTransfer && !this.isDisabled()) {
42331
+ this.onAdd(event.dataTransfer.files);
42332
+ }
41285
42333
  };
41286
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
41287
42337
  event.preventDefault();
42338
+ if (this.isDisabled() && event.dataTransfer)
42339
+ event.dataTransfer.dropEffect = 'none';
41288
42340
  };
41289
42341
  this.onDragEnterHandler = (event) => {
41290
- var _a;
42342
+ if (this.isDisabled()) {
42343
+ event.preventDefault();
42344
+ return;
42345
+ }
41291
42346
  this.dragging = true;
41292
42347
  this.animateText = true;
41293
- (_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.add('drag-area--on-drag-enter');
41294
42348
  event.preventDefault();
41295
42349
  };
41296
42350
  this.onDragLeaveHandler = (event) => {
41297
- var _a;
41298
42351
  this.dragging = false;
41299
- (_a = this.elDragArea) === null || _a === void 0 ? void 0 : _a.classList.remove('drag-area--on-drag-enter');
41300
42352
  event.preventDefault();
41301
42353
  };
41302
- this.onAdd = (event) => {
41303
- if (!event)
42354
+ this.onAdd = (fileList) => {
42355
+ if (!fileList)
41304
42356
  return;
41305
- if (event instanceof FileList || Array.isArray(event)) {
41306
- this.update(this.nativeInput, this.prepareFiles(event));
41307
- }
41308
- else {
41309
- const input = event.target;
41310
- this.update(input, this.prepareFiles(input.files));
41311
- }
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 = '';
41312
42366
  };
41313
42367
  /**
41314
42368
  * Delete single file from upload
@@ -41316,32 +42370,23 @@ class MdsInputUpload {
41316
42370
  */
41317
42371
  this.onCancel = (filekey) => {
41318
42372
  this.files = this.files.filter((f) => f.key !== filekey);
41319
- if (this.nativeInput) {
41320
- const data = new DataTransfer();
41321
- this.files.forEach((f) => {
41322
- if (f.status === Status.SUCCESS) {
41323
- data.items.add(f.file);
41324
- }
41325
- });
41326
- this.update(this.nativeInput, data.files);
41327
- }
42373
+ this.update();
41328
42374
  };
41329
42375
  /**
41330
42376
  * Delete all files from upload
41331
42377
  */
41332
42378
  this.onReset = () => {
41333
- if (this.nativeInput) {
41334
- this.files = [];
41335
- this.nativeInput.value = '';
41336
- this.update(this.nativeInput, null);
41337
- }
42379
+ this.files = [];
42380
+ this.update(true);
41338
42381
  };
41339
42382
  this.onChangeTab = (event) => {
41340
- if (event.value !== undefined && event.value !== '') {
41341
- this.sortFiles(this.files, event.value);
41342
- this.userSort = event.value;
41343
- localStorage.setItem(LOCALSTORAGE_KEY_USER_SORT, this.userSort);
41344
- }
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);
41345
42390
  };
41346
42391
  this.handleAddFileClick = () => {
41347
42392
  var _a;
@@ -41354,29 +42399,51 @@ class MdsInputUpload {
41354
42399
  this.onCancel(filekey);
41355
42400
  };
41356
42401
  }
42402
+ formDisabledCallback(disabled) {
42403
+ this.formDisabled = disabled;
42404
+ }
41357
42405
  formResetCallback() {
41358
42406
  this.onReset();
41359
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
+ }
41360
42413
  componentWillLoad() {
41361
- var _a;
41362
42414
  this.extensions = this.getExtension();
41363
- 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';
41364
42417
  this.updateInitialValue(this.initialValue);
41365
42418
  }
41366
42419
  componentDidLoad() {
41367
42420
  this.updateCSSCustomProps();
41368
42421
  }
42422
+ componentDidRender() {
42423
+ this.revokePreviewUrls(new Set(this.files.map((f) => f.file)));
42424
+ }
42425
+ disconnectedCallback() {
42426
+ this.revokePreviewUrls(new Set());
42427
+ }
41369
42428
  updateInitialValue(newValue) {
41370
42429
  if (newValue) {
41371
42430
  this.onAdd(newValue);
41372
42431
  }
41373
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
+ }
41374
42442
  /**
41375
- * 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
41376
42444
  */
41377
42445
  getFiles() {
41378
- var _a, _b;
41379
- 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());
41380
42447
  }
41381
42448
  /**
41382
42449
  * Returns a promise of files error or null if there's none
@@ -41404,14 +42471,9 @@ class MdsInputUpload {
41404
42471
  * Limit number of file to maxFiles
41405
42472
  * Check size and type for every single file.
41406
42473
  * @param fileList list recieved from input selection or drag and drop
41407
- * @returns list of files accepted
41408
42474
  */
41409
42475
  prepareFiles(fileList) {
41410
- var _a;
41411
- if (!fileList)
41412
- return null;
41413
42476
  const files = fileList instanceof FileList ? Array.from(fileList) : fileList;
41414
- const data = new DataTransfer();
41415
42477
  // prepare new file added
41416
42478
  for (const file of files) {
41417
42479
  // update only file not added previously or files with errors
@@ -41439,11 +42501,7 @@ class MdsInputUpload {
41439
42501
  }
41440
42502
  }
41441
42503
  }
41442
- // set input.files only uploadable file
41443
- this.files.filter((f) => f.status === Status.SUCCESS).forEach((f) => data.items.add(f.file));
41444
- this.sortFiles(this.files, (_a = this.sort) !== null && _a !== void 0 ? _a : this.userSort);
41445
- // this.updateProgress()
41446
- return data.files;
42504
+ this.sortFiles(this.files, this.activeSort);
41447
42505
  }
41448
42506
  // Stores the locale key, not the translated message: consumers translate at
41449
42507
  // read time so the texts follow the current language
@@ -41464,10 +42522,31 @@ class MdsInputUpload {
41464
42522
  }
41465
42523
  return { errorKey, type };
41466
42524
  }
41467
- update(input, files) {
41468
- 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);
41469
42543
  return;
41470
- 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) {
41471
42550
  const validity = {};
41472
42551
  const errorMessage = new Set();
41473
42552
  this.files
@@ -41486,10 +42565,10 @@ class MdsInputUpload {
41486
42565
  }
41487
42566
  errorMessage.add(this.t.get(error.errorKey));
41488
42567
  });
41489
- setFormValue(this.internals, input.value);
42568
+ this.updateFormValue();
41490
42569
  setValidity(this.internals, validity, Array.from(errorMessage).join(', '));
41491
42570
  this.updateProgress();
41492
- this.changedEvent.emit(files);
42571
+ this.changedEvent.emit(reset ? null : this.acceptedFiles());
41493
42572
  }
41494
42573
  /**
41495
42574
  * Update progress bar
@@ -41557,27 +42636,47 @@ class MdsInputUpload {
41557
42636
  sortById(a, b) {
41558
42637
  return b.id - a.id;
41559
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
+ }
41560
42655
  isSortTabShown() {
41561
- return this.sort !== undefined && this.files.length > 1;
42656
+ var _a;
42657
+ // the type has no empty sort, but the attribute can be empty or removed
42658
+ const sort = (_a = this.sort) !== null && _a !== void 0 ? _a : '';
42659
+ return sort !== '' && this.files.length > 1;
41562
42660
  }
41563
42661
  render() {
41564
- return (hAsync(Host, { key: 'e1a32be494b7d7fb876f06a565fe2989a1006772' }, hAsync("div", { key: 'd73ebcefb2d6b5c07482a3032d91053227cdcd36', class: "drag-area", onDrop: this.onDropHandler, onDragOver: this.onDragOverHandler, onDragEnter: this.onDragEnterHandler, onDragLeave: this.onDragLeaveHandler, ref: (dragArea) => (this.elDragArea = dragArea) }, hAsync("div", { key: '7468b77de3ceccce2a773266d28fb9a0f70d4d00', class: "main-action" }, hAsync("div", { key: '795115957fd4f59ebf31110ee242949d81ee1c96', class: "main-action-icon" }, hAsync("mds-icon", { key: '9e990950fb40a7785a63380d38ed834b6551a92d', class: "icon", name: miOutlineFileUpload })), hAsync("mds-text", { key: 'f0ee6b827d8ab659adc24dcbd33d99e345fb0d8e', animation: this.animateText ? 'yugop' : 'none', variant: "title", typography: "action", text: this.dragging
42662
+ var _a;
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
41565
42664
  ? this.t.get('dragEnter')
41566
- : this.t.get('clickOrDrag', { maxFiles: this.maxFiles }) })), hAsync("div", { key: '08f74e8d58bfd8e9196201519fac07a1c387934d', class: "main-actions" }, hAsync("mds-button", { key: '9164c66f5788c8a7fad6920f408ee0ba57c1d734', 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
41567
42666
  ? this.t.get('addFile', { maxFiles: this.maxFiles })
41568
- : this.t.get('selectFile') }), this.files.length > 0 && (hAsync("mds-button", { key: '67cea3986da73239328033e2eca3666a26178425', variant: "error", onClick: this.onReset, label: this.t.get('cancel') }))), hAsync("div", { key: '1a22aab0126e26b070dab3e506116e9ee42acea9', class: "main-infos" }, hAsync("mds-progress", { key: '71b3b782bd8e51c1052dc8bf0534e0c69fc644af', "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" }, this.maxFiles !== 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)
41569
42668
  ? this.t.get('currentFilesWithMax', {
41570
42669
  currentFiles: this.files.length,
41571
42670
  maxFiles: this.maxFiles,
41572
42671
  })
41573
- : this.t.get('currentFilesNoMax', { currentFiles: this.files.length }))))), hAsync("input", { key: '7a011ac7906507984257a23ef3a99035f5d9b5d7', type: "file", accept: this.accept, hidden: true, ref: (i) => (this.nativeInput = i), onChange: this.onAdd, multiple: this.maxFiles > 1 }), hAsync("div", { key: 'a36f62945be2e34bf71729d71dabec834cf6ad76', class: "additional-infos" }, hAsync("div", { key: '416441c915e0e599262a4dc6ed029699b3e381d9', class: clsx('file-specs', this.isSortTabShown() && 'file-specs-sort') }, hAsync("mds-text", { key: '0cfb6962631f9566a81d181c183df32629353921', 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 !== ''
41574
42673
  ? `${this.t.get('canUpload')} ${this.extensions}`
41575
- : this.t.get('canUploadAll')), hAsync("mds-text", { key: '33afa2e116e0c89a816749ee74c2562ebcefda34', variant: "info", typography: "caption" }, this.t.get('maxFileSizePerFile', { maxFileSize: this.maxFileSize }))), this.isSortTabShown() && (hAsync("mds-tab", { key: '879c6312cfbb88da0ec892ef19ac9c5df402a004', class: "action-sort", onMdsTabChange: this.handleTabChange }, hAsync("mds-tab-item", { key: 'b60f5dd78ca23850dd686276b25edb2571112380', icon: iconSortById, selected: this.userSort === 'date', title: this.t.get('sortByDate'), value: "date" }), hAsync("mds-tab-item", { key: 'c97f59d11574ec5505b4dc1120ce2c3183fd8fce', icon: iconSortByStatus, selected: this.userSort === 'status', title: this.t.get('sortByStatus'), value: "status" })))), hAsync("div", { key: '9db8ec83d45a656d7d7b4b322820f2495d79c498', 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) => {
41576
42675
  switch (file.status) {
41577
42676
  case Status.ERROR:
41578
- 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) }));
41579
42678
  case Status.SUCCESS:
41580
- 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) }));
41581
42680
  }
41582
42681
  }))));
41583
42682
  }
@@ -41587,6 +42686,12 @@ class MdsInputUpload {
41587
42686
  "initialValue": [{
41588
42687
  "updateInitialValue": 0
41589
42688
  }],
42689
+ "name": [{
42690
+ "handleNameChange": 0
42691
+ }],
42692
+ "sort": [{
42693
+ "handleSortChange": 0
42694
+ }],
41590
42695
  "maxFiles": [{
41591
42696
  "handleMaxFilesChange": 0
41592
42697
  }]
@@ -41597,6 +42702,8 @@ class MdsInputUpload {
41597
42702
  "$tagName$": "mds-input-upload",
41598
42703
  "$members$": {
41599
42704
  "accept": [513],
42705
+ "disabled": [516],
42706
+ "name": [513],
41600
42707
  "maxFileSize": [514, "max-file-size"],
41601
42708
  "maxFiles": [514, "max-files"],
41602
42709
  "sort": [513],
@@ -41605,13 +42712,15 @@ class MdsInputUpload {
41605
42712
  "files": [32],
41606
42713
  "progress": [32],
41607
42714
  "animateText": [32],
42715
+ "activeSort": [32],
42716
+ "formDisabled": [32],
41608
42717
  "getFiles": [64],
41609
42718
  "getFilesError": [64],
41610
42719
  "reset": [64]
41611
42720
  },
41612
42721
  "$listeners$": undefined,
41613
42722
  "$lazyBundleId$": "-",
41614
- "$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"]]
41615
42724
  }; }
41616
42725
  }
41617
42726
 
@@ -42470,9 +43579,12 @@ class MdsKeyboard {
42470
43579
  };
42471
43580
  this.updateElements = () => {
42472
43581
  this.filteredNodes.forEach((node) => {
42473
- if (node.name !== undefined) {
43582
+ var _a;
43583
+ // the type has no empty name, but the attribute can be empty or removed
43584
+ const name = (_a = node.name) !== null && _a !== void 0 ? _a : '';
43585
+ if (name !== '') {
42474
43586
  this.keyEls.push(node);
42475
- this.keyCombination.add(this.keyCodes(node.name.toLowerCase()).toString());
43587
+ this.keyCombination.add(this.keyCodes(name.toLowerCase()).toString());
42476
43588
  }
42477
43589
  });
42478
43590
  };
@@ -42588,7 +43700,7 @@ class MdsKeyboard {
42588
43700
  }
42589
43701
  }
42590
43702
  render() {
42591
- return (hAsync(Host, { key: '2428b02400771f84bf5bec6a04d9ee79b58214e6', "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: '21bcbcb3751df1686a532ba45ecf70247772d980', class: "shortcuts" }, hAsync("slot", { key: '8c5e6a0061fba55e4b40de59a1a44fd9e83e3552' })), this.try && (hAsync("mds-button", { key: 'ad306361f059bfe504f2e5017c937ba1ffa46357', icon: this.getButtonIcon(), "aria-label": this.t.get('testKeyCombination'), class: "combination-checker", variant: "dark", tone: "text", onClick: this.startKeyboardShortcutTest })), this.try && (hAsync("mds-tooltip", { key: '36bfe040249307ac3cd51552964822d17c6e6d6d', target: ".combination-checker" }, this.testPassed === undefined && this.t.get('testKeyCombination'), this.testPassed === true && this.t.get('testPassed'), this.testPassed === false && (hAsync("div", { key: '2c2f2860b83297a3110432247d69d9a5ef2a622a', class: "errors" }, [...this.errors].map((error) => (hAsync("mds-text", { typography: "tip" }, this.t.get(error))))))))));
43703
+ return (hAsync(Host, { key: '0f22438d7c2df4f9370f9daad1756c065720fded', "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("div", { key: '302124ad13826c7dc832a8d4dbfc3866f3bb5af9', class: "shortcuts" }, hAsync("slot", { key: '0e74fab3079d226dbb14d062e24f7e460984e1da' })), this.try && (hAsync("mds-button", { key: '18ad345428615395f0a6e20453c57db4f8ed93f8', icon: this.getButtonIcon(), "aria-label": this.t.get('testKeyCombination'), class: "combination-checker", variant: "dark", tone: "text", onClick: this.startKeyboardShortcutTest })), this.try && (hAsync("mds-tooltip", { key: '545d9abac32f56ce8199d75a1cc1dc114dd442ac', target: ".combination-checker" }, this.testPassed === undefined && this.t.get('testKeyCombination'), this.testPassed === true && this.t.get('testPassed'), this.testPassed === false && (hAsync("div", { key: 'f668a098b0b91658a9db962c2560d90169083a9c', class: "errors" }, [...this.errors].map((error) => (hAsync("mds-text", { typography: "tip" }, this.t.get(error))))))))));
42592
43704
  }
42593
43705
  get host() { return getElement(this); }
42594
43706
  static get watchers() { return {
@@ -42876,10 +43988,13 @@ class MdsKeyboardKey {
42876
43988
  });
42877
43989
  this.keyboardKeys = keyboardKeysData;
42878
43990
  this.getTitle = () => {
42879
- if (this.name !== undefined) {
42880
- return this.t.get(this.keyboardKeys[this.name.toLowerCase()].description, {
42881
- character: this.keyboardKeys[this.name.toLowerCase()].alias,
42882
- keyboardPosition: this.keyboardKeys[this.name.toLowerCase()].keyboardPosition,
43991
+ var _a;
43992
+ // the type has no empty name, but the attribute can be empty or removed
43993
+ const name = (_a = this.name) !== null && _a !== void 0 ? _a : '';
43994
+ if (name !== '') {
43995
+ return this.t.get(this.keyboardKeys[name.toLowerCase()].description, {
43996
+ character: this.keyboardKeys[name.toLowerCase()].alias,
43997
+ keyboardPosition: this.keyboardKeys[name.toLowerCase()].keyboardPosition,
42883
43998
  });
42884
43999
  }
42885
44000
  return undefined;
@@ -42887,7 +44002,7 @@ class MdsKeyboardKey {
42887
44002
  }
42888
44003
  render() {
42889
44004
  var _a, _b, _c, _d;
42890
- return (hAsync(Host, { key: 'e76fe5d7d65f26b88f909798b85b1b21d480840a', title: this.getTitle() }, hAsync("div", { key: 'a237a895ec3c2b5a92e54daa814cbb2c3528a5e2', class: "physical-key" }, this.name && icons.has(this.name) ? (hAsync("mds-icon", { name: (_a = icons.get(this.name)) !== null && _a !== void 0 ? _a : miBaselineBrokenImage, class: "shortcut-icon" })) : (hAsync("mds-text", { class: "shortcut-text", typography: "detail" }, this.name && hAsync("b", null, this.keyboardKeys[this.name].alias))), this.name && ((_b = this.keyboardKeys[this.name]) === null || _b === void 0 ? void 0 : _b.keyboardPosition) && (hAsync("mds-text", { key: '55480170f7746a1d11c570dccf618cd581d4f3f0', typography: "label" }, ((_c = this.keyboardKeys[this.name].keyboardPosition) === null || _c === void 0 ? void 0 : _c.left) && 'l', ((_d = this.keyboardKeys[this.name].keyboardPosition) === null || _d === void 0 ? void 0 : _d.right) && 'r')))));
44005
+ return (hAsync(Host, { key: 'c6f1c7d6e70627515b3eb3c962967050c41e8e4c', title: this.getTitle() }, hAsync("div", { key: '0b9a357f1a03a8842d01e10e9fab975e14e4c07d', class: "physical-key" }, this.name && icons.has(this.name) ? (hAsync("mds-icon", { name: (_a = icons.get(this.name)) !== null && _a !== void 0 ? _a : miBaselineBrokenImage, class: "shortcut-icon" })) : (hAsync("mds-text", { class: "shortcut-text", typography: "detail" }, this.name && hAsync("b", null, this.keyboardKeys[this.name].alias))), this.name && ((_b = this.keyboardKeys[this.name]) === null || _b === void 0 ? void 0 : _b.keyboardPosition) && (hAsync("mds-text", { key: '47ff355c39a1575159216946af4dd43735bd37e5', typography: "label" }, ((_c = this.keyboardKeys[this.name].keyboardPosition) === null || _c === void 0 ? void 0 : _c.left) && 'l', ((_d = this.keyboardKeys[this.name].keyboardPosition) === null || _d === void 0 ? void 0 : _d.right) && 'r')))));
42891
44006
  }
42892
44007
  static get style() { return mdsKeyboardKeyCss(); }
42893
44008
  static get cmpMeta() { return {
@@ -43194,8 +44309,9 @@ class MdsMention {
43194
44309
  };
43195
44310
  }
43196
44311
  render() {
43197
- var _a, _b;
43198
- return (hAsync(Host, { key: 'c72d5a9b3a0c9af73da6749236f332c34a4a8ecd' }, hAsync("mds-icon", { key: '3702acf811e4c80e05efbc3d50bc8a7402475042', name: this.icon !== undefined && this.icon !== '' ? this.icon : miBaselineAlternateEmail }), hAsync("mds-text", { key: '7727b1962062628017c88e85e129922b5fbec63d', typography: this.sizeTypography[(_a = this.size) !== null && _a !== void 0 ? _a : 'md'] }, this.size === 'lg' ? this.label : hAsync("b", null, this.label)), this.deletable && (hAsync("mds-button", { key: 'f0923dd375fcf930d2f5375c01ce8a45ac5770ec', class: "action-remove", icon: miBaselineCancel, onClick: this.onDeleteHandler, size: "sm", title: `${this.t.get('remove')} ${(_b = this.label) !== null && _b !== void 0 ? _b : ''}`.trim(), tone: "text", variant: "dark" }))));
44312
+ var _a, _b, _c;
44313
+ const icon = (_a = this.icon) !== null && _a !== void 0 ? _a : '';
44314
+ return (hAsync(Host, { key: '914ba108dd94074f6d4cfe55d3ae8f6da5d20c07' }, hAsync("mds-icon", { key: '452fa5eafee76b142b2ca9491f0bdb0ed21649a2', name: icon !== '' ? icon : miBaselineAlternateEmail }), hAsync("mds-text", { key: '1070089d8e8d38d6d9ae477b6ac7b16b7d5bb29a', typography: this.sizeTypography[(_b = this.size) !== null && _b !== void 0 ? _b : 'md'] }, this.size === 'lg' ? this.label : hAsync("b", null, this.label)), this.deletable && (hAsync("mds-button", { key: '958f40a8b6b208f3bdd5572750b7e6e728176f18', class: "action-remove", icon: miBaselineCancel, onClick: this.onDeleteHandler, size: "sm", title: `${this.t.get('remove')} ${(_c = this.label) !== null && _c !== void 0 ? _c : ''}`.trim(), tone: "text", variant: "dark" }))));
43199
44315
  }
43200
44316
  get host() { return getElement(this); }
43201
44317
  static get style() { return mdsMentionCss(); }
@@ -43662,18 +44778,20 @@ class MdsNotification {
43662
44778
  });
43663
44779
  };
43664
44780
  this.clean = (value) => {
43665
- if (value === 0 || isNaN(value))
44781
+ var _a;
44782
+ // a removed attribute leaves null, which counts as no value and no maximum
44783
+ if ((value !== null && value !== void 0 ? value : 0) === 0 || isNaN(value))
43666
44784
  return '';
43667
- if (this.max !== undefined && this.max !== 0 && !Number.isNaN(this.max)) {
43668
- if (value > this.max) {
43669
- return `+${Number(this.max).toLocaleString()}`;
43670
- }
44785
+ const max = (_a = this.max) !== null && _a !== void 0 ? _a : 0;
44786
+ if (max !== 0 && !Number.isNaN(max) && value > max) {
44787
+ return `+${Number(max).toLocaleString()}`;
43671
44788
  }
43672
44789
  return Number(value).toLocaleString();
43673
44790
  };
43674
44791
  }
43675
44792
  componentDidRender() {
43676
- if (this.target === '') {
44793
+ var _a;
44794
+ if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '') {
43677
44795
  this.strategy = 'disabled';
43678
44796
  return;
43679
44797
  }
@@ -43688,10 +44806,11 @@ class MdsNotification {
43688
44806
  this.caller = c;
43689
44807
  }
43690
44808
  componentDidLoad() {
44809
+ var _a;
43691
44810
  if (this.strategy === 'disabled') {
43692
44811
  return;
43693
44812
  }
43694
- if (this.target !== '' && this.cleanupAutoUpdate == null) {
44813
+ if (((_a = this.target) !== null && _a !== void 0 ? _a : '') !== '' && this.cleanupAutoUpdate == null) {
43695
44814
  setTimeout(() => {
43696
44815
  this.cleanupAutoUpdate = autoUpdate(this.caller, this.host, this.updatePosition);
43697
44816
  }, 100);
@@ -43707,7 +44826,7 @@ class MdsNotification {
43707
44826
  }
43708
44827
  render() {
43709
44828
  var _a;
43710
- return (hAsync(Host, { key: '5bfd87ef1cb2958966986af0146414ee844e1b62', "aria-labelledby": this.target, "aria-label": (_a = this.value) !== null && _a !== void 0 ? _a : '0', "pref-animation": preferenceStore.state.animation }, hAsync("mds-text", { key: '8bc7cdde24f617591a8824a6e2600bdc764fee7a', typography: "caption", class: "dot", "aria-hidden": "true" }, this.clean(this.value))));
44829
+ return (hAsync(Host, { key: '7ccd6942aef0bc72b1da02625dd1eff455998ef5', "aria-labelledby": this.target, "aria-label": (_a = this.value) !== null && _a !== void 0 ? _a : '0', "pref-animation": preferenceStore.state.animation }, hAsync("mds-text", { key: '8f4283fa8d54781cd37040427fd1c0dc2ee11348', typography: "caption", class: "dot", "aria-hidden": "true" }, this.clean(this.value))));
43711
44830
  }
43712
44831
  get host() { return getElement(this); }
43713
44832
  static get watchers() { return {
@@ -44057,6 +45176,9 @@ var localeIt$f = {
44057
45176
 
44058
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)}`;
44059
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();
44060
45182
  /**
44061
45183
  * @name Pref
44062
45184
  * @description This component is based on MdsTab component pattern
@@ -44160,6 +45282,7 @@ class MdsPref {
44160
45282
  }
44161
45283
  componentDidLoad() {
44162
45284
  var _a;
45285
+ mountedPrefs.add(this.host);
44163
45286
  if (typeof window !== 'undefined') {
44164
45287
  (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.setAttribute('data-magma-pref', '');
44165
45288
  }
@@ -44173,14 +45296,15 @@ class MdsPref {
44173
45296
  }
44174
45297
  disconnectedCallback() {
44175
45298
  var _a;
44176
- if (typeof window !== 'undefined') {
45299
+ mountedPrefs.delete(this.host);
45300
+ if (typeof window !== 'undefined' && mountedPrefs.size === 0) {
44177
45301
  (_a = document.documentElement) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-magma-pref');
44178
45302
  }
44179
45303
  this.removePerfEvents();
44180
45304
  this.removeThemeEvent(this.host.querySelector('mds-pref-theme'));
44181
45305
  }
44182
45306
  render() {
44183
- 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'))))));
44184
45308
  }
44185
45309
  get host() { return getElement(this); }
44186
45310
  static get watchers() { return {
@@ -44265,6 +45389,7 @@ class MdsPrefAnimation {
44265
45389
  this.localStorageAlias = 'mdsPrefAnimation';
44266
45390
  this.customPropertyAlias = '--magma-pref-animation';
44267
45391
  this.defaultMode = 'system';
45392
+ this.syncingFromStore = false;
44268
45393
  this.t = new Locale$1({
44269
45394
  el: localeEl$d,
44270
45395
  en: localeEn$e,
@@ -44285,6 +45410,18 @@ class MdsPrefAnimation {
44285
45410
  label: 'animationEnabled',
44286
45411
  },
44287
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
+ };
44288
45425
  this.setAnimation = (mode) => {
44289
45426
  this.prefChangeEvent.emit({ preference: 'animation' });
44290
45427
  this.mode = mode;
@@ -44305,16 +45442,27 @@ class MdsPrefAnimation {
44305
45442
  this.setAnimation(mode);
44306
45443
  };
44307
45444
  }
44308
- componentWillRender() {
45445
+ // Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
45446
+ componentWillLoad() {
44309
45447
  var _a, _b;
44310
45448
  this.setAnimation((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
44311
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
+ }
44312
45457
  modeChanged(newValue) {
45458
+ if (this.syncingFromStore) {
45459
+ return;
45460
+ }
44313
45461
  this.setAnimation(newValue);
44314
45462
  }
44315
45463
  render() {
44316
45464
  var _a;
44317
- 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) }))));
44318
45466
  }
44319
45467
  static get watchers() { return {
44320
45468
  "mode": [{
@@ -44406,6 +45554,7 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
44406
45554
  this.localStorageAlias = 'mdsPrefConsumption';
44407
45555
  this.customPropertyAlias = '--magma-pref-consumption';
44408
45556
  this.defaultMode = 'high';
45557
+ this.syncingFromStore = false;
44409
45558
  this.t = new Locale$1({
44410
45559
  el: localeEl$c,
44411
45560
  en: localeEn$d,
@@ -44426,6 +45575,18 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
44426
45575
  label: 'consumptionLow',
44427
45576
  },
44428
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
+ };
44429
45590
  this.setConsumption = (mode) => {
44430
45591
  this.prefChangeEvent.emit({ preference: 'consumption' });
44431
45592
  this.mode = mode;
@@ -44446,16 +45607,27 @@ let MdsPrefContrast$1 = class MdsPrefContrast {
44446
45607
  this.setConsumption(mode);
44447
45608
  };
44448
45609
  }
44449
- componentWillRender() {
45610
+ // Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
45611
+ componentWillLoad() {
44450
45612
  var _a, _b;
44451
45613
  this.setConsumption((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
44452
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
+ }
44453
45622
  modeChanged(newValue) {
45623
+ if (this.syncingFromStore) {
45624
+ return;
45625
+ }
44454
45626
  this.setConsumption(newValue);
44455
45627
  }
44456
45628
  render() {
44457
45629
  var _a;
44458
- 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) }))));
44459
45631
  }
44460
45632
  static get watchers() { return {
44461
45633
  "mode": [{
@@ -44535,6 +45707,7 @@ class MdsPrefContrast {
44535
45707
  this.localStorageAlias = 'mdsPrefContrast';
44536
45708
  this.customPropertyAlias = '--magma-pref-contrast';
44537
45709
  this.defaultMode = 'system';
45710
+ this.syncingFromStore = false;
44538
45711
  this.t = new Locale$1({
44539
45712
  el: localeEl$b,
44540
45713
  en: localeEn$c,
@@ -44561,6 +45734,18 @@ class MdsPrefContrast {
44561
45734
  label: 'contrastDefault',
44562
45735
  },
44563
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
+ };
44564
45749
  this.rollbackContrast = () => {
44565
45750
  if (typeof window === 'undefined') {
44566
45751
  return this.defaultMode;
@@ -44597,18 +45782,26 @@ class MdsPrefContrast {
44597
45782
  this.setContrast(mode);
44598
45783
  };
44599
45784
  }
44600
- componentWillRender() {
45785
+ // Applied once, on load, then mirrored from the shared store (see mds-pref-mode).
45786
+ componentWillLoad() {
44601
45787
  var _a, _b;
44602
45788
  this.setContrast((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
44603
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
+ }
44604
45797
  modeChanged(newValue, oldValue) {
44605
- if (newValue !== oldValue) {
45798
+ if (newValue !== oldValue && !this.syncingFromStore) {
44606
45799
  this.setContrast(newValue);
44607
45800
  }
44608
45801
  }
44609
45802
  render() {
44610
45803
  var _a;
44611
- 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) }))));
44612
45805
  }
44613
45806
  static get watchers() { return {
44614
45807
  "mode": [{
@@ -45846,7 +47039,7 @@ class MdsPrefLanguageItem {
45846
47039
  // unrecognized code is a real error; empty codes fall back to the `noCode` branch
45847
47040
  // already handled in render().
45848
47041
  this.validateCode = (code) => {
45849
- if (code !== undefined && code !== '' && localeDefault[code] === undefined) {
47042
+ if (code != null && code !== '' && localeDefault[code] === undefined) {
45850
47043
  throw Error(`Language code not found: ${code}`);
45851
47044
  }
45852
47045
  };
@@ -45861,10 +47054,11 @@ class MdsPrefLanguageItem {
45861
47054
  this.validateCode(newValue);
45862
47055
  }
45863
47056
  render() {
47057
+ var _a;
45864
47058
  return (
45865
47059
  // the item is an entry of the `menu` the mds-dropdown of the controller opens:
45866
47060
  // without the role axe rejects it as a child of that menu (aria-required-children)
45867
- hAsync(Host, { key: 'e1f07e0db96bc168d1b9ad9d386be0758cf84efc', onClick: this.handleClick, role: "menuitem" }, this.code !== '' ? (hAsync("mds-button", { icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text", label: localeDefault[this.code] })) : (hAsync("mds-button", { icon: miBaselineCheckCircle, variant: "error", tone: "text", label: this.t.get('noCode') }))));
47061
+ hAsync(Host, { key: '968d0f761a2c4b2de6652069dc1db4f51d61ee76', onClick: this.handleClick, role: "menuitem" }, ((_a = this.code) !== null && _a !== void 0 ? _a : '') !== '' ? (hAsync("mds-button", { icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text", label: localeDefault[this.code] })) : (hAsync("mds-button", { icon: miBaselineCheckCircle, variant: "error", tone: "text", label: this.t.get('noCode') }))));
45868
47062
  }
45869
47063
  static get watchers() { return {
45870
47064
  "code": [{
@@ -45964,6 +47158,7 @@ class MdsPrefMode {
45964
47158
  this.cssOverlayZIndex = '6000';
45965
47159
  this.overlayId = 'mds-pref-mode-overlay';
45966
47160
  this.overlayShow = false;
47161
+ this.syncingFromStore = false;
45967
47162
  this.disabled = false;
45968
47163
  this.updateCSSCustomProps = () => {
45969
47164
  var _a, _b, _c;
@@ -45995,6 +47190,18 @@ class MdsPrefMode {
45995
47190
  label: 'lightMode',
45996
47191
  },
45997
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
+ };
45998
47205
  this.setMode = (mode) => {
45999
47206
  this.prefChangeEvent.emit({ preference: 'mode' });
46000
47207
  this.mode = mode;
@@ -46112,7 +47319,10 @@ class MdsPrefMode {
46112
47319
  this.changeMode(mode);
46113
47320
  };
46114
47321
  }
46115
- 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() {
46116
47326
  var _a, _b;
46117
47327
  if (!isSafari()) {
46118
47328
  this.setMode((_b = (_a = this.mode) !== null && _a !== void 0 ? _a : localStorage.getItem(this.localStorageAlias)) !== null && _b !== void 0 ? _b : this.defaultMode);
@@ -46121,11 +47331,18 @@ class MdsPrefMode {
46121
47331
  this.disabled = true;
46122
47332
  this.mode = 'light';
46123
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
+ }
46124
47341
  componentDidLoad() {
46125
47342
  this.updateCSSCustomProps();
46126
47343
  }
46127
47344
  modeChanged(newValue, oldValue) {
46128
- if (newValue === oldValue) {
47345
+ if (newValue === oldValue || this.syncingFromStore) {
46129
47346
  return;
46130
47347
  }
46131
47348
  this.setMode(newValue);
@@ -46142,9 +47359,9 @@ class MdsPrefMode {
46142
47359
  }
46143
47360
  render() {
46144
47361
  var _a, _b;
46145
- 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
46146
47363
  ? this.t.get(this.modes[(_a = this.mode) !== null && _a !== void 0 ? _a : this.defaultMode].label, { forced: true })
46147
- : 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) }))));
46148
47365
  }
46149
47366
  get element() { return getElement(this); }
46150
47367
  static get watchers() { return {
@@ -46401,7 +47618,8 @@ class MdsPrefThemeItem {
46401
47618
  };
46402
47619
  }
46403
47620
  componentWillRender() {
46404
- if (this.label === undefined || this.label === '') {
47621
+ var _a;
47622
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') === '') {
46405
47623
  this.label = this.name.charAt(0).toUpperCase() + this.name.slice(1).replace(/-/g, ' ');
46406
47624
  }
46407
47625
  }
@@ -46409,7 +47627,7 @@ class MdsPrefThemeItem {
46409
47627
  return (
46410
47628
  // the item is an entry of the `menu` the mds-dropdown of the controller opens:
46411
47629
  // without the role axe rejects it as a child of that menu (aria-required-children)
46412
- hAsync(Host, { key: 'ec551ae30ccae450c5d414c0895025bed0dd170e', onClick: this.handleClick, role: "menuitem" }, hAsync("mds-button", { key: '30844b1044098c19553c4eca4295057f4a11c8da', icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text" }, hAsync("div", { key: 'fa16e08a71bb62d516c9304a66fbf3a753fa5683', class: "label" }, hAsync("div", { key: '9fb479719afdb1ebc5059de1f243a33d7f45fcbd', class: "theme-preview" }, hAsync("div", { key: '1ea92220bd3422a2834845f2332d2e07d02e829f', class: "theme-color theme-color--variant-primary" }), hAsync("div", { key: '9668014487ad4f523f20bed4711bd01d78667b69', class: "theme-color theme-color--status-success" }), hAsync("div", { key: 'a0db61833b779d3cd5aab5c9912b4c589ed48306', class: "theme-color theme-color--status-warning" }), hAsync("div", { key: '33e01beea19854485d7780d92657f0c6ac89a6f5', class: "theme-color theme-color--status-error" })), this.label))));
47630
+ hAsync(Host, { key: 'd14e86d120deb8ce9c1425dafb96c93e9cba4005', onClick: this.handleClick, role: "menuitem" }, hAsync("mds-button", { key: '60a1cf50d3875d1a6aa5493d6436edab1d96349e', icon: this.selected ? miBaselineCheckCircle : miOutlineCircle, variant: "dark", tone: "text" }, hAsync("div", { key: 'b6cd3b716ea2bf811c90c63156ad5d57e5bd7aed', class: "label" }, hAsync("div", { key: 'cf8468e4b9f3d3b03d5060c9531ae1035555270e', class: "theme-preview" }, hAsync("div", { key: 'b634d507168fdec1c9536d7cac619ff1195ca9f1', class: "theme-color theme-color--variant-primary" }), hAsync("div", { key: '67c459ade780433bde32a6a2ba302ae9814a275c', class: "theme-color theme-color--status-success" }), hAsync("div", { key: 'e68b927681b50d439bf937c55fb33b06b01463f6', class: "theme-color theme-color--status-warning" }), hAsync("div", { key: 'eb392e74cecbeb00d06989d3fe5650977e0328ea', class: "theme-color theme-color--status-error" })), this.label))));
46413
47631
  }
46414
47632
  static get style() { return mdsPrefThemeItemCss(); }
46415
47633
  static get cmpMeta() { return {
@@ -46919,7 +48137,7 @@ function requireDayjs_min () {
46919
48137
  if (hasRequiredDayjs_min) return dayjs_min$1.exports;
46920
48138
  hasRequiredDayjs_min = 1;
46921
48139
  (function (module, exports) {
46922
- !function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
48140
+ !function(t,e){module.exports=e();}(dayjs_min,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),Y=_.prototype;return O.prototype=Y,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){Y[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
46923
48141
  } (dayjs_min$1));
46924
48142
  return dayjs_min$1.exports;
46925
48143
  }
@@ -47725,11 +48943,13 @@ class MdsStepperBar {
47725
48943
  this.currentItem = index - 1;
47726
48944
  const values = new Array();
47727
48945
  this.items.forEach((item, key) => {
48946
+ var _a;
47728
48947
  item.done = false;
47729
48948
  if (key < this.currentItem) {
47730
48949
  item.done = true;
47731
- if (item.value !== undefined && item.value !== '') {
47732
- values.push(item.value);
48950
+ const value = (_a = item.value) !== null && _a !== void 0 ? _a : '';
48951
+ if (value !== '') {
48952
+ values.push(value);
47733
48953
  }
47734
48954
  }
47735
48955
  item.current = false;
@@ -47807,7 +49027,7 @@ class MdsStepperBar {
47807
49027
  });
47808
49028
  }
47809
49029
  render() {
47810
- return (hAsync(Host, { key: '4ffedeb2ab33ae57a268f8f95e454a51112a1ea4' }, hAsync("div", { key: '2f2e83f385debce8a01cdd1b3d7f31033b53408b', class: "items", part: "items" }, hAsync("slot", { key: '1f8690320efe4ddf44946ec5cd6ff3893c9c4bc2' })), hAsync("div", { key: '89fcbd11b441dae79f33b9d2d6f95cc794a4ae8f', class: "contents", part: "contents" }, hAsync("slot", { key: 'd746b7f1c2ad3a26996550b84d153c90e62019b0', name: "content" }))));
49030
+ return (hAsync(Host, { key: '35f536c577499c237e0a5b1865c2dcfaa5735d72' }, hAsync("div", { key: '5c204cc4ca343076982d3357e7645cc8770a22be', class: "items", part: "items" }, hAsync("slot", { key: '69c3b461ada662e58051b875411781a862ff565d' })), hAsync("div", { key: '7fb5381e1126a5227b50ecc202154e44928aab5e', class: "contents", part: "contents" }, hAsync("slot", { key: '535d40033b20590f72e9fef336bda3ed7b06cead', name: "content" }))));
47811
49031
  }
47812
49032
  get element() { return getElement(this); }
47813
49033
  static get watchers() { return {
@@ -48310,8 +49530,9 @@ class MdsTabBarItem {
48310
49530
  }
48311
49531
  };
48312
49532
  this.onSlotChangeHandler = () => {
49533
+ var _a;
48313
49534
  /* this should be removed in the future once slotted text is no longer used, use the label property instead */
48314
- if (this.label !== undefined && this.label !== '')
49535
+ if (((_a = this.label) !== null && _a !== void 0 ? _a : '') !== '')
48315
49536
  return;
48316
49537
  this.label = readSlottedLabel(this.element);
48317
49538
  };
@@ -48326,7 +49547,7 @@ class MdsTabBarItem {
48326
49547
  this.label = sanitizeLabel(newValue);
48327
49548
  }
48328
49549
  render() {
48329
- return (hAsync(Host, { key: '0939e8df4c3f7e1c452bc5be3717d8871d7c1175', onClick: this.select, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-icon", { key: '2316255b48511920535cbe9e6c07a603107c7362', name: this.icon }), hAsync("mds-text", { key: '4f1973a0a8f280612e6924ea7c386ed1b4fc62f0', typography: this.typography }, this.label || hAsync("slot", { key: 'bac800ae686b2ac8b95d0c452953b460af70c245', onSlotchange: this.onSlotChangeHandler }))));
49550
+ return (hAsync(Host, { key: '6e2c08fad0e04d0725ab7ef827c654cf9edecb51', onClick: this.select, "pref-animation": preferenceStore.state.animation, "pref-contrast": preferenceStore.state.contrast, "pref-mode": preferenceStore.state.mode, "pref-theme-scheme": preferenceStore.state['theme-scheme'] }, hAsync("mds-icon", { key: 'cc8cc878d899d20532b1582ae7eb2aa459a82078', name: this.icon }), hAsync("mds-text", { key: 'ea6030247b5999f34cd64a6a3ea8b15de66ba5ab', typography: this.typography }, this.label || hAsync("slot", { key: 'b922dbfe1b35997ac2c9e9d384e22505838a6994', onSlotchange: this.onSlotChangeHandler }))));
48330
49551
  }
48331
49552
  get element() { return getElement(this); }
48332
49553
  static get watchers() { return {
@@ -48869,7 +50090,7 @@ class MdsTableHeaderCell {
48869
50090
  this.tableRowsDefaultSorted = Array.from(this.tableBody.children);
48870
50091
  };
48871
50092
  this.getValue = (element) => {
48872
- if (element.value !== undefined &&
50093
+ if (element.value != null &&
48873
50094
  element.value !== '' &&
48874
50095
  element.value !== 0 &&
48875
50096
  !Number.isNaN(element.value)) {
@@ -48952,7 +50173,7 @@ class MdsTableHeaderCell {
48952
50173
  }
48953
50174
  }
48954
50175
  render() {
48955
- return (hAsync(Host, { key: 'aa269488717b726ffd93efcc6d863e4b9474bbe8', role: "columnheader", "aria-sort": this.direction, "pref-animation": preferenceStore.state.animation }, this.sortable ? (hAsync("mds-button", { class: "action", icon: clsx(this.direction === 'none' && miBaselineUnfoldMore, this.direction === 'ascending' && miBaselineKeyboardArrowUp, this.direction === 'descending' && miBaselineKeyboardArrowDown), "icon-position": "right", onClick: this.sort, tone: "text", variant: "dark", size: "sm", part: "action", label: this.label })) : (hAsync("mds-text", { class: "label", typography: "label", part: "label" }, this.label))));
50176
+ return (hAsync(Host, { key: 'e7c077673fa918dfd50f25d7b341881f72eaefe2', role: "columnheader", "aria-sort": this.direction, "pref-animation": preferenceStore.state.animation }, this.sortable ? (hAsync("mds-button", { class: "action", icon: clsx(this.direction === 'none' && miBaselineUnfoldMore, this.direction === 'ascending' && miBaselineKeyboardArrowUp, this.direction === 'descending' && miBaselineKeyboardArrowDown), "icon-position": "right", onClick: this.sort, tone: "text", variant: "dark", size: "sm", part: "action", label: this.label })) : (hAsync("mds-text", { class: "label", typography: "label", part: "label" }, this.label))));
48956
50177
  }
48957
50178
  get element() { return getElement(this); }
48958
50179
  static get watchers() { return {
@@ -49399,7 +50620,8 @@ class MdsText {
49399
50620
  this.animateText(newValue);
49400
50621
  }
49401
50622
  render() {
49402
- return (hAsync(Host, { key: '468c9b04797da9ab100c89474a7a67313aac829b', "pref-animation": preferenceStore.state.animation }, hAsync(this.tag, { key: '245ab42bd31cd0cb4be371f074fee956d3c1c13c', class: "text" }, this.text === undefined || this.text === '' ? hAsync("slot", null) : this.text)));
50623
+ var _a;
50624
+ return (hAsync(Host, { key: '468c9b04797da9ab100c89474a7a67313aac829b', "pref-animation": preferenceStore.state.animation }, hAsync(this.tag, { key: '245ab42bd31cd0cb4be371f074fee956d3c1c13c', class: "text" }, ((_a = this.text) !== null && _a !== void 0 ? _a : '') === '' ? hAsync("slot", null) : this.text)));
49403
50625
  }
49404
50626
  get host() { return getElement(this); }
49405
50627
  static get watchers() { return {
@@ -49453,10 +50675,16 @@ class MdsToast {
49453
50675
  * Sets position of toast
49454
50676
  */
49455
50677
  this.position = 'bottom-center';
50678
+ // a removed attribute leaves null, which counts as no duration, like 0
50679
+ this.hasDuration = () => {
50680
+ var _a;
50681
+ const duration = (_a = this.duration) !== null && _a !== void 0 ? _a : 0;
50682
+ return duration !== 0 && !Number.isNaN(duration);
50683
+ };
49456
50684
  this.reloadTimeListeners = (visible) => {
49457
50685
  if (typeof window === 'undefined')
49458
50686
  return;
49459
- if (this.duration === undefined || this.duration === 0 || Number.isNaN(this.duration)) {
50687
+ if (!this.hasDuration()) {
49460
50688
  return;
49461
50689
  }
49462
50690
  if (!visible) {
@@ -49493,7 +50721,7 @@ class MdsToast {
49493
50721
  componentWillLoad() {
49494
50722
  this.hasText = this.hostElement.innerHTML !== '';
49495
50723
  this.hasActions = hasChildWithSlot(this.hostElement, 'action');
49496
- if (this.duration === undefined || this.duration === 0 || Number.isNaN(this.duration)) {
50724
+ if (!this.hasDuration()) {
49497
50725
  return;
49498
50726
  }
49499
50727
  if (this.visible) {
@@ -49510,7 +50738,7 @@ class MdsToast {
49510
50738
  this.reloadTimeListeners(!!this.visible);
49511
50739
  }
49512
50740
  render() {
49513
- return (hAsync(Host, { key: '8bdaf6b4880eade87650f72ad2cf02d8d5be4724', "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: '9d5d8972d21dbc40e265317256e2f28241af48e3', class: clsx('dialog', this.position && `to-${this.position}`, this.visible && 'dialog--visible') }, hAsync("slot", { key: 'f256f3a18b80991a3d3286310b0cd5df0020f88f', name: "icon" }), this.hasText && (hAsync("mds-text", { key: 'f52eba42e9bd4c0c3e3010ea401616bc44b5ac10', typography: "caption" }, hAsync("slot", { key: 'f0b92de1ea1fe9227d5f2c04cf2bead2b925a2fd' }))), hAsync("div", { key: '56f387b1d634e5703f9f263e3655437d3725d76e', class: clsx('actions', !this.hasActions && 'actions--hidden') }, hAsync("slot", { key: '7bb9ad600b6768b0b3edb21846f6e472825de9c9', name: "action", onSlotchange: this.onActionSlotChange })))));
50741
+ return (hAsync(Host, { key: 'd043662b287519f10abe2a4568d2f3458b89857e', "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: '5f8945ad6b39700172920d34c405d616c685de61', class: clsx('dialog', this.position && `to-${this.position}`, this.visible && 'dialog--visible') }, hAsync("slot", { key: 'ad778db94450394931cfb554357e91cbf192fe66', name: "icon" }), this.hasText && (hAsync("mds-text", { key: '43ac2cbcd4101ade9b03ec137ec36d512b9fd87e', typography: "caption" }, hAsync("slot", { key: '4ede3cb3db5c6f096fe66ed87f05a1e2deab2b24' }))), hAsync("div", { key: 'd811c95881d28ccba3be66605efb8197235bc1ef', class: clsx('actions', !this.hasActions && 'actions--hidden') }, hAsync("slot", { key: '08e8d1cb3e62bf1eb104a3de3d473ca57a6991e9', name: "action", onSlotchange: this.onActionSlotChange })))));
49514
50742
  }
49515
50743
  get hostElement() { return getElement(this); }
49516
50744
  static get watchers() { return {
@@ -49633,10 +50861,10 @@ class MdsTooltip {
49633
50861
  this.floatingController.dismiss();
49634
50862
  }
49635
50863
  targetChanged() {
49636
- var _a;
49637
- if (this.target === '')
50864
+ var _a, _b;
50865
+ if (((_a = this.target) !== null && _a !== void 0 ? _a : '') === '')
49638
50866
  return;
49639
- const caller = (_a = this.floatingController) === null || _a === void 0 ? void 0 : _a.updateCaller(this.target);
50867
+ const caller = (_b = this.floatingController) === null || _b === void 0 ? void 0 : _b.updateCaller(this.target);
49640
50868
  if (!caller)
49641
50869
  return;
49642
50870
  this.caller = caller;
@@ -49658,7 +50886,7 @@ class MdsTooltip {
49658
50886
  this.floatingController.dismiss();
49659
50887
  }
49660
50888
  render() {
49661
- return (hAsync(Host, { key: '02d727ee44214d0a1f463fc6cae454141844af42', "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: '8401f0adec5b8e074d9d9bd691ec09fdfc31fca3', class: "arrow", innerHTML: arrowSvg }), hAsync("mds-text", { key: '9ad6ae17fdf84169c6cd7014038c51b9c0f89ff7', class: "text", typography: this.typography, part: "text" }, hAsync("slot", { key: '6c5c19f7780e0849c7940d78a4ca1b6fe64e51d2' }))));
50889
+ return (hAsync(Host, { key: '2031b33e6cc0837318acce18e2298a4bacfc5b0b', "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: 'ba0236540eb28111cba583fc346e4d3717ed0385', class: "arrow", innerHTML: arrowSvg }), hAsync("mds-text", { key: '8aa8abf3be3b4ab25dc1bf4bf85d9fbdb6470639', class: "text", typography: this.typography, part: "text" }, hAsync("slot", { key: '79d6f5b7055890731d8e861985a9de7c5df9c725' }))));
49662
50890
  }
49663
50891
  get host() { return getElement(this); }
49664
50892
  static get watchers() { return {