@maggioli-design-system/magma 2.0.0-beta.2 → 2.0.0-beta.3

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 (1150) hide show
  1. package/README.md +11 -3
  2. package/dist/cjs/{floating-controller-DA8xyqCa.js → floating-controller-CXEVR1wX.js} +5 -5
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/magma-components.cjs.js +1 -1
  5. package/dist/cjs/mds-accordion-item.cjs.entry.js +24 -2
  6. package/dist/cjs/mds-accordion-timer-item.cjs.entry.js +12 -2
  7. package/dist/cjs/mds-accordion-timer.cjs.entry.js +1 -1
  8. package/dist/cjs/mds-accordion.cjs.entry.js +32 -5
  9. package/dist/cjs/mds-author.cjs.entry.js +1 -1
  10. package/dist/cjs/mds-avatar-stack-item.cjs.entry.js +1 -1
  11. package/dist/cjs/mds-avatar-stack.cjs.entry.js +1 -1
  12. package/dist/cjs/mds-avatar.cjs.entry.js +27 -11
  13. package/dist/cjs/mds-badge.cjs.entry.js +24 -2
  14. package/dist/cjs/mds-banner_3.cjs.entry.js +49 -10
  15. package/dist/cjs/mds-benchmark-bar.cjs.entry.js +1 -1
  16. package/dist/cjs/mds-bibliography.cjs.entry.js +1 -1
  17. package/dist/cjs/mds-breadcrumb-item.cjs.entry.js +1 -1
  18. package/dist/cjs/mds-breadcrumb.cjs.entry.js +7 -7
  19. package/dist/cjs/mds-button-dropdown.cjs.entry.js +1 -1
  20. package/dist/cjs/mds-button-group.cjs.entry.js +1 -1
  21. package/dist/cjs/mds-button_3.cjs.entry.js +30 -9
  22. package/dist/cjs/mds-calendar_2.cjs.entry.js +69 -67
  23. package/dist/cjs/mds-card-content.cjs.entry.js +1 -1
  24. package/dist/cjs/mds-card-footer.cjs.entry.js +1 -1
  25. package/dist/cjs/mds-card-header.cjs.entry.js +1 -1
  26. package/dist/cjs/mds-card-media.cjs.entry.js +1 -1
  27. package/dist/cjs/mds-card.cjs.entry.js +22 -4
  28. package/dist/cjs/mds-details.cjs.entry.js +14 -2
  29. package/dist/cjs/mds-dropdown.cjs.entry.js +41 -21
  30. package/dist/cjs/mds-emoji.cjs.entry.js +1 -1
  31. package/dist/cjs/mds-entity.cjs.entry.js +20 -2
  32. package/dist/cjs/mds-file-preview.cjs.entry.js +25 -3
  33. package/dist/cjs/mds-file.cjs.entry.js +26 -4
  34. package/dist/cjs/mds-filter-item.cjs.entry.js +22 -2
  35. package/dist/cjs/mds-filter.cjs.entry.js +24 -2
  36. package/dist/cjs/mds-header-bar.cjs.entry.js +24 -2
  37. package/dist/cjs/mds-header.cjs.entry.js +20 -4
  38. package/dist/cjs/mds-horizontal-scroll.cjs.entry.js +1 -1
  39. package/dist/cjs/mds-hr.cjs.entry.js +16 -2
  40. package/dist/cjs/mds-img.cjs.entry.js +5 -4
  41. package/dist/cjs/mds-input-date-range-preselection.cjs.entry.js +1 -1
  42. package/dist/cjs/mds-input-date-range.cjs.entry.js +31 -14
  43. package/dist/cjs/mds-input-date.cjs.entry.js +38 -14
  44. package/dist/cjs/mds-input-field.cjs.entry.js +1 -1
  45. package/dist/cjs/mds-input-otp.cjs.entry.js +1 -1
  46. package/dist/cjs/mds-input-range.cjs.entry.js +24 -2
  47. package/dist/cjs/mds-input-select.cjs.entry.js +25 -3
  48. package/dist/cjs/mds-input-switch_2.cjs.entry.js +27 -4
  49. package/dist/cjs/mds-input-tip_2.cjs.entry.js +28 -5
  50. package/dist/cjs/mds-input-upload.cjs.entry.js +17 -7
  51. package/dist/cjs/mds-input.cjs.entry.js +26 -3
  52. package/dist/cjs/mds-keyboard-key.cjs.entry.js +1 -1
  53. package/dist/cjs/mds-keyboard.cjs.entry.js +30 -11
  54. package/dist/cjs/mds-kpi-item.cjs.entry.js +24 -2
  55. package/dist/cjs/mds-kpi.cjs.entry.js +1 -1
  56. package/dist/cjs/mds-label.cjs.entry.js +18 -2
  57. package/dist/cjs/mds-list-item.cjs.entry.js +12 -2
  58. package/dist/cjs/mds-list.cjs.entry.js +1 -1
  59. package/dist/cjs/mds-mention.cjs.entry.js +1 -1
  60. package/dist/cjs/mds-modal.cjs.entry.js +121 -43
  61. package/dist/cjs/mds-note.cjs.entry.js +22 -2
  62. package/dist/cjs/mds-notification.cjs.entry.js +14 -4
  63. package/dist/cjs/mds-paginator-item.cjs.entry.js +18 -2
  64. package/dist/cjs/mds-paginator.cjs.entry.js +39 -2
  65. package/dist/cjs/mds-policy-ai.cjs.entry.js +5 -2
  66. package/dist/cjs/mds-pref-animation.cjs.entry.js +15 -8
  67. package/dist/cjs/mds-pref-consumption.cjs.entry.js +15 -8
  68. package/dist/cjs/mds-pref-contrast.cjs.entry.js +15 -8
  69. package/dist/cjs/mds-pref-language-item.cjs.entry.js +2 -2
  70. package/dist/cjs/mds-pref-language.cjs.entry.js +2 -2
  71. package/dist/cjs/mds-pref-theme-variant-item.cjs.entry.js +2 -2
  72. package/dist/cjs/mds-pref-theme-variant.cjs.entry.js +2 -2
  73. package/dist/cjs/mds-pref-theme.cjs.entry.js +27 -18
  74. package/dist/cjs/mds-pref.cjs.entry.js +2 -2
  75. package/dist/cjs/mds-price-table-features-cell.cjs.entry.js +24 -2
  76. package/dist/cjs/mds-price-table-features-row.cjs.entry.js +24 -2
  77. package/dist/cjs/mds-price-table-features.cjs.entry.js +24 -2
  78. package/dist/cjs/mds-price-table-header.cjs.entry.js +2 -2
  79. package/dist/cjs/mds-price-table-list-item.cjs.entry.js +2 -2
  80. package/dist/cjs/mds-price-table-list.cjs.entry.js +24 -2
  81. package/dist/cjs/mds-price-table.cjs.entry.js +2 -2
  82. package/dist/cjs/mds-progress_2.cjs.entry.js +26 -4
  83. package/dist/cjs/mds-push-notification-item.cjs.entry.js +28 -6
  84. package/dist/cjs/mds-push-notification.cjs.entry.js +16 -2
  85. package/dist/cjs/mds-quote.cjs.entry.js +12 -2
  86. package/dist/cjs/mds-radial-menu-item.cjs.entry.js +2 -2
  87. package/dist/cjs/mds-radial-menu.cjs.entry.js +3 -3
  88. package/dist/cjs/mds-separator.cjs.entry.js +20 -2
  89. package/dist/cjs/mds-status-bar.cjs.entry.js +25 -3
  90. package/dist/cjs/mds-stepper-bar-item.cjs.entry.js +10 -2
  91. package/dist/cjs/mds-stepper-bar.cjs.entry.js +2 -2
  92. package/dist/cjs/mds-tab-bar-item.cjs.entry.js +24 -2
  93. package/dist/cjs/mds-tab-bar.cjs.entry.js +24 -2
  94. package/dist/cjs/mds-tab_2.cjs.entry.js +56 -6
  95. package/dist/cjs/mds-table-body.cjs.entry.js +12 -2
  96. package/dist/cjs/mds-table-footer.cjs.entry.js +12 -2
  97. package/dist/cjs/mds-table-header-cell.cjs.entry.js +12 -2
  98. package/dist/cjs/mds-table-header.cjs.entry.js +12 -2
  99. package/dist/cjs/mds-table-row.cjs.entry.js +12 -4
  100. package/dist/cjs/mds-table.cjs.entry.js +26 -4
  101. package/dist/cjs/mds-text.cjs.entry.js +12 -2
  102. package/dist/cjs/mds-toast.cjs.entry.js +24 -2
  103. package/dist/cjs/mds-tooltip.cjs.entry.js +37 -17
  104. package/dist/cjs/mds-tree-item.cjs.entry.js +26 -2
  105. package/dist/cjs/mds-tree.cjs.entry.js +34 -2
  106. package/dist/cjs/mds-url-view.cjs.entry.js +22 -2
  107. package/dist/cjs/mds-usage.cjs.entry.js +24 -2
  108. package/dist/cjs/mds-video-wall.cjs.entry.js +2 -2
  109. package/dist/cjs/mds-zero.cjs.entry.js +24 -2
  110. package/dist/cjs/preference-BdpIXWLP.js +81 -0
  111. package/dist/collection/common/floating-controller.js +5 -5
  112. package/dist/collection/common/preference.js +78 -0
  113. package/dist/collection/components/mds-accordion/mds-accordion.css +16 -16
  114. package/dist/collection/components/mds-accordion/mds-accordion.js +43 -9
  115. package/dist/collection/components/mds-accordion/test/mds-accordion.stories.js +4 -3
  116. package/dist/collection/components/mds-accordion-item/mds-accordion-item.css +38 -27
  117. package/dist/collection/components/mds-accordion-item/mds-accordion-item.js +31 -1
  118. package/dist/collection/components/mds-accordion-timer/mds-accordion-timer.css +0 -11
  119. package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.css +16 -8
  120. package/dist/collection/components/mds-accordion-timer-item/mds-accordion-timer-item.js +16 -1
  121. package/dist/collection/components/mds-author/mds-author.css +1 -1
  122. package/dist/collection/components/mds-avatar/mds-avatar.css +27 -19
  123. package/dist/collection/components/mds-avatar/mds-avatar.js +28 -10
  124. package/dist/collection/components/mds-avatar-stack/mds-avatar-stack.css +25 -0
  125. package/dist/collection/components/mds-avatar-stack-item/mds-avatar-stack-item.css +5 -113
  126. package/dist/collection/components/mds-badge/mds-badge.css +41 -21
  127. package/dist/collection/components/mds-badge/mds-badge.js +31 -1
  128. package/dist/collection/components/mds-banner/mds-banner.css +36 -15
  129. package/dist/collection/components/mds-banner/mds-banner.js +31 -7
  130. package/dist/collection/components/mds-banner/test/mds-banner.stories.js +3 -3
  131. package/dist/collection/components/mds-bibliography/mds-bibliography.css +2 -2
  132. package/dist/collection/components/mds-breadcrumb/mds-breadcrumb.css +0 -12
  133. package/dist/collection/components/mds-breadcrumb/mds-breadcrumb.js +10 -10
  134. package/dist/collection/components/mds-breadcrumb/test/mds-breadcrumb.stories.js +2 -2
  135. package/dist/collection/components/mds-button/mds-button.css +27 -29
  136. package/dist/collection/components/mds-button/mds-button.js +22 -1
  137. package/dist/collection/components/mds-button-group/mds-button-group.css +15 -0
  138. package/dist/collection/components/mds-calendar/mds-calendar.js +67 -65
  139. package/dist/collection/components/mds-card/mds-card.css +17 -6
  140. package/dist/collection/components/mds-card/mds-card.js +28 -7
  141. package/dist/collection/components/mds-card/test/mds-card.stories.js +3 -3
  142. package/dist/collection/components/mds-chip/mds-chip.css +38 -24
  143. package/dist/collection/components/mds-chip/mds-chip.js +25 -1
  144. package/dist/collection/components/mds-details/mds-details.css +23 -10
  145. package/dist/collection/components/mds-details/mds-details.js +15 -1
  146. package/dist/collection/components/mds-dropdown/mds-dropdown.css +40 -19
  147. package/dist/collection/components/mds-dropdown/mds-dropdown.js +63 -35
  148. package/dist/collection/components/mds-dropdown/test/mds-dropdown.stories.js +15 -15
  149. package/dist/collection/components/mds-entity/mds-entity.css +19 -10
  150. package/dist/collection/components/mds-entity/mds-entity.js +26 -1
  151. package/dist/collection/components/mds-file/mds-file.css +32 -20
  152. package/dist/collection/components/mds-file/mds-file.js +33 -7
  153. package/dist/collection/components/mds-file/test/mds-file.stories.js +2 -2
  154. package/dist/collection/components/mds-file-preview/mds-file-preview.css +41 -23
  155. package/dist/collection/components/mds-file-preview/mds-file-preview.js +28 -2
  156. package/dist/collection/components/mds-filter/mds-filter.css +43 -26
  157. package/dist/collection/components/mds-filter/mds-filter.js +27 -1
  158. package/dist/collection/components/mds-filter-item/mds-filter-item.css +33 -13
  159. package/dist/collection/components/mds-filter-item/mds-filter-item.js +29 -1
  160. package/dist/collection/components/mds-header/mds-header.css +18 -7
  161. package/dist/collection/components/mds-header/mds-header.js +27 -8
  162. package/dist/collection/components/mds-header/test/mds-header.stories.js +2 -2
  163. package/dist/collection/components/mds-header-bar/mds-header-bar.css +33 -13
  164. package/dist/collection/components/mds-header-bar/mds-header-bar.js +27 -1
  165. package/dist/collection/components/mds-help/mds-help.js +7 -7
  166. package/dist/collection/components/mds-horizontal-scroll/mds-horizontal-scroll.css +11 -15
  167. package/dist/collection/components/mds-hr/mds-hr.css +9 -3
  168. package/dist/collection/components/mds-hr/mds-hr.js +21 -1
  169. package/dist/collection/components/mds-icon/mds-icon.js +2 -4
  170. package/dist/collection/components/mds-img/mds-img.js +4 -3
  171. package/dist/collection/components/mds-input/mds-input.css +34 -60
  172. package/dist/collection/components/mds-input/mds-input.js +29 -2
  173. package/dist/collection/components/mds-input-date/mds-input-date.css +35 -16
  174. package/dist/collection/components/mds-input-date/mds-input-date.js +41 -13
  175. package/dist/collection/components/mds-input-date-range/mds-input-date-range.css +35 -15
  176. package/dist/collection/components/mds-input-date-range/mds-input-date-range.js +34 -13
  177. package/dist/collection/components/mds-input-field/mds-input-field.css +48 -0
  178. package/dist/collection/components/mds-input-range/mds-input-range.css +37 -36
  179. package/dist/collection/components/mds-input-range/mds-input-range.js +28 -2
  180. package/dist/collection/components/mds-input-select/mds-input-select.css +40 -28
  181. package/dist/collection/components/mds-input-select/mds-input-select.js +28 -2
  182. package/dist/collection/components/mds-input-switch/mds-input-switch.css +9 -3
  183. package/dist/collection/components/mds-input-switch/mds-input-switch.js +17 -1
  184. package/dist/collection/components/mds-input-tip/mds-input-tip.css +16 -7
  185. package/dist/collection/components/mds-input-tip/mds-input-tip.js +16 -1
  186. package/dist/collection/components/mds-input-tip-item/mds-input-tip-item.css +29 -16
  187. package/dist/collection/components/mds-input-tip-item/mds-input-tip-item.js +18 -2
  188. package/dist/collection/components/mds-input-upload/mds-input-upload.css +2 -5
  189. package/dist/collection/components/mds-input-upload/mds-input-upload.js +16 -6
  190. package/dist/collection/components/mds-keyboard/mds-keyboard.css +9 -3
  191. package/dist/collection/components/mds-keyboard/mds-keyboard.js +31 -10
  192. package/dist/collection/components/mds-kpi-item/mds-kpi-item.css +47 -43
  193. package/dist/collection/components/mds-kpi-item/mds-kpi-item.js +27 -1
  194. package/dist/collection/components/mds-label/mds-label.css +17 -6
  195. package/dist/collection/components/mds-label/mds-label.js +20 -1
  196. package/dist/collection/components/mds-list/mds-list.css +4 -5
  197. package/dist/collection/components/mds-list-item/mds-list-item.css +11 -8
  198. package/dist/collection/components/mds-list-item/mds-list-item.js +16 -1
  199. package/dist/collection/components/mds-modal/mds-modal.css +198 -67
  200. package/dist/collection/components/mds-modal/mds-modal.js +133 -74
  201. package/dist/collection/components/mds-modal/test/mds-modal.stories.js +44 -3
  202. package/dist/collection/components/mds-note/mds-note.css +47 -35
  203. package/dist/collection/components/mds-note/mds-note.js +25 -1
  204. package/dist/collection/components/mds-notification/mds-notification.css +34 -26
  205. package/dist/collection/components/mds-notification/mds-notification.js +22 -7
  206. package/dist/collection/components/mds-notification/test/mds-notification.stories.js +7 -7
  207. package/dist/collection/components/mds-paginator/mds-paginator.css +48 -28
  208. package/dist/collection/components/mds-paginator/mds-paginator.js +46 -1
  209. package/dist/collection/components/mds-paginator-item/mds-paginator-item.css +29 -15
  210. package/dist/collection/components/mds-paginator-item/mds-paginator-item.js +24 -1
  211. package/dist/collection/components/mds-policy-ai/mds-policy-ai.css +10 -7
  212. package/dist/collection/components/mds-policy-ai/mds-policy-ai.js +4 -1
  213. package/dist/collection/components/mds-pref/mds-pref.js +1 -1
  214. package/dist/collection/components/mds-pref-animation/mds-pref-animation.css +8 -3
  215. package/dist/collection/components/mds-pref-animation/mds-pref-animation.js +15 -7
  216. package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.css +8 -3
  217. package/dist/collection/components/mds-pref-consumption/mds-pref-consumption.js +15 -7
  218. package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.css +8 -3
  219. package/dist/collection/components/mds-pref-contrast/mds-pref-contrast.js +15 -7
  220. package/dist/collection/components/mds-pref-language/mds-pref-language.js +1 -1
  221. package/dist/collection/components/mds-pref-language-item/mds-pref-language-item.js +1 -1
  222. package/dist/collection/components/mds-pref-theme/mds-pref-theme.css +3 -3
  223. package/dist/collection/components/mds-pref-theme/mds-pref-theme.js +29 -17
  224. package/dist/collection/components/mds-pref-theme-variant/mds-pref-theme-variant.js +1 -1
  225. package/dist/collection/components/mds-pref-theme-variant-item/mds-pref-theme-variant-item.js +1 -1
  226. package/dist/collection/components/mds-price-table/mds-price-table.js +1 -1
  227. package/dist/collection/components/mds-price-table-features/mds-price-table-features.css +35 -16
  228. package/dist/collection/components/mds-price-table-features/mds-price-table-features.js +31 -1
  229. package/dist/collection/components/mds-price-table-features-cell/mds-price-table-features-cell.css +39 -24
  230. package/dist/collection/components/mds-price-table-features-cell/mds-price-table-features-cell.js +31 -1
  231. package/dist/collection/components/mds-price-table-features-row/mds-price-table-features-row.css +37 -17
  232. package/dist/collection/components/mds-price-table-features-row/mds-price-table-features-row.js +28 -2
  233. package/dist/collection/components/mds-price-table-header/mds-price-table-header.js +1 -1
  234. package/dist/collection/components/mds-price-table-list/mds-price-table-list.css +41 -28
  235. package/dist/collection/components/mds-price-table-list/mds-price-table-list.js +28 -2
  236. package/dist/collection/components/mds-price-table-list-item/mds-price-table-list-item.css +4 -5
  237. package/dist/collection/components/mds-price-table-list-item/mds-price-table-list-item.js +1 -1
  238. package/dist/collection/components/mds-progress/mds-progress.css +37 -19
  239. package/dist/collection/components/mds-progress/mds-progress.js +27 -1
  240. package/dist/collection/components/mds-push-notification/mds-push-notification.css +14 -8
  241. package/dist/collection/components/mds-push-notification/mds-push-notification.js +21 -1
  242. package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.css +51 -38
  243. package/dist/collection/components/mds-push-notification-item/mds-push-notification-item.js +33 -7
  244. package/dist/collection/components/mds-push-notification-item/test/mds-push-notification-item.stories.js +2 -2
  245. package/dist/collection/components/mds-quote/mds-quote.css +9 -5
  246. package/dist/collection/components/mds-quote/mds-quote.js +16 -1
  247. package/dist/collection/components/mds-radial-menu/mds-radial-menu.js +1 -1
  248. package/dist/collection/components/mds-radial-menu-item/mds-radial-menu-item.js +1 -1
  249. package/dist/collection/components/mds-radial-progress/mds-radial-progress.js +1 -1
  250. package/dist/collection/components/mds-separator/mds-separator.css +19 -9
  251. package/dist/collection/components/mds-separator/mds-separator.js +26 -1
  252. package/dist/collection/components/mds-spinner/mds-spinner.css +29 -23
  253. package/dist/collection/components/mds-spinner/mds-spinner.js +16 -1
  254. package/dist/collection/components/mds-status-bar/mds-status-bar.css +22 -19
  255. package/dist/collection/components/mds-status-bar/mds-status-bar.js +32 -2
  256. package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.css +13 -32
  257. package/dist/collection/components/mds-stepper-bar/mds-stepper-bar.js +1 -1
  258. package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.css +34 -44
  259. package/dist/collection/components/mds-stepper-bar-item/mds-stepper-bar-item.js +10 -1
  260. package/dist/collection/components/mds-tab/mds-tab.css +50 -20
  261. package/dist/collection/components/mds-tab/mds-tab.js +40 -3
  262. package/dist/collection/components/mds-tab-bar/mds-tab-bar.css +35 -14
  263. package/dist/collection/components/mds-tab-bar/mds-tab-bar.js +31 -1
  264. package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.css +36 -16
  265. package/dist/collection/components/mds-tab-bar-item/mds-tab-bar-item.js +27 -1
  266. package/dist/collection/components/mds-tab-item/mds-tab-item.css +11 -6
  267. package/dist/collection/components/mds-tab-item/mds-tab-item.js +74 -1
  268. package/dist/collection/components/mds-table/mds-table.css +39 -19
  269. package/dist/collection/components/mds-table/mds-table.js +29 -3
  270. package/dist/collection/components/mds-table-body/mds-table-body.css +18 -9
  271. package/dist/collection/components/mds-table-body/mds-table-body.js +16 -1
  272. package/dist/collection/components/mds-table-cell/mds-table-cell.css +17 -8
  273. package/dist/collection/components/mds-table-cell/mds-table-cell.js +16 -1
  274. package/dist/collection/components/mds-table-footer/mds-table-footer.css +18 -8
  275. package/dist/collection/components/mds-table-footer/mds-table-footer.js +16 -1
  276. package/dist/collection/components/mds-table-header/mds-table-header.css +18 -8
  277. package/dist/collection/components/mds-table-header/mds-table-header.js +12 -1
  278. package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.css +20 -10
  279. package/dist/collection/components/mds-table-header-cell/mds-table-header-cell.js +13 -2
  280. package/dist/collection/components/mds-table-row/mds-table-row.css +25 -14
  281. package/dist/collection/components/mds-table-row/mds-table-row.js +31 -3
  282. package/dist/collection/components/mds-text/mds-text.css +7 -5
  283. package/dist/collection/components/mds-text/mds-text.js +16 -1
  284. package/dist/collection/components/mds-toast/mds-toast.css +51 -26
  285. package/dist/collection/components/mds-toast/mds-toast.js +32 -2
  286. package/dist/collection/components/mds-tooltip/mds-tooltip.css +39 -22
  287. package/dist/collection/components/mds-tooltip/mds-tooltip.js +54 -26
  288. package/dist/collection/components/mds-tooltip/test/mds-tooltip.stories.js +11 -11
  289. package/dist/collection/components/mds-tree/mds-tree.css +2 -2
  290. package/dist/collection/components/mds-tree/mds-tree.js +33 -1
  291. package/dist/collection/components/mds-tree-item/mds-tree-item.css +47 -76
  292. package/dist/collection/components/mds-tree-item/mds-tree-item.js +95 -1
  293. package/dist/collection/components/mds-url-view/mds-url-view.css +43 -31
  294. package/dist/collection/components/mds-url-view/mds-url-view.js +25 -1
  295. package/dist/collection/components/mds-usage/mds-usage.css +44 -26
  296. package/dist/collection/components/mds-usage/mds-usage.js +27 -1
  297. package/dist/collection/components/mds-video-wall/mds-video-wall.css +13 -14
  298. package/dist/collection/components/mds-video-wall/mds-video-wall.js +2 -1
  299. package/dist/collection/components/mds-zero/mds-zero.css +36 -20
  300. package/dist/collection/components/mds-zero/mds-zero.js +31 -1
  301. package/dist/collection/storybook/color-scale.stories.js +1 -1
  302. package/dist/components/floating-controller.js +1 -1
  303. package/dist/components/mds-accordion-item.js +1 -1
  304. package/dist/components/mds-accordion-timer-item.js +1 -1
  305. package/dist/components/mds-accordion-timer.js +1 -1
  306. package/dist/components/mds-accordion.js +1 -1
  307. package/dist/components/mds-author.js +1 -1
  308. package/dist/components/mds-avatar-stack-item2.js +1 -1
  309. package/dist/components/mds-avatar-stack.js +1 -1
  310. package/dist/components/mds-avatar2.js +1 -1
  311. package/dist/components/mds-badge2.js +1 -1
  312. package/dist/components/mds-banner2.js +1 -1
  313. package/dist/components/mds-benchmark-bar.js +1 -1
  314. package/dist/components/mds-bibliography.js +1 -1
  315. package/dist/components/mds-breadcrumb-item.js +1 -1
  316. package/dist/components/mds-breadcrumb.js +1 -1
  317. package/dist/components/mds-button-dropdown.js +1 -1
  318. package/dist/components/mds-button-group.js +1 -1
  319. package/dist/components/mds-button2.js +1 -1
  320. package/dist/components/mds-calendar-cell2.js +1 -1
  321. package/dist/components/mds-calendar2.js +1 -1
  322. package/dist/components/mds-card-content.js +1 -1
  323. package/dist/components/mds-card-footer.js +1 -1
  324. package/dist/components/mds-card-header.js +1 -1
  325. package/dist/components/mds-card-media.js +1 -1
  326. package/dist/components/mds-card.js +1 -1
  327. package/dist/components/mds-chip2.js +1 -1
  328. package/dist/components/mds-details.js +1 -1
  329. package/dist/components/mds-dropdown2.js +1 -1
  330. package/dist/components/mds-emoji.js +1 -1
  331. package/dist/components/mds-entity.js +1 -1
  332. package/dist/components/mds-file-preview2.js +2 -2
  333. package/dist/components/mds-file.js +3 -3
  334. package/dist/components/mds-filter-item2.js +1 -1
  335. package/dist/components/mds-filter.js +1 -1
  336. package/dist/components/mds-header-bar.js +1 -1
  337. package/dist/components/mds-header.js +1 -1
  338. package/dist/components/mds-help2.js +1 -1
  339. package/dist/components/mds-horizontal-scroll.js +1 -1
  340. package/dist/components/mds-hr.js +1 -1
  341. package/dist/components/mds-icon2.js +1 -1
  342. package/dist/components/mds-img2.js +1 -1
  343. package/dist/components/mds-input-date-range-preselection.js +1 -1
  344. package/dist/components/mds-input-date-range.js +1 -1
  345. package/dist/components/mds-input-date.js +1 -1
  346. package/dist/components/mds-input-field.js +1 -1
  347. package/dist/components/mds-input-otp.js +1 -1
  348. package/dist/components/mds-input-range.js +1 -1
  349. package/dist/components/mds-input-select.js +1 -1
  350. package/dist/components/mds-input-switch2.js +1 -1
  351. package/dist/components/mds-input-tip-item2.js +1 -1
  352. package/dist/components/mds-input-tip2.js +1 -1
  353. package/dist/components/mds-input-upload.js +1 -1
  354. package/dist/components/mds-input2.js +1 -1
  355. package/dist/components/mds-keyboard-key.js +1 -1
  356. package/dist/components/mds-keyboard.js +1 -1
  357. package/dist/components/mds-kpi-item.js +1 -1
  358. package/dist/components/mds-kpi.js +1 -1
  359. package/dist/components/mds-label.js +1 -1
  360. package/dist/components/mds-list-item.js +1 -1
  361. package/dist/components/mds-list.js +1 -1
  362. package/dist/components/mds-mention.js +1 -1
  363. package/dist/components/mds-modal2.js +1 -1
  364. package/dist/components/mds-note.js +1 -1
  365. package/dist/components/mds-notification.js +1 -1
  366. package/dist/components/mds-paginator-item2.js +1 -1
  367. package/dist/components/mds-paginator.js +1 -1
  368. package/dist/components/mds-policy-ai.js +1 -1
  369. package/dist/components/mds-pref-animation.js +1 -1
  370. package/dist/components/mds-pref-consumption.js +1 -1
  371. package/dist/components/mds-pref-contrast.js +1 -1
  372. package/dist/components/mds-pref-language-item.js +1 -1
  373. package/dist/components/mds-pref-language.js +1 -1
  374. package/dist/components/mds-pref-theme-variant-item.js +1 -1
  375. package/dist/components/mds-pref-theme-variant.js +1 -1
  376. package/dist/components/mds-pref-theme.js +1 -1
  377. package/dist/components/mds-pref.js +1 -1
  378. package/dist/components/mds-price-table-features-cell.js +1 -1
  379. package/dist/components/mds-price-table-features-row.js +1 -1
  380. package/dist/components/mds-price-table-features.js +1 -1
  381. package/dist/components/mds-price-table-header.js +1 -1
  382. package/dist/components/mds-price-table-list-item.js +1 -1
  383. package/dist/components/mds-price-table-list.js +1 -1
  384. package/dist/components/mds-price-table.js +1 -1
  385. package/dist/components/mds-progress2.js +1 -1
  386. package/dist/components/mds-push-notification-item.js +1 -1
  387. package/dist/components/mds-push-notification.js +1 -1
  388. package/dist/components/mds-quote.js +1 -1
  389. package/dist/components/mds-radial-menu-item.js +1 -1
  390. package/dist/components/mds-radial-menu.js +1 -1
  391. package/dist/components/mds-radial-progress2.js +1 -1
  392. package/dist/components/mds-separator2.js +1 -1
  393. package/dist/components/mds-spinner2.js +1 -1
  394. package/dist/components/mds-status-bar.js +1 -1
  395. package/dist/components/mds-stepper-bar-item.js +1 -1
  396. package/dist/components/mds-stepper-bar.js +1 -1
  397. package/dist/components/mds-tab-bar-item.js +1 -1
  398. package/dist/components/mds-tab-bar.js +1 -1
  399. package/dist/components/mds-tab-item2.js +1 -1
  400. package/dist/components/mds-tab2.js +1 -1
  401. package/dist/components/mds-table-body.js +1 -1
  402. package/dist/components/mds-table-cell2.js +1 -1
  403. package/dist/components/mds-table-footer.js +1 -1
  404. package/dist/components/mds-table-header-cell2.js +1 -1
  405. package/dist/components/mds-table-header.js +1 -1
  406. package/dist/components/mds-table-row.js +1 -1
  407. package/dist/components/mds-table.js +1 -1
  408. package/dist/components/mds-text2.js +1 -1
  409. package/dist/components/mds-toast.js +1 -1
  410. package/dist/components/mds-tooltip2.js +1 -1
  411. package/dist/components/mds-tree-item.js +1 -1
  412. package/dist/components/mds-tree.js +1 -1
  413. package/dist/components/mds-url-view.js +1 -1
  414. package/dist/components/mds-usage.js +1 -1
  415. package/dist/components/mds-video-wall.js +1 -1
  416. package/dist/components/mds-zero.js +1 -1
  417. package/dist/components/preference.js +1 -0
  418. package/dist/documentation.json +488 -382
  419. package/dist/esm/{floating-controller-CP3-OFb9.js → floating-controller-D5eXU5Mk.js} +5 -5
  420. package/dist/esm/loader.js +1 -1
  421. package/dist/esm/magma-components.js +1 -1
  422. package/dist/esm/mds-accordion-item.entry.js +24 -2
  423. package/dist/esm/mds-accordion-timer-item.entry.js +12 -2
  424. package/dist/esm/mds-accordion-timer.entry.js +1 -1
  425. package/dist/esm/mds-accordion.entry.js +32 -5
  426. package/dist/esm/mds-author.entry.js +1 -1
  427. package/dist/esm/mds-avatar-stack-item.entry.js +1 -1
  428. package/dist/esm/mds-avatar-stack.entry.js +1 -1
  429. package/dist/esm/mds-avatar.entry.js +27 -11
  430. package/dist/esm/mds-badge.entry.js +24 -2
  431. package/dist/esm/mds-banner_3.entry.js +49 -10
  432. package/dist/esm/mds-benchmark-bar.entry.js +1 -1
  433. package/dist/esm/mds-bibliography.entry.js +1 -1
  434. package/dist/esm/mds-breadcrumb-item.entry.js +1 -1
  435. package/dist/esm/mds-breadcrumb.entry.js +7 -7
  436. package/dist/esm/mds-button-dropdown.entry.js +1 -1
  437. package/dist/esm/mds-button-group.entry.js +1 -1
  438. package/dist/esm/mds-button_3.entry.js +30 -9
  439. package/dist/esm/mds-calendar_2.entry.js +69 -67
  440. package/dist/esm/mds-card-content.entry.js +1 -1
  441. package/dist/esm/mds-card-footer.entry.js +1 -1
  442. package/dist/esm/mds-card-header.entry.js +1 -1
  443. package/dist/esm/mds-card-media.entry.js +1 -1
  444. package/dist/esm/mds-card.entry.js +22 -4
  445. package/dist/esm/mds-details.entry.js +14 -2
  446. package/dist/esm/mds-dropdown.entry.js +41 -21
  447. package/dist/esm/mds-emoji.entry.js +1 -1
  448. package/dist/esm/mds-entity.entry.js +20 -2
  449. package/dist/esm/mds-file-preview.entry.js +25 -3
  450. package/dist/esm/mds-file.entry.js +26 -4
  451. package/dist/esm/mds-filter-item.entry.js +22 -2
  452. package/dist/esm/mds-filter.entry.js +24 -2
  453. package/dist/esm/mds-header-bar.entry.js +24 -2
  454. package/dist/esm/mds-header.entry.js +20 -4
  455. package/dist/esm/mds-horizontal-scroll.entry.js +1 -1
  456. package/dist/esm/mds-hr.entry.js +16 -2
  457. package/dist/esm/mds-img.entry.js +5 -4
  458. package/dist/esm/mds-input-date-range-preselection.entry.js +1 -1
  459. package/dist/esm/mds-input-date-range.entry.js +31 -14
  460. package/dist/esm/mds-input-date.entry.js +38 -14
  461. package/dist/esm/mds-input-field.entry.js +1 -1
  462. package/dist/esm/mds-input-otp.entry.js +1 -1
  463. package/dist/esm/mds-input-range.entry.js +24 -2
  464. package/dist/esm/mds-input-select.entry.js +25 -3
  465. package/dist/esm/mds-input-switch_2.entry.js +27 -4
  466. package/dist/esm/mds-input-tip_2.entry.js +28 -5
  467. package/dist/esm/mds-input-upload.entry.js +17 -7
  468. package/dist/esm/mds-input.entry.js +26 -3
  469. package/dist/esm/mds-keyboard-key.entry.js +1 -1
  470. package/dist/esm/mds-keyboard.entry.js +30 -11
  471. package/dist/esm/mds-kpi-item.entry.js +24 -2
  472. package/dist/esm/mds-kpi.entry.js +1 -1
  473. package/dist/esm/mds-label.entry.js +18 -2
  474. package/dist/esm/mds-list-item.entry.js +12 -2
  475. package/dist/esm/mds-list.entry.js +1 -1
  476. package/dist/esm/mds-mention.entry.js +1 -1
  477. package/dist/esm/mds-modal.entry.js +121 -43
  478. package/dist/esm/mds-note.entry.js +22 -2
  479. package/dist/esm/mds-notification.entry.js +14 -4
  480. package/dist/esm/mds-paginator-item.entry.js +18 -2
  481. package/dist/esm/mds-paginator.entry.js +39 -2
  482. package/dist/esm/mds-policy-ai.entry.js +5 -2
  483. package/dist/esm/mds-pref-animation.entry.js +15 -8
  484. package/dist/esm/mds-pref-consumption.entry.js +15 -8
  485. package/dist/esm/mds-pref-contrast.entry.js +15 -8
  486. package/dist/esm/mds-pref-language-item.entry.js +2 -2
  487. package/dist/esm/mds-pref-language.entry.js +2 -2
  488. package/dist/esm/mds-pref-theme-variant-item.entry.js +2 -2
  489. package/dist/esm/mds-pref-theme-variant.entry.js +2 -2
  490. package/dist/esm/mds-pref-theme.entry.js +27 -18
  491. package/dist/esm/mds-pref.entry.js +2 -2
  492. package/dist/esm/mds-price-table-features-cell.entry.js +24 -2
  493. package/dist/esm/mds-price-table-features-row.entry.js +24 -2
  494. package/dist/esm/mds-price-table-features.entry.js +24 -2
  495. package/dist/esm/mds-price-table-header.entry.js +2 -2
  496. package/dist/esm/mds-price-table-list-item.entry.js +2 -2
  497. package/dist/esm/mds-price-table-list.entry.js +24 -2
  498. package/dist/esm/mds-price-table.entry.js +2 -2
  499. package/dist/esm/mds-progress_2.entry.js +26 -4
  500. package/dist/esm/mds-push-notification-item.entry.js +28 -6
  501. package/dist/esm/mds-push-notification.entry.js +16 -2
  502. package/dist/esm/mds-quote.entry.js +12 -2
  503. package/dist/esm/mds-radial-menu-item.entry.js +2 -2
  504. package/dist/esm/mds-radial-menu.entry.js +3 -3
  505. package/dist/esm/mds-separator.entry.js +20 -2
  506. package/dist/esm/mds-status-bar.entry.js +25 -3
  507. package/dist/esm/mds-stepper-bar-item.entry.js +10 -2
  508. package/dist/esm/mds-stepper-bar.entry.js +2 -2
  509. package/dist/esm/mds-tab-bar-item.entry.js +24 -2
  510. package/dist/esm/mds-tab-bar.entry.js +24 -2
  511. package/dist/esm/mds-tab_2.entry.js +56 -6
  512. package/dist/esm/mds-table-body.entry.js +12 -2
  513. package/dist/esm/mds-table-footer.entry.js +12 -2
  514. package/dist/esm/mds-table-header-cell.entry.js +12 -2
  515. package/dist/esm/mds-table-header.entry.js +12 -2
  516. package/dist/esm/mds-table-row.entry.js +12 -4
  517. package/dist/esm/mds-table.entry.js +26 -4
  518. package/dist/esm/mds-text.entry.js +12 -2
  519. package/dist/esm/mds-toast.entry.js +24 -2
  520. package/dist/esm/mds-tooltip.entry.js +37 -17
  521. package/dist/esm/mds-tree-item.entry.js +26 -2
  522. package/dist/esm/mds-tree.entry.js +34 -2
  523. package/dist/esm/mds-url-view.entry.js +22 -2
  524. package/dist/esm/mds-usage.entry.js +24 -2
  525. package/dist/esm/mds-video-wall.entry.js +2 -2
  526. package/dist/esm/mds-zero.entry.js +24 -2
  527. package/dist/esm/preference-fMwnXhio.js +79 -0
  528. package/dist/esm-es5/floating-controller-D5eXU5Mk.js +1 -0
  529. package/dist/esm-es5/loader.js +1 -1
  530. package/dist/esm-es5/magma-components.js +1 -1
  531. package/dist/esm-es5/mds-accordion-item.entry.js +1 -1
  532. package/dist/esm-es5/mds-accordion-timer-item.entry.js +1 -1
  533. package/dist/esm-es5/mds-accordion-timer.entry.js +1 -1
  534. package/dist/esm-es5/mds-accordion.entry.js +1 -1
  535. package/dist/esm-es5/mds-author.entry.js +1 -1
  536. package/dist/esm-es5/mds-avatar-stack-item.entry.js +1 -1
  537. package/dist/esm-es5/mds-avatar-stack.entry.js +1 -1
  538. package/dist/esm-es5/mds-avatar.entry.js +1 -1
  539. package/dist/esm-es5/mds-badge.entry.js +1 -1
  540. package/dist/esm-es5/mds-banner_3.entry.js +1 -1
  541. package/dist/esm-es5/mds-benchmark-bar.entry.js +1 -1
  542. package/dist/esm-es5/mds-bibliography.entry.js +1 -1
  543. package/dist/esm-es5/mds-breadcrumb-item.entry.js +1 -1
  544. package/dist/esm-es5/mds-breadcrumb.entry.js +1 -1
  545. package/dist/esm-es5/mds-button-dropdown.entry.js +1 -1
  546. package/dist/esm-es5/mds-button-group.entry.js +1 -1
  547. package/dist/esm-es5/mds-button_3.entry.js +1 -1
  548. package/dist/esm-es5/mds-calendar_2.entry.js +1 -1
  549. package/dist/esm-es5/mds-card-content.entry.js +1 -1
  550. package/dist/esm-es5/mds-card-footer.entry.js +1 -1
  551. package/dist/esm-es5/mds-card-header.entry.js +1 -1
  552. package/dist/esm-es5/mds-card-media.entry.js +1 -1
  553. package/dist/esm-es5/mds-card.entry.js +1 -1
  554. package/dist/esm-es5/mds-details.entry.js +1 -1
  555. package/dist/esm-es5/mds-dropdown.entry.js +1 -1
  556. package/dist/esm-es5/mds-emoji.entry.js +1 -1
  557. package/dist/esm-es5/mds-entity.entry.js +1 -1
  558. package/dist/esm-es5/mds-file-preview.entry.js +2 -2
  559. package/dist/esm-es5/mds-file.entry.js +3 -3
  560. package/dist/esm-es5/mds-filter-item.entry.js +1 -1
  561. package/dist/esm-es5/mds-filter.entry.js +1 -1
  562. package/dist/esm-es5/mds-header-bar.entry.js +1 -1
  563. package/dist/esm-es5/mds-header.entry.js +1 -1
  564. package/dist/esm-es5/mds-horizontal-scroll.entry.js +1 -1
  565. package/dist/esm-es5/mds-hr.entry.js +1 -1
  566. package/dist/esm-es5/mds-img.entry.js +1 -1
  567. package/dist/esm-es5/mds-input-date-range-preselection.entry.js +1 -1
  568. package/dist/esm-es5/mds-input-date-range.entry.js +1 -1
  569. package/dist/esm-es5/mds-input-date.entry.js +1 -1
  570. package/dist/esm-es5/mds-input-field.entry.js +1 -1
  571. package/dist/esm-es5/mds-input-otp.entry.js +1 -1
  572. package/dist/esm-es5/mds-input-range.entry.js +1 -1
  573. package/dist/esm-es5/mds-input-select.entry.js +1 -1
  574. package/dist/esm-es5/mds-input-switch_2.entry.js +1 -1
  575. package/dist/esm-es5/mds-input-tip_2.entry.js +1 -1
  576. package/dist/esm-es5/mds-input-upload.entry.js +1 -1
  577. package/dist/esm-es5/mds-input.entry.js +1 -1
  578. package/dist/esm-es5/mds-keyboard-key.entry.js +1 -1
  579. package/dist/esm-es5/mds-keyboard.entry.js +1 -1
  580. package/dist/esm-es5/mds-kpi-item.entry.js +1 -1
  581. package/dist/esm-es5/mds-kpi.entry.js +1 -1
  582. package/dist/esm-es5/mds-label.entry.js +1 -1
  583. package/dist/esm-es5/mds-list-item.entry.js +1 -1
  584. package/dist/esm-es5/mds-list.entry.js +1 -1
  585. package/dist/esm-es5/mds-mention.entry.js +1 -1
  586. package/dist/esm-es5/mds-modal.entry.js +1 -1
  587. package/dist/esm-es5/mds-note.entry.js +1 -1
  588. package/dist/esm-es5/mds-notification.entry.js +1 -1
  589. package/dist/esm-es5/mds-paginator-item.entry.js +1 -1
  590. package/dist/esm-es5/mds-paginator.entry.js +1 -1
  591. package/dist/esm-es5/mds-policy-ai.entry.js +1 -1
  592. package/dist/esm-es5/mds-pref-animation.entry.js +1 -1
  593. package/dist/esm-es5/mds-pref-consumption.entry.js +1 -1
  594. package/dist/esm-es5/mds-pref-contrast.entry.js +1 -1
  595. package/dist/esm-es5/mds-pref-language-item.entry.js +1 -1
  596. package/dist/esm-es5/mds-pref-language.entry.js +1 -1
  597. package/dist/esm-es5/mds-pref-theme-variant-item.entry.js +1 -1
  598. package/dist/esm-es5/mds-pref-theme-variant.entry.js +1 -1
  599. package/dist/esm-es5/mds-pref-theme.entry.js +1 -1
  600. package/dist/esm-es5/mds-pref.entry.js +1 -1
  601. package/dist/esm-es5/mds-price-table-features-cell.entry.js +1 -1
  602. package/dist/esm-es5/mds-price-table-features-row.entry.js +1 -1
  603. package/dist/esm-es5/mds-price-table-features.entry.js +1 -1
  604. package/dist/esm-es5/mds-price-table-header.entry.js +1 -1
  605. package/dist/esm-es5/mds-price-table-list-item.entry.js +1 -1
  606. package/dist/esm-es5/mds-price-table-list.entry.js +1 -1
  607. package/dist/esm-es5/mds-price-table.entry.js +1 -1
  608. package/dist/esm-es5/mds-progress_2.entry.js +1 -1
  609. package/dist/esm-es5/mds-push-notification-item.entry.js +1 -1
  610. package/dist/esm-es5/mds-push-notification.entry.js +1 -1
  611. package/dist/esm-es5/mds-quote.entry.js +1 -1
  612. package/dist/esm-es5/mds-radial-menu-item.entry.js +1 -1
  613. package/dist/esm-es5/mds-radial-menu.entry.js +1 -1
  614. package/dist/esm-es5/mds-separator.entry.js +1 -1
  615. package/dist/esm-es5/mds-status-bar.entry.js +1 -1
  616. package/dist/esm-es5/mds-stepper-bar-item.entry.js +1 -1
  617. package/dist/esm-es5/mds-stepper-bar.entry.js +1 -1
  618. package/dist/esm-es5/mds-tab-bar-item.entry.js +1 -1
  619. package/dist/esm-es5/mds-tab-bar.entry.js +1 -1
  620. package/dist/esm-es5/mds-tab_2.entry.js +1 -1
  621. package/dist/esm-es5/mds-table-body.entry.js +1 -1
  622. package/dist/esm-es5/mds-table-footer.entry.js +1 -1
  623. package/dist/esm-es5/mds-table-header-cell.entry.js +1 -1
  624. package/dist/esm-es5/mds-table-header.entry.js +1 -1
  625. package/dist/esm-es5/mds-table-row.entry.js +1 -1
  626. package/dist/esm-es5/mds-table.entry.js +1 -1
  627. package/dist/esm-es5/mds-text.entry.js +1 -1
  628. package/dist/esm-es5/mds-toast.entry.js +1 -1
  629. package/dist/esm-es5/mds-tooltip.entry.js +1 -1
  630. package/dist/esm-es5/mds-tree-item.entry.js +1 -1
  631. package/dist/esm-es5/mds-tree.entry.js +1 -1
  632. package/dist/esm-es5/mds-url-view.entry.js +1 -1
  633. package/dist/esm-es5/mds-usage.entry.js +1 -1
  634. package/dist/esm-es5/mds-video-wall.entry.js +1 -1
  635. package/dist/esm-es5/mds-zero.entry.js +1 -1
  636. package/dist/esm-es5/preference-fMwnXhio.js +1 -0
  637. package/dist/hydrate/index.js +2084 -527
  638. package/dist/hydrate/index.mjs +2084 -527
  639. package/dist/magma-components/magma-components.esm.js +1 -1
  640. package/dist/magma-components/p-0105d7c7.entry.js +8 -0
  641. package/dist/magma-components/p-022defe8.entry.js +1 -0
  642. package/dist/magma-components/p-02d858d0.entry.js +1 -0
  643. package/dist/magma-components/p-0607a2b3.entry.js +1 -0
  644. package/dist/magma-components/{p-0b11f03b.entry.js → p-0af4d0ef.entry.js} +1 -1
  645. package/dist/magma-components/p-0b91aae4.entry.js +1 -0
  646. package/dist/magma-components/p-0bb29dbd.system.entry.js +1 -0
  647. package/dist/magma-components/p-0c1a5df0.entry.js +1 -0
  648. package/dist/magma-components/p-0e986d85.entry.js +18 -0
  649. package/dist/magma-components/p-0ea42813.entry.js +1 -0
  650. package/dist/magma-components/p-0fe5aeaf.system.entry.js +1 -0
  651. package/dist/magma-components/p-10ddec99.system.entry.js +1 -0
  652. package/dist/magma-components/p-11567740.entry.js +1 -0
  653. package/dist/magma-components/p-116238cf.system.entry.js +1 -0
  654. package/dist/magma-components/p-1239667c.system.entry.js +1 -0
  655. package/dist/magma-components/p-1518fda3.system.entry.js +1 -0
  656. package/dist/magma-components/p-16c94506.system.entry.js +1 -0
  657. package/dist/magma-components/p-18823bfc.system.entry.js +1 -0
  658. package/dist/magma-components/p-188e94ef.system.entry.js +1 -0
  659. package/dist/magma-components/p-19446c9e.entry.js +1 -0
  660. package/dist/magma-components/p-1a73c7b0.system.entry.js +1 -0
  661. package/dist/magma-components/p-1ad03ee9.entry.js +1 -0
  662. package/dist/magma-components/p-1c4038f7.system.entry.js +1 -0
  663. package/dist/magma-components/p-2035564c.system.entry.js +1 -0
  664. package/dist/magma-components/p-2128ce5a.system.entry.js +1 -0
  665. package/dist/magma-components/p-21ee64ec.entry.js +1 -0
  666. package/dist/magma-components/p-224d2f55.entry.js +1 -0
  667. package/dist/magma-components/p-23791e85.system.entry.js +1 -0
  668. package/dist/magma-components/p-248c1b2c.system.entry.js +1 -0
  669. package/dist/magma-components/p-249b80a5.entry.js +1 -0
  670. package/dist/magma-components/p-262daf4f.entry.js +1 -0
  671. package/dist/magma-components/p-288ce251.entry.js +1 -0
  672. package/dist/magma-components/p-2a804b82.entry.js +1 -0
  673. package/dist/magma-components/p-2aff9851.system.entry.js +1 -0
  674. package/dist/magma-components/p-2b0667f6.system.entry.js +1 -0
  675. package/dist/magma-components/p-2bd03b3d.system.entry.js +1 -0
  676. package/dist/magma-components/p-2bfa7ed9.system.entry.js +1 -0
  677. package/dist/magma-components/p-2c6c80e8.entry.js +1 -0
  678. package/dist/magma-components/p-2e88e014.system.entry.js +1 -0
  679. package/dist/magma-components/p-2f5cc981.system.entry.js +1 -0
  680. package/dist/magma-components/p-31403b12.entry.js +1 -0
  681. package/dist/magma-components/p-31616d0b.entry.js +1 -0
  682. package/dist/magma-components/p-33b03c17.system.entry.js +1 -0
  683. package/dist/magma-components/p-353f30cc.system.entry.js +1 -0
  684. package/dist/magma-components/p-35482f9d.system.entry.js +1 -0
  685. package/dist/magma-components/p-35b5889a.system.entry.js +1 -0
  686. package/dist/magma-components/p-36d9d329.system.entry.js +1 -0
  687. package/dist/magma-components/p-36fd1ed7.system.entry.js +1 -0
  688. package/dist/magma-components/p-377c94ee.system.entry.js +1 -0
  689. package/dist/magma-components/p-385f395d.system.entry.js +1 -0
  690. package/dist/magma-components/p-39c09a42.system.entry.js +1 -0
  691. package/dist/magma-components/p-3_AKUQtJ.system.js +1 -0
  692. package/dist/magma-components/p-3c306ed0.system.entry.js +1 -0
  693. package/dist/magma-components/p-3de6fa18.entry.js +1 -0
  694. package/dist/magma-components/p-41da539f.entry.js +1 -0
  695. package/dist/magma-components/p-422bb9e2.system.entry.js +1 -0
  696. package/dist/magma-components/p-447c2d1b.entry.js +1 -0
  697. package/dist/magma-components/p-44e2965d.entry.js +1 -0
  698. package/dist/magma-components/p-46266f27.entry.js +1 -0
  699. package/dist/magma-components/p-4630472f.entry.js +1 -0
  700. package/dist/magma-components/{p-8b3065b4.entry.js → p-4671336c.entry.js} +1 -1
  701. package/dist/magma-components/p-4803d24f.system.entry.js +1 -0
  702. package/dist/magma-components/p-4a929c1c.entry.js +1 -0
  703. package/dist/magma-components/p-4bc7756a.system.entry.js +1 -0
  704. package/dist/magma-components/p-4f8ae676.system.entry.js +1 -0
  705. package/dist/magma-components/p-50c922ad.system.entry.js +1 -0
  706. package/dist/magma-components/p-50cdb70c.system.entry.js +1 -0
  707. package/dist/magma-components/p-52c10dbf.system.entry.js +1 -0
  708. package/dist/magma-components/p-52e35c13.system.entry.js +1 -0
  709. package/dist/magma-components/p-56a8f1d0.system.entry.js +1 -0
  710. package/dist/magma-components/p-5724212b.entry.js +1 -0
  711. package/dist/magma-components/p-5be1c273.entry.js +1 -0
  712. package/dist/magma-components/p-5d05fa1a.entry.js +1 -0
  713. package/dist/magma-components/p-5de4bf4f.entry.js +1 -0
  714. package/dist/magma-components/p-5e626696.entry.js +1 -0
  715. package/dist/magma-components/p-5f1532c0.system.entry.js +1 -0
  716. package/dist/magma-components/{p-dd860de4.entry.js → p-5fe8c814.entry.js} +1 -1
  717. package/dist/magma-components/{p-7306b02e.system.entry.js → p-60e8812c.system.entry.js} +1 -1
  718. package/dist/magma-components/p-611fa0a4.entry.js +1 -0
  719. package/dist/magma-components/p-61fefe1b.system.entry.js +1 -0
  720. package/dist/magma-components/p-62c9216f.system.entry.js +1 -0
  721. package/dist/magma-components/p-652b4e43.entry.js +1 -0
  722. package/dist/magma-components/p-6a92f533.entry.js +1 -0
  723. package/dist/magma-components/p-6b3569a0.entry.js +1 -0
  724. package/dist/magma-components/p-6b9175f1.system.entry.js +1 -0
  725. package/dist/magma-components/p-6ecfec17.entry.js +1 -0
  726. package/dist/magma-components/p-6ed096d3.system.entry.js +1 -0
  727. package/dist/magma-components/p-6ee86191.entry.js +1 -0
  728. package/dist/magma-components/{p-94713401.entry.js → p-70719b58.entry.js} +1 -1
  729. package/dist/magma-components/p-70e1a436.entry.js +1 -0
  730. package/dist/magma-components/p-725d9e09.entry.js +1 -0
  731. package/dist/magma-components/p-726a76f0.entry.js +1 -0
  732. package/dist/magma-components/p-72d91c6f.system.entry.js +1 -0
  733. package/dist/magma-components/{p-68f57bb1.entry.js → p-73926a10.entry.js} +1 -1
  734. package/dist/magma-components/p-7499262d.system.entry.js +1 -0
  735. package/dist/magma-components/p-750214a3.entry.js +1 -0
  736. package/dist/magma-components/p-7590a160.entry.js +1 -0
  737. package/dist/magma-components/p-75fa7e6f.system.entry.js +1 -0
  738. package/dist/magma-components/p-765447d4.system.entry.js +1 -0
  739. package/dist/magma-components/p-76cb480d.entry.js +1 -0
  740. package/dist/magma-components/p-79e12ac8.entry.js +1 -0
  741. package/dist/magma-components/p-7b4b9b88.system.entry.js +1 -0
  742. package/dist/magma-components/p-7c464f28.entry.js +1 -0
  743. package/dist/magma-components/p-7d338f59.system.entry.js +1 -0
  744. package/dist/magma-components/p-81e16f90.system.entry.js +1 -0
  745. package/dist/magma-components/p-82c6cdb9.system.entry.js +1 -0
  746. package/dist/magma-components/p-83b01f8e.system.entry.js +1 -0
  747. package/dist/magma-components/p-8546f46f.system.entry.js +1 -0
  748. package/dist/magma-components/p-85a2d99d.entry.js +1 -0
  749. package/dist/magma-components/p-8620f425.entry.js +1 -0
  750. package/dist/magma-components/p-89581b08.system.entry.js +1 -0
  751. package/dist/magma-components/p-8964a9fe.entry.js +1 -0
  752. package/dist/magma-components/p-899cd759.entry.js +1 -0
  753. package/dist/magma-components/p-8b2408b2.entry.js +1 -0
  754. package/dist/magma-components/p-8b9f6896.entry.js +1 -0
  755. package/dist/magma-components/p-8bde0c42.entry.js +1 -0
  756. package/dist/magma-components/p-8d5955ca.system.entry.js +1 -0
  757. package/dist/magma-components/p-91a1d3d5.entry.js +1 -0
  758. package/dist/magma-components/p-93538408.system.entry.js +1 -0
  759. package/dist/magma-components/p-94ff105b.system.entry.js +1 -0
  760. package/dist/magma-components/p-96f7ec63.entry.js +1 -0
  761. package/dist/magma-components/p-97144490.entry.js +1 -0
  762. package/dist/magma-components/p-999b0698.system.entry.js +1 -0
  763. package/dist/magma-components/p-9e533765.system.entry.js +18 -0
  764. package/dist/magma-components/p-DTZViJWJ.system.js +1 -1
  765. package/dist/magma-components/p-DssKRrAV.system.js +1 -0
  766. package/dist/magma-components/p-MSUJeuJp.js +1 -0
  767. package/dist/magma-components/p-a24d6d4a.system.entry.js +1 -0
  768. package/dist/magma-components/p-a24dadaa.system.entry.js +1 -0
  769. package/dist/magma-components/p-a2b84011.system.entry.js +1 -0
  770. package/dist/magma-components/p-a2d761d6.entry.js +1 -0
  771. package/dist/magma-components/p-a379adca.entry.js +1 -0
  772. package/dist/magma-components/p-a46f7424.system.entry.js +1 -0
  773. package/dist/magma-components/p-a47708f1.system.entry.js +1 -0
  774. package/dist/magma-components/p-a4d11055.system.entry.js +1 -0
  775. package/dist/magma-components/{p-7595afcf.entry.js → p-a5ef9d32.entry.js} +1 -1
  776. package/dist/magma-components/p-a6103622.entry.js +1 -0
  777. package/dist/magma-components/p-a6b8b861.entry.js +1 -0
  778. package/dist/magma-components/p-a6bdaa85.entry.js +1 -0
  779. package/dist/magma-components/p-a716833c.system.entry.js +1 -0
  780. package/dist/magma-components/p-a877906d.system.entry.js +1 -0
  781. package/dist/magma-components/p-a8a2d90e.system.entry.js +1 -0
  782. package/dist/magma-components/p-a92edada.entry.js +1 -0
  783. package/dist/magma-components/p-aafec5fe.entry.js +1 -0
  784. package/dist/magma-components/p-abce0c57.system.entry.js +1 -0
  785. package/dist/magma-components/p-ac2ee475.entry.js +1 -0
  786. package/dist/magma-components/p-ac5baffa.system.entry.js +1 -0
  787. package/dist/magma-components/p-ad1ad433.system.entry.js +1 -0
  788. package/dist/magma-components/p-ae433eb9.entry.js +1 -0
  789. package/dist/magma-components/p-afaef9a1.entry.js +1 -0
  790. package/dist/magma-components/p-b257222c.system.entry.js +1 -0
  791. package/dist/magma-components/p-b472ed3c.entry.js +1 -0
  792. package/dist/magma-components/p-b4fc19e9.entry.js +1 -0
  793. package/dist/magma-components/p-b53ef2c1.entry.js +1 -0
  794. package/dist/magma-components/p-b7dedc9f.entry.js +1 -0
  795. package/dist/magma-components/p-b97edfb5.entry.js +1 -0
  796. package/dist/magma-components/p-bc851caf.entry.js +1 -0
  797. package/dist/magma-components/p-bc8ef479.system.entry.js +9 -0
  798. package/dist/magma-components/p-bdc54840.system.entry.js +1 -0
  799. package/dist/magma-components/p-bf29ca5a.entry.js +1 -0
  800. package/dist/magma-components/p-bfc29d3b.system.entry.js +1 -0
  801. package/dist/magma-components/p-bff1e84c.system.entry.js +1 -0
  802. package/dist/magma-components/p-c01c49b6.entry.js +1 -0
  803. package/dist/magma-components/p-c0296d86.system.entry.js +1 -0
  804. package/dist/magma-components/p-c036f516.entry.js +1 -0
  805. package/dist/magma-components/p-c3d8aa52.entry.js +1 -0
  806. package/dist/magma-components/{p-d1eea8ca.system.entry.js → p-c4e7b103.system.entry.js} +1 -1
  807. package/dist/magma-components/p-c7a0a746.system.entry.js +1 -0
  808. package/dist/magma-components/p-c92a772e.entry.js +1 -0
  809. package/dist/magma-components/p-ca09ab1d.system.entry.js +1 -0
  810. package/dist/magma-components/p-cc9212ce.system.entry.js +1 -0
  811. package/dist/magma-components/p-cc95225c.system.entry.js +1 -0
  812. package/dist/magma-components/p-cd49c455.entry.js +1 -0
  813. package/dist/magma-components/p-d0542487.entry.js +1 -0
  814. package/dist/magma-components/p-d0dfe659.entry.js +1 -0
  815. package/dist/magma-components/p-d0eb94ea.system.entry.js +1 -0
  816. package/dist/magma-components/p-d3e5c4eb.system.entry.js +1 -0
  817. package/dist/magma-components/p-d4295773.entry.js +1 -0
  818. package/dist/magma-components/p-d5700423.system.entry.js +1 -0
  819. package/dist/magma-components/{p-292f4566.system.entry.js → p-d838cb1c.system.entry.js} +1 -1
  820. package/dist/magma-components/p-d9605a5d.system.entry.js +1 -0
  821. package/dist/magma-components/p-daa8f835.entry.js +1 -0
  822. package/dist/magma-components/p-db4e2a0b.system.entry.js +1 -0
  823. package/dist/magma-components/p-de0dac8f.entry.js +1 -0
  824. package/dist/magma-components/p-de8204f9.entry.js +1 -0
  825. package/dist/magma-components/p-e0b841e3.entry.js +1 -0
  826. package/dist/magma-components/p-e35ab355.entry.js +1 -0
  827. package/dist/magma-components/p-e44e2652.system.entry.js +1 -0
  828. package/dist/magma-components/p-e48d23f4.system.entry.js +1 -0
  829. package/dist/magma-components/p-e570aec5.system.entry.js +1 -0
  830. package/dist/magma-components/p-e57698df.system.entry.js +1 -0
  831. package/dist/magma-components/p-e669739e.entry.js +1 -0
  832. package/dist/magma-components/p-e8fa7a07.entry.js +1 -0
  833. package/dist/magma-components/{p-19f99447.entry.js → p-ea2c8dd1.entry.js} +1 -1
  834. package/dist/magma-components/p-ea881c45.system.entry.js +1 -0
  835. package/dist/magma-components/p-ebfb6963.system.entry.js +1 -0
  836. package/dist/magma-components/p-eca8523b.system.entry.js +1 -0
  837. package/dist/magma-components/p-ef142420.system.entry.js +1 -0
  838. package/dist/magma-components/p-ef56af85.system.entry.js +1 -0
  839. package/dist/magma-components/p-f0762290.entry.js +1 -0
  840. package/dist/magma-components/p-f1832c1e.system.entry.js +1 -0
  841. package/dist/magma-components/p-f4b1974a.entry.js +1 -0
  842. package/dist/magma-components/p-f7cfc9a7.system.entry.js +1 -0
  843. package/dist/magma-components/p-f83a9e08.entry.js +1 -0
  844. package/dist/magma-components/p-f8ee5fec.system.entry.js +1 -0
  845. package/dist/magma-components/p-f91dab2b.entry.js +1 -0
  846. package/dist/magma-components/p-fMwnXhio.js +1 -0
  847. package/dist/magma-components/p-fa61d03c.entry.js +1 -0
  848. package/dist/magma-components/p-fbf423a7.system.entry.js +1 -0
  849. package/dist/magma-components/p-fbfb589c.entry.js +1 -0
  850. package/dist/magma-components/p-fc56d9ae.entry.js +1 -0
  851. package/dist/magma-components/p-fc862fe2.system.entry.js +1 -0
  852. package/dist/magma-components/{p-59d65cff.entry.js → p-fd574e21.entry.js} +1 -1
  853. package/dist/magma-components/p-fd649ac2.entry.js +1 -0
  854. package/dist/magma-components/p-fed36619.entry.js +1 -0
  855. package/dist/stats.json +4297 -2219
  856. package/dist/types/common/floating-controller.d.ts +3 -3
  857. package/dist/types/common/preference.d.ts +22 -0
  858. package/dist/types/components/mds-accordion/mds-accordion.d.ts +10 -2
  859. package/dist/types/components/mds-accordion/test/mds-accordion.stories.d.ts +3 -2
  860. package/dist/types/components/mds-accordion-item/mds-accordion-item.d.ts +10 -0
  861. package/dist/types/components/mds-accordion-timer-item/mds-accordion-timer-item.d.ts +4 -0
  862. package/dist/types/components/mds-avatar/mds-avatar.d.ts +8 -0
  863. package/dist/types/components/mds-badge/mds-badge.d.ts +10 -0
  864. package/dist/types/components/mds-banner/mds-banner.d.ts +11 -2
  865. package/dist/types/components/mds-banner/test/mds-banner.stories.d.ts +2 -2
  866. package/dist/types/components/mds-breadcrumb/mds-breadcrumb.d.ts +2 -2
  867. package/dist/types/components/mds-breadcrumb/test/mds-breadcrumb.stories.d.ts +1 -1
  868. package/dist/types/components/mds-button/mds-button.d.ts +6 -0
  869. package/dist/types/components/mds-calendar/mds-calendar.d.ts +6 -0
  870. package/dist/types/components/mds-card/mds-card.d.ts +10 -2
  871. package/dist/types/components/mds-card/test/mds-card.stories.d.ts +2 -2
  872. package/dist/types/components/mds-chip/mds-chip.d.ts +9 -0
  873. package/dist/types/components/mds-details/mds-details.d.ts +5 -0
  874. package/dist/types/components/mds-dropdown/mds-dropdown.d.ts +20 -11
  875. package/dist/types/components/mds-dropdown/test/mds-dropdown.stories.d.ts +10 -10
  876. package/dist/types/components/mds-entity/mds-entity.d.ts +8 -0
  877. package/dist/types/components/mds-file/mds-file.d.ts +12 -2
  878. package/dist/types/components/mds-file/test/mds-file.stories.d.ts +1 -1
  879. package/dist/types/components/mds-file-preview/mds-file-preview.d.ts +10 -0
  880. package/dist/types/components/mds-filter/mds-filter.d.ts +10 -0
  881. package/dist/types/components/mds-filter-item/mds-filter-item.d.ts +9 -0
  882. package/dist/types/components/mds-header/mds-header.d.ts +9 -2
  883. package/dist/types/components/mds-header/test/mds-header.stories.d.ts +1 -1
  884. package/dist/types/components/mds-header-bar/mds-header-bar.d.ts +10 -0
  885. package/dist/types/components/mds-help/mds-help.d.ts +2 -2
  886. package/dist/types/components/mds-hr/mds-hr.d.ts +6 -0
  887. package/dist/types/components/mds-icon/mds-icon.d.ts +0 -1
  888. package/dist/types/components/mds-img/mds-img.d.ts +1 -0
  889. package/dist/types/components/mds-input/mds-input.d.ts +10 -0
  890. package/dist/types/components/mds-input-date/mds-input-date.d.ts +12 -0
  891. package/dist/types/components/mds-input-date-range/mds-input-date-range.d.ts +11 -0
  892. package/dist/types/components/mds-input-range/mds-input-range.d.ts +10 -0
  893. package/dist/types/components/mds-input-select/mds-input-select.d.ts +10 -0
  894. package/dist/types/components/mds-input-switch/mds-input-switch.d.ts +6 -0
  895. package/dist/types/components/mds-input-tip/mds-input-tip.d.ts +4 -0
  896. package/dist/types/components/mds-input-tip-item/mds-input-tip-item.d.ts +6 -0
  897. package/dist/types/components/mds-input-upload/mds-input-upload.d.ts +3 -0
  898. package/dist/types/components/mds-keyboard/mds-keyboard.d.ts +6 -1
  899. package/dist/types/components/mds-kpi-item/mds-kpi-item.d.ts +10 -0
  900. package/dist/types/components/mds-label/mds-label.d.ts +7 -0
  901. package/dist/types/components/mds-list-item/mds-list-item.d.ts +4 -0
  902. package/dist/types/components/mds-modal/mds-modal.d.ts +23 -12
  903. package/dist/types/components/mds-modal/meta/types.d.ts +0 -1
  904. package/dist/types/components/mds-modal/test/mds-modal.stories.d.ts +16 -2
  905. package/dist/types/components/mds-note/mds-note.d.ts +9 -0
  906. package/dist/types/components/mds-notification/mds-notification.d.ts +5 -2
  907. package/dist/types/components/mds-notification/test/mds-notification.stories.d.ts +6 -6
  908. package/dist/types/components/mds-paginator/mds-paginator.d.ts +15 -0
  909. package/dist/types/components/mds-paginator-item/mds-paginator-item.d.ts +7 -0
  910. package/dist/types/components/mds-policy-ai/mds-policy-ai.d.ts +1 -0
  911. package/dist/types/components/mds-pref-animation/mds-pref-animation.d.ts +5 -0
  912. package/dist/types/components/mds-pref-consumption/mds-pref-consumption.d.ts +5 -0
  913. package/dist/types/components/mds-pref-contrast/mds-pref-contrast.d.ts +5 -0
  914. package/dist/types/components/mds-pref-theme/mds-pref-theme.d.ts +9 -0
  915. package/dist/types/components/mds-price-table-features/mds-price-table-features.d.ts +10 -0
  916. package/dist/types/components/mds-price-table-features-cell/mds-price-table-features-cell.d.ts +10 -0
  917. package/dist/types/components/mds-price-table-features-row/mds-price-table-features-row.d.ts +10 -0
  918. package/dist/types/components/mds-price-table-list/mds-price-table-list.d.ts +10 -0
  919. package/dist/types/components/mds-progress/mds-progress.d.ts +10 -0
  920. package/dist/types/components/mds-push-notification/mds-push-notification.d.ts +6 -0
  921. package/dist/types/components/mds-push-notification-item/mds-push-notification-item.d.ts +11 -1
  922. package/dist/types/components/mds-quote/mds-quote.d.ts +4 -0
  923. package/dist/types/components/mds-separator/mds-separator.d.ts +8 -0
  924. package/dist/types/components/mds-spinner/mds-spinner.d.ts +4 -0
  925. package/dist/types/components/mds-status-bar/mds-status-bar.d.ts +10 -0
  926. package/dist/types/components/mds-stepper-bar-item/mds-stepper-bar-item.d.ts +3 -0
  927. package/dist/types/components/mds-tab/mds-tab.d.ts +11 -1
  928. package/dist/types/components/mds-tab-bar/mds-tab-bar.d.ts +10 -0
  929. package/dist/types/components/mds-tab-bar-item/mds-tab-bar-item.d.ts +10 -0
  930. package/dist/types/components/mds-tab-item/mds-tab-item.d.ts +20 -0
  931. package/dist/types/components/mds-table/mds-table.d.ts +9 -0
  932. package/dist/types/components/mds-table-body/mds-table-body.d.ts +4 -0
  933. package/dist/types/components/mds-table-cell/mds-table-cell.d.ts +4 -0
  934. package/dist/types/components/mds-table-footer/mds-table-footer.d.ts +4 -0
  935. package/dist/types/components/mds-table-header/mds-table-header.d.ts +4 -0
  936. package/dist/types/components/mds-table-header-cell/mds-table-header-cell.d.ts +4 -0
  937. package/dist/types/components/mds-table-row/mds-table-row.d.ts +8 -0
  938. package/dist/types/components/mds-text/mds-text.d.ts +4 -0
  939. package/dist/types/components/mds-toast/mds-toast.d.ts +10 -0
  940. package/dist/types/components/mds-tooltip/mds-tooltip.d.ts +17 -8
  941. package/dist/types/components/mds-tooltip/test/mds-tooltip.stories.d.ts +8 -8
  942. package/dist/types/components/mds-tree/mds-tree.d.ts +5 -0
  943. package/dist/types/components/mds-tree-item/mds-tree-item.d.ts +25 -1
  944. package/dist/types/components/mds-url-view/mds-url-view.d.ts +9 -0
  945. package/dist/types/components/mds-usage/mds-usage.d.ts +10 -0
  946. package/dist/types/components/mds-zero/mds-zero.d.ts +10 -0
  947. package/dist/types/components.d.ts +200 -160
  948. package/package.json +6 -3
  949. package/dist/esm-es5/floating-controller-CP3-OFb9.js +0 -1
  950. package/dist/magma-components/p-00313884.entry.js +0 -1
  951. package/dist/magma-components/p-01dc43dd.entry.js +0 -1
  952. package/dist/magma-components/p-01dca5e8.entry.js +0 -1
  953. package/dist/magma-components/p-030d45e3.entry.js +0 -1
  954. package/dist/magma-components/p-0328a23e.system.entry.js +0 -1
  955. package/dist/magma-components/p-08c6869a.entry.js +0 -1
  956. package/dist/magma-components/p-09de9fc5.system.entry.js +0 -1
  957. package/dist/magma-components/p-0acb46c8.entry.js +0 -1
  958. package/dist/magma-components/p-0b10ef9f.system.entry.js +0 -1
  959. package/dist/magma-components/p-0be56202.system.entry.js +0 -1
  960. package/dist/magma-components/p-0de58147.entry.js +0 -1
  961. package/dist/magma-components/p-0e481e5c.system.entry.js +0 -1
  962. package/dist/magma-components/p-0f104850.system.entry.js +0 -1
  963. package/dist/magma-components/p-1073bf63.entry.js +0 -1
  964. package/dist/magma-components/p-11490a89.entry.js +0 -1
  965. package/dist/magma-components/p-137b0bbe.system.entry.js +0 -1
  966. package/dist/magma-components/p-14a98729.entry.js +0 -1
  967. package/dist/magma-components/p-14d858f8.system.entry.js +0 -1
  968. package/dist/magma-components/p-14e918de.system.entry.js +0 -1
  969. package/dist/magma-components/p-154ef5b9.entry.js +0 -1
  970. package/dist/magma-components/p-158af6e3.entry.js +0 -1
  971. package/dist/magma-components/p-17427d8a.system.entry.js +0 -1
  972. package/dist/magma-components/p-1805592d.entry.js +0 -1
  973. package/dist/magma-components/p-18563022.entry.js +0 -1
  974. package/dist/magma-components/p-1a56d383.system.entry.js +0 -1
  975. package/dist/magma-components/p-1bb7895a.system.entry.js +0 -1
  976. package/dist/magma-components/p-1ce791c1.system.entry.js +0 -1
  977. package/dist/magma-components/p-1da904c3.system.entry.js +0 -1
  978. package/dist/magma-components/p-20961bf1.entry.js +0 -1
  979. package/dist/magma-components/p-24a9ed63.system.entry.js +0 -1
  980. package/dist/magma-components/p-26b131cf.entry.js +0 -1
  981. package/dist/magma-components/p-28ebb626.entry.js +0 -1
  982. package/dist/magma-components/p-2a1d3680.system.entry.js +0 -1
  983. package/dist/magma-components/p-2ab75334.system.entry.js +0 -1
  984. package/dist/magma-components/p-2ccc796b.system.entry.js +0 -1
  985. package/dist/magma-components/p-2d9d0887.system.entry.js +0 -1
  986. package/dist/magma-components/p-2df01d02.system.entry.js +0 -1
  987. package/dist/magma-components/p-3145c7eb.entry.js +0 -1
  988. package/dist/magma-components/p-34018dfe.entry.js +0 -1
  989. package/dist/magma-components/p-35a9f1b4.system.entry.js +0 -18
  990. package/dist/magma-components/p-35ec8bbd.entry.js +0 -1
  991. package/dist/magma-components/p-370f9463.system.entry.js +0 -1
  992. package/dist/magma-components/p-387948c4.system.entry.js +0 -1
  993. package/dist/magma-components/p-3aeecbba.system.entry.js +0 -1
  994. package/dist/magma-components/p-3af9132f.system.entry.js +0 -1
  995. package/dist/magma-components/p-3bfd085f.system.entry.js +0 -1
  996. package/dist/magma-components/p-3c246a39.entry.js +0 -1
  997. package/dist/magma-components/p-3c2bf79b.entry.js +0 -1
  998. package/dist/magma-components/p-3ce52f3c.entry.js +0 -1
  999. package/dist/magma-components/p-3e5993b4.entry.js +0 -1
  1000. package/dist/magma-components/p-3ef80cd4.system.entry.js +0 -1
  1001. package/dist/magma-components/p-3fc3b8b4.entry.js +0 -1
  1002. package/dist/magma-components/p-423955d1.system.entry.js +0 -1
  1003. package/dist/magma-components/p-42f336df.system.entry.js +0 -1
  1004. package/dist/magma-components/p-45a85712.system.entry.js +0 -1
  1005. package/dist/magma-components/p-460cd731.system.entry.js +0 -1
  1006. package/dist/magma-components/p-473f6954.entry.js +0 -1
  1007. package/dist/magma-components/p-47fa0ecf.entry.js +0 -1
  1008. package/dist/magma-components/p-4b07fe37.entry.js +0 -1
  1009. package/dist/magma-components/p-4b884441.entry.js +0 -1
  1010. package/dist/magma-components/p-4ba583c9.entry.js +0 -1
  1011. package/dist/magma-components/p-4c08fe3e.entry.js +0 -1
  1012. package/dist/magma-components/p-4f490917.entry.js +0 -1
  1013. package/dist/magma-components/p-4f98fdba.system.entry.js +0 -1
  1014. package/dist/magma-components/p-50553954.system.entry.js +0 -1
  1015. package/dist/magma-components/p-523d4716.entry.js +0 -1
  1016. package/dist/magma-components/p-52ccfafc.system.entry.js +0 -1
  1017. package/dist/magma-components/p-52e2f903.entry.js +0 -1
  1018. package/dist/magma-components/p-53195d95.system.entry.js +0 -1
  1019. package/dist/magma-components/p-5488f51f.system.entry.js +0 -1
  1020. package/dist/magma-components/p-553927f9.system.entry.js +0 -1
  1021. package/dist/magma-components/p-55b4bbba.entry.js +0 -1
  1022. package/dist/magma-components/p-583f5ffa.entry.js +0 -1
  1023. package/dist/magma-components/p-59f53701.system.entry.js +0 -1
  1024. package/dist/magma-components/p-5b881091.entry.js +0 -1
  1025. package/dist/magma-components/p-5c44d208.entry.js +0 -1
  1026. package/dist/magma-components/p-5fdcd8e2.system.entry.js +0 -1
  1027. package/dist/magma-components/p-5fe7b875.system.entry.js +0 -1
  1028. package/dist/magma-components/p-614e7f83.system.entry.js +0 -1
  1029. package/dist/magma-components/p-62cf9003.system.entry.js +0 -1
  1030. package/dist/magma-components/p-63898681.entry.js +0 -1
  1031. package/dist/magma-components/p-663a510e.entry.js +0 -1
  1032. package/dist/magma-components/p-6ae4df92.system.entry.js +0 -1
  1033. package/dist/magma-components/p-6d268a59.entry.js +0 -1
  1034. package/dist/magma-components/p-75011fed.system.entry.js +0 -9
  1035. package/dist/magma-components/p-77e9bd68.entry.js +0 -1
  1036. package/dist/magma-components/p-7d836722.entry.js +0 -1
  1037. package/dist/magma-components/p-7e037cf3.entry.js +0 -8
  1038. package/dist/magma-components/p-8106dbfd.system.entry.js +0 -1
  1039. package/dist/magma-components/p-82deeaa0.system.entry.js +0 -1
  1040. package/dist/magma-components/p-83589b83.entry.js +0 -1
  1041. package/dist/magma-components/p-83721814.entry.js +0 -18
  1042. package/dist/magma-components/p-83de0e53.system.entry.js +0 -1
  1043. package/dist/magma-components/p-849760e7.system.entry.js +0 -1
  1044. package/dist/magma-components/p-85ac6e54.system.entry.js +0 -1
  1045. package/dist/magma-components/p-87f8a213.entry.js +0 -1
  1046. package/dist/magma-components/p-89bf698e.system.entry.js +0 -1
  1047. package/dist/magma-components/p-89f96753.system.entry.js +0 -1
  1048. package/dist/magma-components/p-8bec8ad6.system.entry.js +0 -1
  1049. package/dist/magma-components/p-8d76853c.system.entry.js +0 -1
  1050. package/dist/magma-components/p-8f1ce3f1.system.entry.js +0 -1
  1051. package/dist/magma-components/p-9021fa60.entry.js +0 -1
  1052. package/dist/magma-components/p-90b72c1c.system.entry.js +0 -1
  1053. package/dist/magma-components/p-90d5b6df.system.entry.js +0 -1
  1054. package/dist/magma-components/p-913372ff.entry.js +0 -1
  1055. package/dist/magma-components/p-94093140.system.entry.js +0 -1
  1056. package/dist/magma-components/p-944d9b27.system.entry.js +0 -1
  1057. package/dist/magma-components/p-956b5ae6.entry.js +0 -1
  1058. package/dist/magma-components/p-95eae04e.entry.js +0 -1
  1059. package/dist/magma-components/p-961a2531.entry.js +0 -1
  1060. package/dist/magma-components/p-9658cb0c.entry.js +0 -1
  1061. package/dist/magma-components/p-96d1a168.entry.js +0 -1
  1062. package/dist/magma-components/p-96f6a646.entry.js +0 -1
  1063. package/dist/magma-components/p-98435b90.system.entry.js +0 -1
  1064. package/dist/magma-components/p-988b0c7c.entry.js +0 -1
  1065. package/dist/magma-components/p-98a05642.system.entry.js +0 -1
  1066. package/dist/magma-components/p-99f7a1b6.system.entry.js +0 -1
  1067. package/dist/magma-components/p-9a1940c1.system.entry.js +0 -1
  1068. package/dist/magma-components/p-9a89bc78.system.entry.js +0 -1
  1069. package/dist/magma-components/p-9ad586a7.system.entry.js +0 -1
  1070. package/dist/magma-components/p-9b52918e.system.entry.js +0 -1
  1071. package/dist/magma-components/p-9yaIBCJC.system.js +0 -1
  1072. package/dist/magma-components/p-CxU_BeBE.js +0 -1
  1073. package/dist/magma-components/p-a1af65e8.entry.js +0 -1
  1074. package/dist/magma-components/p-a5473293.system.entry.js +0 -1
  1075. package/dist/magma-components/p-a6caafcb.system.entry.js +0 -1
  1076. package/dist/magma-components/p-a7bd4585.entry.js +0 -1
  1077. package/dist/magma-components/p-a88fba47.system.entry.js +0 -1
  1078. package/dist/magma-components/p-a959ade4.entry.js +0 -1
  1079. package/dist/magma-components/p-aa7d8972.entry.js +0 -1
  1080. package/dist/magma-components/p-aa98652f.entry.js +0 -1
  1081. package/dist/magma-components/p-aaeb0ee3.system.entry.js +0 -1
  1082. package/dist/magma-components/p-ab89bf5b.system.entry.js +0 -1
  1083. package/dist/magma-components/p-abc720e3.entry.js +0 -1
  1084. package/dist/magma-components/p-abe87810.entry.js +0 -1
  1085. package/dist/magma-components/p-ac80aca8.entry.js +0 -1
  1086. package/dist/magma-components/p-acb07134.system.entry.js +0 -1
  1087. package/dist/magma-components/p-acd4f96a.entry.js +0 -1
  1088. package/dist/magma-components/p-af49bca2.entry.js +0 -1
  1089. package/dist/magma-components/p-af670eaf.entry.js +0 -1
  1090. package/dist/magma-components/p-b14a94e0.system.entry.js +0 -1
  1091. package/dist/magma-components/p-b2bc194a.entry.js +0 -1
  1092. package/dist/magma-components/p-b2e76c18.system.entry.js +0 -1
  1093. package/dist/magma-components/p-b37dff80.system.entry.js +0 -1
  1094. package/dist/magma-components/p-b3e3226e.entry.js +0 -1
  1095. package/dist/magma-components/p-b40f1153.entry.js +0 -1
  1096. package/dist/magma-components/p-b4709a95.entry.js +0 -1
  1097. package/dist/magma-components/p-b5db6527.system.entry.js +0 -1
  1098. package/dist/magma-components/p-b764defa.entry.js +0 -1
  1099. package/dist/magma-components/p-b9b2501e.system.entry.js +0 -1
  1100. package/dist/magma-components/p-b9b5bcdd.system.entry.js +0 -1
  1101. package/dist/magma-components/p-ba2a0bc1.system.entry.js +0 -1
  1102. package/dist/magma-components/p-bb4380cd.entry.js +0 -1
  1103. package/dist/magma-components/p-bce3a8b0.system.entry.js +0 -1
  1104. package/dist/magma-components/p-bd2998e6.system.entry.js +0 -1
  1105. package/dist/magma-components/p-bd3dbc2d.entry.js +0 -1
  1106. package/dist/magma-components/p-bed57abb.entry.js +0 -1
  1107. package/dist/magma-components/p-bfed0b7a.entry.js +0 -1
  1108. package/dist/magma-components/p-c6177cb9.system.entry.js +0 -1
  1109. package/dist/magma-components/p-c638556c.entry.js +0 -1
  1110. package/dist/magma-components/p-c6fa4a21.entry.js +0 -1
  1111. package/dist/magma-components/p-c8e99385.system.entry.js +0 -1
  1112. package/dist/magma-components/p-c9231987.entry.js +0 -1
  1113. package/dist/magma-components/p-c9c51ba6.system.entry.js +0 -1
  1114. package/dist/magma-components/p-cc53b30c.entry.js +0 -1
  1115. package/dist/magma-components/p-ccc0521c.entry.js +0 -1
  1116. package/dist/magma-components/p-cd71630e.system.entry.js +0 -1
  1117. package/dist/magma-components/p-cd879243.system.entry.js +0 -1
  1118. package/dist/magma-components/p-ce064d47.entry.js +0 -1
  1119. package/dist/magma-components/p-d2537229.system.entry.js +0 -1
  1120. package/dist/magma-components/p-d2617a1a.entry.js +0 -1
  1121. package/dist/magma-components/p-d41c4637.system.entry.js +0 -1
  1122. package/dist/magma-components/p-d88f44aa.entry.js +0 -1
  1123. package/dist/magma-components/p-dae9ae8e.system.entry.js +0 -1
  1124. package/dist/magma-components/p-df87e2f5.system.entry.js +0 -1
  1125. package/dist/magma-components/p-dfe082be.system.entry.js +0 -1
  1126. package/dist/magma-components/p-e00ba5a0.entry.js +0 -1
  1127. package/dist/magma-components/p-e0d12fa2.system.entry.js +0 -1
  1128. package/dist/magma-components/p-e2cd11c3.entry.js +0 -1
  1129. package/dist/magma-components/p-e5fb3081.system.entry.js +0 -1
  1130. package/dist/magma-components/p-e67a6452.entry.js +0 -1
  1131. package/dist/magma-components/p-e6d8c9e3.system.entry.js +0 -1
  1132. package/dist/magma-components/p-e71aecc1.entry.js +0 -1
  1133. package/dist/magma-components/p-eac692ea.system.entry.js +0 -1
  1134. package/dist/magma-components/p-ecf2e98d.system.entry.js +0 -1
  1135. package/dist/magma-components/p-ed6d1453.system.entry.js +0 -1
  1136. package/dist/magma-components/p-f289eb5a.entry.js +0 -1
  1137. package/dist/magma-components/p-f3604c99.entry.js +0 -1
  1138. package/dist/magma-components/p-f3dbca34.entry.js +0 -1
  1139. package/dist/magma-components/p-f4b4bdf2.system.entry.js +0 -1
  1140. package/dist/magma-components/p-f56d16f7.entry.js +0 -1
  1141. package/dist/magma-components/p-f8014852.system.entry.js +0 -1
  1142. package/dist/magma-components/p-f851100d.entry.js +0 -1
  1143. package/dist/magma-components/p-f8d5adce.entry.js +0 -1
  1144. package/dist/magma-components/p-fa427f75.system.entry.js +0 -1
  1145. package/dist/magma-components/p-fa6a05b5.entry.js +0 -1
  1146. package/dist/magma-components/p-fb8b0104.entry.js +0 -1
  1147. package/dist/magma-components/p-fcf59139.system.entry.js +0 -1
  1148. package/dist/magma-components/p-fe3d5720.system.entry.js +0 -1
  1149. package/dist/magma-components/p-fe85ad8e.system.entry.js +0 -1
  1150. package/dist/magma-components/p-ffae137a.entry.js +0 -1
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,createEvent as a,h as n,Host as i,transformTag as r}from"@stencil/core/internal/client";import{m as s}from"./calendar-today.js";import{D as o,d}from"./mds-calendar2.js";import{c as l}from"./clsx.js";import{L as h}from"./locale.js";import{d as c}from"./mds-button2.js";import{d as m}from"./mds-calendar-cell2.js";import{d as u}from"./mds-dropdown2.js";import{d as p}from"./mds-icon2.js";import{d as g}from"./mds-spinner2.js";import{d as v}from"./mds-text2.js";var b={from:"Από",to:"έως"},f={from:"From",to:"to"},x={from:"De",to:"a"},y={from:"Dal",to:"al"};const w=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.valueChanged=a(this,"mdsInputDateRangeValueChange",7),this.internals=this.attachInternals(),this.calendarKey=0,this.internalStartDate="",this.internalEndDate="",this.visibleCalendarDate="",this.hasPreselection=!1,this.t=new h({el:b,en:f,es:x,it:y}),this.startDate="",this.endDate="",this.min=null,this.max=null,this.delay=500,this.dualCalendar=!1,this.lastEmittedStartDate=null,this.lastEmittedEndDate=null,this.initialStartDate="",this.initialEndDate="",this.hoveredCalendarDate=null,this.syncingInputSlots=new Set,this.handleFocusOut=t=>{if(!this.host.contains(t.relatedTarget)){const t=o.fromISO(this.internalStartDate).isValid,e=o.fromISO(this.internalEndDate).isValid;t&&e&&(this.validateDateRange(),this.syncFormValue(),this.checkPreselections(),this.emitValueChanged())}},this.focusInput=t=>{t.focusInput()},this.focusDateInput=t=>{t.target===this.host&&this.focusStartDateInput(t)},this.focusStartDateInput=t=>{t.preventDefault(),t.stopPropagation(),this.focusInput(this.host.querySelector('mds-input-date[slot="start"]'))},this.focusEndDateInput=t=>{t.preventDefault(),t.stopPropagation(),this.focusInput(this.host.querySelector('mds-input-date[slot="end"]'))},this.handleCalendarHover=t=>{if(""===this.internalStartDate||""!==this.internalEndDate)return void this.clearHoverPreview();const e=t.detail.hoverDate;this.hoveredCalendarDate!==e&&(this.hoveredCalendarDate=e,this.syncCalendarsHoverAttributes())},this.handleCalendarChange=t=>{this.clearHoverPreview(),this.internalStartDate=t.detail.startDate,this.updateInputValue("start",this.internalStartDate),void 0!==t.detail.endDate&&""!==t.detail.endDate?(this.internalEndDate=t.detail.endDate,this.updateInputValue("end",this.internalEndDate)):(this.internalEndDate="",this.updateInputValue("end",this.internalEndDate)),this.syncFormValue(),this.syncCalendarsSelectionAttributes(),""!==this.internalStartDate&&""!==this.internalEndDate&&(this.emitValueChanged(),this.closeDropdownAfterSelection())},this.handleCalendarNavigate=t=>{if(!this.dualCalendar)return;const e=this.getCalendars().indexOf(t.target),a=o.fromISO(t.detail.currentDate);a.isValid&&(this.visibleCalendarDate=a.minus({months:1===e?1:0}).startOf("month").toISODate())}}async updateLang(){this.language=this.t.lang(this.host)}getCalendars(){var t,e;return Array.from(null!==(e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelectorAll("mds-calendar"))&&void 0!==e?e:[])}resolveVisibleCalendarDate(t,e){var a;return(null!==(a=[t,e].map((t=>o.fromISO(null!=t?t:""))).filter((t=>t.isValid))[0])&&void 0!==a?a:o.now()).startOf("month").toISODate()}getCalendarViewDate(t=0){const e=o.fromISO(this.visibleCalendarDate),a=o.fromISO(this.internalStartDate);let n=o.now();return e.isValid?n=e:a.isValid&&(n=a),n.startOf("month").plus({months:t}).toISODate()}setVisibleCalendarDate(t){const e=o.fromISO(t);e.isValid&&(this.visibleCalendarDate=e.startOf("month").toISODate())}closeDropdownAfterSelection(){if(0===this.delay)return;const{dropdownRef:t}=this;t&&setTimeout((()=>{t.visible=!1}),this.delay)}syncCalendarsSelectionAttributes(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.querySelectorAll("mds-calendar").forEach((t=>{""!==this.internalStartDate?t.setAttribute("start-date",this.internalStartDate):t.removeAttribute("start-date"),""!==this.internalEndDate?t.setAttribute("end-date",this.internalEndDate):t.removeAttribute("end-date")})),this.syncCalendarsHoverAttributes()}syncCalendarsHoverAttributes(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.querySelectorAll("mds-calendar").forEach((t=>{null!==this.hoveredCalendarDate&&""!==this.hoveredCalendarDate?t.setAttribute("hover-date",this.hoveredCalendarDate):t.removeAttribute("hover-date")}))}clearHoverPreview(){null!==this.hoveredCalendarDate&&(this.hoveredCalendarDate=null,this.syncCalendarsHoverAttributes())}getEmittableDateRangeDetail(){const t=o.fromISO(this.internalStartDate),e=o.fromISO(this.internalEndDate);return t.isValid&&e.isValid?{startDate:this.internalStartDate,endDate:this.internalEndDate}:null}emitValueChanged(){const t=this.getEmittableDateRangeDetail();return!(!t||t.startDate===this.lastEmittedStartDate&&t.endDate===this.lastEmittedEndDate||(this.valueChanged.emit(t),this.lastEmittedStartDate=t.startDate,this.lastEmittedEndDate=t.endDate,0))}handleStartDateChange(t){this.syncExternalDate("start",t)}handleEndDateChange(t){this.syncExternalDate("end",t)}componentWillLoad(){if(this.language=this.t.lang(this.host),this.internalStartDate=this.startDate,this.internalEndDate=this.endDate,this.initialStartDate=this.startDate,this.initialEndDate=this.endDate,this.visibleCalendarDate=this.resolveVisibleCalendarDate(this.internalStartDate,this.internalEndDate),null!==this.min&&""!==this.min&&null!==this.max&&""!==this.max){const t=o.fromISO(this.min);o.fromISO(this.max)<t&&(this.max=this.min)}this.syncFormValue()}disconnectedCallback(){var t;this.host.removeEventListener("focusout",this.handleFocusOut),null===(t=this.host.shadowRoot)||void 0===t||t.removeEventListener("mdsCalendarHover",this.handleCalendarHover)}async preselect(t){null==this.togglePreselection&&(this.togglePreselection=Array.from(this.host.querySelectorAll("mds-input-date-range-preselection"))),this.togglePreselection.forEach((t=>{t.selected=!1})),t.caller.selected=!0,this.clearHoverPreview(),o.fromISO(t.start).isValid&&(this.internalStartDate=t.start,this.setVisibleCalendarDate(this.internalStartDate),this.updateInputValue("start",this.internalStartDate)),void 0!==t.end?o.fromISO(t.end).isValid&&(this.internalEndDate=t.end):this.internalEndDate=t.start,this.updateInputValue("end",this.internalEndDate),this.syncFormValue();const e=this.getCalendars();return 0!==e.length&&(await Promise.all(e.map(((t,e)=>t.updateCurrentDate(this.getCalendarViewDate(e))))),this.closeDropdownAfterSelection()),this.emitValueChanged(),Promise.resolve()}componentDidLoad(){var t;this.updateInputListeners(),this.updateInputValue("start",this.internalStartDate),this.updateInputValue("end",this.internalEndDate),this.syncFormValue(),this.host.addEventListener("focusout",this.handleFocusOut),null===(t=this.host.shadowRoot)||void 0===t||t.addEventListener("mdsCalendarHover",this.handleCalendarHover)}formResetCallback(){this.clearHoverPreview(),this.internalStartDate=this.initialStartDate,this.internalEndDate=this.initialEndDate,this.visibleCalendarDate=this.resolveVisibleCalendarDate(this.initialStartDate,this.initialEndDate),this.updateInputValue("start",this.internalStartDate),this.updateInputValue("end",this.internalEndDate),this.checkPreselections(),this.syncFormValue()}syncExternalDate(t,e){const a=null!=e?e:"";if(this.clearHoverPreview(),"start"===t){if(a===this.internalStartDate)return;this.internalStartDate=a,this.setVisibleCalendarDate(this.internalStartDate)}else{if(a===this.internalEndDate)return;this.internalEndDate=a}this.validateDateRange(),this.updateInputValue("start",this.internalStartDate),this.updateInputValue("end",this.internalEndDate),this.checkPreselections(),this.syncFormValue()}updateInputValue(t,e){var a;const n=null===(a=this.host.shadowRoot)||void 0===a?void 0:a.querySelector(`slot[name="${t}"]`),i=null==n?void 0:n.assignedElements()[0];null!=i&&(this.syncingInputSlots.add(t),i.setValue(e).finally((()=>{requestAnimationFrame((()=>{this.syncingInputSlots.delete(t)}))})))}updateInputListeners(){var t,e;const a=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector('slot[name="start"]'),n=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector('slot[name="end"]');this.hasPreselection=null!==this.host.querySelector("mds-input-date-range-preselection"),null!=a&&a.assignedElements()[0].addEventListener("mdsInputDateSelect",this.createFocusoutListener("start")),null!=n&&n.assignedElements()[0].addEventListener("mdsInputDateSelect",this.createFocusoutListener("end"))}createFocusoutListener(t){return e=>{if(this.syncingInputSlots.has(t))return;const a=e;this.clearHoverPreview(),"start"===t?(this.internalStartDate=a.detail,this.setVisibleCalendarDate(this.internalStartDate)):this.internalEndDate=a.detail,this.syncFormValue()}}validateDateRange(){if(""!==this.internalStartDate&&""!==this.internalEndDate){const t=o.fromISO(this.internalStartDate);o.fromISO(this.internalEndDate)<t&&(this.internalEndDate=this.internalStartDate,this.updateInputValue("end",this.internalEndDate))}}checkPreselections(){const t=Array.from(this.host.querySelectorAll("mds-input-date-range-preselection"));null!=t&&t.forEach((t=>{t.selected=!!(t.start===this.internalStartDate&&t.end===this.internalEndDate||t.start===this.internalStartDate&&this.internalStartDate===this.internalEndDate&&void 0===t.end)}))}renderCalendarPreselectionPanel(){return this.hasPreselection?n("div",{class:"calendar-preselection-panel"},n("div",{class:l("date-preselection",this.hasPreselection&&"date-preselection--has-preselection")},n("slot",{name:"calendar-preselection"}))):null}renderSingleCalendar(){return n("div",{class:"calendar-single"},this.renderCalendarPreselectionPanel(),n("mds-calendar",Object.assign({lang:this.language,key:this.calendarKey,rangePicker:!0,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:()=>{this.checkPreselections()},startDate:this.internalStartDate,endDate:this.internalEndDate},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{})))}renderDualCalendars(){return n("div",{class:"calendars"},this.renderCalendarPreselectionPanel(),n("mds-calendar",Object.assign({lang:this.language,key:this.calendarKey+"-start",rangePicker:!0,showNextButton:!1,disableMonthYearSelection:!0,viewDate:this.getCalendarViewDate(),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:()=>{this.checkPreselections()},startDate:this.internalStartDate,endDate:this.internalEndDate},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{})),n("mds-calendar",Object.assign({lang:this.language,key:this.calendarKey+"-end",rangePicker:!0,showPreviousButton:!1,disableMonthYearSelection:!0,viewDate:this.getCalendarViewDate(1),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:()=>{this.checkPreselections()},startDate:this.internalStartDate,endDate:this.internalEndDate},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{})))}render(){return n(i,{key:"13d9a565316927ca4ec2586f82e2f25f7d04ae25",onClick:this.focusDateInput},n("div",{key:"71bda796783e6ead96c24ad4ed84ac79265291e8",class:"inputs"},n("div",{key:"c06b73facc486130eb89e857b782b15581cfba20",class:"input-element"},n("mds-text",{key:"340fa48ce0a88bd6445cfc874c27ec70e2426feb",class:"date-label",typography:"detail",onClick:this.focusStartDateInput},this.t.get("from")),n("div",{key:"b82416e3ffa442ee84004d20e298b859ca5543a8",class:"input-wrapper"},n("slot",{key:"9b8741fecf76c4503e58b044222b4ccb6bb889e0",name:"start"}))),n("div",{key:"fcd38e4e5d5a065001c712a960dd5bcae1dd5e79",class:"input-element"},n("mds-text",{key:"269cdf295bfefe625a3cf98f1aaf7fb021b688d4",class:"date-label",typography:"detail",onClick:this.focusEndDateInput},this.t.get("to")),n("div",{key:"ee917dba0a0af805e1ebe5b69fb997b492e044ba",class:"input-wrapper"},n("slot",{key:"dd22c8a98be387b76aa6b355f6b025db1a8fdbb6",name:"end"})))),n("div",{key:"ca651a85e149d23e4eafdf66c121ffa3d5685dca",class:"action-open-calendar-wrapper"},n("mds-button",{key:"ff5e89aec57614f98890f52859bc2f10e33bc85d",class:"action-open-calendar",variant:"dark",tone:"text",icon:s,id:"calendar-dropdown",onClick:()=>{this.calendarKey+=1}})),n("mds-dropdown",{key:"30609e1d1eb75209b5e17444758b1b9b2ac19bce",ref:t=>this.dropdownRef=t,target:"#calendar-dropdown","auto-placement":!1,placement:"bottom-end"},this.dualCalendar?this.renderDualCalendars():this.renderSingleCalendar()))}syncFormValue(){var t,e,a,n;const i=null!==(e=null===(t=this.internalStartDate)||void 0===t?void 0:t.trim())&&void 0!==e?e:"",r=null!==(n=null===(a=this.internalEndDate)||void 0===a?void 0:a.trim())&&void 0!==n?n:"";this.internals.setFormValue(""!==i||""!==r?JSON.stringify({startDate:i,endDate:r}):null)}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{startDate:[{handleStartDateChange:0}],endDate:[{handleEndDateChange:0}]}}static get style(){return'@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@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{--mds-input-date-range-background:rgb(var(--tone-neutral,0 0 0));--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(--variant-primary-03,211 226 255));--mds-input-date-range-variant-color-rgb:0 0 0}}}@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}@property --mds-input-date-range-calendar-width{syntax:"<length>";inherits:false;initial-value:22rem}@property --mds-input-date-range-fields-firefox-justify-content{syntax:"start|end|center|left|right|flex-start|flex-end";inherits:false;initial-value:start}@property --mds-input-date-range-variant-color-rgb{syntax:"<integer>+";inherits:false;initial-value:0 0 0}:host{--mds-input-date-range-background:rgb(var(--tone-neutral,0 0 0));--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(--variant-primary-03,211 226 255));--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);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(--radius-2xl,24px);color:rgb(var(--tone-neutral-02,244 244 244));corner-shape:var(--magma-corner-shape,round);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(--variant-primary-04,184 208 255));--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(--tone-neutral,0 0 0)));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(--duration-300,.3s);transition-duration:var(--duration-300,.3s);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}.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(--tone-neutral-09,76 76 76));border-radius:var(--radius-lg,16px);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}.calendar-single mds-calendar,.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(--variant-primary-03,211 226 255)))}mds-dropdown{padding:0}:host-context(:root.pref-animation-reduce) .input{transition-duration:0s}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)){--mds-input-date-range-ring:var(--shadow-outline-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}:host-context(:root.pref-contrast-more){--mds-input-date-range-ring:var(--shadow-outline-strong-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:host-context(:root.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:host-context(:root.pref-contrast-more) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}@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(--variant-primary-05,152 188 255));--mds-input-date-range-variant-color-rgb:var(--variant-primary-04,184 208 255)}:host([variant=ai]){--mds-input-date-range-icon-color:rgb(var(--variant-ai-04,218 199 253));--mds-input-tip-background:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=ai]:focus-within){--mds-input-date-range-icon-color:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-range-variant-color-rgb:var(--variant-ai-04,218 199 253)}:host([variant=info]){--mds-input-date-range-icon-color:rgb(var(--status-info-04,159 216 241));--mds-input-tip-background:rgb(var(--status-info-05,112 198 234));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=info]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-info-05,112 198 234));--mds-input-date-range-variant-color-rgb:var(--status-info-04,159 216 241)}:host([variant=success]){--mds-input-date-range-icon-color:rgb(var(--status-success-04,158 222 181));--mds-input-tip-background:rgb(var(--status-success-05,107 206 147));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=success]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-success-05,107 206 147));--mds-input-date-range-variant-color-rgb:var(--status-success-04,158 222 181)}:host([variant=warning]){--mds-input-date-range-icon-color:rgb(var(--status-warning-04,255 200 33));--mds-input-tip-background:rgb(var(--status-warning-05,237 177 0));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-warning-05,237 177 0));--mds-input-date-range-variant-color-rgb:var(--status-warning-04,255 200 33)}:host([variant=error]){--mds-input-date-range-icon-color:rgb(var(--status-error-04,254 193 189));--mds-input-tip-background:rgb(var(--status-error-05,250 165 160));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=error]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-error-05,250 165 160));--mds-input-date-range-variant-color-rgb:var(--status-error-04,254 193 189)}@media (forced-colors:active){:host(:focus-within) .inputs{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion){:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .input{transition-duration:0s}}@media (prefers-color-scheme:dark){:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))){--mds-input-date-range-ring:var(--shadow-outline-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}}@media (prefers-contrast:more){:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))){--mds-input-date-range-ring:var(--shadow-outline-strong-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}}'}},[321,"mds-input-date-range",{startDate:[513,"start-date"],endDate:[513,"end-date"],min:[513],max:[513],delay:[514],dualCalendar:[516,"dual-calendar"],name:[513],calendarKey:[32],internalStartDate:[32],internalEndDate:[32],visibleCalendarDate:[32],dropdownRef:[32],hasPreselection:[32],language:[32],updateLang:[64],preselect:[64]},void 0,{startDate:[{handleStartDateChange:0}],endDate:[{handleEndDateChange:0}]}]),k=w,D=function(){"undefined"!=typeof customElements&&["mds-input-date-range","mds-button","mds-calendar","mds-calendar-cell","mds-dropdown","mds-icon","mds-spinner","mds-text"].forEach((t=>{switch(t){case"mds-input-date-range":customElements.get(r(t))||customElements.define(r(t),w);break;case"mds-button":customElements.get(r(t))||c();break;case"mds-calendar":customElements.get(r(t))||d();break;case"mds-calendar-cell":customElements.get(r(t))||m();break;case"mds-dropdown":customElements.get(r(t))||u();break;case"mds-icon":customElements.get(r(t))||p();break;case"mds-spinner":customElements.get(r(t))||g();break;case"mds-text":customElements.get(r(t))||v()}}))};export{k as MdsInputDateRange,D as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as e,createEvent as a,h as i,Host as n,transformTag as r}from"@stencil/core/internal/client";import{m as s}from"./calendar-today.js";import{D as o,d}from"./mds-calendar2.js";import{c as l}from"./clsx.js";import{L as h}from"./locale.js";import{s as c}from"./preference.js";import{d as u}from"./mds-button2.js";import{d as m}from"./mds-calendar-cell2.js";import{d as p}from"./mds-dropdown2.js";import{d as g}from"./mds-icon2.js";import{d as v}from"./mds-spinner2.js";import{d as f}from"./mds-text2.js";var b={from:"Από",to:"έως"},w={from:"From",to:"to"},x={from:"De",to:"a"},y={from:"Dal",to:"al"};const k=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.valueChanged=a(this,"mdsInputDateRangeValueChange",7),this.internals=this.attachInternals(),this.calendarKey=0,this.internalStartDate="",this.internalEndDate="",this.visibleCalendarDate="",this.hasPreselection=!1,this.t=new h({el:b,en:w,es:x,it:y}),this.startDate="",this.endDate="",this.min=null,this.max=null,this.delay=500,this.dualCalendar=!1,this.lastEmittedStartDate=null,this.lastEmittedEndDate=null,this.initialStartDate="",this.initialEndDate="",this.hoveredCalendarDate=null,this.syncingInputSlots=new Set,this.handleFocusOut=t=>{if(!this.host.contains(t.relatedTarget)){const t=o.fromISO(this.internalStartDate).isValid,e=o.fromISO(this.internalEndDate).isValid;t&&e&&(this.validateDateRange(),this.syncFormValue(),this.checkPreselections(),this.emitValueChanged())}},this.focusInput=t=>{t.focusInput()},this.focusDateInput=t=>{t.target===this.host&&this.focusStartDateInput(t)},this.focusStartDateInput=t=>{t.preventDefault(),t.stopPropagation(),this.focusInput(this.host.querySelector('mds-input-date[slot="start"]'))},this.focusEndDateInput=t=>{t.preventDefault(),t.stopPropagation(),this.focusInput(this.host.querySelector('mds-input-date[slot="end"]'))},this.handleCalendarHover=t=>{if(""===this.internalStartDate||""!==this.internalEndDate)return void this.clearHoverPreview();const e=t.detail.hoverDate;this.hoveredCalendarDate!==e&&(this.hoveredCalendarDate=e,this.syncCalendarsHoverAttributes())},this.handleCalendarChange=t=>{this.clearHoverPreview(),this.internalStartDate=t.detail.startDate,this.updateInputValue("start",this.internalStartDate),void 0!==t.detail.endDate&&""!==t.detail.endDate?(this.internalEndDate=t.detail.endDate,this.updateInputValue("end",this.internalEndDate)):(this.internalEndDate="",this.updateInputValue("end",this.internalEndDate)),this.syncFormValue(),this.syncCalendarsSelectionAttributes(),""!==this.internalStartDate&&""!==this.internalEndDate&&(this.emitValueChanged(),this.closeDropdownAfterSelection())},this.handleCalendarNavigate=t=>{if(!this.dualCalendar)return;const e=this.getCalendars().indexOf(t.target),a=o.fromISO(t.detail.currentDate);a.isValid&&(this.visibleCalendarDate=a.minus({months:1===e?1:0}).startOf("month").toISODate())},this.handleCalendarPreselect=()=>{this.checkPreselections()},this.handleOpenCalendarClick=()=>{this.calendarKey+=1}}async updateLang(){this.language=this.t.lang(this.host)}getCalendars(){var t,e;return Array.from(null!==(e=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelectorAll("mds-calendar"))&&void 0!==e?e:[])}resolveVisibleCalendarDate(t,e){var a;return(null!==(a=[t,e].map((t=>o.fromISO(null!=t?t:""))).filter((t=>t.isValid))[0])&&void 0!==a?a:o.now()).startOf("month").toISODate()}getCalendarViewDate(t=0){const e=o.fromISO(this.visibleCalendarDate),a=o.fromISO(this.internalStartDate);let i=o.now();return e.isValid?i=e:a.isValid&&(i=a),i.startOf("month").plus({months:t}).toISODate()}setVisibleCalendarDate(t){const e=o.fromISO(t);e.isValid&&(this.visibleCalendarDate=e.startOf("month").toISODate())}closeDropdownAfterSelection(){if(0===this.delay)return;const{dropdownRef:t}=this;t&&setTimeout((()=>{t.visible=!1}),this.delay)}syncCalendarsSelectionAttributes(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.querySelectorAll("mds-calendar").forEach((t=>{""!==this.internalStartDate?t.setAttribute("start-date",this.internalStartDate):t.removeAttribute("start-date"),""!==this.internalEndDate?t.setAttribute("end-date",this.internalEndDate):t.removeAttribute("end-date")})),this.syncCalendarsHoverAttributes()}syncCalendarsHoverAttributes(){var t;null===(t=this.host.shadowRoot)||void 0===t||t.querySelectorAll("mds-calendar").forEach((t=>{null!==this.hoveredCalendarDate&&""!==this.hoveredCalendarDate?t.setAttribute("hover-date",this.hoveredCalendarDate):t.removeAttribute("hover-date")}))}clearHoverPreview(){null!==this.hoveredCalendarDate&&(this.hoveredCalendarDate=null,this.syncCalendarsHoverAttributes())}getEmittableDateRangeDetail(){const t=o.fromISO(this.internalStartDate),e=o.fromISO(this.internalEndDate);return t.isValid&&e.isValid?{startDate:this.internalStartDate,endDate:this.internalEndDate}:null}emitValueChanged(){const t=this.getEmittableDateRangeDetail();return!(!t||t.startDate===this.lastEmittedStartDate&&t.endDate===this.lastEmittedEndDate||(this.valueChanged.emit(t),this.lastEmittedStartDate=t.startDate,this.lastEmittedEndDate=t.endDate,0))}handleStartDateChange(t){this.syncExternalDate("start",t)}handleEndDateChange(t){this.syncExternalDate("end",t)}componentWillLoad(){if(this.language=this.t.lang(this.host),this.internalStartDate=this.startDate,this.internalEndDate=this.endDate,this.initialStartDate=this.startDate,this.initialEndDate=this.endDate,this.visibleCalendarDate=this.resolveVisibleCalendarDate(this.internalStartDate,this.internalEndDate),null!==this.min&&""!==this.min&&null!==this.max&&""!==this.max){const t=o.fromISO(this.min);o.fromISO(this.max)<t&&(this.max=this.min)}this.syncFormValue()}connectedCallback(){this.unsubscribePrefAnimation=c("animation",(t=>{this.prefAnimation=t})),this.unsubscribePrefContrast=c("contrast",(t=>{this.prefContrast=t})),this.unsubscribePrefTheme=c("theme",(t=>{this.prefTheme=t})),this.unsubscribePrefThemeScheme=c("theme-scheme",(t=>{this.prefThemeScheme=t}))}disconnectedCallback(){var t,e,a,i,n;null===(t=this.unsubscribePrefAnimation)||void 0===t||t.call(this),null===(e=this.unsubscribePrefContrast)||void 0===e||e.call(this),null===(a=this.unsubscribePrefTheme)||void 0===a||a.call(this),null===(i=this.unsubscribePrefThemeScheme)||void 0===i||i.call(this),this.host.removeEventListener("focusout",this.handleFocusOut),null===(n=this.host.shadowRoot)||void 0===n||n.removeEventListener("mdsCalendarHover",this.handleCalendarHover)}async preselect(t){null==this.togglePreselection&&(this.togglePreselection=Array.from(this.host.querySelectorAll("mds-input-date-range-preselection"))),this.togglePreselection.forEach((t=>{t.selected=!1})),t.caller.selected=!0,this.clearHoverPreview(),o.fromISO(t.start).isValid&&(this.internalStartDate=t.start,this.setVisibleCalendarDate(this.internalStartDate),this.updateInputValue("start",this.internalStartDate)),void 0!==t.end?o.fromISO(t.end).isValid&&(this.internalEndDate=t.end):this.internalEndDate=t.start,this.updateInputValue("end",this.internalEndDate),this.syncFormValue();const e=this.getCalendars();return 0!==e.length&&(await Promise.all(e.map(((t,e)=>t.updateCurrentDate(this.getCalendarViewDate(e))))),this.closeDropdownAfterSelection()),this.emitValueChanged(),Promise.resolve()}componentDidLoad(){var t;this.updateInputListeners(),this.updateInputValue("start",this.internalStartDate),this.updateInputValue("end",this.internalEndDate),this.syncFormValue(),this.host.addEventListener("focusout",this.handleFocusOut),null===(t=this.host.shadowRoot)||void 0===t||t.addEventListener("mdsCalendarHover",this.handleCalendarHover)}formResetCallback(){this.clearHoverPreview(),this.internalStartDate=this.initialStartDate,this.internalEndDate=this.initialEndDate,this.visibleCalendarDate=this.resolveVisibleCalendarDate(this.initialStartDate,this.initialEndDate),this.updateInputValue("start",this.internalStartDate),this.updateInputValue("end",this.internalEndDate),this.checkPreselections(),this.syncFormValue()}syncExternalDate(t,e){const a=null!=e?e:"";if(this.clearHoverPreview(),"start"===t){if(a===this.internalStartDate)return;this.internalStartDate=a,this.setVisibleCalendarDate(this.internalStartDate)}else{if(a===this.internalEndDate)return;this.internalEndDate=a}this.validateDateRange(),this.updateInputValue("start",this.internalStartDate),this.updateInputValue("end",this.internalEndDate),this.checkPreselections(),this.syncFormValue()}updateInputValue(t,e){var a;const i=null===(a=this.host.shadowRoot)||void 0===a?void 0:a.querySelector(`slot[name="${t}"]`),n=null==i?void 0:i.assignedElements()[0];null!=n&&(this.syncingInputSlots.add(t),n.setValue(e).finally((()=>{requestAnimationFrame((()=>{this.syncingInputSlots.delete(t)}))})))}updateInputListeners(){var t,e;const a=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector('slot[name="start"]'),i=null===(e=this.host.shadowRoot)||void 0===e?void 0:e.querySelector('slot[name="end"]');this.hasPreselection=null!==this.host.querySelector("mds-input-date-range-preselection"),null!=a&&a.assignedElements()[0].addEventListener("mdsInputDateSelect",this.createFocusoutListener("start")),null!=i&&i.assignedElements()[0].addEventListener("mdsInputDateSelect",this.createFocusoutListener("end"))}createFocusoutListener(t){return e=>{if(this.syncingInputSlots.has(t))return;const a=e;this.clearHoverPreview(),"start"===t?(this.internalStartDate=a.detail,this.setVisibleCalendarDate(this.internalStartDate)):this.internalEndDate=a.detail,this.syncFormValue()}}validateDateRange(){if(""!==this.internalStartDate&&""!==this.internalEndDate){const t=o.fromISO(this.internalStartDate);o.fromISO(this.internalEndDate)<t&&(this.internalEndDate=this.internalStartDate,this.updateInputValue("end",this.internalEndDate))}}checkPreselections(){const t=Array.from(this.host.querySelectorAll("mds-input-date-range-preselection"));null!=t&&t.forEach((t=>{t.selected=!!(t.start===this.internalStartDate&&t.end===this.internalEndDate||t.start===this.internalStartDate&&this.internalStartDate===this.internalEndDate&&void 0===t.end)}))}renderCalendarPreselectionPanel(){return this.hasPreselection?i("div",{class:"calendar-preselection-panel"},i("div",{class:l("date-preselection",this.hasPreselection&&"date-preselection--has-preselection")},i("slot",{name:"calendar-preselection"}))):null}renderSingleCalendar(){return i("div",{class:"calendar-single"},this.renderCalendarPreselectionPanel(),i("mds-calendar",Object.assign({lang:this.language,key:this.calendarKey,rangePicker:!0,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{})))}renderDualCalendars(){return i("div",{class:"calendars"},this.renderCalendarPreselectionPanel(),i("mds-calendar",Object.assign({lang:this.language,key:this.calendarKey+"-start",rangePicker:!0,showNextButton:!1,disableMonthYearSelection:!0,viewDate:this.getCalendarViewDate(),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{})),i("mds-calendar",Object.assign({lang:this.language,key:this.calendarKey+"-end",rangePicker:!0,showPreviousButton:!1,disableMonthYearSelection:!0,viewDate:this.getCalendarViewDate(1),onMdsCalendarNavigate:this.handleCalendarNavigate,onMdsCalendarChange:this.handleCalendarChange,onMdsCalendarPreselect:this.handleCalendarPreselect,startDate:this.internalStartDate,endDate:this.internalEndDate},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{})))}render(){return i(n,{key:"70d713a2ba286fe3ee69feb5b804e043c0357166",onClick:this.focusDateInput,"pref-animation":this.prefAnimation,"pref-contrast":this.prefContrast,"pref-theme":this.prefTheme,"pref-theme-scheme":this.prefThemeScheme},i("div",{key:"35518a0ed132cd6977c0a557a2f45438c7a9db6b",class:"inputs"},i("div",{key:"befa6ce8026d0f02451c5bda8f174252214a3457",class:"input-element"},i("mds-text",{key:"7919fc8583f940b6a7ab46f6da35067c245f1c4e",class:"date-label",typography:"detail",onClick:this.focusStartDateInput},this.t.get("from")),i("div",{key:"9a9d1e950e8523423fba228b66b99d63722ae3f3",class:"input-wrapper"},i("slot",{key:"a4c7031eb4db25ebe766650676475a1b70c7a27f",name:"start"}))),i("div",{key:"c033efadef102cac6d615505e1b8cd476e4bd911",class:"input-element"},i("mds-text",{key:"fe5cbbbb85d2f4895236de71c79b3850c076fbac",class:"date-label",typography:"detail",onClick:this.focusEndDateInput},this.t.get("to")),i("div",{key:"64e5392cb8d476e099d3efcd4b86958f2601986f",class:"input-wrapper"},i("slot",{key:"c2ff17f4e61a42a8afe50488847ccd3b71c670cf",name:"end"})))),i("div",{key:"8e3d4fecf6eca2c7cfc90aa3cec5835626a33cbc",class:"action-open-calendar-wrapper"},i("mds-button",{key:"c12b6fcbe2a7e233ba45a224620a26f37200e097",class:"action-open-calendar",variant:"dark",tone:"text",icon:s,id:"calendar-dropdown",onClick:this.handleOpenCalendarClick})),i("mds-dropdown",{key:"eb088ba8ec6c6c82373efa9f5dad8cae23c63604",ref:t=>this.dropdownRef=t,target:"#calendar-dropdown","disable-auto-placement":!0,placement:"bottom-end"},this.dualCalendar?this.renderDualCalendars():this.renderSingleCalendar()))}syncFormValue(){var t,e,a,i;const n=null!==(e=null===(t=this.internalStartDate)||void 0===t?void 0:t.trim())&&void 0!==e?e:"",r=null!==(i=null===(a=this.internalEndDate)||void 0===a?void 0:a.trim())&&void 0!==i?i:"";this.internals.setFormValue(""!==n||""!==r?JSON.stringify({startDate:n,endDate:r}):null)}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{startDate:[{handleStartDateChange:0}],endDate:[{handleEndDateChange:0}]}}static get style(){return'@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{--mds-input-date-range-background:rgb(var(--tone-neutral,0 0 0));--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(--variant-primary-03,211 226 255));--mds-input-date-range-variant-color-rgb:0 0 0}}}: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}@property --mds-input-date-range-calendar-width{syntax:"<length>";inherits:false;initial-value:22rem}@property --mds-input-date-range-fields-firefox-justify-content{syntax:"start|end|center|left|right|flex-start|flex-end";inherits:false;initial-value:start}@property --mds-input-date-range-variant-color-rgb{syntax:"<integer>+";inherits:false;initial-value:0 0 0}:host{--mds-input-date-range-background:rgb(var(--tone-neutral,0 0 0));--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(--variant-primary-03,211 226 255));--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(--radius-2xl,24px);color:rgb(var(--tone-neutral-02,244 244 244));corner-shape:var(--magma-corner-shape,round);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(--variant-primary-04,184 208 255));--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(--tone-neutral,0 0 0)));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}.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(--tone-neutral-09,76 76 76));border-radius:var(--radius-lg,16px);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(--variant-primary-03,211 226 255)))}mds-dropdown{padding:0}:host([pref-animation=reduce]){--private-input-date-range-transition-duration:0s}:host([pref-theme=dark]:not([pref-theme-scheme=light])){--mds-input-date-range-ring:var(--shadow-outline-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:host([pref-theme=dark]:not([pref-theme-scheme=light])) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}:host([pref-contrast=more]){--mds-input-date-range-ring:var(--shadow-outline-strong-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}@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(--variant-primary-05,152 188 255));--mds-input-date-range-variant-color-rgb:var(--variant-primary-04,184 208 255)}:host([variant=ai]){--mds-input-date-range-icon-color:rgb(var(--variant-ai-04,218 199 253));--mds-input-tip-background:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=ai]:focus-within){--mds-input-date-range-icon-color:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-range-variant-color-rgb:var(--variant-ai-04,218 199 253)}:host([variant=info]){--mds-input-date-range-icon-color:rgb(var(--status-info-04,159 216 241));--mds-input-tip-background:rgb(var(--status-info-05,112 198 234));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=info]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-info-05,112 198 234));--mds-input-date-range-variant-color-rgb:var(--status-info-04,159 216 241)}:host([variant=success]){--mds-input-date-range-icon-color:rgb(var(--status-success-04,158 222 181));--mds-input-tip-background:rgb(var(--status-success-05,107 206 147));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=success]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-success-05,107 206 147));--mds-input-date-range-variant-color-rgb:var(--status-success-04,158 222 181)}:host([variant=warning]){--mds-input-date-range-icon-color:rgb(var(--status-warning-04,255 200 33));--mds-input-tip-background:rgb(var(--status-warning-05,237 177 0));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-warning-05,237 177 0));--mds-input-date-range-variant-color-rgb:var(--status-warning-04,255 200 33)}:host([variant=error]){--mds-input-date-range-icon-color:rgb(var(--status-error-04,254 193 189));--mds-input-tip-background:rgb(var(--status-error-05,250 165 160));--mds-input-date-range-variant-color-rgb:0 0 0}:host([variant=error]:focus-within){--mds-input-date-range-icon-color:rgb(var(--status-error-05,250 165 160));--mds-input-date-range-variant-color-rgb:var(--status-error-04,254 193 189)}@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([pref-animation=system]){--private-input-date-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-theme])),:host([pref-theme=system]:not([pref-theme-scheme=light])){--mds-input-date-range-ring:var(--shadow-outline-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:is(:host([pref-theme=system]:not([pref-theme-scheme=light])),:host(:not([pref-theme]))) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-date-range-ring:var(--shadow-outline-strong-50);--mds-input-date-range-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-range-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}}'}},[321,"mds-input-date-range",{startDate:[513,"start-date"],endDate:[513,"end-date"],min:[513],max:[513],delay:[514],dualCalendar:[516,"dual-calendar"],name:[513],prefAnimation:[32],prefContrast:[32],prefTheme:[32],prefThemeScheme:[32],calendarKey:[32],internalStartDate:[32],internalEndDate:[32],visibleCalendarDate:[32],dropdownRef:[32],hasPreselection:[32],language:[32],updateLang:[64],preselect:[64]},void 0,{startDate:[{handleStartDateChange:0}],endDate:[{handleEndDateChange:0}]}]),D=k,C=function(){"undefined"!=typeof customElements&&["mds-input-date-range","mds-button","mds-calendar","mds-calendar-cell","mds-dropdown","mds-icon","mds-spinner","mds-text"].forEach((t=>{switch(t){case"mds-input-date-range":customElements.get(r(t))||customElements.define(r(t),k);break;case"mds-button":customElements.get(r(t))||u();break;case"mds-calendar":customElements.get(r(t))||d();break;case"mds-calendar-cell":customElements.get(r(t))||m();break;case"mds-dropdown":customElements.get(r(t))||p();break;case"mds-icon":customElements.get(r(t))||g();break;case"mds-spinner":customElements.get(r(t))||v();break;case"mds-text":customElements.get(r(t))||f()}}))};export{D as MdsInputDateRange,C as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as r,createEvent as e,h as a,Host as i,transformTag as o}from"@stencil/core/internal/client";import{m as n}from"./calendar-today.js";import{D as s,d}from"./mds-calendar2.js";import{L as c}from"./locale.js";import{d as l}from"./mds-button2.js";import{d as p}from"./mds-calendar-cell2.js";import{d as u}from"./mds-dropdown2.js";import{d as m}from"./mds-icon2.js";import{d as h}from"./mds-input-tip2.js";import{d as b}from"./mds-input-tip-item2.js";import{d as g}from"./mds-spinner2.js";import{d as v}from"./mds-text2.js";const f=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.validationEvent=e(this,"mdsInputValidation",7),this.valueChange=e(this,"mdsInputDateSelect",7),this.internals=this.attachInternals(),this.isSlotted=!1,this.empty=void 0,this.t=new c({el:{},en:{},es:{},it:{}}),this.touched=!1,this.value="",this.variant="primary",this.min=null,this.max=null,this.delay=500,this.disabled=!1,this.readonly=!1,this.required=!1,this.calendarKey=0,this.hasFocus=!1,this.handleChange=t=>{const r=t.target;this.touched=!0,""!==r.value&&(this.value=r.value),this.validateValue(r.validity.badInput)},this.onBlur=t=>{const r=t.target;this.hasFocus=!1,this.value=r.value,this.validateValue(r.validity.badInput)},this.onFocus=t=>{const r=t.target;this.hasFocus=!0,this.readonly&&setTimeout((()=>{r.select()}),10)}}async updateLang(){this.language=this.t.lang(this.host)}handleValue(){this.valueChange.emit(this.value),this.validateValue()}validateValue(t=!1){const r=s.fromISO(this.value),e=!!this.value,a=e&&!r.isValid,i=this.required&&!e,o=r.isValid&&(this.max&&s.fromISO(this.max)<r||this.min&&s.fromISO(this.min)>r);t||a||i||o?(this.isValid=!1,this.variant="error",this.internals.setFormValue(null),this.empty=!(!t&&!a)||void 0):(this.isValid=!0,this.variant="primary",this.internals.setFormValue(this.value),this.empty=void 0),this.validationEvent.emit(this.isValid)}async focusInput(){var t;(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".input")).focus()}async setValue(t){return this.value=t,this.validateValue(),Promise.resolve()}async getErrors(){return Promise.resolve(this.isValid?null:{error:""})}formResetCallback(){this.internals.setFormValue("")}componentWillLoad(){if(this.isSlotted=!(null===this.host.getAttribute("slot")||""===this.host.getAttribute("slot")),this.value=this.value||"",this.language=this.t.lang(this.host),null!==this.min&&""!==this.min&&null!==this.max&&""!==this.max){const t=s.fromISO(this.min);s.fromISO(this.max)<t&&(this.max=this.min)}this.validateValue()}render(){return a(i,{key:"1c3f9c46a1a1bc77e6639135ffe9615b91754289",empty:this.empty},a("input",{key:"e8867ce0ccc07885b616cd0c898859d4d378d70c",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&&a("div",{key:"82e8e07567fceed4f0a589f8ceac9057c9aaa324",class:"action-open-calendar-wrapper"},a("mds-button",{key:"9c22475d725089ae3ccfe4c39aac26149726e8ff",id:"calendar-dropdown",class:"action-open-calendar",disabled:this.disabled,variant:"dark",tone:"text",icon:n,onClick:()=>{this.calendarKey+=1}})),a("mds-input-tip",{key:"3b4a5d49acf05f853839b7317a2e8bfe8d7d487d",lang:this.language,position:"top",active:this.hasFocus},this.disabled&&a("mds-input-tip-item",{key:"987565a2df5bcaf1a538f3bf276cd6f7a12811a9",expanded:!0,variant:"disabled"}),this.readonly&&a("mds-input-tip-item",{key:"b51c192d654c65279fb2bdb0eb43952cc51e02e0",expanded:!0,variant:"readonly"}),this.required&&a("mds-input-tip-item",{key:"acd20e717f7abab93a5750f7125f06f55d618da8",expanded:this.hasFocus,variant:this.isValid?"required-success":"required"})),!this.isSlotted&&a("mds-dropdown",{key:"9c2d0e843d019c530509f30cd37e890f5ab351a8",placement:"bottom-end","auto-placement":!1,ref:t=>this.dropdownRef=t,target:"#calendar-dropdown"},a("mds-calendar",Object.assign({key:this.calendarKey,rangePicker:!1,lang:this.language,onMdsCalendarChange:t=>{if(this.value=t.detail.startDate,0===this.delay)return;const{dropdownRef:r}=this;r&&setTimeout((()=>{r.visible=!1}),this.delay)},startDate:this.value},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{}))))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{value:[{handleValue:0}]}}static get style(){return'@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@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{--mds-input-date-icon-color:rgb(var(--variant-primary-03,211 226 255));--mds-input-date-background:rgb(var(--tone-neutral,0 0 0));--mds-input-date-field-background-empty:rgb(var(--status-error-10,115 0 0));--mds-input-date-field-color-empty:rgb(var(--status-error-06,239 108 105));--mds-input-date-icon-color-rgb:var(--mds-input-date-variant-color-rgb,0 0 0);--mds-input-date-variant-color-rgb:0 0 0;--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233))}}}@layer reset,vendor,theme,base,components,utilities;@property --mds-input-date-variant-color-rgb{syntax:"<integer>+";inherits:false;initial-value:0 0 0}:host{--mds-input-date-icon-color:rgb(var(--variant-primary-03,211 226 255));--mds-input-date-background:rgb(var(--tone-neutral,0 0 0));--mds-input-date-field-background-empty:rgb(var(--status-error-10,115 0 0));--mds-input-date-field-color-empty:rgb(var(--status-error-06,239 108 105));--mds-input-date-icon-color-rgb:var(--mds-input-date-variant-color-rgb,0 0 0);--mds-input-date-ring:0 0 0 1px rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.1);--mds-input-date-shadow:0 1px 3px 0 rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.06);--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233));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(--radius-2xl,24px);color:rgb(var(--tone-neutral-02,244 244 244));corner-shape:var(--magma-corner-shape,round);container-type:inline-size;display:flex;gap:calc(var(--spacing,.0025rem)*200);overflow:visible;position:relative;--mds-input-date-icon-color:rgb(var(--variant-primary-04,184 208 255));--mds-input-date-variant-color-rgb:0 0 0}.input::-webkit-calendar-picker-indicator{appearance:textfield;display:none}.input{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;border-radius:inherit;box-sizing:border-box;color:inherit;corner-shape:inherit;background-color:#0000;border:0;margin:0;overflow:hidden;text-overflow:ellipsis;-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);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:min-content}:host([empty]) .input{background-color:var(--mds-input-date-field-background-empty,rgb(var(--status-error-10,115 0 0)));color:var(--mds-input-date-field-color-empty,rgb(var(--status-error-06,239 108 105)))}:host([slot]){color:inherit;display:contents}:host([slot]) .input{cursor:text;text-align:center}:host(:not([slot])) .input{background-color:var(--mds-input-date-background,rgb(var(--tone-neutral,0 0 0)));-webkit-box-shadow:var(--mds-input-date-ring),var(--mds-input-date-shadow);box-shadow:var(--mds-input-date-ring),var(--mds-input-date-shadow);min-height:3rem;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);padding-top:calc(var(--spacing,.0025rem)*300);width:100%}:host(:focus-within) .input{--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-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-date-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::placeholder{color:rgb(var(--tone-neutral-04,218 218 218))}.input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-04,218 218 218))}.input::-webkit-inner-spin-button,.input::-webkit-outer-spin-button{appearance:none;display:none;margin:0}.input:disabled{background-color:rgb(var(--tone-neutral-10,60 60 60))}.input:disabled::placeholder{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled:-ms-placeholder-shown{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05,197 197 197))}.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-icon-color,rgb(var(--variant-primary-03,211 226 255)))}:host([disabled]:not([disabled=false])) .action-open-calendar{-webkit-transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}mds-calendar{min-width:max-content}mds-dropdown{padding:0}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(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar,mds-dropdown,mds-input-tip,mds-input-tip-item):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-context(:root.pref-animation-reduce) .input{transition-duration:0s}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)){--mds-input-date-ring:var(--shadow-outline-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}:host-context(:root.pref-contrast-more){--mds-input-date-ring:var(--shadow-outline-strong-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:host-context(:root.pref-contrast-more) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:host-context(:root.pref-contrast-more) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}@supports ((-moz-appearance:none)){.action-open-calendar{display:none}:host(:not([slot])) .input{padding-right:calc(var(--spacing,.0025rem)*400)}}:host(:focus){--mds-input-date-icon-color:rgb(var(--variant-primary-05,152 188 255));--mds-input-date-variant-color-rgb:var(--variant-primary-04,184 208 255)}:host([variant=ai]){--mds-input-date-icon-color:rgb(var(--variant-ai-04,218 199 253));--mds-input-tip-background:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=ai]:focus){--mds-input-date-icon-color:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-variant-color-rgb:var(--variant-ai-04,218 199 253)}:host([variant=info]){--mds-input-date-icon-color:rgb(var(--status-info-04,159 216 241));--mds-input-tip-background:rgb(var(--status-info-05,112 198 234));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=info]:focus){--mds-input-date-icon-color:rgb(var(--status-info-05,112 198 234));--mds-input-date-variant-color-rgb:var(--status-info-04,159 216 241)}:host([variant=success]){--mds-input-date-icon-color:rgb(var(--status-success-04,158 222 181));--mds-input-tip-background:rgb(var(--status-success-05,107 206 147));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=success]:focus){--mds-input-date-icon-color:rgb(var(--status-success-05,107 206 147));--mds-input-date-variant-color-rgb:var(--status-success-04,158 222 181)}:host([variant=warning]){--mds-input-date-icon-color:rgb(var(--status-warning-04,255 200 33));--mds-input-tip-background:rgb(var(--status-warning-05,237 177 0));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=warning]:focus){--mds-input-date-icon-color:rgb(var(--status-warning-05,237 177 0));--mds-input-date-variant-color-rgb:var(--status-warning-04,255 200 33)}:host([variant=error]){--mds-input-date-icon-color:rgb(var(--status-error-04,254 193 189));--mds-input-tip-background:rgb(var(--status-error-05,250 165 160));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=error]:focus){--mds-input-date-icon-color:rgb(var(--status-error-05,250 165 160));--mds-input-date-variant-color-rgb:var(--status-error-04,254 193 189)}@media (forced-colors:active){:host(:focus-within) .input{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion){:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .input{transition-duration:0s}}@media (prefers-color-scheme:dark){:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))){--mds-input-date-ring:var(--shadow-outline-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}}@media (prefers-contrast:more){:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))){--mds-input-date-ring:var(--shadow-outline-strong-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}}'}},[65,"mds-input-date",{value:[513],name:[513],variant:[1537],min:[1537],max:[1537],delay:[514],disabled:[516],readonly:[516],required:[516],empty:[32],isValid:[32],language:[32],touched:[32],calendarKey:[32],dropdownRef:[32],hasFocus:[32],updateLang:[64],focusInput:[64],setValue:[64],getErrors:[64]},void 0,{value:[{handleValue:0}]}]),y=f,x=function(){"undefined"!=typeof customElements&&["mds-input-date","mds-button","mds-calendar","mds-calendar-cell","mds-dropdown","mds-icon","mds-input-tip","mds-input-tip-item","mds-spinner","mds-text"].forEach((t=>{switch(t){case"mds-input-date":customElements.get(o(t))||customElements.define(o(t),f);break;case"mds-button":customElements.get(o(t))||l();break;case"mds-calendar":customElements.get(o(t))||d();break;case"mds-calendar-cell":customElements.get(o(t))||p();break;case"mds-dropdown":customElements.get(o(t))||u();break;case"mds-icon":customElements.get(o(t))||m();break;case"mds-input-tip":customElements.get(o(t))||h();break;case"mds-input-tip-item":customElements.get(o(t))||b();break;case"mds-spinner":customElements.get(o(t))||g();break;case"mds-text":customElements.get(o(t))||v()}}))};export{y as MdsInputDate,x as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as r,createEvent as a,h as i,Host as e,transformTag as n}from"@stencil/core/internal/client";import{m as o}from"./calendar-today.js";import{D as s,d}from"./mds-calendar2.js";import{L as c}from"./locale.js";import{s as p}from"./preference.js";import{d as u}from"./mds-button2.js";import{d as l}from"./mds-calendar-cell2.js";import{d as m}from"./mds-dropdown2.js";import{d as h}from"./mds-icon2.js";import{d as b}from"./mds-input-tip2.js";import{d as g}from"./mds-input-tip-item2.js";import{d as v}from"./mds-spinner2.js";import{d as f}from"./mds-text2.js";const y=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.validationEvent=a(this,"mdsInputValidation",7),this.valueChange=a(this,"mdsInputDateSelect",7),this.internals=this.attachInternals(),this.isSlotted=!1,this.empty=void 0,this.t=new c({el:{},en:{},es:{},it:{}}),this.touched=!1,this.value="",this.variant="primary",this.min=null,this.max=null,this.delay=500,this.disabled=!1,this.readonly=!1,this.required=!1,this.calendarKey=0,this.hasFocus=!1,this.handleChange=t=>{const r=t.target;this.touched=!0,""!==r.value&&(this.value=r.value),this.validateValue(r.validity.badInput)},this.onBlur=t=>{const r=t.target;this.hasFocus=!1,this.value=r.value,this.validateValue(r.validity.badInput)},this.onFocus=t=>{const r=t.target;this.hasFocus=!0,this.readonly&&setTimeout((()=>{r.select()}),10)},this.handleOpenCalendarClick=()=>{this.calendarKey+=1},this.handleCalendarChange=t=>{if(this.value=t.detail.startDate,0===this.delay)return;const{dropdownRef:r}=this;r&&setTimeout((()=>{r.visible=!1}),this.delay)}}async updateLang(){this.language=this.t.lang(this.host)}handleValue(){this.valueChange.emit(this.value),this.validateValue()}validateValue(t=!1){const r=s.fromISO(this.value),a=!!this.value,i=a&&!r.isValid,e=this.required&&!a,n=r.isValid&&(this.max&&s.fromISO(this.max)<r||this.min&&s.fromISO(this.min)>r);t||i||e||n?(this.isValid=!1,this.variant="error",this.internals.setFormValue(null),this.empty=!(!t&&!i)||void 0):(this.isValid=!0,this.variant="primary",this.internals.setFormValue(this.value),this.empty=void 0),this.validationEvent.emit(this.isValid)}async focusInput(){var t;(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".input")).focus()}async setValue(t){return this.value=t,this.validateValue(),Promise.resolve()}async getErrors(){return Promise.resolve(this.isValid?null:{error:""})}formResetCallback(){this.internals.setFormValue("")}connectedCallback(){this.unsubscribePrefAnimation=p("animation",(t=>{this.prefAnimation=t})),this.unsubscribePrefContrast=p("contrast",(t=>{this.prefContrast=t})),this.unsubscribePrefTheme=p("theme",(t=>{this.prefTheme=t})),this.unsubscribePrefThemeScheme=p("theme-scheme",(t=>{this.prefThemeScheme=t}))}disconnectedCallback(){var t,r,a,i;null===(t=this.unsubscribePrefAnimation)||void 0===t||t.call(this),null===(r=this.unsubscribePrefContrast)||void 0===r||r.call(this),null===(a=this.unsubscribePrefTheme)||void 0===a||a.call(this),null===(i=this.unsubscribePrefThemeScheme)||void 0===i||i.call(this)}componentWillLoad(){if(this.isSlotted=!(null===this.host.getAttribute("slot")||""===this.host.getAttribute("slot")),this.value=this.value||"",this.language=this.t.lang(this.host),null!==this.min&&""!==this.min&&null!==this.max&&""!==this.max){const t=s.fromISO(this.min);s.fromISO(this.max)<t&&(this.max=this.min)}this.validateValue()}render(){return i(e,{key:"4d896aae88a4637f371861ee251e2337530baded",empty:this.empty,"pref-animation":this.prefAnimation,"pref-contrast":this.prefContrast,"pref-theme":this.prefTheme,"pref-theme-scheme":this.prefThemeScheme},i("input",{key:"5e58df1c7b4e43e9c31c2660d31180efd2ac813e",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&&i("div",{key:"bd68590ff1bbbc0a3a744e44e88d6a3bca11fdca",class:"action-open-calendar-wrapper"},i("mds-button",{key:"f3bd3316bce646eb4df4eb368a952096397447e7",id:"calendar-dropdown",class:"action-open-calendar",disabled:this.disabled,variant:"dark",tone:"text",icon:o,onClick:this.handleOpenCalendarClick})),i("mds-input-tip",{key:"9f4264859de66046a3761ec96083c09c53bdced9",lang:this.language,position:"top",active:this.hasFocus},this.disabled&&i("mds-input-tip-item",{key:"8be9f58f10be7407d6c76d5e7b79e2faaa6aaa86",expanded:!0,variant:"disabled"}),this.readonly&&i("mds-input-tip-item",{key:"144bce0f9a1a67593be23decd4a59e34c342b359",expanded:!0,variant:"readonly"}),this.required&&i("mds-input-tip-item",{key:"efcafab1b01ddb3983299273dbddae86af6f621d",expanded:this.hasFocus,variant:this.isValid?"required-success":"required"})),!this.isSlotted&&i("mds-dropdown",{key:"df129e18751e4312509dc60ea4538fb4797071ff",placement:"bottom-end","disable-auto-placement":!0,ref:t=>this.dropdownRef=t,target:"#calendar-dropdown"},i("mds-calendar",Object.assign({key:this.calendarKey,rangePicker:!1,lang:this.language,onMdsCalendarChange:this.handleCalendarChange,startDate:this.value},null!==this.min&&""!==this.min?{min:this.min}:{},null!==this.max&&""!==this.max?{max:this.max}:{}))))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{value:[{handleValue:0}]}}static get style(){return'@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{--mds-input-date-icon-color:rgb(var(--variant-primary-03,211 226 255));--mds-input-date-background:rgb(var(--tone-neutral,0 0 0));--mds-input-date-field-background-empty:rgb(var(--status-error-10,115 0 0));--mds-input-date-field-color-empty:rgb(var(--status-error-06,239 108 105));--mds-input-date-icon-color-rgb:var(--mds-input-date-variant-color-rgb,0 0 0);--mds-input-date-variant-color-rgb:0 0 0;--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233))}}}@property --mds-input-date-variant-color-rgb{syntax:"<integer>+";inherits:false;initial-value:0 0 0}:host{--mds-input-date-icon-color:rgb(var(--variant-primary-03,211 226 255));--mds-input-date-background:rgb(var(--tone-neutral,0 0 0));--mds-input-date-field-background-empty:rgb(var(--status-error-10,115 0 0));--mds-input-date-field-color-empty:rgb(var(--status-error-06,239 108 105));--mds-input-date-icon-color-rgb:var(--mds-input-date-variant-color-rgb,0 0 0);--mds-input-date-ring:0 0 0 1px rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.1);--mds-input-date-shadow:0 1px 3px 0 rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.1),0 1px 2px 0 rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.06);--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233));--mds-input-date-transition-duration:var(--duration-300,.3s);--private-input-date-transition-duration:var(--mds-input-date-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(--radius-2xl,24px);color:rgb(var(--tone-neutral-02,244 244 244));corner-shape:var(--magma-corner-shape,round);container-type:inline-size;display:flex;gap:calc(var(--spacing,.0025rem)*200);overflow:visible;position:relative;--mds-input-date-icon-color:rgb(var(--variant-primary-04,184 208 255));--mds-input-date-variant-color-rgb:0 0 0}.input::-webkit-calendar-picker-indicator{appearance:textfield;display:none}.input{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;border-radius:inherit;box-sizing:border-box;color:inherit;corner-shape:inherit;background-color:#0000;border:0;margin:0;overflow:hidden;text-overflow:ellipsis;-webkit-transition-duration:var(--private-input-date-transition-duration);transition-duration:var(--private-input-date-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:min-content}:host([empty]) .input{background-color:var(--mds-input-date-field-background-empty,rgb(var(--status-error-10,115 0 0)));color:var(--mds-input-date-field-color-empty,rgb(var(--status-error-06,239 108 105)))}:host([slot]){color:inherit;display:contents}:host([slot]) .input{cursor:text;text-align:center}:host(:not([slot])) .input{background-color:var(--mds-input-date-background,rgb(var(--tone-neutral,0 0 0)));-webkit-box-shadow:var(--mds-input-date-ring),var(--mds-input-date-shadow);box-shadow:var(--mds-input-date-ring),var(--mds-input-date-shadow);min-height:3rem;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);width:100%}:host(:focus-within) .input{--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-ring:0 0 0 3px rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/1);--mds-input-date-shadow:0 4px 6px 3px rgb(var(--mds-input-date-variant-color-rgb,0 0 0)/.1),0 2px 4px -1px rgb(var(--mds-input-date-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::placeholder{color:rgb(var(--tone-neutral-04,218 218 218))}.input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-04,218 218 218))}.input::-webkit-inner-spin-button,.input::-webkit-outer-spin-button{appearance:none;display:none;margin:0}.input:disabled{background-color:rgb(var(--tone-neutral-10,60 60 60))}.input:disabled::placeholder{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled:-ms-placeholder-shown{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled::-moz-placeholder{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled,.input:disabled::placeholder{color:rgb(var(--tone-neutral-05,197 197 197))}.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-icon-color,rgb(var(--variant-primary-03,211 226 255)))}:host([disabled]:not([disabled=false])) .action-open-calendar{-webkit-transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}mds-calendar{min-width:max-content}mds-dropdown{padding:0}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(:not(:is([hydrated],.hydrated))),:is(mds-button,mds-calendar,mds-dropdown,mds-input-tip,mds-input-tip-item):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([pref-animation=reduce]){--private-input-date-transition-duration:0s}:host([pref-theme=dark]:not([pref-theme-scheme=light])){--mds-input-date-ring:var(--shadow-outline-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:host([pref-theme=dark]:not([pref-theme-scheme=light])) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}:host([pref-contrast=more]){--mds-input-date-ring:var(--shadow-outline-strong-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:host([pref-contrast=more]) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:host([pref-contrast=more]) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}@supports ((-moz-appearance:none)){.action-open-calendar{display:none}:host(:not([slot])) .input{padding-right:calc(var(--spacing,.0025rem)*400)}}:host(:focus){--mds-input-date-icon-color:rgb(var(--variant-primary-05,152 188 255));--mds-input-date-variant-color-rgb:var(--variant-primary-04,184 208 255)}:host([variant=ai]){--mds-input-date-icon-color:rgb(var(--variant-ai-04,218 199 253));--mds-input-tip-background:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=ai]:focus){--mds-input-date-icon-color:rgb(var(--variant-ai-05,202 174 251));--mds-input-date-variant-color-rgb:var(--variant-ai-04,218 199 253)}:host([variant=info]){--mds-input-date-icon-color:rgb(var(--status-info-04,159 216 241));--mds-input-tip-background:rgb(var(--status-info-05,112 198 234));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=info]:focus){--mds-input-date-icon-color:rgb(var(--status-info-05,112 198 234));--mds-input-date-variant-color-rgb:var(--status-info-04,159 216 241)}:host([variant=success]){--mds-input-date-icon-color:rgb(var(--status-success-04,158 222 181));--mds-input-tip-background:rgb(var(--status-success-05,107 206 147));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=success]:focus){--mds-input-date-icon-color:rgb(var(--status-success-05,107 206 147));--mds-input-date-variant-color-rgb:var(--status-success-04,158 222 181)}:host([variant=warning]){--mds-input-date-icon-color:rgb(var(--status-warning-04,255 200 33));--mds-input-tip-background:rgb(var(--status-warning-05,237 177 0));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=warning]:focus){--mds-input-date-icon-color:rgb(var(--status-warning-05,237 177 0));--mds-input-date-variant-color-rgb:var(--status-warning-04,255 200 33)}:host([variant=error]){--mds-input-date-icon-color:rgb(var(--status-error-04,254 193 189));--mds-input-tip-background:rgb(var(--status-error-05,250 165 160));--mds-input-date-variant-color-rgb:0 0 0}:host([variant=error]:focus){--mds-input-date-icon-color:rgb(var(--status-error-05,250 165 160));--mds-input-date-variant-color-rgb:var(--status-error-04,254 193 189)}@media (forced-colors:active){:host(:focus-within) .input{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-date-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-theme])),:host([pref-theme=system]:not([pref-theme-scheme=light])){--mds-input-date-ring:var(--shadow-outline-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-06,158 158 158))}:is(:host([pref-theme=system]:not([pref-theme-scheme=light])),:host(:not([pref-theme]))) .counter-button:hover{--mds-button-background:rgb(var(--tone-neutral-08,107 107 107))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-date-ring:var(--shadow-outline-strong-50);--mds-input-date-background:rgb(var(--tone-neutral-09,76 76 76));--mds-input-date-controls-border:2px solid rgb(var(--tone-neutral-05,197 197 197))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::-webkit-input-placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input:-ms-placeholder-shown{color:rgb(var(--tone-neutral-03,233 233 233))}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input::placeholder{color:rgb(var(--tone-neutral-03,233 233 233))}}'}},[65,"mds-input-date",{value:[513],name:[513],variant:[1537],min:[1537],max:[1537],delay:[514],disabled:[516],readonly:[516],required:[516],prefAnimation:[32],prefContrast:[32],prefTheme:[32],prefThemeScheme:[32],empty:[32],isValid:[32],language:[32],touched:[32],calendarKey:[32],dropdownRef:[32],hasFocus:[32],updateLang:[64],focusInput:[64],setValue:[64],getErrors:[64]},void 0,{value:[{handleValue:0}]}]),k=y,w=function(){"undefined"!=typeof customElements&&["mds-input-date","mds-button","mds-calendar","mds-calendar-cell","mds-dropdown","mds-icon","mds-input-tip","mds-input-tip-item","mds-spinner","mds-text"].forEach((t=>{switch(t){case"mds-input-date":customElements.get(n(t))||customElements.define(n(t),y);break;case"mds-button":customElements.get(n(t))||u();break;case"mds-calendar":customElements.get(n(t))||d();break;case"mds-calendar-cell":customElements.get(n(t))||l();break;case"mds-dropdown":customElements.get(n(t))||m();break;case"mds-icon":customElements.get(n(t))||h();break;case"mds-input-tip":customElements.get(n(t))||b();break;case"mds-input-tip-item":customElements.get(n(t))||g();break;case"mds-spinner":customElements.get(n(t))||v();break;case"mds-text":customElements.get(n(t))||f()}}))};export{k as MdsInputDate,w as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as a,Host as r,transformTag as i}from"@stencil/core/internal/client";import{d as s}from"./mds-text2.js";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.variant="primary"}handleValidation(e){e.getErrors().then((e=>{if(null==e)this.variant="success",this.message=void 0;else{this.variant="error";const t=Object.entries(e).map((e=>e[1])).filter((e=>e));this.message=0!==t.length?t.join(";"):void 0}}))}componentDidLoad(){const[e]=this.slotInput.assignedElements();if(null==e)throw Error("Mds input not found");e.addEventListener("mdsInputValidation",(()=>this.handleValidation(e)))}render(){var e;return a(r,{key:"7d2b6e591f2da90402eef9c453b6b229d04f56f8"},a("mds-text",{key:"6058dec040f453a65f5d34c8d16ddf786ade620f",class:"label",typography:"label"},this.label),a("div",{key:"dda1efd3aed92889c8aa28d5958630d304f81f9e",class:"message-window"},a("div",{key:"66196e8f4f024dbbd2c59dc6c8d00b46b4997ff4",class:"content",part:"content"},a("slot",{key:"ba8af714da43300a70833acbd281bfe19c5d3e4b",ref:e=>this.slotInput=e})),a("div",{key:"dbc5d405bb47cd7f3d730d3732e2ef0c49d9bfc6",class:"message"},null===(e=this.message)||void 0===e?void 0:e.split(";").map(((e,t)=>a("mds-text",{typography:"caption",key:t},e))))))}static get formAssociated(){return!0}get host(){return this}static get style(){return"@layer reset,vendor,theme,base,components,utilities;@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{--mds-input-field-message-color:rgb(var(--tone-neutral-03,233 233 233));--mds-input-field-message-background:rgb(var(--tone-neutral-10,60 60 60))}}}@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-field-message-color:rgb(var(--tone-neutral-03,233 233 233));--mds-input-field-message-background:rgb(var(--tone-neutral-10,60 60 60));color:rgb(var(--tone-neutral-02,244 244 244));corner-shape:var(--magma-corner-shape,round);display:grid;gap:calc(var(--spacing,.0025rem)*300)}.message-window{border-radius:var(--radius-2xl,24px);color:var(--mds-input-field-message-color,rgb(var(--tone-neutral-03,233 233 233)));corner-shape:inherit;background-color:#0000;display:grid;gap:0;padding:0;-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:background-color,color,gap,padding;-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))}.message-window:has(.message:not(:empty)){background-color:var(--mds-input-field-message-background,rgb(var(--tone-neutral-10,60 60 60)));gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.message{interpolate-size:allow-keywords;display:flex;flex-direction:column;height:auto;padding:calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*200) calc(var(--spacing,.0025rem)*200);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:height,margin-top,opacity,padding;-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))}.message:empty{height:0;max-height:0;opacity:0;padding:0}.label:empty{display:none}.content{container:content/inline-size;display:flex;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*200)}::slotted(:first-child){flex-grow:1}::slotted(:not(:first-child)){flex-shrink:0}@container content (max-width:300px){::slotted(*){flex-grow:1;min-width:100%}}:host([variant=ai]){--mds-input-field-message-color:rgb(var(--variant-ai-02,242 235 254));--mds-input-field-message-background:rgb(var(--variant-ai-09,75 8 189))}:host([variant=info]){--mds-input-field-message-color:rgb(var(--status-info-02,222 242 250));--mds-input-field-message-background:rgb(var(--status-info-09,0 73 116))}:host([variant=success]){--mds-input-field-message-color:rgb(var(--status-success-02,222 244 228));--mds-input-field-message-background:rgb(var(--status-success-09,0 82 9))}:host([variant=warning]){--mds-input-field-message-color:rgb(var(--status-warning-02,255 237 185));--mds-input-field-message-background:rgb(var(--status-warning-09,90 67 0))}:host([variant=error]){--mds-input-field-message-color:rgb(var(--status-error-02,255 234 231));--mds-input-field-message-background:rgb(var(--status-error-09,135 0 14))}"}},[321,"mds-input-field",{label:[1025],message:[1025],variant:[1537]}]),o=n,d=function(){"undefined"!=typeof customElements&&["mds-input-field","mds-text"].forEach((e=>{switch(e){case"mds-input-field":customElements.get(i(e))||customElements.define(i(e),n);break;case"mds-text":customElements.get(i(e))||s()}}))};export{o as MdsInputField,d as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as r,h as s,Host as a,transformTag as i}from"@stencil/core/internal/client";import{d as n}from"./mds-text2.js";const e=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.variant="primary"}handleValidation(t){t.getErrors().then((t=>{if(null==t)this.variant="success",this.message=void 0;else{this.variant="error";const r=Object.entries(t).map((t=>t[1])).filter((t=>t));this.message=0!==r.length?r.join(";"):void 0}}))}componentDidLoad(){const[t]=this.slotInput.assignedElements();if(null==t)throw Error("Mds input not found");t.addEventListener("mdsInputValidation",(()=>this.handleValidation(t)))}render(){var t;return s(a,{key:"7d2b6e591f2da90402eef9c453b6b229d04f56f8"},s("mds-text",{key:"6058dec040f453a65f5d34c8d16ddf786ade620f",class:"label",typography:"label"},this.label),s("div",{key:"dda1efd3aed92889c8aa28d5958630d304f81f9e",class:"message-window"},s("div",{key:"66196e8f4f024dbbd2c59dc6c8d00b46b4997ff4",class:"content",part:"content"},s("slot",{key:"ba8af714da43300a70833acbd281bfe19c5d3e4b",ref:t=>this.slotInput=t})),s("div",{key:"dbc5d405bb47cd7f3d730d3732e2ef0c49d9bfc6",class:"message"},null===(t=this.message)||void 0===t?void 0:t.split(";").map(((t,r)=>s("mds-text",{typography:"caption",key:r},t))))))}static get formAssociated(){return!0}get host(){return this}static get style(){return"@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{--mds-input-field-message-color:rgb(var(--tone-neutral-03,233 233 233));--mds-input-field-message-background:rgb(var(--tone-neutral-10,60 60 60))}}}: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-field-message-color:rgb(var(--tone-neutral-03,233 233 233));--mds-input-field-message-background:rgb(var(--tone-neutral-10,60 60 60));color:rgb(var(--tone-neutral-02,244 244 244));corner-shape:var(--magma-corner-shape,round);display:grid;gap:calc(var(--spacing,.0025rem)*300)}.message-window{border-radius:var(--radius-2xl,24px);color:var(--mds-input-field-message-color,rgb(var(--tone-neutral-03,233 233 233)));corner-shape:inherit;background-color:#0000;display:grid;gap:0;padding:0;-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:background-color,color,gap,padding;-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))}.message-window:has(.message:not(:empty)){background-color:var(--mds-input-field-message-background,rgb(var(--tone-neutral-10,60 60 60)));gap:calc(var(--spacing,.0025rem)*200);padding:calc(var(--spacing,.0025rem)*200)}.message{interpolate-size:allow-keywords;display:flex;flex-direction:column;height:auto;padding:calc(var(--spacing,.0025rem)*100) calc(var(--spacing,.0025rem)*200) calc(var(--spacing,.0025rem)*200);-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:height,margin-top,opacity,padding;-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))}.message:empty{height:0;max-height:0;opacity:0;padding:0}.label:empty{display:none}.content{container:content/inline-size;display:flex;flex-wrap:wrap;gap:calc(var(--spacing,.0025rem)*200)}::slotted(:first-child){flex-grow:1}::slotted(:not(:first-child)){flex-shrink:0}@container content (max-width:300px){::slotted(*){flex-grow:1;min-width:100%}}:host([variant=ai]){--mds-input-field-message-color:rgb(var(--variant-ai-02,242 235 254));--mds-input-field-message-background:rgb(var(--variant-ai-09,75 8 189))}:host([variant=info]){--mds-input-field-message-color:rgb(var(--status-info-02,222 242 250));--mds-input-field-message-background:rgb(var(--status-info-09,0 73 116))}:host([variant=success]){--mds-input-field-message-color:rgb(var(--status-success-02,222 244 228));--mds-input-field-message-background:rgb(var(--status-success-09,0 82 9))}:host([variant=warning]){--mds-input-field-message-color:rgb(var(--status-warning-02,255 237 185));--mds-input-field-message-background:rgb(var(--status-warning-09,90 67 0))}:host([variant=error]){--mds-input-field-message-color:rgb(var(--status-error-02,255 234 231));--mds-input-field-message-background:rgb(var(--status-error-09,135 0 14))}:host([variant=info]) ::slotted(mds-input){--mds-input-icon-color:rgb(var(--status-info-04,159 216 241));--mds-input-tip-background:rgb(var(--status-info-05,112 198 234));--mds-input-variant-color-rgb:0 0 0}:host([variant=info]) ::slotted(mds-input:focus){--mds-input-icon-color:rgb(var(--status-info-05,112 198 234));--mds-input-variant-color-rgb:var(--status-info-04,159 216 241)}:host([variant=warning]) ::slotted(mds-input){--mds-input-icon-color:rgb(var(--status-warning-04,255 200 33));--mds-input-tip-background:rgb(var(--status-warning-05,237 177 0));--mds-input-variant-color-rgb:0 0 0}:host([variant=warning]) ::slotted(mds-input:focus){--mds-input-icon-color:rgb(var(--status-warning-05,237 177 0));--mds-input-variant-color-rgb:var(--status-warning-04,255 200 33)}:host([variant=success]) ::slotted(mds-input){--mds-input-icon-color:rgb(var(--status-success-04,158 222 181));--mds-input-tip-background:rgb(var(--status-success-05,107 206 147));--mds-input-variant-color-rgb:0 0 0}:host([variant=success]) ::slotted(mds-input:focus){--mds-input-icon-color:rgb(var(--status-success-05,107 206 147));--mds-input-variant-color-rgb:var(--status-success-04,158 222 181)}:host([variant=error]) ::slotted(mds-input){--mds-input-icon-color:rgb(var(--status-error-04,254 193 189));--mds-input-tip-background:rgb(var(--status-error-05,250 165 160));--mds-input-variant-color-rgb:0 0 0}:host([variant=error]) ::slotted(mds-input:focus){--mds-input-icon-color:rgb(var(--status-error-05,250 165 160));--mds-input-variant-color-rgb:var(--status-error-04,254 193 189)}"}},[321,"mds-input-field",{label:[1025],message:[1025],variant:[1537]}]),o=e,d=function(){"undefined"!=typeof customElements&&["mds-input-field","mds-text"].forEach((t=>{switch(t){case"mds-input-field":customElements.get(i(t))||customElements.define(i(t),e);break;case"mds-text":customElements.get(i(t))||n()}}))};export{o as MdsInputField,d as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as e,h as s,Host as i,transformTag as n}from"@stencil/core/internal/client";import{d as r}from"./mds-button2.js";import{d as o}from"./mds-icon2.js";import{d as m}from"./mds-input2.js";import{d as a}from"./mds-input-tip2.js";import{d as u}from"./mds-input-tip-item2.js";import{d as c}from"./mds-spinner2.js";import{d as l}from"./mds-text2.js";const d=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.internals=this.attachInternals(),this.length=6,this.autosubmit=!1,this.value="",this.getOtpCode=()=>Array.from(this.element.shadowRoot.querySelectorAll("mds-input")).map((t=>t.value)).join(""),this.setOtpDigit=(t,e)=>{t.value=e;const s=this.getOtpCode();this.value=s,this.internals.setFormValue(s)},this.submit=t=>{var e;const s=this.getOtpCode().length===this.length;t.blur(),this.autosubmit&&s&&(null===(e=this.internals.form)||void 0===e||e.requestSubmit())},this.handleKeyDown=t=>{if(t.ctrlKey)return;if(t.preventDefault(),isNaN(Number(t.key)))return;const e=t.target;this.setOtpDigit(e,t.key);const s=e.nextElementSibling;null!=s?s.setFocus():this.submit(e)},this.handlePaste=t=>{var e,s;t.preventDefault();const i=null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text");if(isNaN(Number(i)))return;const n=null!==(s=null==i?void 0:i.split(""))&&void 0!==s?s:[];let r=t.target;for(const t of n){if(this.setOtpDigit(r,t),r=r.nextElementSibling,null==r)return void this.submit(r);r.setFocus()}}}render(){return s(i,{key:"b8ed6443032efcace51ea84c5dbae2533796a7f7"},Array.from({length:this.length}).map((()=>s("mds-input",{class:"input",maxlength:1,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste}))))}static get formAssociated(){return!0}get element(){return this}static get style(){return"@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@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}"}},[65,"mds-input-otp",{length:[2],autosubmit:[516],value:[1537]}]),p=d,h=function(){"undefined"!=typeof customElements&&["mds-input-otp","mds-button","mds-icon","mds-input","mds-input-tip","mds-input-tip-item","mds-spinner","mds-text"].forEach((t=>{switch(t){case"mds-input-otp":customElements.get(n(t))||customElements.define(n(t),d);break;case"mds-button":customElements.get(n(t))||r();break;case"mds-icon":customElements.get(n(t))||o();break;case"mds-input":customElements.get(n(t))||m();break;case"mds-input-tip":customElements.get(n(t))||a();break;case"mds-input-tip-item":customElements.get(n(t))||u();break;case"mds-spinner":customElements.get(n(t))||c();break;case"mds-text":customElements.get(n(t))||l()}}))};export{p as MdsInputOtp,h as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as s,h as e,Host as i,transformTag as n}from"@stencil/core/internal/client";import{d as m}from"./mds-button2.js";import{d as r}from"./mds-icon2.js";import{d as o}from"./mds-input2.js";import{d as a}from"./mds-input-tip2.js";import{d as u}from"./mds-input-tip-item2.js";import{d as c}from"./mds-spinner2.js";import{d}from"./mds-text2.js";const p=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.internals=this.attachInternals(),this.length=6,this.autosubmit=!1,this.value="",this.getOtpCode=()=>Array.from(this.element.shadowRoot.querySelectorAll("mds-input")).map((t=>t.value)).join(""),this.setOtpDigit=(t,s)=>{t.value=s;const e=this.getOtpCode();this.value=e,this.internals.setFormValue(e)},this.submit=t=>{var s;const e=this.getOtpCode().length===this.length;t.blur(),this.autosubmit&&e&&(null===(s=this.internals.form)||void 0===s||s.requestSubmit())},this.handleKeyDown=t=>{if(t.ctrlKey)return;if(t.preventDefault(),isNaN(Number(t.key)))return;const s=t.target;this.setOtpDigit(s,t.key);const e=s.nextElementSibling;null!=e?e.setFocus():this.submit(s)},this.handlePaste=t=>{var s,e;t.preventDefault();const i=null===(s=t.clipboardData)||void 0===s?void 0:s.getData("text");if(isNaN(Number(i)))return;const n=null!==(e=null==i?void 0:i.split(""))&&void 0!==e?e:[];let m=t.target;for(const t of n){if(this.setOtpDigit(m,t),m=m.nextElementSibling,null==m)return void this.submit(m);m.setFocus()}}}render(){return e(i,{key:"b8ed6443032efcace51ea84c5dbae2533796a7f7"},Array.from({length:this.length}).map((()=>e("mds-input",{class:"input",maxlength:1,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste}))))}static get formAssociated(){return!0}get element(){return this}static get style(){return"@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}"}},[65,"mds-input-otp",{length:[2],autosubmit:[516],value:[1537]}]),l=p,h=function(){"undefined"!=typeof customElements&&["mds-input-otp","mds-button","mds-icon","mds-input","mds-input-tip","mds-input-tip-item","mds-spinner","mds-text"].forEach((t=>{switch(t){case"mds-input-otp":customElements.get(n(t))||customElements.define(n(t),p);break;case"mds-button":customElements.get(n(t))||m();break;case"mds-icon":customElements.get(n(t))||r();break;case"mds-input":customElements.get(n(t))||o();break;case"mds-input-tip":customElements.get(n(t))||a();break;case"mds-input-tip-item":customElements.get(n(t))||u();break;case"mds-spinner":customElements.get(n(t))||c();break;case"mds-text":customElements.get(n(t))||d()}}))};export{l as MdsInputOtp,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as a,createEvent as r,h as e,Host as i,transformTag as n}from"@stencil/core/internal/client";import{d as s}from"./mds-text2.js";const o=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.changeEvent=r(this,"mdsInputRangeChange",7),this.internals=this.attachInternals(),this.max=100,this.min=0,this.step=1,this.onInput=()=>{if(Number.isNaN(this.inputElement.value))throw Error(`Entered value ${this.inputElement.value} is not a Number`);this.value=Number(this.inputElement.value)}}calculateProgress(){let t=Number(this.inputElement.value);const a=Math.pow(10,this.decimalPlaces);t>this.max?t=this.max:t<this.min&&(t=this.min),(t-this.min)*a%(this.step*a)!=0&&(t=(Math.round((t*a-this.min*a)/(this.step*a))*(this.step*a)+this.min*a)/a),this.value=t,this.internals.setFormValue(""+this.value),this.progress=(this.value-this.min)/(this.max-this.min)*100}countDecimals(t){return Math.floor(t)===t?0:(""+t).split(".")[1].length||0}disabledChanged(t){t&&this.internals.setFormValue(null)}valueChanged(t,a){t!==a&&(this.inputElement.value=""+this.value,this.calculateProgress(),this.changeEvent.emit(this.value))}minChanged(){this.calculateProgress()}maxChanged(){this.calculateProgress()}stepChanged(){if(this.step<=0)throw Error("step cant be negative or zero");this.decimalPlaces=this.countDecimals(this.step),this.calculateProgress()}formResetCallback(){this.internals.setFormValue("")}componentDidLoad(){var t;this.decimalPlaces=this.countDecimals(this.step),this.onInput(),this.label=null!==(t=this.element.textContent)&&void 0!==t?t:"",this.calculateProgress()}render(){var t;return e(i,{key:"a200a0ed9cc3735eab347999773ca856c8d2ded1"},e("header",{key:"b52c4601e16f356d76bffcb2018bc8cd66d2dbab",class:"header",part:"header"},e("mds-text",{key:"7af7d0c88bb393bd1cad2c5a40a56fd26930e4fc",class:"label",typography:"label"},e("slot",{key:"7f1482ea2b4f1ea553691f7613b9180e3447cc64"})),e("mds-text",{key:"e8246bdc6dbeb8b5efaf3f2170e32cf725fb1462",class:"value",typography:"label"},this.formatValue?this.formatValue(this.value):this.value)),e("div",{key:"1b8ee03cf6ad4213d9370bae15b3db0bb4e3bec3",class:"range"},e("div",{key:"e01ea5fb7bb7217c6e94a4f606ab3567bf6946c3",class:"track",part:"track"},e("div",{key:"a5b33522f8605dad0e07a02749e8905cbe23e689",class:"contrast-area"}),e("div",{key:"14699dffa17f50a13e008bae4c79b507cf1454dd",class:"track-total"},e("div",{key:"b601caf89612bb39ac586b77e14d7e86730098b7",class:"track-progress",style:{"--mds-input-range-progress":""+(null!==(t=this.progress)&&void 0!==t?t:0)}}))),e("input",{key:"ea2948160dce05d3bdebbcf2f76adf01fb5159e5",ref:t=>this.inputElement=t,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})))}static get formAssociated(){return!0}get element(){return this}static get watchers(){return{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}}static get style(){return'@layer reset,vendor,theme,base,components,utilities;@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-duration:initial;--tw-ease:initial}}}@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-thumb-background-disabled:rgb(var(--tone-neutral-08,107 107 107));--mds-input-range-thumb-background:rgb(var(--tone-neutral,0 0 0));--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(--tone-neutral-08,107 107 107));--mds-input-range-track-background:rgb(var(--tone-neutral-08,107 107 107));--mds-input-range-track-progress-background-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-range-track-progress-background:rgb(var(--variant-primary-03,211 226 255));--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);gap:calc(var(--spacing,.0025rem)*200);--tw-duration:.3s;--tw-ease:var(--ease-in-out,cubic-bezier(.4,0,.2,1));display:grid;gap:calc(var(--spacing,.0025rem)*100);transition-duration:.3s;-webkit-transition-duration:var(--duration-300,.3s);transition-duration:var(--duration-300,.3s);transition-property:color;transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));-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: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(--duration-300,.3s);transition-duration:var(--duration-300,.3s);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-context(:root.pref-animation-reduce){transition-duration:0s}:is(:host-context(:root.pref-animation-reduce) .track-progress,:host-context(:root.pref-animation-reduce) .track-total){transition-duration:0s}:host-context(:root.pref-animation-reduce) .field::-webkit-slider-thumb{transition-duration:0s}:host-context(:root.pref-animation-reduce) .field::-webkit-slider-runnable-track{transition-duration:0s}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)){--mds-input-range-thumb-background:rgb(var(--variant-primary-04,184 208 255));--mds-input-range-track-background:rgb(var(--tone-neutral-07,134 134 134));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05,152 188 255))}:host-context(:root.pref-contrast-more){color:rgb(var(--tone-neutral-01,255 255 255))}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@media (prefers-reduced-motion){:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))),:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .track-progress,:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .track-total{transition-duration:0s}:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .field::-webkit-slider-thumb{transition-duration:0s}:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .field::-webkit-slider-runnable-track{transition-duration:0s}}@media (prefers-color-scheme:dark){:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))){--mds-input-range-thumb-background:rgb(var(--variant-primary-04,184 208 255));--mds-input-range-track-background:rgb(var(--tone-neutral-07,134 134 134));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05,152 188 255))}}@media (prefers-contrast:more){:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))){color:rgb(var(--tone-neutral-01,255 255 255))}}'}},[321,"mds-input-range",{formatValue:[16],name:[513],max:[2],min:[2],step:[2],disabled:[1540],value:[1538],progress:[32]},void 0,{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}]),d=o,c=function(){"undefined"!=typeof customElements&&["mds-input-range","mds-text"].forEach((t=>{switch(t){case"mds-input-range":customElements.get(n(t))||customElements.define(n(t),o);break;case"mds-text":customElements.get(n(t))||s()}}))};export{d as MdsInputRange,c as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as a,createEvent as r,h as e,Host as i,transformTag as n}from"@stencil/core/internal/client";import{s}from"./preference.js";import{d as o}from"./mds-text2.js";const d=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.changeEvent=r(this,"mdsInputRangeChange",7),this.internals=this.attachInternals(),this.max=100,this.min=0,this.step=1,this.onInput=()=>{if(Number.isNaN(this.inputElement.value))throw Error(`Entered value ${this.inputElement.value} is not a Number`);this.value=Number(this.inputElement.value)}}calculateProgress(){let t=Number(this.inputElement.value);const a=Math.pow(10,this.decimalPlaces);t>this.max?t=this.max:t<this.min&&(t=this.min),(t-this.min)*a%(this.step*a)!=0&&(t=(Math.round((t*a-this.min*a)/(this.step*a))*(this.step*a)+this.min*a)/a),this.value=t,this.internals.setFormValue(""+this.value),this.progress=(this.value-this.min)/(this.max-this.min)*100}countDecimals(t){return Math.floor(t)===t?0:(""+t).split(".")[1].length||0}disabledChanged(t){t&&this.internals.setFormValue(null)}valueChanged(t,a){t!==a&&(this.inputElement.value=""+this.value,this.calculateProgress(),this.changeEvent.emit(this.value))}minChanged(){this.calculateProgress()}maxChanged(){this.calculateProgress()}stepChanged(){if(this.step<=0)throw Error("step cant be negative or zero");this.decimalPlaces=this.countDecimals(this.step),this.calculateProgress()}formResetCallback(){this.internals.setFormValue("")}connectedCallback(){this.unsubscribePrefAnimation=s("animation",(t=>{this.prefAnimation=t})),this.unsubscribePrefContrast=s("contrast",(t=>{this.prefContrast=t})),this.unsubscribePrefTheme=s("theme",(t=>{this.prefTheme=t})),this.unsubscribePrefThemeScheme=s("theme-scheme",(t=>{this.prefThemeScheme=t}))}disconnectedCallback(){var t,a,r,e;null===(t=this.unsubscribePrefAnimation)||void 0===t||t.call(this),null===(a=this.unsubscribePrefContrast)||void 0===a||a.call(this),null===(r=this.unsubscribePrefTheme)||void 0===r||r.call(this),null===(e=this.unsubscribePrefThemeScheme)||void 0===e||e.call(this)}componentDidLoad(){var t;this.decimalPlaces=this.countDecimals(this.step),this.onInput(),this.label=null!==(t=this.element.textContent)&&void 0!==t?t:"",this.calculateProgress()}render(){var t;return e(i,{key:"b820e8ed601040eee9bac980e0ee308a3d09de51","pref-animation":this.prefAnimation,"pref-contrast":this.prefContrast,"pref-theme":this.prefTheme,"pref-theme-scheme":this.prefThemeScheme},e("header",{key:"f9849eb9243eaab7585991a7f32a7ecd0aa30d78",class:"header",part:"header"},e("mds-text",{key:"9d32ebdd41564adfc5c4d4546017b87aeaef6580",class:"label",typography:"label"},e("slot",{key:"6061c4d9d0987242ca08444370831aa55aa0e927"})),e("mds-text",{key:"a8e588f3833bdd9a809b75b1f9cf2bef725ccd4e",class:"value",typography:"label"},this.formatValue?this.formatValue(this.value):this.value)),e("div",{key:"b0ea4bd7ca1b5f82c4b6581d891a5ca3db71b901",class:"range"},e("div",{key:"2d888c14de77f99cfbb651c470e85888869eefcf",class:"track",part:"track"},e("div",{key:"0bd42dcedd84c2e8ce4ac8e922c40de108bca01c",class:"contrast-area"}),e("div",{key:"d88d39f19a361f6a515ba9faf63bfce0961abb77",class:"track-total"},e("div",{key:"82d7e7dd1e4741f89ab8ca250daf93b3e1fb7c28",class:"track-progress",style:{"--mds-input-range-progress":""+(null!==(t=this.progress)&&void 0!==t?t:0)}}))),e("input",{key:"c6d01e5b369efc8a60007255b1ae4c1cd2cfce03",ref:t=>this.inputElement=t,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})))}static get formAssociated(){return!0}get element(){return this}static get watchers(){return{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}}static get style(){return"@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(--tone-neutral-08,107 107 107));--mds-input-range-thumb-background:rgb(var(--tone-neutral,0 0 0));--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(--tone-neutral-08,107 107 107));--mds-input-range-track-background:rgb(var(--tone-neutral-08,107 107 107));--mds-input-range-track-progress-background-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-range-track-progress-background:rgb(var(--variant-primary-03,211 226 255));--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: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]){--private-input-range-transition-duration:0s}:host([pref-theme=dark]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--variant-primary-04,184 208 255));--mds-input-range-track-background:rgb(var(--tone-neutral-07,134 134 134));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05,152 188 255))}:host([pref-contrast=more]){color:rgb(var(--tone-neutral-01,255 255 255))}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-range-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-theme])),:host([pref-theme=system]:not([pref-theme-scheme=light])){--mds-input-range-thumb-background:rgb(var(--variant-primary-04,184 208 255));--mds-input-range-track-background:rgb(var(--tone-neutral-07,134 134 134));--mds-input-range-track-progress-background:rgb(var(--variant-primary-05,152 188 255))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){color:rgb(var(--tone-neutral-01,255 255 255))}}"}},[321,"mds-input-range",{formatValue:[16],name:[513],max:[2],min:[2],step:[2],disabled:[1540],value:[1538],progress:[32],prefAnimation:[32],prefContrast:[32],prefTheme:[32],prefThemeScheme:[32]},void 0,{disabled:[{disabledChanged:0}],value:[{valueChanged:0}],min:[{minChanged:0}],max:[{maxChanged:0}],step:[{stepChanged:0}]}]),c=d,u=function(){"undefined"!=typeof customElements&&["mds-input-range","mds-text"].forEach((t=>{switch(t){case"mds-input-range":customElements.get(n(t))||customElements.define(n(t),d);break;case"mds-text":customElements.get(n(t))||o()}}))};export{c as MdsInputRange,u as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as r,createEvent as o,h as e,Host as i,transformTag as a}from"@stencil/core/internal/client";import{L as n}from"./locale.js";import{m as s}from"./keyboard-arrow-down.js";import{d as c}from"./mds-input-tip2.js";import{d as l}from"./mds-input-tip-item2.js";import{d as u}from"./mds-text2.js";const d=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.changeEvent=o(this,"mdsInputSelectChange",7),this.internals=this.attachInternals(),this.hasFocus=!1,this.t=new n,this.disabled=!1,this.required=!1,this.multiple=!1,this.size=0,this.value="",this.onInput=t=>{const r=t.target;r&&(this.value=r.value)},this.onBlur=()=>{this.hasFocus=!1},this.onFocus=()=>{this.hasFocus=!0},this.emptyOptions=()=>{var t;const r=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("select"),o=null==r?void 0:r.querySelectorAll("option");o&&o.forEach(((t,r)=>{void 0!==this.placeholder&&""!==this.placeholder||t.remove(),void 0!==this.placeholder&&""!==this.placeholder&&r>0&&t.remove()}))},this.onSlotChangeHandler=()=>{var t,r,o;const e=null===(r=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelectorAll("slot")[0])||void 0===r?void 0:r.assignedNodes(),i=null===(o=this.selectEl)||void 0===o?void 0:o.querySelectorAll("option");null!=i&&((void 0===this.placeholder||""===this.placeholder)&&i.length>0&&this.emptyOptions(),void 0!==this.placeholder&&""!==this.placeholder&&i.length>1&&this.emptyOptions(),null==e||e.forEach((t=>{var r;null===(r=this.selectEl)||void 0===r||r.appendChild(t.cloneNode(!0))})),this.setCurrentValue())},this.setCurrentValue=()=>{var t;null!=this.selectEl&&(null==this.value||""===this.value||0===this.value||Number.isNaN(this.value)?void 0!==this.placeholder&&""!==this.placeholder||(this.value=null===(t=this.selectEl)||void 0===t?void 0:t.querySelectorAll("option")[0].value):this.selectEl.querySelectorAll("option").forEach((t=>{t.selected=t.value===this.value})))}}async updateLang(){this.language=this.t.lang(this.host),this.t.update()}async setValue(t){return this.value=t,Promise.resolve()}valueChanged(){var t,r,o;this.changeEvent.emit({value:null===(t=this.value)||void 0===t?void 0:""+t}),this.setCurrentValue(),this.internals.setFormValue(null!==(o=null===(r=this.value)||void 0===r?void 0:""+r)&&void 0!==o?o:null)}disabledChanged(t){t&&this.internals.setFormValue(null)}placeholderChanged(t,r){if(void 0!==t&&""!==t&&(void 0===r||""===r)){let r=document.querySelector(".placeholder-option");r&&r.remove(),r=document.createElement("option"),this.selectEl.insertBefore(r,this.selectEl.firstChild),r.value="",r.text=t,(null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue))&&(r.selected=!0,this.value=void 0),this.required&&(r.disabled=!0)}}formResetCallback(){this.internals.setFormValue("")}componentWillLoad(){this.language=this.t.lang(this.host),null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue)||(this.value=this.defaultValue)}componentDidLoad(){null==this.value||""===this.value||0===this.value||Number.isNaN(this.value)||this.internals.setFormValue(""+this.value)}render(){return e(i,{key:"464b7c512e49866bfeb174c68feb33eca3f85bce"},e("select",{key:"fbf891a0e4bc63ea509252bbbb7c5c0de9a04c4a",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:t=>this.selectEl=t},e("option",{key:"b5b46a1fee6ba457b47c79123051bf5976bfa7fc",class:"placeholder-option",value:"",disabled:!!this.required||void 0,selected:!(null!=this.defaultValue&&""!==this.defaultValue&&0!==this.defaultValue&&!Number.isNaN(this.defaultValue))||void 0},this.placeholder)),e("div",{key:"e3101de2d9c66aee324ef4dfc332b560e6c561bf",class:"icon-container"},e("i",{key:"f191aadd1e565a1182e9bb7ac956a6149b170d1e",class:"icon",innerHTML:s})),e("div",{key:"ae377495ebb30aed7580ebd67d4d2bd0080cc1bf",class:"option-container"},e("slot",{key:"77c743369dbed2bfd1c86f2b9803a3055cc7e7f5",onSlotchange:this.onSlotChangeHandler})),e("mds-input-tip",{key:"31e000f584381fa7c7324f99ccfa9b068eb35af8",position:"top",lang:this.language,active:this.hasFocus,part:"tip-top"},this.disabled&&e("mds-input-tip-item",{key:"456fa339c96db8e85d4d6df4cf61bb880c467d78",expanded:!0,variant:"disabled"}),this.required&&e("mds-input-tip-item",{key:"3778f2888a7d3bca817edcbf31d77b30a73fdd77",expanded:this.hasFocus,variant:""===this.value?"required":"required-success"})))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{value:[{valueChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}]}}static get style(){return'@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@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{--mds-input-select-variant-color-rgb:var(--tone-neutral-01,255 255 255);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255)));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233))}}}@layer reset,vendor,theme,base,components,utilities;:host(:not(:is([hydrated],.hydrated))),:is(mds-input-tip,mds-input-tip-item):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-select-variant-color-rgb:var(--tone-neutral-01,255 255 255);--mds-input-select-ring:0 0 0 1px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.1);--mds-input-select-shadow:0 1px 3px 0 rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.1),0 1px 2px 0 rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255)));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233));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;color:rgb(var(--tone-neutral-02,244 244 244));display:flex;position:relative;-webkit-user-select:none;user-select:none;--mds-input-select-icon-color:rgb(var(--variant-primary-03,211 226 255));--mds-input-select-variant-color-rgb:0 0 0;--mds-input-select-arrow-icon-blur-background-color:rgb(var(--variant-primary-09,0 58 168));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--variant-primary-08,0 83 239));--mds-input-select-arrow-icon-blur-color:rgb(var(--variant-primary-06,90 147 255));--mds-input-select-arrow-icon-hover-color:rgb(var(--variant-primary-04,184 208 255))}:host([required]:not([required=false]):focus-within) .icon{-webkit-transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150));transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150))}:host(:focus-within),:host(:hover){--mds-input-select-variant-color-rgb:var(--variant-primary-03,211 226 255);--mds-input-select-ring:0 0 0 3px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/1);--mds-input-select-shadow:0 4px 6px -1px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.1),0 2px 4px -1px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-hover-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5));--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-hover-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))));--mds-input-select-variant-color-rgb:var(--variant-primary-04,184 208 255)}.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;appearance:none;background-color:rgb(var(--tone-neutral,0 0 0));border:0;border-radius:var(--radius-xs,8px);-webkit-box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-sizing:border-box;color:rgb(var(--tone-neutral-02,244 244 244));cursor:pointer;margin:0;min-height:calc(var(--spacing,.0025rem)*1200);overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;transition-property:background-color,border-color,box-shadow,color,fill;width:100%}.input,.input:focus,.input:hover{-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:focus,.input:hover{--tw-outline-style:none;color:rgb(var(--tone-neutral-03,233 233 233));outline-style:none}:host([value]:not([value=""])) .input{color:rgb(var(--tone-neutral-03,233 233 233))}:host([required]:not([required=false])) .input{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled{background-color:rgb(var(--tone-neutral-09,76 76 76));opacity:1}:host([disabled]:not([disabled=false])),:host([disabled]:not([disabled=false])) .input{pointer-events:none}:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--tone-neutral-06,158 158 158));-webkit-transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}.icon-container{align-items:center;color:inherit;display:flex;height:calc(var(--spacing,.0025rem)*1200);pointer-events:none;position:absolute;right:calc(var(--spacing,.0025rem)*400)}.icon{background-color:var(--mds-input-select-arrow-icon-background-color,var(--mds-input-select-arrow-icon-blur-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0)));border-radius:var(--radius-full,1000px);display:flex;fill:var(--mds-input-select-arrow-icon-color,var(--mds-input-select-arrow-icon-blur-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5)));-webkit-transition-duration:var(--duration-200,.2s);transition-duration:var(--duration-200,.2s);transition-property:background-color,fill}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.option-container{display:none}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}@container (max-width:210px){:host .tip__content,:host(:focus-within) .tip__content{grid-template-columns:0fr;opacity:0}:host .tip{padding-left:0;padding-right:0}:host{--mds-input-select-background:rgb(var(--variant-primary-07,44 117 255))}}:host([variant=info]){--mds-input-select-icon-color:rgb(var(--status-info-05,112 198 234));--mds-input-select-tip-background:rgb(var(--status-info-05,112 198 234));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-info-09,0 73 116));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-info-08,0 107 151));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-info-06,0 161 208));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-info-04,159 216 241));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=info]:focus-within),:host([variant=info]:hover){--mds-input-select-icon-color:rgb(var(--status-info-04,159 216 241));--mds-input-select-variant-color-rgb:var(--status-info-05,112 198 234)}:host([variant=success]){--mds-input-select-icon-color:rgb(var(--status-success-05,107 206 147));--mds-input-select-tip-background:rgb(var(--status-success-05,107 206 147));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-success-09,0 82 9));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-success-08,0 116 46));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-success-06,0 171 97));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-success-04,158 222 181));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=success]:focus-within),:host([variant=success]:hover){--mds-input-select-icon-color:rgb(var(--status-success-04,158 222 181));--mds-input-select-variant-color-rgb:var(--status-success-05,107 206 147)}:host([variant=warning]){--mds-input-select-icon-color:rgb(var(--status-warning-05,237 177 0));--mds-input-select-tip-background:rgb(var(--status-warning-05,237 177 0));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-warning-09,90 67 0));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-warning-08,129 96 0));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-warning-06,190 142 0));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-warning-04,255 200 33));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within),:host([variant=warning]:hover){--mds-input-select-icon-color:rgb(var(--status-warning-04,255 200 33));--mds-input-select-variant-color-rgb:var(--status-warning-05,237 177 0)}:host([variant=error]){--mds-input-select-icon-color:rgb(var(--status-error-05,250 165 160));--mds-input-select-tip-background:rgb(var(--status-error-05,250 165 160));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-error-09,135 0 14));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-error-08,182 50 54));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-error-06,239 108 105));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-error-04,254 193 189));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=error]:focus-within),:host([variant=error]:hover){--mds-input-select-icon-color:rgb(var(--status-error-04,254 193 189));--mds-input-select-variant-color-rgb:var(--status-error-05,250 165 160)}:host-context(:root.pref-animation-reduce){transition-duration:0s}:host-context(:root.pref-animation-reduce) .input{transition-duration:0s}:host-context(:root.pref-animation-reduce) .input:hover{transition-duration:0s}:host-context(:root.pref-animation-reduce) .input:focus{transition-duration:0s}:host-context(:root.pref-animation-reduce) .icon{transition-duration:0s}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)){--mds-input-select-ring:var(--shadow-outline-50);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--variant-primary-05,152 188 255));--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--variant-primary-04,184 208 255));--mds-input-select-arrow-icon-hover-color:rgb(var(--variant-primary-08,0 83 239))}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)) .input{color:rgb(var(--tone-neutral-03,233 233 233))}:host-context(:root.pref-contrast-more){--mds-input-select-ring:var(--shadow-outline-strong-50)}:host-context(:root.pref-contrast-more) .input{color:rgb(var(--tone-neutral-01,255 255 255))}@media (forced-colors:active){.input:focus,.input:hover{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion){:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))),:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .icon,:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .input,:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .input:focus,:is(:host-context(:root.pref-animation-system),:host-context(:root:not([data-magma-pref]))) .input:hover{transition-duration:0s}}@media (prefers-color-scheme:dark){:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))){--mds-input-select-ring:var(--shadow-outline-50);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--variant-primary-05,152 188 255));--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--variant-primary-04,184 208 255));--mds-input-select-arrow-icon-hover-color:rgb(var(--variant-primary-08,0 83 239))}:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))) .input{color:rgb(var(--tone-neutral-03,233 233 233))}}@media (prefers-contrast:more){:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))){--mds-input-select-ring:var(--shadow-outline-strong-50)}:is(:host-context(:root.pref-contrast-system),:host-context(:root:not([data-magma-pref]))) .input{color:rgb(var(--tone-neutral-01,255 255 255))}}'}},[321,"mds-input-select",{autocomplete:[513],autoFocus:[516,"auto-focus"],placeholder:[513],name:[513],disabled:[516],required:[516],multiple:[516],size:[514],value:[520],defaultValue:[520,"default-value"],variant:[513],hasFocus:[32],language:[32],updateLang:[64],setValue:[64]},void 0,{value:[{valueChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}]}]),p=d,m=function(){"undefined"!=typeof customElements&&["mds-input-select","mds-input-tip","mds-input-tip-item","mds-text"].forEach((t=>{switch(t){case"mds-input-select":customElements.get(a(t))||customElements.define(a(t),d);break;case"mds-input-tip":customElements.get(a(t))||c();break;case"mds-input-tip-item":customElements.get(a(t))||l();break;case"mds-text":customElements.get(a(t))||u()}}))};export{p as MdsInputSelect,m as defineCustomElement}
1
+ import{proxyCustomElement as t,HTMLElement as r,createEvent as e,h as i,Host as o,transformTag as a}from"@stencil/core/internal/client";import{L as n}from"./locale.js";import{s}from"./preference.js";import{m as c}from"./keyboard-arrow-down.js";import{d as l}from"./mds-input-tip2.js";import{d as u}from"./mds-input-tip-item2.js";import{d}from"./mds-text2.js";const p=t(class extends r{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.changeEvent=e(this,"mdsInputSelectChange",7),this.internals=this.attachInternals(),this.hasFocus=!1,this.t=new n,this.disabled=!1,this.required=!1,this.multiple=!1,this.size=0,this.value="",this.onInput=t=>{const r=t.target;r&&(this.value=r.value)},this.onBlur=()=>{this.hasFocus=!1},this.onFocus=()=>{this.hasFocus=!0},this.emptyOptions=()=>{var t;const r=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("select"),e=null==r?void 0:r.querySelectorAll("option");e&&e.forEach(((t,r)=>{void 0!==this.placeholder&&""!==this.placeholder||t.remove(),void 0!==this.placeholder&&""!==this.placeholder&&r>0&&t.remove()}))},this.onSlotChangeHandler=()=>{var t,r,e;const i=null===(r=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelectorAll("slot")[0])||void 0===r?void 0:r.assignedNodes(),o=null===(e=this.selectEl)||void 0===e?void 0:e.querySelectorAll("option");null!=o&&((void 0===this.placeholder||""===this.placeholder)&&o.length>0&&this.emptyOptions(),void 0!==this.placeholder&&""!==this.placeholder&&o.length>1&&this.emptyOptions(),null==i||i.forEach((t=>{var r;null===(r=this.selectEl)||void 0===r||r.appendChild(t.cloneNode(!0))})),this.setCurrentValue())},this.setCurrentValue=()=>{var t;null!=this.selectEl&&(null==this.value||""===this.value||0===this.value||Number.isNaN(this.value)?void 0!==this.placeholder&&""!==this.placeholder||(this.value=null===(t=this.selectEl)||void 0===t?void 0:t.querySelectorAll("option")[0].value):this.selectEl.querySelectorAll("option").forEach((t=>{t.selected=t.value===this.value})))}}async updateLang(){this.language=this.t.lang(this.host),this.t.update()}async setValue(t){return this.value=t,Promise.resolve()}valueChanged(){var t,r,e;this.changeEvent.emit({value:null===(t=this.value)||void 0===t?void 0:""+t}),this.setCurrentValue(),this.internals.setFormValue(null!==(e=null===(r=this.value)||void 0===r?void 0:""+r)&&void 0!==e?e:null)}disabledChanged(t){t&&this.internals.setFormValue(null)}placeholderChanged(t,r){if(void 0!==t&&""!==t&&(void 0===r||""===r)){let r=document.querySelector(".placeholder-option");r&&r.remove(),r=document.createElement("option"),this.selectEl.insertBefore(r,this.selectEl.firstChild),r.value="",r.text=t,(null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue))&&(r.selected=!0,this.value=void 0),this.required&&(r.disabled=!0)}}formResetCallback(){this.internals.setFormValue("")}connectedCallback(){this.unsubscribePrefAnimation=s("animation",(t=>{this.prefAnimation=t})),this.unsubscribePrefContrast=s("contrast",(t=>{this.prefContrast=t})),this.unsubscribePrefTheme=s("theme",(t=>{this.prefTheme=t})),this.unsubscribePrefThemeScheme=s("theme-scheme",(t=>{this.prefThemeScheme=t}))}disconnectedCallback(){var t,r,e,i;null===(t=this.unsubscribePrefAnimation)||void 0===t||t.call(this),null===(r=this.unsubscribePrefContrast)||void 0===r||r.call(this),null===(e=this.unsubscribePrefTheme)||void 0===e||e.call(this),null===(i=this.unsubscribePrefThemeScheme)||void 0===i||i.call(this)}componentWillLoad(){this.language=this.t.lang(this.host),null==this.defaultValue||""===this.defaultValue||0===this.defaultValue||Number.isNaN(this.defaultValue)||(this.value=this.defaultValue)}componentDidLoad(){null==this.value||""===this.value||0===this.value||Number.isNaN(this.value)||this.internals.setFormValue(""+this.value)}render(){return i(o,{key:"729807a3442ef1465c131a06041aa3e661e7362d","pref-animation":this.prefAnimation,"pref-contrast":this.prefContrast,"pref-theme":this.prefTheme,"pref-theme-scheme":this.prefThemeScheme},i("select",{key:"708f45218c8651e99143fbc99f4d701d3837cdf5",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:t=>this.selectEl=t},i("option",{key:"8aca9030ca7eecb8bd90347ab0f65dd6195bf446",class:"placeholder-option",value:"",disabled:!!this.required||void 0,selected:!(null!=this.defaultValue&&""!==this.defaultValue&&0!==this.defaultValue&&!Number.isNaN(this.defaultValue))||void 0},this.placeholder)),i("div",{key:"c9ec4a12c6a1c61a843bd8e3b17fa49060f59cf4",class:"icon-container"},i("i",{key:"8b1dffa75c8ccb7e69236d06cb22fedd75663721",class:"icon",innerHTML:c})),i("div",{key:"829bd49c29b9f890f36e88f09f1685a4675b4d37",class:"option-container"},i("slot",{key:"7c077c0c8e5a46cfbd1707fc405e453cd12839d0",onSlotchange:this.onSlotChangeHandler})),i("mds-input-tip",{key:"fb95b541445b5c5a2cdd7e8dda6f71e0a4a7dc8a",position:"top",lang:this.language,active:this.hasFocus,part:"tip-top"},this.disabled&&i("mds-input-tip-item",{key:"1f49975a3d659e263ed400edcc77a0d1ba3ca1ca",expanded:!0,variant:"disabled"}),this.required&&i("mds-input-tip-item",{key:"45829a603cbd0c208e49c0103be849ada469db1a",expanded:this.hasFocus,variant:""===this.value?"required":"required-success"})))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{value:[{valueChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}]}}static get style(){return'@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{--mds-input-select-variant-color-rgb:var(--tone-neutral-01,255 255 255);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255)));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233))}}}:host(:not(:is([hydrated],.hydrated))),:is(mds-input-tip,mds-input-tip-item):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-select-variant-color-rgb:var(--tone-neutral-01,255 255 255);--mds-input-select-ring:0 0 0 1px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.1);--mds-input-select-shadow:0 1px 3px 0 rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.1),0 1px 2px 0 rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-blur-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0);--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-blur-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5);--mds-input-select-arrow-icon-hover-color:rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255)));--mds-input-tip-horizontal-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-horizontal-offset-focused:calc(var(--spacing,.0025rem)*1000);--mds-input-tip-vertical-offset:calc(var(--spacing,.0025rem)*100);--mds-input-tip-background:rgb(var(--tone-neutral-03,233 233 233));--mds-input-select-transition-duration:var(--duration-300,.3s);--mds-input-select-icon-transition-duration:var(--duration-200,.2s);--private-input-select-transition-duration:var(--mds-input-select-transition-duration);--private-input-select-icon-transition-duration:var(--mds-input-select-icon-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;color:rgb(var(--tone-neutral-02,244 244 244));display:flex;position:relative;-webkit-user-select:none;user-select:none;--mds-input-select-icon-color:rgb(var(--variant-primary-03,211 226 255));--mds-input-select-variant-color-rgb:0 0 0;--mds-input-select-arrow-icon-blur-background-color:rgb(var(--variant-primary-09,0 58 168));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--variant-primary-08,0 83 239));--mds-input-select-arrow-icon-blur-color:rgb(var(--variant-primary-06,90 147 255));--mds-input-select-arrow-icon-hover-color:rgb(var(--variant-primary-04,184 208 255))}:host([required]:not([required=false]):focus-within) .icon{-webkit-transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150));transform:translate(calc(var(--spacing,.0025rem)*150),calc(var(--spacing,.0025rem)*150))}:host(:focus-within),:host(:hover){--mds-input-select-variant-color-rgb:var(--variant-primary-03,211 226 255);--mds-input-select-ring:0 0 0 3px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/1);--mds-input-select-shadow:0 4px 6px -1px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.1),0 2px 4px -1px rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.06);--mds-input-select-arrow-icon-background-color:var(--mds-input-select-arrow-icon-hover-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5));--mds-input-select-arrow-icon-color:var(--mds-input-select-arrow-icon-hover-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))));--mds-input-select-variant-color-rgb:var(--variant-primary-04,184 208 255)}.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;appearance:none;background-color:rgb(var(--tone-neutral,0 0 0));border:0;border-radius:var(--radius-xs,8px);-webkit-box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-shadow:var(--mds-input-select-ring),var(--mds-input-select-shadow);box-sizing:border-box;color:rgb(var(--tone-neutral-02,244 244 244));cursor:pointer;margin:0;min-height:calc(var(--spacing,.0025rem)*1200);overflow:hidden;padding-left:calc(var(--spacing,.0025rem)*400);padding-right:calc(var(--spacing,.0025rem)*1200);text-overflow:ellipsis;transition-property:background-color,border-color,box-shadow,color,fill;width:100%}.input,.input:focus,.input:hover{-webkit-transition-duration:var(--private-input-select-transition-duration);transition-duration:var(--private-input-select-transition-duration);-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:focus,.input:hover{--tw-outline-style:none;color:rgb(var(--tone-neutral-03,233 233 233));outline-style:none}:host([value]:not([value=""])) .input{color:rgb(var(--tone-neutral-03,233 233 233))}:host([required]:not([required=false])) .input{color:rgb(var(--tone-neutral-05,197 197 197))}.input:disabled{background-color:rgb(var(--tone-neutral-09,76 76 76));opacity:1}:host([disabled]:not([disabled=false])),:host([disabled]:not([disabled=false])) .input{pointer-events:none}:host([disabled]:not([disabled=false])) .icon{fill:rgb(var(--tone-neutral-06,158 158 158));-webkit-transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200));transform:translate(calc(var(--spacing,.0025rem)*250),calc(var(--spacing,.0025rem)*200))}.icon-container{align-items:center;color:inherit;display:flex;height:calc(var(--spacing,.0025rem)*1200);pointer-events:none;position:absolute;right:calc(var(--spacing,.0025rem)*400)}.icon{background-color:var(--mds-input-select-arrow-icon-background-color,var(--mds-input-select-arrow-icon-blur-background-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/0)));border-radius:var(--radius-full,1000px);display:flex;fill:var(--mds-input-select-arrow-icon-color,var(--mds-input-select-arrow-icon-blur-color,rgb(var(--mds-input-select-variant-color-rgb,var(--tone-neutral-01,255 255 255))/.5)));-webkit-transition-duration:var(--private-input-select-icon-transition-duration);transition-duration:var(--private-input-select-icon-transition-duration);transition-property:background-color,fill}.icon svg{aspect-ratio:var(--aspect-square,1/1);height:100%;width:100%}.option-container{display:none}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}@container (max-width:210px){:host .tip__content,:host(:focus-within) .tip__content{grid-template-columns:0fr;opacity:0}:host .tip{padding-left:0;padding-right:0}:host{--mds-input-select-background:rgb(var(--variant-primary-07,44 117 255))}}:host([variant=info]){--mds-input-select-icon-color:rgb(var(--status-info-05,112 198 234));--mds-input-select-tip-background:rgb(var(--status-info-05,112 198 234));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-info-09,0 73 116));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-info-08,0 107 151));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-info-06,0 161 208));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-info-04,159 216 241));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=info]:focus-within),:host([variant=info]:hover){--mds-input-select-icon-color:rgb(var(--status-info-04,159 216 241));--mds-input-select-variant-color-rgb:var(--status-info-05,112 198 234)}:host([variant=success]){--mds-input-select-icon-color:rgb(var(--status-success-05,107 206 147));--mds-input-select-tip-background:rgb(var(--status-success-05,107 206 147));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-success-09,0 82 9));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-success-08,0 116 46));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-success-06,0 171 97));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-success-04,158 222 181));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=success]:focus-within),:host([variant=success]:hover){--mds-input-select-icon-color:rgb(var(--status-success-04,158 222 181));--mds-input-select-variant-color-rgb:var(--status-success-05,107 206 147)}:host([variant=warning]){--mds-input-select-icon-color:rgb(var(--status-warning-05,237 177 0));--mds-input-select-tip-background:rgb(var(--status-warning-05,237 177 0));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-warning-09,90 67 0));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-warning-08,129 96 0));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-warning-06,190 142 0));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-warning-04,255 200 33));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=warning]:focus-within),:host([variant=warning]:hover){--mds-input-select-icon-color:rgb(var(--status-warning-04,255 200 33));--mds-input-select-variant-color-rgb:var(--status-warning-05,237 177 0)}:host([variant=error]){--mds-input-select-icon-color:rgb(var(--status-error-05,250 165 160));--mds-input-select-tip-background:rgb(var(--status-error-05,250 165 160));--mds-input-select-arrow-icon-blur-background-color:rgb(var(--status-error-09,135 0 14));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--status-error-08,182 50 54));--mds-input-select-arrow-icon-blur-color:rgb(var(--status-error-06,239 108 105));--mds-input-select-arrow-icon-hover-color:rgb(var(--status-error-04,254 193 189));--mds-input-select-variant-color-rgb:0 0 0}:host([variant=error]:focus-within),:host([variant=error]:hover){--mds-input-select-icon-color:rgb(var(--status-error-04,254 193 189));--mds-input-select-variant-color-rgb:var(--status-error-05,250 165 160)}:host([pref-animation=reduce]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}:host([pref-theme=dark]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-outline-50);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--variant-primary-05,152 188 255));--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--variant-primary-04,184 208 255));--mds-input-select-arrow-icon-hover-color:rgb(var(--variant-primary-08,0 83 239))}:host([pref-theme=dark]:not([pref-theme-scheme=light])) .input{color:rgb(var(--tone-neutral-03,233 233 233))}:host([pref-contrast=more]){--mds-input-select-ring:var(--shadow-outline-strong-50)}:host([pref-contrast=more]) .input{color:rgb(var(--tone-neutral-01,255 255 255))}@media (forced-colors:active){.input:focus,.input:hover{outline:2px solid #0000;outline-offset:2px}}@media (prefers-reduced-motion:reduce){:host(:not([pref-animation])),:host([pref-animation=system]){--private-input-select-transition-duration:0s;--private-input-select-icon-transition-duration:0s}}@media (prefers-color-scheme:dark){:host(:not([pref-theme])),:host([pref-theme=system]:not([pref-theme-scheme=light])){--mds-input-select-ring:var(--shadow-outline-50);--mds-input-select-arrow-icon-blur-background-color:rgb(var(--variant-primary-05,152 188 255));--mds-input-select-arrow-icon-blur-color:rgb(var(--mds-input-select-variant-color));--mds-input-select-arrow-icon-hover-background-color:rgb(var(--variant-primary-04,184 208 255));--mds-input-select-arrow-icon-hover-color:rgb(var(--variant-primary-08,0 83 239))}:is(:host([pref-theme=system]:not([pref-theme-scheme=light])),:host(:not([pref-theme]))) .input{color:rgb(var(--tone-neutral-03,233 233 233))}}@media (prefers-contrast:more){:host(:not([pref-contrast])),:host([pref-contrast=system]){--mds-input-select-ring:var(--shadow-outline-strong-50)}:is(:host([pref-contrast=system]),:host(:not([pref-contrast]))) .input{color:rgb(var(--tone-neutral-01,255 255 255))}}'}},[321,"mds-input-select",{autocomplete:[513],autoFocus:[516,"auto-focus"],placeholder:[513],name:[513],disabled:[516],required:[516],multiple:[516],size:[514],value:[520],defaultValue:[520,"default-value"],variant:[513],prefAnimation:[32],prefContrast:[32],prefTheme:[32],prefThemeScheme:[32],hasFocus:[32],language:[32],updateLang:[64],setValue:[64]},void 0,{value:[{valueChanged:0}],disabled:[{disabledChanged:0}],placeholder:[{placeholderChanged:0}]}]),v=p,h=function(){"undefined"!=typeof customElements&&["mds-input-select","mds-input-tip","mds-input-tip-item","mds-text"].forEach((t=>{switch(t){case"mds-input-select":customElements.get(a(t))||customElements.define(a(t),p);break;case"mds-input-tip":customElements.get(a(t))||l();break;case"mds-input-tip-item":customElements.get(a(t))||u();break;case"mds-text":customElements.get(a(t))||d()}}))};export{v as MdsInputSelect,h as defineCustomElement}
@@ -1 +1 @@
1
- import{proxyCustomElement as i,HTMLElement as t,createEvent as e,h as a,Host as n,transformTag as s}from"@stencil/core/internal/client";import{c}from"./clsx.js";import{m as o}from"./remove.js";import{K as r}from"./keyboard-manager.js";import{h as l}from"./slot.js";import{L as d}from"./locale.js";import{d as h}from"./mds-icon2.js";import{d as m}from"./mds-text2.js";const u={switch:{iconChecked:"",iconIndeterminate:"",iconUnchecked:""},checkbox:{iconChecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-9 14l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',iconIndeterminate:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"/></svg>',iconUnchecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>'},radio:{iconChecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8z"/></svg>',iconIndeterminate:"",iconUnchecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8z"/></svg>'}};var g={select:"Επιλογή {{#label}}{{label}}{{/label}}{{^label}}στοιχείο{{/label}}",unselect:"Αποεπιλογή {{#label}}{{label}}{{/label}}{{^label}}στοιχείο{{/label}}"},p={select:"Select {{#label}}{{label}}{{/label}}{{^label}}element{{/label}}",unselect:"Deselect {{#label}}{{label}}{{/label}}{{^label}}element{{/label}}"},b={select:"Seleccionar {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}",unselect:"Deseleccionar {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}"},v={select:"Seleziona {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}",unselect:"Deseleziona {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}"};const w=i(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.changeEvent=e(this,"mdsInputSwitchChange",7),this.internals=this.attachInternals(),this.km=new r,this.dirty=!1,this.hasText=!1,this.t=new d({el:g,en:p,es:b,it:v}),this.icon="",this.name="",this.size="md",this.type="switch",this.typography="detail",this.value="",this.uncheckSiblings=()=>{document.querySelectorAll(`mds-input-switch[name="${this.name}"]`).forEach((i=>{i!==this.host&&(i.checked=!1)}))},this.handleInputOnChange=i=>{var t,e;const{value:a}=i.target;i.preventDefault(),i.stopPropagation();const n=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.getElementById("field");this.checked=n.checked,this.indeterminate=!1,"radio"===this.type&&this.uncheckSiblings(),this.changeEvent.emit({name:this.name,checked:this.checked,value:a}),this.internals.setFormValue(this.checked&&null!==(e=this.value)&&void 0!==e?e:null)},this.handleDirty=()=>{this.dirty=!0},this.checkFocusElement=()=>{var i,t;"switch"===this.type?(this.km.removeElement("default"),this.km.addElement(null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector(".switch-container"),"switch"),this.km.attachClickBehavior("switch")):(this.km.removeElement("switch"),this.km.addElement(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".label-icon"),"default"),this.km.attachClickBehavior("default"))}}async updateLang(){this.language=this.t.lang(this.host)}disabledChanged(i){i?this.internals.setFormValue(null):!1===i&&(this.disabled=void 0)}checkedChanged(i){!1===i&&(this.checked=void 0)}explicitChanged(i){!1===i&&(this.explicit=void 0)}formResetCallback(){this.internals.setFormValue("")}componentDidLoad(){var i,t;this.language=this.t.lang(this.host),this.label=null!==(i=this.host.textContent)&&void 0!==i?i:"",this.internals.setFormValue(this.checked&&null!==(t=this.value)&&void 0!==t?t:null),this.checkFocusElement(),this.hasText=l(this.host)}render(){var i;const{iconChecked:t,iconUnchecked:e,iconIndeterminate:s}=u[this.type],r=""!==this.icon?this.icon:t;return a(n,{key:"2567f5e3e7e467b8e631ea7811d57006c4b1c5d3",onClick:this.handleDirty},a("input",{key:"b33e197bed24584b0f1a1f795a699f8d4c2ba1ea",autoFocus:this.autofocus,checked:this.checked,class:"field",disabled:this.disabled,id:"field",indeterminate:this.indeterminate,name:this.name,onChange:i=>this.handleInputOnChange(i),type:"switch"===this.type?"checkbox":this.type,value:null!==(i=this.value)&&void 0!==i?i:void 0}),"switch"===this.type?a("label",{htmlFor:"field",class:c("switch-container",!1!==this.dirty&&"dirty"),tabindex:"0","aria-label":this.t.get(this.checked?"unselect":"select",{label:this.label})},a("div",{class:"switch"},a("div",{class:"switch-toggle"},this.explicit&&a("mds-icon",{class:"icon-explicit",name:this.checked?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M16.59 7.58 10 14.17l-2.59-2.58L6 13l4 4 8-8z"/>\n</svg>\n':o})))):a("label",{htmlFor:"field",class:"label-icon",tabindex:"0","aria-label":this.t.get(this.checked?"unselect":"select",{label:this.label})},a("mds-text",{class:"icon-typography-unchecked",tag:"div",typography:this.typography,variant:this.variant},a("mds-icon",{class:"icon-unchecked",name:c(this.indeterminate?s:e)})),this.checked&&a("mds-text",{class:"icon-typography-checked",tag:"div",typography:this.typography,variant:this.variant},a("mds-icon",{class:"icon-checked",name:c(this.indeterminate?s:r)}))),a("label",{key:"1972a79c1db097026c9833f47da6eb96a7d95d6d",htmlFor:"field",class:c("label-text",!this.hasText&&"label-text--empty")},a("mds-text",{key:"041a88fbb8a21a4a5eb810947c29dbce24665651",tag:"p",typography:this.typography,variant:this.variant},a("slot",{key:"ea04ede1e08f07893d941eb2426a7cb0d9005a3d"}))))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{disabled:[{disabledChanged:0}],checked:[{checkedChanged:0}],explicit:[{explicitChanged:0}]}}static get style(){return'@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@layer reset,vendor,theme,base,components,utilities;@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{--mds-input-switch-animation-timing-adjust:1.4;--mds-input-switch-box-color-enabled-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--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(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255)));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--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));--tw-font-weight:initial}}}@layer reset,vendor,theme,base,components,utilities;: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}@property --mds-input-switch-animation-timing-adjust{syntax:"<number>";inherits:false;initial-value:1.4}@property --mds-input-switch-duration{syntax:"<time>";inherits:false;initial-value:.3s}: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(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--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(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255)));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--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{display:none}.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}.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,var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255))));height:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)));width:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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(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)))}.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(--tone-neutral-06,158 158 158)));box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:min-content;padding:var(--mds-input-switch-box-padding,var(--mds-input-switch-box-padding-md,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(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)))}.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(--tone-neutral,0 0 0)));-webkit-box-shadow:var(--shadow);box-shadow:var(--shadow);display:flex;height:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}.field:checked+.switch-container .switch{background-color:var(--mds-input-switch-box-color-enabled-checked,rgb(var(--variant-primary-04,184 208 255)))}.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(--tone-neutral,0 0 0)))}.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(--tone-neutral-10,60 60 60)))}.field:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-unchecked,rgb(var(--tone-neutral-08,107 107 107)))}.field:checked:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-checked,rgb(var(--tone-neutral-08,107 107 107)))}.field:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-unchecked,rgb(var(--tone-neutral,0 0 0)))}.field:checked:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-checked,rgb(var(--tone-neutral,0 0 0)))}@keyframes check{0%{transform:translate(0);width:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}}@keyframes uncheck{0%{transform:translate(100%);width:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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,var(--mds-input-switch-toggle-size-md,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(--tone-neutral-06,158 158 158)));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(--variant-primary-04,184 208 255)));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(--tone-neutral-06,158 158 158)))}.field:disabled+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--tone-neutral-06,158 158 158)))}.field:disabled:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate-disabled,rgb(var(--tone-neutral-05,197 197 197)))}.field:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate,rgb(var(--tone-neutral-05,197 197 197)));transform:scale(1)}:host([explicit]:not([disabled]):not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked,rgb(var(--tone-neutral-06,158 158 158)))}:host([explicit][checked]:not([disabled])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255)))}:host([explicit][checked][disabled]){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--tone-neutral-06,158 158 158)))}:host([explicit][disabled]:not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--tone-neutral-06,158 158 158)))}:host-context(:root.pref-theme-dark:not(.pref-theme-scheme-light)){--mds-input-switch-box-color-enabled-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-icon-color-checked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-06,90 147 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158))}: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){:is(:host-context(:root.pref-theme-system:not(.pref-theme-scheme-light)),:host-context(:root:not([data-magma-pref]))){--mds-input-switch-box-color-enabled-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-icon-color-checked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-06,90 147 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158))}}'}},[321,"mds-input-switch",{autofocus:[516],checked:[1540],disabled:[1540],explicit:[516],icon:[513],indeterminate:[1540],name:[513],size:[513],type:[513],typography:[513],variant:[513],value:[1537],dirty:[32],hasText:[32],language:[32],updateLang:[64]},void 0,{disabled:[{disabledChanged:0}],checked:[{checkedChanged:0}],explicit:[{explicitChanged:0}]}]);function k(){"undefined"!=typeof customElements&&["mds-input-switch","mds-icon","mds-text"].forEach((i=>{switch(i){case"mds-input-switch":customElements.get(s(i))||customElements.define(s(i),w);break;case"mds-icon":customElements.get(s(i))||h();break;case"mds-text":customElements.get(s(i))||m()}}))}export{w as M,k as d}
1
+ import{proxyCustomElement as i,HTMLElement as t,createEvent as e,h as a,Host as n,transformTag as c}from"@stencil/core/internal/client";import{c as s}from"./clsx.js";import{m as r}from"./remove.js";import{K as o}from"./keyboard-manager.js";import{h as l}from"./slot.js";import{L as d}from"./locale.js";import{s as h}from"./preference.js";import{d as m}from"./mds-icon2.js";import{d as u}from"./mds-text2.js";const g={switch:{iconChecked:"",iconIndeterminate:"",iconUnchecked:""},checkbox:{iconChecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-9 14l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',iconIndeterminate:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"/></svg>',iconUnchecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"/></svg>'},radio:{iconChecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8z"/></svg>',iconIndeterminate:"",iconUnchecked:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8s8 3.58 8 8s-3.58 8-8 8z"/></svg>'}};var p={select:"Επιλογή {{#label}}{{label}}{{/label}}{{^label}}στοιχείο{{/label}}",unselect:"Αποεπιλογή {{#label}}{{label}}{{/label}}{{^label}}στοιχείο{{/label}}"},b={select:"Select {{#label}}{{label}}{{/label}}{{^label}}element{{/label}}",unselect:"Deselect {{#label}}{{label}}{{/label}}{{^label}}element{{/label}}"},v={select:"Seleccionar {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}",unselect:"Deseleccionar {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}"},w={select:"Seleziona {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}",unselect:"Deseleziona {{#label}}{{label}}{{/label}}{{^label}}elemento{{/label}}"};const k=i(class extends t{constructor(i){super(),!1!==i&&this.__registerHost(),this.__attachShadow(),this.changeEvent=e(this,"mdsInputSwitchChange",7),this.internals=this.attachInternals(),this.km=new o,this.dirty=!1,this.hasText=!1,this.t=new d({el:p,en:b,es:v,it:w}),this.icon="",this.name="",this.size="md",this.type="switch",this.typography="detail",this.value="",this.uncheckSiblings=()=>{document.querySelectorAll(`mds-input-switch[name="${this.name}"]`).forEach((i=>{i!==this.host&&(i.checked=!1)}))},this.handleInputOnChange=i=>{var t,e;const{value:a}=i.target;i.preventDefault(),i.stopPropagation();const n=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.getElementById("field");this.checked=n.checked,this.indeterminate=!1,"radio"===this.type&&this.uncheckSiblings(),this.changeEvent.emit({name:this.name,checked:this.checked,value:a}),this.internals.setFormValue(this.checked&&null!==(e=this.value)&&void 0!==e?e:null)},this.handleDirty=()=>{this.dirty=!0},this.checkFocusElement=()=>{var i,t;"switch"===this.type?(this.km.removeElement("default"),this.km.addElement(null===(i=this.host.shadowRoot)||void 0===i?void 0:i.querySelector(".switch-container"),"switch"),this.km.attachClickBehavior("switch")):(this.km.removeElement("switch"),this.km.addElement(null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".label-icon"),"default"),this.km.attachClickBehavior("default"))}}async updateLang(){this.language=this.t.lang(this.host)}disabledChanged(i){i?this.internals.setFormValue(null):!1===i&&(this.disabled=void 0)}checkedChanged(i){!1===i&&(this.checked=void 0)}explicitChanged(i){!1===i&&(this.explicit=void 0)}formResetCallback(){this.internals.setFormValue("")}connectedCallback(){this.unsubscribePrefTheme=h("theme",(i=>{this.prefTheme=i})),this.unsubscribePrefThemeScheme=h("theme-scheme",(i=>{this.prefThemeScheme=i}))}disconnectedCallback(){var i,t;null===(i=this.unsubscribePrefTheme)||void 0===i||i.call(this),null===(t=this.unsubscribePrefThemeScheme)||void 0===t||t.call(this)}componentDidLoad(){var i,t;this.language=this.t.lang(this.host),this.label=null!==(i=this.host.textContent)&&void 0!==i?i:"",this.internals.setFormValue(this.checked&&null!==(t=this.value)&&void 0!==t?t:null),this.checkFocusElement(),this.hasText=l(this.host)}render(){var i;const{iconChecked:t,iconUnchecked:e,iconIndeterminate:c}=g[this.type],o=""!==this.icon?this.icon:t;return a(n,{key:"963b8366404d13af6237a061c10d7b7f3512ff47",onClick:this.handleDirty,"pref-theme":this.prefTheme,"pref-theme-scheme":this.prefThemeScheme},a("input",{key:"1d13fb479902008db6d8f8bce420aea5eabb8232",autoFocus:this.autofocus,checked:this.checked,class:"field",disabled:this.disabled,id:"field",indeterminate:this.indeterminate,name:this.name,onChange:this.handleInputOnChange,type:"switch"===this.type?"checkbox":this.type,value:null!==(i=this.value)&&void 0!==i?i:void 0}),"switch"===this.type?a("label",{htmlFor:"field",class:s("switch-container",!1!==this.dirty&&"dirty"),tabindex:"0","aria-label":this.t.get(this.checked?"unselect":"select",{label:this.label})},a("div",{class:"switch"},a("div",{class:"switch-toggle"},this.explicit&&a("mds-icon",{class:"icon-explicit",name:this.checked?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M16.59 7.58 10 14.17l-2.59-2.58L6 13l4 4 8-8z"/>\n</svg>\n':r})))):a("label",{htmlFor:"field",class:"label-icon",tabindex:"0","aria-label":this.t.get(this.checked?"unselect":"select",{label:this.label})},a("mds-text",{class:"icon-typography-unchecked",tag:"div",typography:this.typography,variant:this.variant},a("mds-icon",{class:"icon-unchecked",name:s(this.indeterminate?c:e)})),this.checked&&a("mds-text",{class:"icon-typography-checked",tag:"div",typography:this.typography,variant:this.variant},a("mds-icon",{class:"icon-checked",name:s(this.indeterminate?c:o)}))),a("label",{key:"e95925e2b9c53b9fb5e2dba6523d24b573eb4849",htmlFor:"field",class:s("label-text",!this.hasText&&"label-text--empty")},a("mds-text",{key:"cc1fd90f2ac22285cb764b4cce34e80180d95431",tag:"p",typography:this.typography,variant:this.variant},a("slot",{key:"2bfaae2683bf4b30daf69d07febbf7848605e1de"}))))}static get formAssociated(){return!0}get host(){return this}static get watchers(){return{disabled:[{disabledChanged:0}],checked:[{checkedChanged:0}],explicit:[{explicitChanged:0}]}}static get style(){return'@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{--mds-input-switch-animation-timing-adjust:1.4;--mds-input-switch-box-color-enabled-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--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(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255)));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--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));--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}@property --mds-input-switch-animation-timing-adjust{syntax:"<number>";inherits:false;initial-value:1.4}@property --mds-input-switch-duration{syntax:"<time>";inherits:false;initial-value:.3s}: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(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--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(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255)));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--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{display:none}.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}.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,var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255))));height:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)));width:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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(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)))}.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(--tone-neutral-06,158 158 158)));box-sizing:border-box;cursor:pointer;display:inline-flex;flex-shrink:0;height:min-content;padding:var(--mds-input-switch-box-padding,var(--mds-input-switch-box-padding-md,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(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)))}.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(--tone-neutral,0 0 0)));-webkit-box-shadow:var(--shadow);box-shadow:var(--shadow);display:flex;height:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}.field:checked+.switch-container .switch{background-color:var(--mds-input-switch-box-color-enabled-checked,rgb(var(--variant-primary-04,184 208 255)))}.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(--tone-neutral,0 0 0)))}.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(--tone-neutral-10,60 60 60)))}.field:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-unchecked,rgb(var(--tone-neutral-08,107 107 107)))}.field:checked:disabled+.switch-container .switch{background-color:var(--mds-input-switch-box-color-disabled-checked,rgb(var(--tone-neutral-08,107 107 107)))}.field:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-unchecked,rgb(var(--tone-neutral,0 0 0)))}.field:checked:disabled+.switch-container .switch-toggle{background-color:var(--mds-input-switch-toggle-color-disabled-checked,rgb(var(--tone-neutral,0 0 0)))}@keyframes check{0%{transform:translate(0);width:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}}@keyframes uncheck{0%{transform:translate(100%);width:var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,calc(var(--spacing,.0025rem)*600)))}50%{transform:translate(0);width:calc(var(--mds-input-switch-toggle-size,var(--mds-input-switch-toggle-size-md,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,var(--mds-input-switch-toggle-size-md,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(--tone-neutral-06,158 158 158)));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(--variant-primary-04,184 208 255)));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(--tone-neutral-06,158 158 158)))}.field:disabled+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--tone-neutral-06,158 158 158)))}.field:disabled:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate-disabled,rgb(var(--tone-neutral-05,197 197 197)))}.field:indeterminate+.label-icon .icon-checked{fill:var(--mds-input-switch-icon-color-indeterminate,rgb(var(--tone-neutral-05,197 197 197)));transform:scale(1)}:host([explicit]:not([disabled]):not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked,rgb(var(--tone-neutral-06,158 158 158)))}:host([explicit][checked]:not([disabled])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked,rgb(var(--variant-primary-04,184 208 255)))}:host([explicit][checked][disabled]){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-checked-disabled,rgb(var(--tone-neutral-06,158 158 158)))}:host([explicit][disabled]:not([checked])){--mds-input-switch-icon-explicit-color:var(--mds-input-switch-icon-color-unchecked-disabled,rgb(var(--tone-neutral-06,158 158 158)))}:host([pref-theme=dark]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-icon-color-checked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-06,90 147 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158))}: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-theme])),:host([pref-theme=system]:not([pref-theme-scheme=light])){--mds-input-switch-box-color-enabled-checked:rgb(var(--variant-primary-04,184 208 255));--mds-input-switch-box-color-enabled-unchecked:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-box-color-disabled-checked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-box-color-disabled-unchecked:rgb(var(--tone-neutral-08,107 107 107));--mds-input-switch-toggle-color-enabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-enabled-unchecked:rgb(var(--tone-neutral-10,60 60 60));--mds-input-switch-toggle-color-disabled-checked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-toggle-color-disabled-unchecked:rgb(var(--tone-neutral,0 0 0));--mds-input-switch-icon-color-checked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-checked:rgb(var(--variant-primary-06,90 147 255));--mds-input-switch-icon-color-indeterminate-disabled:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-indeterminate:rgb(var(--tone-neutral-05,197 197 197));--mds-input-switch-icon-color-unchecked-disabled:rgb(var(--tone-neutral-06,158 158 158));--mds-input-switch-icon-color-unchecked:rgb(var(--tone-neutral-06,158 158 158))}}'}},[321,"mds-input-switch",{autofocus:[516],checked:[1540],disabled:[1540],explicit:[516],icon:[513],indeterminate:[1540],name:[513],size:[513],type:[513],typography:[513],variant:[513],value:[1537],prefTheme:[32],prefThemeScheme:[32],dirty:[32],hasText:[32],language:[32],updateLang:[64]},void 0,{disabled:[{disabledChanged:0}],checked:[{checkedChanged:0}],explicit:[{explicitChanged:0}]}]);function f(){"undefined"!=typeof customElements&&["mds-input-switch","mds-icon","mds-text"].forEach((i=>{switch(i){case"mds-input-switch":customElements.get(c(i))||customElements.define(c(i),k);break;case"mds-icon":customElements.get(c(i))||m();break;case"mds-text":customElements.get(c(i))||u()}}))}export{k as M,f as d}