@luzmo/lucero 1.0.1-alpha.9 → 1.0.2

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 (487) hide show
  1. package/README.md +74 -9
  2. package/components/accordion/index.cjs +1 -26
  3. package/components/accordion/index.js +8 -164
  4. package/components/accordion-BHBIfsLU.cjs +43 -0
  5. package/components/accordion-DC7cjb1c.js +152 -0
  6. package/components/action-bar/index.cjs +1 -22
  7. package/components/action-bar/index.js +8 -90
  8. package/components/action-bar-BMHZ4e_p.cjs +39 -0
  9. package/components/action-bar-CmLjsljR.js +92 -0
  10. package/components/action-button/index.cjs +1 -7
  11. package/components/action-button/index.js +8 -144
  12. package/components/action-button-B4_UEJle.js +121 -0
  13. package/components/action-button-G0PWSrZo.cjs +24 -0
  14. package/components/action-group/index.cjs +1 -1
  15. package/components/action-group/index.js +11 -12
  16. package/components/action-group-CH8FTW0i.cjs +20 -0
  17. package/components/action-group-DYKpp-mz.js +211 -0
  18. package/components/action-menu/index.cjs +1 -39
  19. package/components/action-menu/index.js +8 -109
  20. package/components/action-menu-CJyB0mmO.cjs +56 -0
  21. package/components/action-menu-FiS1vhW7.js +105 -0
  22. package/components/avatar/avatar.d.ts +5 -0
  23. package/components/avatar/index.cjs +1 -7
  24. package/components/avatar/index.js +8 -64
  25. package/components/avatar-CyY_ZSD0.js +65 -0
  26. package/components/avatar-PulwjkMI.cjs +24 -0
  27. package/components/badge/badge.d.ts +35 -0
  28. package/components/{random-id-CqvckpWe.cjs → badge/index.cjs} +1 -1
  29. package/components/badge/index.d.ts +8 -0
  30. package/components/badge/index.js +25 -0
  31. package/components/badge-D1Ry32wi.cjs +23 -0
  32. package/components/badge-D6p2hPj8.js +94 -0
  33. package/components/button/button-base.d.ts +16 -0
  34. package/components/button/button.d.ts +38 -2
  35. package/components/button/index.cjs +1 -3
  36. package/components/button/index.js +9 -110
  37. package/components/button-CRNRP8P0.js +115 -0
  38. package/components/button-D3ZTogni.cjs +20 -0
  39. package/components/button-base-BYV3Lp3P.cjs +25 -0
  40. package/components/button-base-SHgEJgk2.js +123 -0
  41. package/components/button-group/index.cjs +1 -1
  42. package/components/button-group/index.js +8 -42
  43. package/components/button-group-CJVpgiLq.js +46 -0
  44. package/components/button-group-rEK_YaF3.cjs +18 -0
  45. package/components/calendar/calendar.d.ts +67 -0
  46. package/components/calendar/index.cjs +1 -1
  47. package/components/calendar/index.d.ts +1 -0
  48. package/components/calendar/index.js +8 -11
  49. package/components/calendar-CKr5T_zV.js +619 -0
  50. package/components/calendar-WRhzTEyZ.cjs +142 -0
  51. package/components/chat-message/chat-message.d.ts +139 -0
  52. package/components/{random-id-ByCz1xaq.js → chat-message/index.cjs} +1 -9
  53. package/components/chat-message/index.d.ts +8 -0
  54. package/components/chat-message/index.js +25 -0
  55. package/components/chat-message-CNE-mGuP.cjs +149 -0
  56. package/components/chat-message-DJgocVNj.js +2295 -0
  57. package/components/chat-message-group/chat-message-group.d.ts +50 -0
  58. package/components/{when-CDZyJPvd.cjs → chat-message-group/index.cjs} +1 -5
  59. package/components/chat-message-group/index.d.ts +7 -0
  60. package/components/chat-message-group/index.js +25 -0
  61. package/components/chat-message-group-B4U2MzHx.js +100 -0
  62. package/components/chat-message-group-COmhCN-R.cjs +24 -0
  63. package/components/checkbox/checkbox.d.ts +7 -0
  64. package/components/checkbox/index.cjs +1 -8
  65. package/components/checkbox/index.js +8 -79
  66. package/components/checkbox-CPS-tR_i.js +89 -0
  67. package/components/checkbox-DFwDrIdY.cjs +25 -0
  68. package/components/checkbox-mixin-C5sLMo5L.js +67 -0
  69. package/components/{checkbox-mixin-BDN0dBtS.cjs → checkbox-mixin-D4HeLrMj.cjs} +3 -3
  70. package/components/chunk-D-qHiVGv.cjs +18 -0
  71. package/components/close-button-BeXYep8K.js +42 -0
  72. package/components/close-button-BzapEpcF.cjs +18 -0
  73. package/components/color-area/index.cjs +1 -63
  74. package/components/color-area/index.js +8 -364
  75. package/components/color-area-DA3ps2-c.cjs +80 -0
  76. package/components/color-area-DViRjuKo.js +300 -0
  77. package/components/color-controller-DueaXfnX.cjs +18 -0
  78. package/components/color-controller-G2_v2xSl.js +247 -0
  79. package/components/color-field/color-field.d.ts +1 -0
  80. package/components/color-field/index.cjs +1 -6
  81. package/components/color-field/index.js +8 -68
  82. package/components/color-field-CxdIoSq6.js +75 -0
  83. package/components/color-field-D7_7z2A2.cjs +23 -0
  84. package/components/color-handle/index.cjs +1 -7
  85. package/components/color-handle/index.js +8 -56
  86. package/components/color-handle-BOusOFFx.js +62 -0
  87. package/components/color-handle-Cka48yPY.cjs +24 -0
  88. package/components/color-loupe/index.cjs +1 -1
  89. package/components/color-loupe/index.js +11 -12
  90. package/components/color-loupe-DMk8uWZW.cjs +56 -0
  91. package/components/color-loupe-bEzi2P0y.js +76 -0
  92. package/components/color-menu/index.cjs +1 -69
  93. package/components/color-menu/index.js +8 -189
  94. package/components/color-menu-DwbTxeqv.cjs +89 -0
  95. package/components/color-menu-Lxc9PTzl.js +183 -0
  96. package/components/color-palette/index.cjs +1 -1
  97. package/components/color-palette/index.js +8 -71
  98. package/components/color-palette-349EkPMg.cjs +18 -0
  99. package/components/color-palette-BAdaNySC.js +80 -0
  100. package/components/color-palette-group/index.cjs +1 -11
  101. package/components/color-palette-group/index.js +8 -188
  102. package/components/color-palette-group-BvP09zmT.cjs +28 -0
  103. package/components/color-palette-group-D8Mavsd2.js +163 -0
  104. package/components/color-picker/color-picker.d.ts +3 -3
  105. package/components/color-picker/index.cjs +1 -31
  106. package/components/color-picker/index.js +8 -128
  107. package/components/color-picker-CSWiU-X5.cjs +48 -0
  108. package/components/color-picker-DqjfTvYf.js +126 -0
  109. package/components/color-slider/index.cjs +1 -1
  110. package/components/color-slider/index.js +8 -11
  111. package/components/color-slider-DxjJ72ue.cjs +57 -0
  112. package/components/color-slider-ihAIFt5p.js +421 -0
  113. package/components/{condition-attribute-with-id-Dv4lSRbe.js → condition-attribute-with-id-DauPaLSS.cjs} +1 -14
  114. package/components/{query-assigned-nodes-C76XVPWY.js → condition-attribute-with-id-Duo51HZ7.js} +10 -18
  115. package/components/date-range-picker/date-range-picker.d.ts +184 -0
  116. package/components/{if-defined-C9YGdo33.cjs → date-range-picker/index.cjs} +1 -5
  117. package/components/date-range-picker/index.d.ts +8 -0
  118. package/components/date-range-picker/index.js +25 -0
  119. package/components/date-range-picker/types.d.ts +16 -0
  120. package/components/date-range-picker-BdRQep--.js +626 -0
  121. package/components/date-range-picker-CgitOe0i.cjs +187 -0
  122. package/components/date-time-picker/date-time-picker.d.ts +3 -3
  123. package/components/date-time-picker/index.cjs +1 -88
  124. package/components/date-time-picker/index.d.ts +1 -0
  125. package/components/date-time-picker/index.js +8 -1109
  126. package/components/date-time-picker/{types.d.ts → shared/types.d.ts} +1 -1
  127. package/components/date-time-picker-Bz8XwSOR.cjs +105 -0
  128. package/components/date-time-picker-Ct_ln8Ot.js +470 -0
  129. package/components/decorate-B2wePfNm.cjs +18 -0
  130. package/components/decorate-aGxJUVxg.js +91 -0
  131. package/components/{condition-attribute-with-id-DrQYZzFS.cjs → dependency-manger-CHy9t__e.cjs} +1 -1
  132. package/components/dependency-manger-DMrulWcJ.js +40 -0
  133. package/components/divider/index.cjs +1 -1
  134. package/components/divider/index.js +8 -44
  135. package/components/divider-Dn8XqbB6.cjs +18 -0
  136. package/components/divider-cU0lVwOp.js +59 -0
  137. package/components/divider.module-C65RfSUa.js +21 -0
  138. package/components/divider.module-CL60P_z8.cjs +18 -0
  139. package/components/element-resolution-Bs1x89vU.js +80 -0
  140. package/components/element-resolution-C0aiOB0Y.cjs +18 -0
  141. package/components/field-group/index.cjs +1 -1
  142. package/components/field-group/index.js +11 -12
  143. package/components/field-group-C7ROsWq3.js +57 -0
  144. package/components/field-group-OcI5Lgu7.cjs +23 -0
  145. package/components/field-label/index.cjs +1 -1
  146. package/components/field-label/index.js +11 -12
  147. package/components/field-label-BCl6R1uO.cjs +25 -0
  148. package/components/field-label-CtGCEmdp.js +87 -0
  149. package/components/focus-group-BshI1RpM.js +164 -0
  150. package/components/focus-group-SF8Kj7iB.cjs +18 -0
  151. package/components/focus-visible-B0NNezGc.cjs +18 -0
  152. package/components/focus-visible-CrooVCUu.js +58 -0
  153. package/components/focusable-BmS8IzhH.js +117 -0
  154. package/components/focusable-CupEoHmn.cjs +18 -0
  155. package/components/{base-BjTwmyRF.cjs → focusable-selectors-5n5liBn0.cjs} +1 -5
  156. package/components/{focusable-selectors-BgFlyFcY.cjs → focusable-selectors-Bg60_Kra.js} +13 -1
  157. package/components/{state-Deh-vKYE.js → get-label-from-slot-5vVnfSgN.js} +7 -11
  158. package/components/get-label-from-slot-LO_DZP60.cjs +18 -0
  159. package/components/icon/index.cjs +1 -1
  160. package/components/icon/index.js +8 -71
  161. package/components/icon-B7hKwn_q.cjs +18 -0
  162. package/components/icon-CwBAE1eU.js +59 -0
  163. package/components/index.cjs +1 -1
  164. package/components/index.js +78 -176
  165. package/components/infield-button/index.cjs +1 -5
  166. package/components/infield-button/index.js +8 -47
  167. package/components/infield-button-B2z0dLzq.js +54 -0
  168. package/components/infield-button-BVKotWqr.cjs +22 -0
  169. package/components/label/index.cjs +1 -1
  170. package/components/label/index.js +8 -34
  171. package/components/label-ClJE2esm.js +41 -0
  172. package/components/label-CqolZbJo.cjs +18 -0
  173. package/components/language-resolution-BYemISJC.cjs +18 -0
  174. package/components/language-resolution-BpfGTC29.js +43 -0
  175. package/components/like-anchor-BZJXts_H.cjs +32 -0
  176. package/components/like-anchor-DeOXX-MX.js +46 -0
  177. package/components/manage-help-text-CF0xBh0F.js +81 -0
  178. package/components/manage-help-text-D9VbYRf_.cjs +30 -0
  179. package/components/menu/index.cjs +1 -66
  180. package/components/menu/index.js +8 -879
  181. package/components/menu/menu-item.d.ts +8 -1
  182. package/components/menu/menu.d.ts +1 -0
  183. package/components/menu--ukVtSq7.js +749 -0
  184. package/components/menu-DAA51y45.cjs +108 -0
  185. package/components/multi-language-field/index.cjs +1 -22
  186. package/components/multi-language-field/index.js +8 -131
  187. package/components/multi-language-field/multi-language-field.d.ts +1 -0
  188. package/components/multi-language-field-BzY75rOY.js +122 -0
  189. package/components/multi-language-field-DmoMyCBH.cjs +40 -0
  190. package/components/number-field/index.cjs +1 -40
  191. package/components/number-field/index.js +8 -453
  192. package/components/number-field/number-field.d.ts +145 -0
  193. package/components/number-field-B4RSFeTR.cjs +57 -0
  194. package/components/number-field-C66dTUMM.js +402 -0
  195. package/components/observe-slot-presence-BCqd3VSd.js +55 -0
  196. package/components/observe-slot-presence-Dx8hzNzK.cjs +18 -0
  197. package/components/observe-slot-text-BhTcGuHY.cjs +18 -0
  198. package/components/observe-slot-text-Ddf1OC6F.js +71 -0
  199. package/components/options/index.cjs +1 -84
  200. package/components/options/index.js +8 -1160
  201. package/components/options/option.d.ts +16 -0
  202. package/components/options/options.d.ts +44 -4
  203. package/components/options-BPNAm4MW.cjs +101 -0
  204. package/components/options-Dz-ejkxF.js +484 -0
  205. package/components/overlay/index.cjs +1 -56
  206. package/components/overlay/index.js +10 -329
  207. package/components/overlay/overlay.d.ts +12 -1
  208. package/components/overlay/virtual-trigger.d.ts +3 -2
  209. package/components/overlay-8tN0KPbR.js +1115 -0
  210. package/components/overlay-CMd2Dnpv.cjs +73 -0
  211. package/components/overlay-CwR_36OV.js +227 -0
  212. package/components/overlay-DdrfkOry.cjs +47 -0
  213. package/components/pending-state-DFcNf5rd.js +50 -0
  214. package/components/{pending-state-CaH1si5b.cjs → pending-state-DIeF18qg.cjs} +4 -3
  215. package/components/picker/index.cjs +1 -1
  216. package/components/picker/index.js +11 -15
  217. package/components/picker/picker.d.ts +1 -0
  218. package/components/picker-C4RVOxLq.cjs +123 -0
  219. package/components/picker-agQW7YNo.js +394 -0
  220. package/components/picker-button/index.cjs +1 -20
  221. package/components/picker-button/index.js +8 -70
  222. package/components/picker-button-BLbeT3Yu.js +72 -0
  223. package/components/picker-button-D34YXyXp.cjs +37 -0
  224. package/components/platform-B7Sk7Qon.cjs +18 -0
  225. package/components/{platform-BM-uMWpX.js → platform-D4V_cOJF.js} +29 -38
  226. package/components/popover/index.cjs +1 -1
  227. package/components/popover/index.js +11 -12
  228. package/components/popover-DyC9xGhX.js +58 -0
  229. package/components/popover-dgL04x6P.cjs +30 -0
  230. package/components/progress-bar/index.cjs +18 -0
  231. package/components/progress-bar/index.d.ts +7 -0
  232. package/components/progress-bar/index.js +25 -0
  233. package/components/progress-bar/progress-bar.d.ts +34 -0
  234. package/components/progress-bar-BR28tISC.cjs +31 -0
  235. package/components/progress-bar-DHgFRml1.js +119 -0
  236. package/components/progress-circle/index.cjs +1 -1
  237. package/components/progress-circle/index.js +11 -12
  238. package/components/progress-circle-Cg_ua9Ff.js +78 -0
  239. package/components/progress-circle-DuzwUiGN.cjs +33 -0
  240. package/components/progress-steps/index.cjs +18 -0
  241. package/components/progress-steps/index.d.ts +8 -0
  242. package/components/progress-steps/index.js +25 -0
  243. package/components/progress-steps/progress-steps.d.ts +148 -0
  244. package/components/progress-steps/types.d.ts +32 -0
  245. package/components/progress-steps-Da8aZWx3.js +262 -0
  246. package/components/progress-steps-WriXaZpE.cjs +96 -0
  247. package/components/prompt-box/controllers/attachments-controller.d.ts +35 -0
  248. package/components/prompt-box/controllers/recording-controller.d.ts +23 -0
  249. package/components/prompt-box/controllers/rich-input-controller.d.ts +89 -0
  250. package/components/prompt-box/controllers/trigger-menu-controller.d.ts +107 -0
  251. package/components/prompt-box/index.cjs +18 -0
  252. package/components/prompt-box/index.d.ts +9 -0
  253. package/components/prompt-box/index.js +25 -0
  254. package/components/prompt-box/keyboard-focus-tracker.d.ts +3 -0
  255. package/components/prompt-box/prompt-box-templates.d.ts +10 -0
  256. package/components/prompt-box/prompt-box.d.ts +194 -0
  257. package/components/prompt-box/range-from-point.d.ts +21 -0
  258. package/components/prompt-box/selection-utils.d.ts +39 -0
  259. package/components/prompt-box/slot-state-sync.d.ts +10 -0
  260. package/components/prompt-box/types.d.ts +112 -0
  261. package/components/prompt-box-BEloQP-R.js +1506 -0
  262. package/components/prompt-box-DV8Smf3Q.cjs +282 -0
  263. package/components/radio/index.cjs +1 -5
  264. package/components/radio/index.js +8 -174
  265. package/components/radio-BzEPGUmQ.js +141 -0
  266. package/components/radio-d-2GUbYE.cjs +22 -0
  267. package/components/{if-defined-DOaE2coe.js → random-id-B51lUxUB.cjs} +1 -10
  268. package/components/{when-CDK1Tt5Y.js → random-id-Dd4boCPV.js} +5 -10
  269. package/components/{focusable-selectors-B4YgbghQ.js → rolldown-runtime-CAFD8bLK.js} +10 -13
  270. package/components/roving-tabindex-B7x5ePUB.cjs +18 -0
  271. package/components/roving-tabindex-BP6mQbXf.js +62 -0
  272. package/components/{directive-oAbCiebi.js → scaled-indicator-BcO2BOsf.js} +24 -26
  273. package/components/scaled-indicator-p8-3k2cJ.cjs +26 -0
  274. package/components/search/index.cjs +1 -28
  275. package/components/search/index.js +8 -114
  276. package/components/search-CmLfd2dF.js +94 -0
  277. package/components/search-DRTD4xsE.cjs +45 -0
  278. package/components/segments-factory-CHo9oQw7.cjs +18 -0
  279. package/components/segments-factory-D0IveW-q.js +417 -0
  280. package/components/select/index.cjs +1 -140
  281. package/components/select/index.js +8 -602
  282. package/components/select/select.d.ts +26 -17
  283. package/components/select--vrG59GQ.cjs +158 -0
  284. package/components/select-DPeI0jP9.js +518 -0
  285. package/components/{language-resolution-8yZa5r_P.js → sized-mixin-DaBoZkVS.js} +38 -35
  286. package/components/sized-mixin-StFA4y0J.cjs +18 -0
  287. package/components/skeleton-loader/index.cjs +18 -0
  288. package/components/skeleton-loader/index.d.ts +7 -0
  289. package/components/skeleton-loader/index.js +25 -0
  290. package/components/skeleton-loader/skeleton-loader.d.ts +22 -0
  291. package/components/skeleton-loader-B8NgELvX.cjs +18 -0
  292. package/components/skeleton-loader-C1XG3m_u.js +46 -0
  293. package/components/slider/index.cjs +1 -1
  294. package/components/slider/index.js +8 -1141
  295. package/components/slider/slider.d.ts +2 -0
  296. package/components/slider-3QBnq0S8.js +96 -0
  297. package/components/slider-uXRKcOz5.cjs +18 -0
  298. package/components/slottable-request-event-DZ2Z_BLk.js +29 -0
  299. package/components/{base-D76d76ww.js → slottable-request-event-gAcEQan2.cjs} +1 -9
  300. package/components/status-light/index.cjs +18 -0
  301. package/components/status-light/index.d.ts +8 -0
  302. package/components/status-light/index.js +25 -0
  303. package/components/status-light/status-light.d.ts +26 -0
  304. package/components/status-light-Bf8jGu4G.js +85 -0
  305. package/components/status-light-CBaAFRUc.cjs +21 -0
  306. package/components/strategies-DhxJGIZT.js +137 -0
  307. package/components/strategies-kuvLVIKO.cjs +18 -0
  308. package/components/streaming-listener-2NcP7ys7.js +77 -0
  309. package/components/streaming-listener-BnDW38lt.cjs +18 -0
  310. package/components/suggestion/index.cjs +18 -0
  311. package/components/suggestion/index.d.ts +8 -0
  312. package/components/suggestion/index.js +25 -0
  313. package/components/suggestion/suggestion.d.ts +45 -0
  314. package/components/suggestion-CEJiW_7y.cjs +23 -0
  315. package/components/suggestion-DK5gxxDI.js +76 -0
  316. package/components/swatch/index.cjs +1 -32
  317. package/components/swatch/index.js +8 -325
  318. package/components/swatch-BLuV-hlF.js +271 -0
  319. package/components/swatch-G70JUe6I.cjs +49 -0
  320. package/components/switch/index.cjs +1 -5
  321. package/components/switch/index.js +8 -56
  322. package/components/switch-BdE-hI69.js +60 -0
  323. package/components/switch-KzkrF-ob.cjs +22 -0
  324. package/components/tabs/index.cjs +1 -76
  325. package/components/tabs/index.js +8 -619
  326. package/components/tabs/tabs.d.ts +3 -9
  327. package/components/tabs-BfTgzdid.cjs +76 -0
  328. package/components/tabs-BthdwrmW.js +434 -0
  329. package/components/tags/index.cjs +1 -15
  330. package/components/tags/index.d.ts +1 -0
  331. package/components/tags/index.js +8 -156
  332. package/components/tags/tag.d.ts +28 -0
  333. package/components/tags/tags.d.ts +3 -1
  334. package/components/tags-B89eYzsB.js +203 -0
  335. package/components/tags-OBPAvjdV.cjs +47 -0
  336. package/components/text-field/index.cjs +1 -4
  337. package/components/text-field/index.js +9 -45
  338. package/components/text-field/text-field.d.ts +27 -0
  339. package/components/text-field-A4Obzs4l.cjs +21 -0
  340. package/components/text-field-BoGAvXvh.js +44 -0
  341. package/components/text-field-Cs8HYRYL.js +256 -0
  342. package/components/text-field-FJr8ZUhI.cjs +81 -0
  343. package/components/text-field.module-Btsve-VN.js +21 -0
  344. package/components/text-field.module-D5oDP7MB.cjs +18 -0
  345. package/components/toast/index.cjs +1 -34
  346. package/components/toast/index.js +8 -136
  347. package/components/toast-CJSQUzoW.cjs +51 -0
  348. package/components/toast-DKwphMrp.js +133 -0
  349. package/components/tooltip/index.cjs +1 -28
  350. package/components/tooltip/index.js +8 -205
  351. package/components/tooltip/tooltip.d.ts +12 -1
  352. package/components/tooltip-C3O4AQ1l.js +192 -0
  353. package/components/tooltip-DY1trLtg.cjs +45 -0
  354. package/components/top-nav/index.cjs +18 -0
  355. package/components/top-nav/index.d.ts +10 -0
  356. package/components/top-nav/index.js +25 -0
  357. package/components/top-nav/top-nav-item.d.ts +26 -0
  358. package/components/top-nav/top-nav.d.ts +45 -0
  359. package/components/top-nav-DVQ5ASMa.js +203 -0
  360. package/components/top-nav-DlTojz8S.cjs +45 -0
  361. package/components/utils.cjs +1 -1
  362. package/components/utils.js +8 -25
  363. package/components/voice-recorder-477xPHRU.js +134 -0
  364. package/components/voice-recorder-BUtmSvPO.cjs +18 -0
  365. package/custom-elements.json +1 -1
  366. package/index.d.ts +11 -1
  367. package/package.json +134 -5
  368. package/utils/button-interaction-controllers/interaction-controller.d.ts +1 -1
  369. package/utils/index.d.ts +1 -0
  370. package/utils/scaled-indicator.d.ts +8 -0
  371. package/utils/voice-recorder.d.ts +121 -0
  372. package/components/NumberFormatter-DewVDY5w.cjs +0 -18
  373. package/components/NumberFormatter-DgOUVrge.js +0 -136
  374. package/components/NumberParser-Dik4a0h-.cjs +0 -18
  375. package/components/NumberParser-ci9J5EKv.js +0 -173
  376. package/components/action-group-DBImibFn.js +0 -258
  377. package/components/action-group-DJGMcRHb.cjs +0 -20
  378. package/components/async-directive-BX1T1e1_.cjs +0 -22
  379. package/components/async-directive-BfcqVjDp.js +0 -82
  380. package/components/base-CBCg3yyw.cjs +0 -40
  381. package/components/base-WsynuqaS.js +0 -677
  382. package/components/button-base-DbkDzb71.js +0 -144
  383. package/components/button-base-XgPLmwP-.cjs +0 -25
  384. package/components/checkbox-mixin-Do7EgtpQ.js +0 -70
  385. package/components/class-map-Di1D_rCm.cjs +0 -22
  386. package/components/class-map-NbVXqBU0.js +0 -51
  387. package/components/clear-button-DQcRdcUa.js +0 -53
  388. package/components/clear-button-OFUFFe7G.cjs +0 -18
  389. package/components/close-button-Cbnb7XXj.cjs +0 -18
  390. package/components/close-button-CqHYZhum.js +0 -51
  391. package/components/color-controller-DTp1juRz.js +0 -3198
  392. package/components/color-controller-_ZwyhvaU.cjs +0 -18
  393. package/components/color-loupe-CaA_Lfkk.cjs +0 -56
  394. package/components/color-loupe-CmMsXbjT.js +0 -81
  395. package/components/dependency-manger-C5HCkMMB.cjs +0 -18
  396. package/components/dependency-manger-CEXvGQUV.js +0 -54
  397. package/components/directive-C7oCP5Bh.cjs +0 -22
  398. package/components/directive-helpers-Cm6gitnu.js +0 -62
  399. package/components/directive-helpers-DyIRTWwA.cjs +0 -22
  400. package/components/divider.module-DDvBo9zo.cjs +0 -18
  401. package/components/divider.module-DoQWQEIJ.js +0 -21
  402. package/components/element-resolution-BvRLGqIU.cjs +0 -18
  403. package/components/element-resolution-FCUT-wql.js +0 -91
  404. package/components/field-group-DXfBWrkO.js +0 -66
  405. package/components/field-group-DkGst3r5.cjs +0 -23
  406. package/components/field-label-CZ2zzChK.js +0 -106
  407. package/components/field-label-mO1AkUgR.cjs +0 -25
  408. package/components/flow-D-0MTYCm.js +0 -527
  409. package/components/flow-DM3dNAKs.cjs +0 -30
  410. package/components/focus-group-DHeTq18L.js +0 -218
  411. package/components/focus-group-DnxZUBhQ.cjs +0 -18
  412. package/components/focus-visible-B0P9aY_G.cjs +0 -18
  413. package/components/focus-visible-DBlJGoEW.js +0 -74
  414. package/components/focusable-BxtpnzWp.js +0 -153
  415. package/components/focusable-EbipgXRh.cjs +0 -18
  416. package/components/index-BwxgAdzi.cjs +0 -57
  417. package/components/index-Cl54m8Yh.js +0 -1490
  418. package/components/index-HjQa8tew.js +0 -1174
  419. package/components/index-Wq3qZJGh.cjs +0 -113
  420. package/components/language-resolution-DJzmyzZq.cjs +0 -18
  421. package/components/like-anchor-Bvn_vLQ8.js +0 -69
  422. package/components/like-anchor-sod1C1fR.cjs +0 -32
  423. package/components/luzmo-icons-4nDFv1Lq.js +0 -229
  424. package/components/luzmo-icons-D4IvHgVd.cjs +0 -29
  425. package/components/manage-help-text-DhgARkZX.cjs +0 -30
  426. package/components/manage-help-text-syYnjKGL.js +0 -92
  427. package/components/mutation-controller-DH7YOCyj.js +0 -52
  428. package/components/mutation-controller-DkOMCW-c.cjs +0 -22
  429. package/components/observe-slot-presence-CmVi0zTc.js +0 -68
  430. package/components/observe-slot-presence-bc9chhsi.cjs +0 -18
  431. package/components/observe-slot-text-BPfIQQtz.js +0 -87
  432. package/components/observe-slot-text-Ceb7SvYT.cjs +0 -18
  433. package/components/overlay-Cig9r6uU.js +0 -2747
  434. package/components/overlay-KSKMzzkh.cjs +0 -47
  435. package/components/pending-state-DTX7ggyF.js +0 -61
  436. package/components/picker-BfBP7XJN.js +0 -461
  437. package/components/picker-xIphqE6d.cjs +0 -123
  438. package/components/platform-BiXhwqk3.cjs +0 -18
  439. package/components/popover-DjX0aAnY.js +0 -67
  440. package/components/popover-KFfO0IYL.cjs +0 -30
  441. package/components/progress-circle-BvRJNuNo.cjs +0 -33
  442. package/components/progress-circle-DXH9z8-6.js +0 -97
  443. package/components/query-BL-TJj7K.cjs +0 -22
  444. package/components/query-D_KR_GUc.js +0 -51
  445. package/components/query-assigned-elements-DjfhL1cl.js +0 -36
  446. package/components/query-assigned-elements-DsKsfk7G.cjs +0 -22
  447. package/components/query-assigned-nodes-BcKWmGzy.cjs +0 -22
  448. package/components/roving-tabindex-By_fCy_e.cjs +0 -18
  449. package/components/roving-tabindex-DOg4z6ZU.js +0 -66
  450. package/components/sized-mixin-CPxE5C96.cjs +0 -18
  451. package/components/sized-mixin-D4ACoVUr.js +0 -63
  452. package/components/slottable-request-event-BfUUt1Mh.cjs +0 -18
  453. package/components/slottable-request-event-DggLA4Rx.js +0 -31
  454. package/components/state-D8JEtYqe.cjs +0 -22
  455. package/components/strategies-9indNIEb.js +0 -195
  456. package/components/strategies-BACP6MhR.cjs +0 -18
  457. package/components/streaming-listener-B00MvALi.cjs +0 -18
  458. package/components/streaming-listener-CP-JE6Fa.js +0 -91
  459. package/components/style-map-CeilmSgs.cjs +0 -22
  460. package/components/style-map-IgqIKvlE.js +0 -53
  461. package/components/text-field-BTkr42k4.cjs +0 -85
  462. package/components/text-field-ol9Ed5lQ.js +0 -314
  463. package/components/text-field.module-ColtFhf_.js +0 -21
  464. package/components/text-field.module-p_VF2tC_.cjs +0 -18
  465. package/components/unit-input/index.cjs +0 -43
  466. package/components/unit-input/index.d.ts +0 -7
  467. package/components/unit-input/index.js +0 -183
  468. package/components/unit-input/unit-input.d.ts +0 -33
  469. /package/components/date-time-picker/{helpers.d.ts → shared/helpers.d.ts} +0 -0
  470. /package/components/date-time-picker/{segments → shared/segments}/date/day-segment.d.ts +0 -0
  471. /package/components/date-time-picker/{segments → shared/segments}/date/month-segment.d.ts +0 -0
  472. /package/components/date-time-picker/{segments → shared/segments}/date/year-segment.d.ts +0 -0
  473. /package/components/date-time-picker/{segments → shared/segments}/date-time-segments.d.ts +0 -0
  474. /package/components/date-time-picker/{segments → shared/segments}/editable-segment.d.ts +0 -0
  475. /package/components/date-time-picker/{segments → shared/segments}/literal-segment.d.ts +0 -0
  476. /package/components/date-time-picker/{segments → shared/segments}/modifiers/clear-modifier.d.ts +0 -0
  477. /package/components/date-time-picker/{segments → shared/segments}/modifiers/decrement-modifier.d.ts +0 -0
  478. /package/components/date-time-picker/{segments → shared/segments}/modifiers/increment-modifier.d.ts +0 -0
  479. /package/components/date-time-picker/{segments → shared/segments}/modifiers/input-modifier.d.ts +0 -0
  480. /package/components/date-time-picker/{segments → shared/segments}/modifiers/segments-modifier.d.ts +0 -0
  481. /package/components/date-time-picker/{segments → shared/segments}/segments-factory.d.ts +0 -0
  482. /package/components/date-time-picker/{segments → shared/segments}/segments-formatter.d.ts +0 -0
  483. /package/components/date-time-picker/{segments → shared/segments}/time/day-period-segment.d.ts +0 -0
  484. /package/components/date-time-picker/{segments → shared/segments}/time/hour-segment.d.ts +0 -0
  485. /package/components/date-time-picker/{segments → shared/segments}/time/millisecond-segment.d.ts +0 -0
  486. /package/components/date-time-picker/{segments → shared/segments}/time/minute-segment.d.ts +0 -0
  487. /package/components/date-time-picker/{segments → shared/segments}/time/second-segment.d.ts +0 -0
@@ -1,1490 +0,0 @@
1
- /*! * Lucero - The design system for Luzmo.
2
- *
3
- * Copyright © 2025 Luzmo
4
- * All rights reserved.
5
- * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
- * This license allows users with a current active Luzmo account to use Lucero.
7
- * This license terminates automatically if a user no longer has an active Luzmo account.
8
- * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
- *
10
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
- * SOFTWARE.
17
- * */
18
- import { $ as de } from "./NumberFormatter-DgOUVrge.js";
19
- import { a as Be, r as Ae, x as g, n as F } from "./base-WsynuqaS.js";
20
- import { e as Re } from "./class-map-NbVXqBU0.js";
21
- import { o as Oe } from "./if-defined-DOaE2coe.js";
22
- import { S as Pe } from "./sized-mixin-D4ACoVUr.js";
23
- import "./action-button/index.js";
24
- import "./icon/index.js";
25
- import { k as We, S as Ye } from "./luzmo-icons-4nDFv1Lq.js";
26
- import { r as D } from "./state-Deh-vKYE.js";
27
- function Z(t, e) {
28
- return t - e * Math.floor(t / e);
29
- }
30
- const ye = 1721426;
31
- function R(t, e, a, r) {
32
- e = X(t, e);
33
- let n = e - 1, o = -2;
34
- return a <= 2 ? o = 0 : W(e) && (o = -1), ye - 1 + 365 * n + Math.floor(n / 4) - Math.floor(n / 100) + Math.floor(n / 400) + Math.floor((367 * a - 362) / 12 + o + r);
35
- }
36
- function W(t) {
37
- return t % 4 === 0 && (t % 100 !== 0 || t % 400 === 0);
38
- }
39
- function X(t, e) {
40
- return t === "BC" ? 1 - e : e;
41
- }
42
- function Ne(t) {
43
- let e = "AD";
44
- return t <= 0 && (e = "BC", t = 1 - t), [
45
- e,
46
- t
47
- ];
48
- }
49
- const He = {
50
- standard: [
51
- 31,
52
- 28,
53
- 31,
54
- 30,
55
- 31,
56
- 30,
57
- 31,
58
- 31,
59
- 30,
60
- 31,
61
- 30,
62
- 31
63
- ],
64
- leapyear: [
65
- 31,
66
- 29,
67
- 31,
68
- 30,
69
- 31,
70
- 30,
71
- 31,
72
- 31,
73
- 30,
74
- 31,
75
- 30,
76
- 31
77
- ]
78
- };
79
- class I {
80
- fromJulianDay(e) {
81
- let a = e, r = a - ye, n = Math.floor(r / 146097), o = Z(r, 146097), l = Math.floor(o / 36524), d = Z(o, 36524), i = Math.floor(d / 1461), f = Z(d, 1461), M = Math.floor(f / 365), k = n * 400 + l * 100 + i * 4 + M + (l !== 4 && M !== 4 ? 1 : 0), [C, $] = Ne(k), b = a - R(C, $, 1, 1), U = 2;
82
- a < R(C, $, 3, 1) ? U = 0 : W($) && (U = 1);
83
- let le = Math.floor(((b + U) * 12 + 373) / 367), Fe = a - R(C, $, le, 1) + 1;
84
- return new S(C, $, le, Fe);
85
- }
86
- toJulianDay(e) {
87
- return R(e.era, e.year, e.month, e.day);
88
- }
89
- getDaysInMonth(e) {
90
- return He[W(e.year) ? "leapyear" : "standard"][e.month - 1];
91
- }
92
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
93
- getMonthsInYear(e) {
94
- return 12;
95
- }
96
- getDaysInYear(e) {
97
- return W(e.year) ? 366 : 365;
98
- }
99
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
100
- getYearsInEra(e) {
101
- return 9999;
102
- }
103
- getEras() {
104
- return [
105
- "BC",
106
- "AD"
107
- ];
108
- }
109
- isInverseEra(e) {
110
- return e.era === "BC";
111
- }
112
- balanceDate(e) {
113
- e.year <= 0 && (e.era = e.era === "BC" ? "AD" : "BC", e.year = 1 - e.year);
114
- }
115
- constructor() {
116
- this.identifier = "gregory";
117
- }
118
- }
119
- const Le = {
120
- "001": 1,
121
- AD: 1,
122
- AE: 6,
123
- AF: 6,
124
- AI: 1,
125
- AL: 1,
126
- AM: 1,
127
- AN: 1,
128
- AR: 1,
129
- AT: 1,
130
- AU: 1,
131
- AX: 1,
132
- AZ: 1,
133
- BA: 1,
134
- BE: 1,
135
- BG: 1,
136
- BH: 6,
137
- BM: 1,
138
- BN: 1,
139
- BY: 1,
140
- CH: 1,
141
- CL: 1,
142
- CM: 1,
143
- CN: 1,
144
- CR: 1,
145
- CY: 1,
146
- CZ: 1,
147
- DE: 1,
148
- DJ: 6,
149
- DK: 1,
150
- DZ: 6,
151
- EC: 1,
152
- EE: 1,
153
- EG: 6,
154
- ES: 1,
155
- FI: 1,
156
- FJ: 1,
157
- FO: 1,
158
- FR: 1,
159
- GB: 1,
160
- GE: 1,
161
- GF: 1,
162
- GP: 1,
163
- GR: 1,
164
- HR: 1,
165
- HU: 1,
166
- IE: 1,
167
- IQ: 6,
168
- IR: 6,
169
- IS: 1,
170
- IT: 1,
171
- JO: 6,
172
- KG: 1,
173
- KW: 6,
174
- KZ: 1,
175
- LB: 1,
176
- LI: 1,
177
- LK: 1,
178
- LT: 1,
179
- LU: 1,
180
- LV: 1,
181
- LY: 6,
182
- MC: 1,
183
- MD: 1,
184
- ME: 1,
185
- MK: 1,
186
- MN: 1,
187
- MQ: 1,
188
- MV: 5,
189
- MY: 1,
190
- NL: 1,
191
- NO: 1,
192
- NZ: 1,
193
- OM: 6,
194
- PL: 1,
195
- QA: 6,
196
- RE: 1,
197
- RO: 1,
198
- RS: 1,
199
- RU: 1,
200
- SD: 6,
201
- SE: 1,
202
- SI: 1,
203
- SK: 1,
204
- SM: 1,
205
- SY: 6,
206
- TJ: 1,
207
- TM: 1,
208
- TR: 1,
209
- UA: 1,
210
- UY: 1,
211
- UZ: 1,
212
- VA: 1,
213
- VN: 1,
214
- XK: 1
215
- };
216
- function p(t, e) {
217
- return e = u(e, t.calendar), t.era === e.era && t.year === e.year && t.month === e.month && t.day === e.day;
218
- }
219
- function x(t, e) {
220
- return e = u(e, t.calendar), t = w(t), e = w(e), t.era === e.era && t.year === e.year && t.month === e.month;
221
- }
222
- function Ue(t, e) {
223
- var a, r, n, o;
224
- return (o = (n = (a = t.isEqual) === null || a === void 0 ? void 0 : a.call(t, e)) !== null && n !== void 0 ? n : (r = e.isEqual) === null || r === void 0 ? void 0 : r.call(e, t)) !== null && o !== void 0 ? o : t.identifier === e.identifier;
225
- }
226
- function me(t, e, a) {
227
- let r = t.calendar.toJulianDay(t), n = Ke(e), o = Math.ceil(r + 1 - n) % 7;
228
- return o < 0 && (o += 7), o;
229
- }
230
- function Ze(t) {
231
- return m(Date.now(), t);
232
- }
233
- function je(t) {
234
- return Y(Ze(t));
235
- }
236
- function ve(t, e) {
237
- return t.calendar.toJulianDay(t) - e.calendar.toJulianDay(e);
238
- }
239
- function be(t, e) {
240
- return ie(t) - ie(e);
241
- }
242
- function ie(t) {
243
- return t.hour * 36e5 + t.minute * 6e4 + t.second * 1e3 + t.millisecond;
244
- }
245
- let j = null;
246
- function ee() {
247
- return j == null && (j = new Intl.DateTimeFormat().resolvedOptions().timeZone), j;
248
- }
249
- function w(t) {
250
- return t.subtract({
251
- days: t.day - 1
252
- });
253
- }
254
- function qe(t) {
255
- return t.add({
256
- days: t.calendar.getDaysInMonth(t) - t.day
257
- });
258
- }
259
- function Ft(t) {
260
- return t.calendar.getMinimumMonthInYear ? t.calendar.getMinimumMonthInYear(t) : 1;
261
- }
262
- function Bt(t) {
263
- return t.calendar.getMinimumDayInMonth ? t.calendar.getMinimumDayInMonth(t) : 1;
264
- }
265
- function ce(t, e, a) {
266
- let r = me(t, e);
267
- return t.subtract({
268
- days: r
269
- });
270
- }
271
- const se = /* @__PURE__ */ new Map();
272
- function Ge(t) {
273
- if (Intl.Locale) {
274
- let a = se.get(t);
275
- return a || (a = new Intl.Locale(t).maximize().region, a && se.set(t, a)), a;
276
- }
277
- let e = t.split("-")[1];
278
- return e === "u" ? void 0 : e;
279
- }
280
- function Ke(t) {
281
- let e = Ge(t);
282
- return e && Le[e] || 0;
283
- }
284
- function Ve(t, e, a) {
285
- let r = t.calendar.getDaysInMonth(t);
286
- return Math.ceil((me(w(t), e) + r) / 7);
287
- }
288
- function T(t) {
289
- t = u(t, new I());
290
- let e = X(t.era, t.year);
291
- return ge(e, t.month, t.day, t.hour, t.minute, t.second, t.millisecond);
292
- }
293
- function ge(t, e, a, r, n, o, l) {
294
- let d = /* @__PURE__ */ new Date();
295
- return d.setUTCHours(r, n, o, l), d.setUTCFullYear(t, e - 1, a), d.getTime();
296
- }
297
- function V(t, e) {
298
- if (e === "UTC") return 0;
299
- if (t > 0 && e === ee()) return new Date(t).getTimezoneOffset() * -6e4;
300
- let { year: a, month: r, day: n, hour: o, minute: l, second: d } = $e(t, e);
301
- return ge(a, r, n, o, l, d, 0) - Math.floor(t / 1e3) * 1e3;
302
- }
303
- const he = /* @__PURE__ */ new Map();
304
- function $e(t, e) {
305
- let a = he.get(e);
306
- a || (a = new Intl.DateTimeFormat("en-US", {
307
- timeZone: e,
308
- hour12: !1,
309
- era: "short",
310
- year: "numeric",
311
- month: "numeric",
312
- day: "numeric",
313
- hour: "numeric",
314
- minute: "numeric",
315
- second: "numeric"
316
- }), he.set(e, a));
317
- let r = a.formatToParts(new Date(t)), n = {};
318
- for (let o of r) o.type !== "literal" && (n[o.type] = o.value);
319
- return {
320
- // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
321
- year: n.era === "BC" || n.era === "B" ? -n.year + 1 : +n.year,
322
- month: +n.month,
323
- day: +n.day,
324
- hour: n.hour === "24" ? 0 : +n.hour,
325
- minute: +n.minute,
326
- second: +n.second
327
- };
328
- }
329
- const ue = 864e5;
330
- function Je(t, e, a, r) {
331
- return (a === r ? [
332
- a
333
- ] : [
334
- a,
335
- r
336
- ]).filter((o) => Qe(t, e, o));
337
- }
338
- function Qe(t, e, a) {
339
- let r = $e(a, e);
340
- return t.year === r.year && t.month === r.month && t.day === r.day && t.hour === r.hour && t.minute === r.minute && t.second === r.second;
341
- }
342
- function y(t, e, a = "compatible") {
343
- let r = _(t);
344
- if (e === "UTC") return T(r);
345
- if (e === ee() && a === "compatible") {
346
- r = u(r, new I());
347
- let i = /* @__PURE__ */ new Date(), f = X(r.era, r.year);
348
- return i.setFullYear(f, r.month - 1, r.day), i.setHours(r.hour, r.minute, r.second, r.millisecond), i.getTime();
349
- }
350
- let n = T(r), o = V(n - ue, e), l = V(n + ue, e), d = Je(r, e, n - o, n - l);
351
- if (d.length === 1) return d[0];
352
- if (d.length > 1) switch (a) {
353
- // 'compatible' means 'earlier' for "fall back" transitions
354
- case "compatible":
355
- case "earlier":
356
- return d[0];
357
- case "later":
358
- return d[d.length - 1];
359
- case "reject":
360
- throw new RangeError("Multiple possible absolute times found");
361
- }
362
- switch (a) {
363
- case "earlier":
364
- return Math.min(n - o, n - l);
365
- // 'compatible' means 'later' for "spring forward" transitions
366
- case "compatible":
367
- case "later":
368
- return Math.max(n - o, n - l);
369
- case "reject":
370
- throw new RangeError("No such absolute time found");
371
- }
372
- }
373
- function pe(t, e, a = "compatible") {
374
- return new Date(y(t, e, a));
375
- }
376
- function m(t, e) {
377
- let a = V(t, e), r = new Date(t + a), n = r.getUTCFullYear(), o = r.getUTCMonth() + 1, l = r.getUTCDate(), d = r.getUTCHours(), i = r.getUTCMinutes(), f = r.getUTCSeconds(), M = r.getUTCMilliseconds();
378
- return new E(n < 1 ? "BC" : "AD", n < 1 ? -n + 1 : n, o, l, e, a, d, i, f, M);
379
- }
380
- function Y(t) {
381
- return new S(t.calendar, t.era, t.year, t.month, t.day);
382
- }
383
- function _(t, e) {
384
- let a = 0, r = 0, n = 0, o = 0;
385
- if ("timeZone" in t) ({ hour: a, minute: r, second: n, millisecond: o } = t);
386
- else if ("hour" in t && !e) return t;
387
- return e && ({ hour: a, minute: r, second: n, millisecond: o } = e), new N(t.calendar, t.era, t.year, t.month, t.day, a, r, n, o);
388
- }
389
- function u(t, e) {
390
- if (Ue(t.calendar, e)) return t;
391
- let a = e.fromJulianDay(t.calendar.toJulianDay(t)), r = t.copy();
392
- return r.calendar = e, r.era = a.era, r.year = a.year, r.month = a.month, r.day = a.day, z(r), r;
393
- }
394
- function Xe(t, e, a) {
395
- if (t instanceof E)
396
- return t.timeZone === e ? t : xe(t, e);
397
- let r = y(t, e, a);
398
- return m(r, e);
399
- }
400
- function et(t) {
401
- let e = T(t) - t.offset;
402
- return new Date(e);
403
- }
404
- function xe(t, e) {
405
- let a = T(t) - t.offset;
406
- return u(m(a, e), t.calendar);
407
- }
408
- const B = 36e5;
409
- function H(t, e) {
410
- let a = t.copy(), r = "hour" in a ? Me(a, e) : 0;
411
- J(a, e.years || 0), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, t), a.month += e.months || 0, Q(a), we(a), a.day += (e.weeks || 0) * 7, a.day += e.days || 0, a.day += r, tt(a), a.calendar.balanceDate && a.calendar.balanceDate(a), a.year < 1 && (a.year = 1, a.month = 1, a.day = 1);
412
- let n = a.calendar.getYearsInEra(a);
413
- if (a.year > n) {
414
- var o, l;
415
- let i = (o = (l = a.calendar).isInverseEra) === null || o === void 0 ? void 0 : o.call(l, a);
416
- a.year = n, a.month = i ? 1 : a.calendar.getMonthsInYear(a), a.day = i ? 1 : a.calendar.getDaysInMonth(a);
417
- }
418
- a.month < 1 && (a.month = 1, a.day = 1);
419
- let d = a.calendar.getMonthsInYear(a);
420
- return a.month > d && (a.month = d, a.day = a.calendar.getDaysInMonth(a)), a.day = Math.max(1, Math.min(a.calendar.getDaysInMonth(a), a.day)), a;
421
- }
422
- function J(t, e) {
423
- var a, r;
424
- !((a = (r = t.calendar).isInverseEra) === null || a === void 0) && a.call(r, t) && (e = -e), t.year += e;
425
- }
426
- function Q(t) {
427
- for (; t.month < 1; )
428
- J(t, -1), t.month += t.calendar.getMonthsInYear(t);
429
- let e = 0;
430
- for (; t.month > (e = t.calendar.getMonthsInYear(t)); )
431
- t.month -= e, J(t, 1);
432
- }
433
- function tt(t) {
434
- for (; t.day < 1; )
435
- t.month--, Q(t), t.day += t.calendar.getDaysInMonth(t);
436
- for (; t.day > t.calendar.getDaysInMonth(t); )
437
- t.day -= t.calendar.getDaysInMonth(t), t.month++, Q(t);
438
- }
439
- function we(t) {
440
- t.month = Math.max(1, Math.min(t.calendar.getMonthsInYear(t), t.month)), t.day = Math.max(1, Math.min(t.calendar.getDaysInMonth(t), t.day));
441
- }
442
- function z(t) {
443
- t.calendar.constrainDate && t.calendar.constrainDate(t), t.year = Math.max(1, Math.min(t.calendar.getYearsInEra(t), t.year)), we(t);
444
- }
445
- function te(t) {
446
- let e = {};
447
- for (let a in t) typeof t[a] == "number" && (e[a] = -t[a]);
448
- return e;
449
- }
450
- function ze(t, e) {
451
- return H(t, te(e));
452
- }
453
- function ae(t, e) {
454
- let a = t.copy();
455
- return e.era != null && (a.era = e.era), e.year != null && (a.year = e.year), e.month != null && (a.month = e.month), e.day != null && (a.day = e.day), z(a), a;
456
- }
457
- function A(t, e) {
458
- let a = t.copy();
459
- return e.hour != null && (a.hour = e.hour), e.minute != null && (a.minute = e.minute), e.second != null && (a.second = e.second), e.millisecond != null && (a.millisecond = e.millisecond), De(a), a;
460
- }
461
- function at(t) {
462
- t.second += Math.floor(t.millisecond / 1e3), t.millisecond = O(t.millisecond, 1e3), t.minute += Math.floor(t.second / 60), t.second = O(t.second, 60), t.hour += Math.floor(t.minute / 60), t.minute = O(t.minute, 60);
463
- let e = Math.floor(t.hour / 24);
464
- return t.hour = O(t.hour, 24), e;
465
- }
466
- function De(t) {
467
- t.millisecond = Math.max(0, Math.min(t.millisecond, 1e3)), t.second = Math.max(0, Math.min(t.second, 59)), t.minute = Math.max(0, Math.min(t.minute, 59)), t.hour = Math.max(0, Math.min(t.hour, 23));
468
- }
469
- function O(t, e) {
470
- let a = t % e;
471
- return a < 0 && (a += e), a;
472
- }
473
- function Me(t, e) {
474
- return t.hour += e.hours || 0, t.minute += e.minutes || 0, t.second += e.seconds || 0, t.millisecond += e.milliseconds || 0, at(t);
475
- }
476
- function ke(t, e) {
477
- let a = t.copy();
478
- return Me(a, e), a;
479
- }
480
- function rt(t, e) {
481
- return ke(t, te(e));
482
- }
483
- function re(t, e, a, r) {
484
- let n = t.copy();
485
- switch (e) {
486
- case "era": {
487
- let d = t.calendar.getEras(), i = d.indexOf(t.era);
488
- if (i < 0) throw new Error("Invalid era: " + t.era);
489
- i = v(i, a, 0, d.length - 1, r == null ? void 0 : r.round), n.era = d[i], z(n);
490
- break;
491
- }
492
- case "year":
493
- var o, l;
494
- !((o = (l = n.calendar).isInverseEra) === null || o === void 0) && o.call(l, n) && (a = -a), n.year = v(t.year, a, -1 / 0, 9999, r == null ? void 0 : r.round), n.year === -1 / 0 && (n.year = 1), n.calendar.balanceYearMonth && n.calendar.balanceYearMonth(n, t);
495
- break;
496
- case "month":
497
- n.month = v(t.month, a, 1, t.calendar.getMonthsInYear(t), r == null ? void 0 : r.round);
498
- break;
499
- case "day":
500
- n.day = v(t.day, a, 1, t.calendar.getDaysInMonth(t), r == null ? void 0 : r.round);
501
- break;
502
- default:
503
- throw new Error("Unsupported field " + e);
504
- }
505
- return t.calendar.balanceDate && t.calendar.balanceDate(n), z(n), n;
506
- }
507
- function ne(t, e, a, r) {
508
- let n = t.copy();
509
- switch (e) {
510
- case "hour": {
511
- let o = t.hour, l = 0, d = 23;
512
- if ((r == null ? void 0 : r.hourCycle) === 12) {
513
- let i = o >= 12;
514
- l = i ? 12 : 0, d = i ? 23 : 11;
515
- }
516
- n.hour = v(o, a, l, d, r == null ? void 0 : r.round);
517
- break;
518
- }
519
- case "minute":
520
- n.minute = v(t.minute, a, 0, 59, r == null ? void 0 : r.round);
521
- break;
522
- case "second":
523
- n.second = v(t.second, a, 0, 59, r == null ? void 0 : r.round);
524
- break;
525
- case "millisecond":
526
- n.millisecond = v(t.millisecond, a, 0, 999, r == null ? void 0 : r.round);
527
- break;
528
- default:
529
- throw new Error("Unsupported field " + e);
530
- }
531
- return n;
532
- }
533
- function v(t, e, a, r, n = !1) {
534
- if (n) {
535
- t += Math.sign(e), t < a && (t = r);
536
- let o = Math.abs(e);
537
- e > 0 ? t = Math.ceil(t / o) * o : t = Math.floor(t / o) * o, t > r && (t = a);
538
- } else
539
- t += e, t < a ? t = r - (a - t - 1) : t > r && (t = a + (t - r - 1));
540
- return t;
541
- }
542
- function Ce(t, e) {
543
- let a;
544
- if (e.years != null && e.years !== 0 || e.months != null && e.months !== 0 || e.weeks != null && e.weeks !== 0 || e.days != null && e.days !== 0) {
545
- let n = H(_(t), {
546
- years: e.years,
547
- months: e.months,
548
- weeks: e.weeks,
549
- days: e.days
550
- });
551
- a = y(n, t.timeZone);
552
- } else
553
- a = T(t) - t.offset;
554
- a += e.milliseconds || 0, a += (e.seconds || 0) * 1e3, a += (e.minutes || 0) * 6e4, a += (e.hours || 0) * 36e5;
555
- let r = m(a, t.timeZone);
556
- return u(r, t.calendar);
557
- }
558
- function nt(t, e) {
559
- return Ce(t, te(e));
560
- }
561
- function ot(t, e, a, r) {
562
- switch (e) {
563
- case "hour": {
564
- let n = 0, o = 23;
565
- if ((r == null ? void 0 : r.hourCycle) === 12) {
566
- let b = t.hour >= 12;
567
- n = b ? 12 : 0, o = b ? 23 : 11;
568
- }
569
- let l = _(t), d = u(A(l, {
570
- hour: n
571
- }), new I()), i = [
572
- y(d, t.timeZone, "earlier"),
573
- y(d, t.timeZone, "later")
574
- ].filter((b) => m(b, t.timeZone).day === d.day)[0], f = u(A(l, {
575
- hour: o
576
- }), new I()), M = [
577
- y(f, t.timeZone, "earlier"),
578
- y(f, t.timeZone, "later")
579
- ].filter((b) => m(b, t.timeZone).day === f.day).pop(), k = T(t) - t.offset, C = Math.floor(k / B), $ = k % B;
580
- return k = v(C, a, Math.floor(i / B), Math.floor(M / B), r == null ? void 0 : r.round) * B + $, u(m(k, t.timeZone), t.calendar);
581
- }
582
- case "minute":
583
- case "second":
584
- case "millisecond":
585
- return ne(t, e, a, r);
586
- case "era":
587
- case "year":
588
- case "month":
589
- case "day": {
590
- let n = re(_(t), e, a, r), o = y(n, t.timeZone);
591
- return u(m(o, t.timeZone), t.calendar);
592
- }
593
- default:
594
- throw new Error("Unsupported field " + e);
595
- }
596
- }
597
- function lt(t, e, a) {
598
- let r = _(t), n = A(ae(r, e), e);
599
- if (n.compare(r) === 0) return t;
600
- let o = y(n, t.timeZone, a);
601
- return u(m(o, t.timeZone), t.calendar);
602
- }
603
- const dt = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/, it = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
604
- function P(t) {
605
- let e = t.match(dt);
606
- if (!e) throw new Error("Invalid ISO 8601 date string: " + t);
607
- let a = new S(h(e[1], 0, 9999), h(e[2], 1, 12), 1);
608
- return a.day = h(e[3], 0, a.calendar.getDaysInMonth(a)), a;
609
- }
610
- function At(t, e) {
611
- let a = t.match(it);
612
- if (!a) throw new Error("Invalid ISO 8601 date time string: " + t);
613
- let r = h(a[1], -9999, 9999), n = r < 1 ? "BC" : "AD", o = new E(n, r < 1 ? -r + 1 : r, h(a[2], 1, 12), 1, e, 0, a[4] ? h(a[4], 0, 23) : 0, a[5] ? h(a[5], 0, 59) : 0, a[6] ? h(a[6], 0, 59) : 0, a[7] ? h(a[7], 0, 1 / 0) * 1e3 : 0);
614
- o.day = h(a[3], 0, o.calendar.getDaysInMonth(o));
615
- var l;
616
- return a[8] && (o.offset = h(a[8], -23, 23) * 36e5 + h((l = a[9]) !== null && l !== void 0 ? l : "0", 0, 59) * 6e4), xe(o, e);
617
- }
618
- function h(t, e, a) {
619
- let r = Number(t);
620
- if (r < e || r > a) throw new RangeError(`Value out of range: ${e} <= ${r} <= ${a}`);
621
- return r;
622
- }
623
- function Ie(t) {
624
- return `${String(t.hour).padStart(2, "0")}:${String(t.minute).padStart(2, "0")}:${String(t.second).padStart(2, "0")}${t.millisecond ? String(t.millisecond / 1e3).slice(1) : ""}`;
625
- }
626
- function Te(t) {
627
- let e = u(t, new I()), a;
628
- return e.era === "BC" ? a = e.year === 1 ? "0000" : "-" + String(Math.abs(1 - e.year)).padStart(6, "00") : a = String(e.year).padStart(4, "0"), `${a}-${String(e.month).padStart(2, "0")}-${String(e.day).padStart(2, "0")}`;
629
- }
630
- function _e(t) {
631
- return `${Te(t)}T${Ie(t)}`;
632
- }
633
- function ct(t) {
634
- let e = Math.sign(t) < 0 ? "-" : "+";
635
- t = Math.abs(t);
636
- let a = Math.floor(t / 36e5), r = t % 36e5 / 6e4;
637
- return `${e}${String(a).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
638
- }
639
- function st(t) {
640
- return `${_e(t)}${ct(t.offset)}[${t.timeZone}]`;
641
- }
642
- function ht(t, e) {
643
- if (e.has(t))
644
- throw new TypeError("Cannot initialize the same private elements twice on an object");
645
- }
646
- function L(t, e, a) {
647
- ht(t, e), e.set(t, a);
648
- }
649
- function oe(t) {
650
- let e = typeof t[0] == "object" ? t.shift() : new I(), a;
651
- if (typeof t[0] == "string") a = t.shift();
652
- else {
653
- let l = e.getEras();
654
- a = l[l.length - 1];
655
- }
656
- let r = t.shift(), n = t.shift(), o = t.shift();
657
- return [
658
- e,
659
- a,
660
- r,
661
- n,
662
- o
663
- ];
664
- }
665
- var ut = /* @__PURE__ */ new WeakMap();
666
- class S {
667
- /** Returns a copy of this date. */
668
- copy() {
669
- return this.era ? new S(this.calendar, this.era, this.year, this.month, this.day) : new S(this.calendar, this.year, this.month, this.day);
670
- }
671
- /** Returns a new `CalendarDate` with the given duration added to it. */
672
- add(e) {
673
- return H(this, e);
674
- }
675
- /** Returns a new `CalendarDate` with the given duration subtracted from it. */
676
- subtract(e) {
677
- return ze(this, e);
678
- }
679
- /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
680
- set(e) {
681
- return ae(this, e);
682
- }
683
- /**
684
- * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
685
- * When the resulting value reaches the limits of the field, it wraps around.
686
- */
687
- cycle(e, a, r) {
688
- return re(this, e, a, r);
689
- }
690
- /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
691
- toDate(e) {
692
- return pe(this, e);
693
- }
694
- /** Converts the date to an ISO 8601 formatted string. */
695
- toString() {
696
- return Te(this);
697
- }
698
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
699
- compare(e) {
700
- return ve(this, e);
701
- }
702
- constructor(...e) {
703
- L(this, ut, {
704
- writable: !0,
705
- value: void 0
706
- });
707
- let [a, r, n, o, l] = oe(e);
708
- this.calendar = a, this.era = r, this.year = n, this.month = o, this.day = l, z(this);
709
- }
710
- }
711
- var ft = /* @__PURE__ */ new WeakMap();
712
- class Se {
713
- /** Returns a copy of this time. */
714
- copy() {
715
- return new Se(this.hour, this.minute, this.second, this.millisecond);
716
- }
717
- /** Returns a new `Time` with the given duration added to it. */
718
- add(e) {
719
- return ke(this, e);
720
- }
721
- /** Returns a new `Time` with the given duration subtracted from it. */
722
- subtract(e) {
723
- return rt(this, e);
724
- }
725
- /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */
726
- set(e) {
727
- return A(this, e);
728
- }
729
- /**
730
- * Returns a new `Time` with the given field adjusted by a specified amount.
731
- * When the resulting value reaches the limits of the field, it wraps around.
732
- */
733
- cycle(e, a, r) {
734
- return ne(this, e, a, r);
735
- }
736
- /** Converts the time to an ISO 8601 formatted string. */
737
- toString() {
738
- return Ie(this);
739
- }
740
- /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */
741
- compare(e) {
742
- return be(this, e);
743
- }
744
- constructor(e = 0, a = 0, r = 0, n = 0) {
745
- L(this, ft, {
746
- writable: !0,
747
- value: void 0
748
- }), this.hour = e, this.minute = a, this.second = r, this.millisecond = n, De(this);
749
- }
750
- }
751
- var yt = /* @__PURE__ */ new WeakMap();
752
- class N {
753
- /** Returns a copy of this date. */
754
- copy() {
755
- return this.era ? new N(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new N(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
756
- }
757
- /** Returns a new `CalendarDateTime` with the given duration added to it. */
758
- add(e) {
759
- return H(this, e);
760
- }
761
- /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
762
- subtract(e) {
763
- return ze(this, e);
764
- }
765
- /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
766
- set(e) {
767
- return ae(A(this, e), e);
768
- }
769
- /**
770
- * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
771
- * When the resulting value reaches the limits of the field, it wraps around.
772
- */
773
- cycle(e, a, r) {
774
- switch (e) {
775
- case "era":
776
- case "year":
777
- case "month":
778
- case "day":
779
- return re(this, e, a, r);
780
- default:
781
- return ne(this, e, a, r);
782
- }
783
- }
784
- /** Converts the date to a native JavaScript Date object in the given time zone. */
785
- toDate(e, a) {
786
- return pe(this, e, a);
787
- }
788
- /** Converts the date to an ISO 8601 formatted string. */
789
- toString() {
790
- return _e(this);
791
- }
792
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
793
- compare(e) {
794
- let a = ve(this, e);
795
- return a === 0 ? be(this, _(e)) : a;
796
- }
797
- constructor(...e) {
798
- L(this, yt, {
799
- writable: !0,
800
- value: void 0
801
- });
802
- let [a, r, n, o, l] = oe(e);
803
- this.calendar = a, this.era = r, this.year = n, this.month = o, this.day = l, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, z(this);
804
- }
805
- }
806
- var mt = /* @__PURE__ */ new WeakMap();
807
- class E {
808
- /** Returns a copy of this date. */
809
- copy() {
810
- return this.era ? new E(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new E(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
811
- }
812
- /** Returns a new `ZonedDateTime` with the given duration added to it. */
813
- add(e) {
814
- return Ce(this, e);
815
- }
816
- /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
817
- subtract(e) {
818
- return nt(this, e);
819
- }
820
- /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
821
- set(e, a) {
822
- return lt(this, e, a);
823
- }
824
- /**
825
- * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
826
- * When the resulting value reaches the limits of the field, it wraps around.
827
- */
828
- cycle(e, a, r) {
829
- return ot(this, e, a, r);
830
- }
831
- /** Converts the date to a native JavaScript Date object. */
832
- toDate() {
833
- return et(this);
834
- }
835
- /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */
836
- toString() {
837
- return st(this);
838
- }
839
- /** Converts the date to an ISO 8601 formatted string in UTC. */
840
- toAbsoluteString() {
841
- return this.toDate().toISOString();
842
- }
843
- /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
844
- compare(e) {
845
- return this.toDate().getTime() - Xe(e, this.timeZone).toDate().getTime();
846
- }
847
- constructor(...e) {
848
- L(this, mt, {
849
- writable: !0,
850
- value: void 0
851
- });
852
- let [a, r, n, o, l] = oe(e), d = e.shift(), i = e.shift();
853
- this.calendar = a, this.era = r, this.year = n, this.month = o, this.day = l, this.timeZone = d, this.offset = i, this.hour = e.shift() || 0, this.minute = e.shift() || 0, this.second = e.shift() || 0, this.millisecond = e.shift() || 0, z(this);
854
- }
855
- }
856
- let q = /* @__PURE__ */ new Map();
857
- class vt {
858
- /** Formats a date as a string according to the locale and format options passed to the constructor. */
859
- format(e) {
860
- return this.formatter.format(e);
861
- }
862
- /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
863
- formatToParts(e) {
864
- return this.formatter.formatToParts(e);
865
- }
866
- /** Formats a date range as a string. */
867
- formatRange(e, a) {
868
- if (typeof this.formatter.formatRange == "function")
869
- return this.formatter.formatRange(e, a);
870
- if (a < e) throw new RangeError("End date must be >= start date");
871
- return `${this.formatter.format(e)} – ${this.formatter.format(a)}`;
872
- }
873
- /** Formats a date range as an array of parts. */
874
- formatRangeToParts(e, a) {
875
- if (typeof this.formatter.formatRangeToParts == "function")
876
- return this.formatter.formatRangeToParts(e, a);
877
- if (a < e) throw new RangeError("End date must be >= start date");
878
- let r = this.formatter.formatToParts(e), n = this.formatter.formatToParts(a);
879
- return [
880
- ...r.map((o) => ({
881
- ...o,
882
- source: "startRange"
883
- })),
884
- {
885
- type: "literal",
886
- value: " – ",
887
- source: "shared"
888
- },
889
- ...n.map((o) => ({
890
- ...o,
891
- source: "endRange"
892
- }))
893
- ];
894
- }
895
- /** Returns the resolved formatting options based on the values passed to the constructor. */
896
- resolvedOptions() {
897
- let e = this.formatter.resolvedOptions();
898
- return $t() && (this.resolvedHourCycle || (this.resolvedHourCycle = pt(e.locale, this.options)), e.hourCycle = this.resolvedHourCycle, e.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), e.calendar === "ethiopic-amete-alem" && (e.calendar = "ethioaa"), e;
899
- }
900
- constructor(e, a = {}) {
901
- this.formatter = Ee(e, a), this.options = a;
902
- }
903
- }
904
- const bt = {
905
- true: {
906
- // Only Japanese uses the h11 style for 12 hour time. All others use h12.
907
- ja: "h11"
908
- },
909
- false: {}
910
- };
911
- function Ee(t, e = {}) {
912
- if (typeof e.hour12 == "boolean" && gt()) {
913
- e = {
914
- ...e
915
- };
916
- let n = bt[String(e.hour12)][t.split("-")[0]], o = e.hour12 ? "h12" : "h23";
917
- e.hourCycle = n ?? o, delete e.hour12;
918
- }
919
- let a = t + (e ? Object.entries(e).sort((n, o) => n[0] < o[0] ? -1 : 1).join() : "");
920
- if (q.has(a)) return q.get(a);
921
- let r = new Intl.DateTimeFormat(t, e);
922
- return q.set(a, r), r;
923
- }
924
- let G = null;
925
- function gt() {
926
- return G == null && (G = new Intl.DateTimeFormat("en-US", {
927
- hour: "numeric",
928
- hour12: !1
929
- }).format(new Date(2020, 2, 3, 0)) === "24"), G;
930
- }
931
- let K = null;
932
- function $t() {
933
- return K == null && (K = new Intl.DateTimeFormat("fr", {
934
- hour: "numeric",
935
- hour12: !1
936
- }).resolvedOptions().hourCycle === "h12"), K;
937
- }
938
- function pt(t, e) {
939
- if (!e.timeStyle && !e.hour) return;
940
- t = t.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), t += (t.includes("-u-") ? "" : "-u") + "-nu-latn";
941
- let a = Ee(t, {
942
- ...e,
943
- timeZone: void 0
944
- // use local timezone
945
- }), r = parseInt(a.formatToParts(new Date(2020, 2, 3, 0)).find((o) => o.type === "hour").value, 10), n = parseInt(a.formatToParts(new Date(2020, 2, 3, 23)).find((o) => o.type === "hour").value, 10);
946
- if (r === 0 && n === 23) return "h23";
947
- if (r === 24 && n === 23) return "h24";
948
- if (r === 0 && n === 11) return "h11";
949
- if (r === 12 && n === 11) return "h12";
950
- throw new Error("Unexpected hour cycle result");
951
- }
952
- const xt = ':host{inline-size:var(--luzmo-calendar-width, var(--calendar-width));display:inline-block}.header{inline-size:100%;align-items:center;display:flex}.title{color:var(--highcontrast-calendar-date-text-color, var(--luzmo-calendar-date-text-color, var(--calendar-date-text-color)));font-size:var(--luzmo-calendar-title-text-size, var(--calendar-title-text-size));font-weight:var(--luzmo-calendar-title-font-weight, var(--calendar-title-font-weight));line-height:var(--luzmo-calendar-title-height, var(--calendar-title-height));text-align:center;white-space:nowrap;text-overflow:ellipsis;flex-grow:1;order:1;margin:0;overflow:hidden}.nextMonth,.prevMonth{transform:var(--logical-rotation)}.nextMonth:not([disabled]),.prevMonth:not([disabled]){color:var(--highcontrast-calendar-button-icon-color, var(--luzmo-calendar-button-icon-color, var(--calendar-button-icon-color)))}.prevMonth{order:0}.nextMonth{order:2}.dayOfWeek{inline-size:var(--luzmo-calendar-day-width, var(--calendar-day-width));color:var(--highcontrast-calendar-day-title-text-color, var(--luzmo-calendar-day-title-text-color, var(--calendar-day-title-text-color)));font-size:var(--luzmo-calendar-day-title-text-size, var(--calendar-day-title-text-size));font-weight:var(--luzmo-calendar-day-title-text-font-weight, var(--calendar-day-title-text-font-weight));text-transform:uppercase;cursor:default;flex-direction:column;justify-content:flex-end;display:flex;border-block-end:none!important;-webkit-text-decoration:none!important;text-decoration:none!important}:host([title]) .dayOfWeek{text-decoration:underline;letter-spacing:var(--luzmo-calendar-title-text-letter-spacing, var(--calendar-title-text-letter-spacing));border-block-end:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.body{outline:none}.table{table-layout:fixed;border-collapse:collapse;border-spacing:0;-webkit-user-select:none;user-select:none}.table-cell{text-align:center;box-sizing:initial;block-size:var(--luzmo-calendar-day-height, var(--calendar-day-height));inline-size:var(--luzmo-calendar-day-width, var(--calendar-day-width));padding:var(--luzmo-calendar-day-padding, var(--calendar-day-padding));position:relative}.table-cell:focus{outline:0}.date{box-sizing:border-box;block-size:var(--luzmo-calendar-day-height, var(--calendar-day-height));inline-size:var(--luzmo-calendar-day-width, var(--calendar-day-width));margin:var(--luzmo-calendar-day-padding, var(--calendar-day-padding));border-radius:var(--luzmo-calendar-day-border-radius, var(--calendar-day-border-radius));border:var(--luzmo-calendar-day-border-size, var(--calendar-day-border-size)) solid transparent;font-size:var(--luzmo-calendar-day-text-size, var(--calendar-day-text-size));line-height:calc(var(--luzmo-calendar-day-width, var(--calendar-day-width)) - var(--luzmo-calendar-day-border-size, var(--calendar-day-border-size)) * 2);white-space:nowrap;cursor:pointer;display:block;position:absolute;inset-block-start:0;inset-inline-start:0}.date:lang(ja),.date:lang(ko),.date:lang(zh){font-size:var(--luzmo-calendar-day-text-size-han, var(--calendar-day-text-size-han))}.date.is-disabled{cursor:default;pointer-events:none}.date.is-outsideMonth{display:none}.date:before{content:"";box-sizing:border-box;inline-size:var(--luzmo-calendar-day-width, var(--calendar-day-width));block-size:var(--luzmo-calendar-day-height, var(--calendar-day-height));border-radius:var(--luzmo-calendar-day-border-radius, var(--calendar-day-border-radius));border:var(--luzmo-calendar-day-border-size, var(--calendar-day-border-size)) solid transparent;position:absolute;inset-block-start:calc(50% - var(--luzmo-calendar-day-width, var(--calendar-day-width)) / 2);inset-inline-start:calc(50% - var(--luzmo-calendar-day-width, var(--calendar-day-width)) / 2)}.date.is-selected:not(.is-range-selection){font-weight:var(--luzmo-calendar-day-text-font-weight-selected, var(--calendar-day-text-font-weight-selected))}.date.is-selected:not(.is-range-selection):before{display:none}.date.is-today{font-weight:var(--luzmo-calendar-day-today-text-font-weight, var(--calendar-day-today-text-font-weight))}.date.is-range-selection{margin:var(--luzmo-calendar-day-padding, var(--calendar-day-padding)) 0;border-width:var(--luzmo-calendar-border-width-reset, var(--calendar-border-width-reset));line-height:var(--luzmo-calendar-day-height, var(--calendar-day-height));border-radius:var(--luzmo-calendar-border-radius-reset, var(--calendar-border-radius-reset));inline-size:calc(var(--luzmo-calendar-day-width, var(--calendar-day-width)) + var(--luzmo-calendar-day-padding, var(--calendar-day-padding)) * 2)}.date.is-range-selection.is-range-end,.date.is-range-selection.is-range-start,.date.is-range-selection.is-selection-end,.date.is-range-selection.is-selection-start{inline-size:calc(var(--luzmo-calendar-day-width, var(--calendar-day-width)) + var(--luzmo-calendar-day-padding, var(--calendar-day-padding)))}.date.is-range-selection.is-selection-end,.date.is-range-selection.is-selection-start{font-weight:var(--luzmo-calendar-day-text-font-weight-cap-selected, var(--calendar-day-text-font-weight-cap-selected))}.date.is-range-selection.is-selection-end:after,.date.is-range-selection.is-selection-start:after{block-size:var(--luzmo-calendar-day-height, var(--calendar-day-height));inline-size:var(--luzmo-calendar-day-width, var(--calendar-day-width));border-radius:var(--luzmo-calendar-day-width, var(--calendar-day-width));content:"";display:block;position:absolute;inset-block-start:0}.date.is-range-selection.is-range-start,.date.is-range-selection.is-selection-start{border-start-start-radius:var(--luzmo-calendar-day-width, var(--calendar-day-width));border-end-start-radius:var(--luzmo-calendar-day-width, var(--calendar-day-width));margin-inline-start:var(--luzmo-calendar-day-padding, var(--calendar-day-padding));padding-inline-end:var(--luzmo-calendar-day-padding, var(--calendar-day-padding))}.date.is-range-selection.is-range-start:after,.date.is-range-selection.is-range-start:before,.date.is-range-selection.is-selection-start:after,.date.is-range-selection.is-selection-start:before{inset-inline-start:0}.date.is-range-selection.is-range-end,.date.is-range-selection.is-selection-end{border-start-end-radius:var(--luzmo-calendar-day-width, var(--calendar-day-width));border-end-end-radius:var(--luzmo-calendar-day-width, var(--calendar-day-width));margin-inline-end:var(--luzmo-calendar-day-padding, var(--calendar-day-padding));padding-inline-start:var(--luzmo-calendar-day-padding, var(--calendar-day-padding))}.date.is-range-selection.is-range-end:after,.date.is-range-selection.is-range-end:before,.date.is-range-selection.is-selection-end:after,.date.is-range-selection.is-selection-end:before{inset-inline:auto 0}.date.is-range-selection.is-range-start.is-range-end,.date.is-range-selection.is-selection-end.is-range-start,.date.is-range-selection.is-selection-start.is-range-end,.date.is-range-selection.is-selection-start.is-selection-end{inline-size:var(--luzmo-calendar-day-width, var(--calendar-day-width));border-radius:var(--luzmo-calendar-day-width, var(--calendar-day-width))}.date{color:var(--highcontrast-calendar-day-text-color, var(--luzmo-calendar-day-text-color, var(--calendar-day-text-color)))}.date:active{background-color:var(--highcontrast-calendar-day-background-color-down, var(--luzmo-calendar-day-background-color-down, var(--calendar-day-background-color-down)))}.date.is-selected{color:var(--highcontrast-calendar-day-text-color-selected, var(--luzmo-calendar-day-text-color-selected, var(--calendar-day-text-color-selected)));background:var(--highcontrast-calendar-day-background-color-selected, var(--luzmo-calendar-day-background-color-selected, var(--calendar-day-background-color-selected)))}.date.is-selected:not(.is-range-selection){background:var(--highcontrast-calendar-day-background-color-cap-selected, var(--luzmo-calendar-day-background-color-cap-selected, var(--calendar-day-background-color-cap-selected)));color:var(--highcontrast-calendar-day-text-color-cap-selected, var(--luzmo-calendar-day-text-color-cap-selected, var(--calendar-day-text-color-cap-selected)));border-color:var(--highcontrast-calendar-day-border-color-cap-selected, var(--luzmo-calendar-day-border-color-cap-selected, var(--calendar-day-border-color-cap-selected)))}.date.is-today{color:var(--highcontrast-calendar-day-today-text-color, var(--luzmo-calendar-day-today-text-color, var(--calendar-day-today-text-color)));background-color:var(--highcontrast-calendar-day-today-background-color, var(--luzmo-calendar-day-today-background-color, var(--calendar-day-today-background-color)))}.date.is-today,.date.is-today:before{border-color:var(--highcontrast-calendar-day-today-border-color, var(--luzmo-calendar-day-today-border-color, var(--calendar-day-today-border-color)))}@media (hover: hover){.date:hover{color:var(--highcontrast-calendar-day-text-color-hover, var(--luzmo-calendar-day-text-color-hover, var(--calendar-day-text-color-hover)))}.date:hover:not(.is-selection-end,.is-selection-start):before{background:var(--highcontrast-calendar-day-background-color-hover, var(--luzmo-calendar-day-background-color-hover, var(--calendar-day-background-color-hover)))}.date.is-range-selection:hover:before,.date.is-selected:hover:not(.is-selection-end,.is-selection-start):before{background:var(--highcontrast-calendar-day-background-color-selected-hover, var(--luzmo-calendar-day-background-color-selected-hover, var(--calendar-day-background-color-selected-hover)))}.date.is-today.is-selected:not(.is-range-selection):hover:before{background:var(--highcontrast-calendar-day-today-background-color-selected-hover, var(--luzmo-calendar-day-today-background-color-selected-hover, var(--calendar-day-today-background-color-selected-hover)))}}.date.is-today.is-disabled{color:var(--highcontrast-calendar-day-today-text-color-disabled, var(--luzmo-calendar-day-today-text-color-disabled, var(--calendar-day-today-text-color-disabled)))}.date.is-today.is-disabled,.date.is-today.is-disabled:before{border-color:var(--highcontrast-calendar-day-today-border-color-disabled, var(--luzmo-calendar-day-today-border-color-disabled, var(--calendar-day-today-border-color-disabled)))}.table-cell:focus-within .date:not(.is-range-selection){background:var(--highcontrast-calendar-day-background-color-key-focus, var(--luzmo-calendar-day-background-color-key-focus, var(--calendar-day-background-color-key-focus)));color:var(--highcontrast-calendar-day-text-color-key-focus, var(--luzmo-calendar-day-text-color-key-focus, var(--calendar-day-text-color-key-focus)))}.table-cell:focus-within .date.is-selected:not(.is-range-selection),.table-cell:focus-within .date.is-today:not(.is-range-selection),.table-cell:focus-within .date:not(.is-range-selection),.table-cell:focus-within .date:not(.is-range-selection):active{border-color:var(--highcontrast-calendar-day-border-color-key-focus, var(--luzmo-calendar-day-border-color-key-focus, var(--calendar-day-border-color-key-focus)))}.table-cell:focus-within .date.is-selected:not(.is-range-selection),.table-cell:focus-within .date:not(.is-range-selection):active{color:var(--highcontrast-calendar-day-text-color-selected, var(--luzmo-calendar-day-text-color-selected, var(--calendar-day-text-color-selected)));background:var(--highcontrast-calendar-day-background-color-cap-selected, var(--luzmo-calendar-day-background-color-cap-selected, var(--calendar-day-background-color-cap-selected)));border-color:var(--highcontrast-calendar-day-border-color-key-focus, var(--luzmo-calendar-day-border-color-cap-selected-focus, var(--calendar-day-border-color-cap-selected-focus)))}.table-cell:focus-within .date.is-range-selection:before,.table-cell:focus-within .date.is-selected:before{background:var(--highcontrast-calendar-day-background-color-selected-hover, var(--luzmo-calendar-day-background-color-selected-hover, var(--calendar-day-background-color-selected-hover)))}.table-cell:focus-within .date:before{border-color:var(--highcontrast-calendar-day-border-color-key-focus, var(--luzmo-calendar-day-border-color-key-focus, var(--calendar-day-border-color-key-focus)))}.date.is-disabled{color:var(--highcontrast-calendar-day-text-color-disabled, var(--luzmo-calendar-day-text-color-disabled, var(--calendar-day-text-color-disabled)))}.date.is-selection-end,.date.is-selection-start{color:var(--highcontrast-calendar-day-text-color-cap-selected, var(--luzmo-calendar-day-text-color-cap-selected, var(--calendar-day-text-color-cap-selected)))}.date.is-selection-end:after,.date.is-selection-start:after{background-color:var(--highcontrast-calendar-day-background-color-selected, var(--luzmo-calendar-day-background-color-selected, var(--calendar-day-background-color-selected)))}.date.is-selection-end.is-disabled,.date.is-selection-start.is-disabled{color:var(--highcontrast-calendar-day-text-color-disabled, var(--luzmo-calendar-day-text-color-disabled, var(--calendar-day-text-color-disabled)))}@media (forced-colors: active){.nextMonth,.prevMonth{--highcontrast-calendar-button-icon-color: ButtonText}.date{--highcontrast-calendar-day-background-color-cap-selected: Highlight;--highcontrast-calendar-day-background-color-down: ButtonFace;--highcontrast-calendar-day-background-color-hover: Transparent;--highcontrast-calendar-day-background-color-key-focus: ButtonFace;--highcontrast-calendar-day-background-color-selected-hover: Transparent;--highcontrast-calendar-day-background-color-selected: Highlight;--highcontrast-calendar-day-border-color-key-focus: ButtonText;--highcontrast-calendar-day-text-color-cap-selected: HighlightText;--highcontrast-calendar-day-text-color-disabled: GrayText;--highcontrast-calendar-day-text-color-hover: ButtonText;--highcontrast-calendar-day-text-color-key-focus: ButtonText;--highcontrast-calendar-day-text-color-selected: HighlightText;--highcontrast-calendar-day-text-color: CanvasText;--highcontrast-calendar-date-text-color: CanvasText;--highcontrast-calendar-day-title-text-color: CanvasText;--highcontrast-calendar-day-today-background-color-selected-hover: Highlight;--highcontrast-calendar-day-today-border-color-disabled: GrayText;--highcontrast-calendar-day-today-border-color: ButtonText;--highcontrast-calendar-day-today-text-color-disabled: GrayText;--highcontrast-calendar-day-today-text-color: ButtonText;forced-color-adjust:none}.date.is-range-selection.is-today{color:HighlightText}.date.is-range-selection.is-selection-end:after,.date.is-range-selection.is-selection-start:after{content:none}.date.is-disabled.is-range-selection,.date.is-disabled.is-selected{background:Highlight;color:HighlightText}}:host{--calendar-background-color: var(--luzmo-background-color-white)}:host{font-family:var(--luzmo-font-family);--calendar-day-width: var(--luzmo-component-height);--calendar-day-height: var(--luzmo-component-height);--calendar-border-radius-reset: 0;--calendar-border-width-reset: 0;--calendar-day-border-size: var(--luzmo-border-width);--calendar-margin-y: calc(var(--luzmo-spacing) * 3);--calendar-margin-x: var(--luzmo-component-height);--calendar-day-padding: var(--luzmo-spacing-2);--calendar-width: calc( (var(--calendar-day-width) + var(--calendar-day-padding) * 2) * 7 );--calendar-title-text-letter-spacing: .06em;--calendar-day-title-text-font-weight: bold;--calendar-day-title-text-color: var(--luzmo-font-color-disabled);--calendar-title-height: var(--luzmo-component-height);--calendar-title-font-weight: bold;--calendar-title-text-size: var(--luzmo-font-size);--calendar-day-title-text-size: var(--luzmo-font-size);--calendar-day-text-size-han: var(--luzmo-font-size);--calendar-date-text-color: var(--luzmo-font-color);--calendar-day-text-color: var(--luzmo-font-color);--calendar-day-text-size: var(--luzmo-font-size);--calendar-day-border-radius: var(--luzmo-border-radius);--calendar-day-text-color-selected: var(--luzmo-primary-inverse-color);--calendar-day-text-color-hover: var(--luzmo-font-color-hover);--calendar-day-text-color-cap-selected: var(--luzmo-primary-inverse-color);--calendar-day-border-color-cap-selected: var(--luzmo-primary);--calendar-day-border-color-cap-selected-focus: var(--luzmo-primary-focus);--calendar-day-text-font-weight-selected: var(--bold-font-weight);--calendar-day-text-font-weight-cap-selected: var(--bold-font-weight);--calendar-day-today-text-color: var(--luzmo-primary);--calendar-day-today-background-color: var(--luzmo-background-color-hover);--calendar-day-today-text-font-weight: normal;--calendar-day-today-border-color: transparent;--calendar-day-today-text-color-disabled: var(--luzmo-font-color-disabled);--calendar-day-today-border-color-disabled: transparent;--calendar-day-text-color-disabled: var(--luzmo-font-color-disabled);--calendar-day-text-color-key-focus: var(--luzmo-primary-down);--calendar-day-background-color-cap-selected: var(--luzmo-primary);--calendar-button-icon-color: var(--luzmo-font-color)}:host:dir(rtl),:host([dir=rtl]){--logical-rotation: matrix(-1, 0, 0, 1, 0, 0)}:host([size=s]){--calendar-day-width: var(--luzmo-component-height-s);--calendar-day-height: var(--luzmo-component-height-s);--calendar-day-border-radius: var(--luzmo-border-radius-s);--calendar-title-height: var(--luzmo-component-height-s);--calendar-title-text-size: var(--luzmo-font-size-s);--calendar-day-title-text-size: var(--luzmo-font-size-s);--calendar-day-text-size-han: var(--luzmo-font-size-s);--calendar-day-text-size: var(--luzmo-font-size-s)}:host([size=l]){--calendar-day-width: var(--luzmo-component-height-l);--calendar-day-height: var(--luzmo-component-height-l);--calendar-day-border-radius: var(--luzmo-border-radius-l);--calendar-title-height: var(--luzmo-component-height-l);--calendar-title-text-size: var(--luzmo-font-size-l);--calendar-day-title-text-size: var(--luzmo-font-size-l);--calendar-day-text-size-han: var(--luzmo-font-size-l);--calendar-day-text-size: var(--luzmo-font-size-l)}:host([size=xl]){--calendar-day-width: var(--luzmo-component-height-xl);--calendar-day-height: var(--luzmo-component-height-xl);--calendar-day-border-radius: var(--luzmo-border-radius-xl);--calendar-title-height: var(--luzmo-component-height-xl);--calendar-title-text-size: var(--luzmo-font-size-xl);--calendar-day-title-text-size: var(--luzmo-font-size-xl);--calendar-day-text-size-han: var(--luzmo-font-size-xl);--calendar-day-text-size: var(--luzmo-font-size-xl)}.table-cell span[role=button]{border-radius:var(--luzmo-calendar-day-width, var(--calendar-day-width))}';
953
- var wt = Object.defineProperty, zt = Object.getOwnPropertyDescriptor, s = (t, e, a, r) => {
954
- for (var n = r > 1 ? void 0 : r ? zt(e, a) : e, o = t.length - 1, l; o >= 0; o--)
955
- (l = t[o]) && (n = (r ? l(e, a, n) : l(n)) || n);
956
- return r && n && wt(e, a, n), n;
957
- };
958
- const fe = 7;
959
- class c extends Pe(Be, {
960
- validSizes: ["s", "m", "l", "xl"],
961
- noDefaultSize: !0
962
- }) {
963
- constructor() {
964
- super(), this.disabled = !1, this.labels = {
965
- previous: "Previous",
966
- next: "Next",
967
- today: "Today",
968
- selected: "Selected"
969
- }, this.currentDate = this.today, this.timeZone = ee(), this.weekdays = [], this.currentMonthDates = [], this._isDateFocusIntent = !1, this.numberFormatter = new de(this._language), this.setNumberFormatter(), this.setWeekdays(), this.setCurrentMonthDates();
970
- }
971
- /**
972
- * The styles of the calendar
973
- * @internal
974
- */
975
- static get styles() {
976
- return [Ae(xt)];
977
- }
978
- /**
979
- * The language used to format the dates and weekdays.
980
- * @internal
981
- */
982
- get _language() {
983
- try {
984
- return this.language ? new Intl.Locale(this.language).language : "en";
985
- } catch {
986
- return "en";
987
- }
988
- }
989
- /**
990
- * The current date in the calendar
991
- * @internal
992
- */
993
- get today() {
994
- return je(this.timeZone);
995
- }
996
- set isDateFocusIntent(e) {
997
- this._isDateFocusIntent !== e && (this._isDateFocusIntent = e, this.requestUpdate("isDateFocusIntent", !e));
998
- }
999
- /**
1000
- * @internal
1001
- */
1002
- get isDateFocusIntent() {
1003
- return this._isDateFocusIntent;
1004
- }
1005
- setDateFocusIntent() {
1006
- this.isDateFocusIntent = !0;
1007
- }
1008
- resetDateFocusIntent() {
1009
- this.isDateFocusIntent = !1;
1010
- }
1011
- connectedCallback() {
1012
- super.connectedCallback(), document.addEventListener("mousedown", this.resetDateFocusIntent);
1013
- }
1014
- disconnectedCallback() {
1015
- super.disconnectedCallback(), document.removeEventListener("mousedown", this.resetDateFocusIntent);
1016
- }
1017
- /**
1018
- * Resets the component's value
1019
- */
1020
- clear() {
1021
- this._value = void 0;
1022
- }
1023
- willUpdate(e) {
1024
- e.has("language") && (this.setNumberFormatter(), this.setWeekdays(), this.setCurrentMonthDates());
1025
- const a = e.has("min"), r = e.has("max"), n = e.has("value");
1026
- (a || r || n) && (this.convertToCalendarDates(), this.checkDatePropsCompliance(a || r), this.updateCurrentDate());
1027
- const l = e.get("currentDate");
1028
- e.has("currentDate") && (!l || !x(l, this.currentDate)) && (this.setCurrentMonthDates(), this.setAttribute("aria-label", this.monthAndYear));
1029
- }
1030
- updated(e) {
1031
- e.has("currentDate") && this.isDateFocusIntent && this.focusCurrentDate();
1032
- }
1033
- /**
1034
- * Focuses the tabbable day element in the calendar represented by the current date.
1035
- * Useful while navigating through the calendar as the focus might be lost when the month changes.
1036
- */
1037
- focusCurrentDate() {
1038
- var a;
1039
- const e = (a = this.shadowRoot) == null ? void 0 : a.querySelector(
1040
- 'td span[tabindex="0"]'
1041
- );
1042
- e && e.focus();
1043
- }
1044
- convertToCalendarDates() {
1045
- this._min = this.min ? P(this.min) : void 0, this._max = this.max ? P(this.max) : void 0, this._value = this.value ? P(this.value) : void 0;
1046
- const e = "AD";
1047
- this._min = this._min && Y(this._min).set({ era: e }), this._max = this._max && Y(this._max).set({ era: e }), this._value = this._value && Y(this._value).set({ era: e });
1048
- }
1049
- /**
1050
- * Validates the component's date properties (min, max and value) compliance with one another.
1051
- * If the [min, max] constraint interval is invalid, both properties are reset.
1052
- * If the value is not within the [min, max] (valid) interval, it is reset.
1053
- *
1054
- * @param checkInterval - Whether to check the [min, max] interval
1055
- */
1056
- checkDatePropsCompliance(e) {
1057
- e && this._min && this._max && (this._min.compare(this._max) < 0 || (console.warn && console.warn(
1058
- this,
1059
- `<${this.localName}> expects the 'min' to be less than 'max'. Please ensure that 'min' property's date is earlier than 'max' property's date.`
1060
- ), this._min = void 0, this._max = void 0)), this._value && this.isNonCompliantDate(this._value) && (console.warn && console.warn(
1061
- this,
1062
- `<${this.localName}> expects the preselected value to comply with the min and max constraints. Please ensure that 'value' property's date is in between the dates for the 'min' and 'max' properties.`
1063
- ), this._value = void 0);
1064
- }
1065
- updateCurrentDate() {
1066
- if (this._value) {
1067
- this.currentDate = this._value;
1068
- return;
1069
- }
1070
- this.isNonCompliantDate(this.today) ? this._min ? this.currentDate = this._min : this._max && (this.currentDate = this._max) : this.currentDate = this.today;
1071
- }
1072
- /**
1073
- * Whether the date is non-compliant with the min and max constraints
1074
- */
1075
- isNonCompliantDate(e) {
1076
- return !!(this._min && e.compare(this._min) < 0 || this._max && e.compare(this._max) > 0);
1077
- }
1078
- render() {
1079
- return g` ${this.renderCalendarHeader()}${this.renderCalendarGrid()} `;
1080
- }
1081
- /**
1082
- * The month and year of the calendar
1083
- * @internal
1084
- */
1085
- get monthAndYear() {
1086
- return this.formatDate(this.currentDate, {
1087
- month: "long",
1088
- year: "numeric"
1089
- });
1090
- }
1091
- renderCalendarHeader() {
1092
- return g`
1093
- <div class="header" @focusin=${this.resetDateFocusIntent}>
1094
- <h2
1095
- class="title"
1096
- aria-live="polite"
1097
- aria-atomic="true"
1098
- data-test-id="calendar-title"
1099
- >
1100
- ${this.monthAndYear}
1101
- </h2>
1102
-
1103
- <luzmo-action-button
1104
- quiet
1105
- size="s"
1106
- label=${this.labels.previous}
1107
- class="prevMonth"
1108
- data-test-id="prev-btn"
1109
- ?disabled=${this.isPreviousMonthDisabled}
1110
- @click=${this.handlePreviousMonth}
1111
- >
1112
- <div slot="icon">
1113
- <slot name="prev-icon">
1114
- <luzmo-icon
1115
- block
1116
- .size=${this.size}
1117
- .icon=${We}
1118
- ></luzmo-icon>
1119
- </slot>
1120
- </div>
1121
- </luzmo-action-button>
1122
-
1123
- <luzmo-action-button
1124
- quiet
1125
- size="s"
1126
- label=${this.labels.next}
1127
- class="nextMonth"
1128
- data-test-id="next-btn"
1129
- ?disabled=${this.isNextMonthDisabled}
1130
- @click=${this.handleNextMonth}
1131
- >
1132
- <div slot="icon">
1133
- <slot name="next-icon">
1134
- <luzmo-icon
1135
- block
1136
- .size=${this.size}
1137
- .icon=${Ye}
1138
- ></luzmo-icon>
1139
- </slot>
1140
- </div>
1141
- </luzmo-action-button>
1142
- </div>
1143
- `;
1144
- }
1145
- /**
1146
- * Whether the previous month is disabled
1147
- * @internal
1148
- */
1149
- get isPreviousMonthDisabled() {
1150
- if (this.disabled) return !0;
1151
- const e = w(this.currentDate), a = e.subtract({ months: 1 });
1152
- return e.era !== a.era || p(e, a);
1153
- }
1154
- /**
1155
- * Whether the next month is disabled
1156
- * @internal
1157
- */
1158
- get isNextMonthDisabled() {
1159
- if (this.disabled) return !0;
1160
- const e = qe(this.currentDate), a = e.add({ months: 1 });
1161
- return e.era !== a.era || p(e, a);
1162
- }
1163
- handlePreviousMonth() {
1164
- let e = w(this.currentDate).subtract({
1165
- months: 1
1166
- });
1167
- this._value && x(e, this._value) ? e = this._value : x(e, this.today) && (e = this.today), this.currentDate = e;
1168
- }
1169
- handleNextMonth() {
1170
- let e = w(this.currentDate).add({
1171
- months: 1
1172
- });
1173
- this._value && x(e, this._value) ? e = this._value : x(e, this.today) && (e = this.today), this.currentDate = e;
1174
- }
1175
- renderCalendarGrid() {
1176
- return g`
1177
- <table
1178
- role="grid"
1179
- aria-readonly="true"
1180
- aria-disabled=${this.disabled}
1181
- role="presentation"
1182
- class="table body"
1183
- @keydown=${this.handleKeydown}
1184
- >
1185
- ${this.renderCalendarTableHead()} ${this.renderCalendarTableBody()}
1186
- </table>
1187
- `;
1188
- }
1189
- renderCalendarTableHead() {
1190
- return g`
1191
- <thead role="presentation">
1192
- <tr role="row">
1193
- ${this.renderWeekdayColumns()}
1194
- </tr>
1195
- </thead>
1196
- `;
1197
- }
1198
- renderWeekdayColumns() {
1199
- return this.weekdays.map((e) => this.renderWeekdayColumn(e));
1200
- }
1201
- renderWeekdayColumn(e) {
1202
- return g`
1203
- <th role="columnheader" scope="col" class="table-cell">
1204
- <abbr class="dayOfWeek" title=${e.long}> ${e.narrow} </abbr>
1205
- </th>
1206
- `;
1207
- }
1208
- renderCalendarTableBody() {
1209
- return g`
1210
- <tbody role="presentation">
1211
- ${this.renderCalendarWeeks()}
1212
- </tbody>
1213
- `;
1214
- }
1215
- renderCalendarWeeks() {
1216
- return this.currentMonthDates.map(
1217
- (e) => g`
1218
- <tr role="row">
1219
- ${this.renderDatesInWeek(e)}
1220
- </tr>
1221
- `
1222
- );
1223
- }
1224
- renderDatesInWeek(e) {
1225
- return e.map((a) => this.renderCalendarTableCell(a));
1226
- }
1227
- parseDateCellProperties(e) {
1228
- const a = {
1229
- isOutsideMonth: !1,
1230
- isSelected: !1,
1231
- isToday: !1,
1232
- isDisabled: !1,
1233
- isTabbable: !1
1234
- };
1235
- return a.isOutsideMonth = e.month !== this.currentDate.month, a.isOutsideMonth || (a.isDisabled = this.disabled || this.isMinLimitReached(e) || this.isMaxLimitReached(e), a.isToday = p(e, this.today), a.isDisabled) || (a.isTabbable = p(e, this.currentDate), a.isSelected = !!(this._value && p(this._value, e))), a;
1236
- }
1237
- renderCalendarTableCell(e) {
1238
- const { isOutsideMonth: a, isSelected: r, isToday: n, isDisabled: o, isTabbable: l } = this.parseDateCellProperties(e), d = {
1239
- date: !0,
1240
- "is-outsideMonth": a,
1241
- "is-selected": r,
1242
- "is-today": n,
1243
- "is-disabled": o
1244
- };
1245
- let i = "";
1246
- n ? i = `${this.labels.today}, ` : r && (i = `${this.labels.selected}, `);
1247
- const f = i + this.formatDate(e, {
1248
- weekday: "long",
1249
- year: "numeric",
1250
- month: "long",
1251
- day: "numeric"
1252
- });
1253
- return g`
1254
- <td role="gridcell" class="table-cell">
1255
- <span
1256
- role="button"
1257
- tabindex=${Oe(
1258
- a ? void 0 : l ? "0" : "-1"
1259
- )}
1260
- aria-label=${f}
1261
- aria-disabled=${a || o}
1262
- data-value=${e.toString()}
1263
- @mousedown=${this.handleDaySelect}
1264
- >
1265
- <span role="presentation" class=${Re(d)}>
1266
- ${this.formatNumber(e.day)}
1267
- </span>
1268
- </span>
1269
- </td>
1270
- `;
1271
- }
1272
- handleKeydown(e) {
1273
- switch (this.setDateFocusIntent(), e.code) {
1274
- case "ArrowLeft": {
1275
- this.moveToPreviousDay();
1276
- break;
1277
- }
1278
- case "ArrowDown": {
1279
- this.moveToNextWeek();
1280
- break;
1281
- }
1282
- case "ArrowRight": {
1283
- this.moveToNextDay();
1284
- break;
1285
- }
1286
- case "ArrowUp": {
1287
- this.moveToPreviousWeek();
1288
- break;
1289
- }
1290
- case "Space":
1291
- case "Enter": {
1292
- this.handleDaySelect(e);
1293
- break;
1294
- }
1295
- }
1296
- }
1297
- handleDaySelect(e) {
1298
- if (this.disabled) {
1299
- e.preventDefault();
1300
- return;
1301
- }
1302
- const a = e.target.closest(
1303
- 'span[role="button"]'
1304
- ), r = a && a.dataset.value;
1305
- if (!r) return;
1306
- const n = P(r);
1307
- if (this._value && p(this._value, n) || this.isMinLimitReached(n) || this.isMaxLimitReached(n)) {
1308
- e.preventDefault();
1309
- return;
1310
- }
1311
- this._value = n, this.value = n.toString(), this.dispatchEvent(
1312
- new CustomEvent("change", {
1313
- bubbles: !0,
1314
- composed: !0,
1315
- cancelable: !0,
1316
- detail: {
1317
- value: this.value
1318
- }
1319
- })
1320
- );
1321
- }
1322
- moveToPreviousDay() {
1323
- const e = this.currentDate.subtract({ days: 1 });
1324
- this.canMoveBackToDate(e) && (this.currentDate = e);
1325
- }
1326
- moveToNextDay() {
1327
- const e = this.currentDate.add({ days: 1 });
1328
- this.canMoveForwardToDate(e) && (this.currentDate = e);
1329
- }
1330
- moveToPreviousWeek() {
1331
- const e = this.currentDate.subtract({ weeks: 1 });
1332
- if (this.canMoveBackToDate(e)) {
1333
- this.currentDate = e;
1334
- return;
1335
- }
1336
- let a = e.add({ days: 1 });
1337
- for (; !this.canMoveBackToDate(a); )
1338
- a = a.add({ days: 1 });
1339
- this.currentDate = a;
1340
- }
1341
- moveToNextWeek() {
1342
- const e = this.currentDate.add({ weeks: 1 });
1343
- if (this.canMoveForwardToDate(e)) {
1344
- this.currentDate = e;
1345
- return;
1346
- }
1347
- let a = e.subtract({ days: 1 });
1348
- for (; !this.canMoveForwardToDate(a); )
1349
- a = a.subtract({ days: 1 });
1350
- this.currentDate = a;
1351
- }
1352
- canMoveBackToDate(e) {
1353
- return this.isMinLimitReached(e) ? !1 : x(this.currentDate, e) || !this.isPreviousMonthDisabled;
1354
- }
1355
- canMoveForwardToDate(e) {
1356
- return this.isMaxLimitReached(e) ? !1 : x(this.currentDate, e) || !this.isNextMonthDisabled;
1357
- }
1358
- /**
1359
- * Defines the array with data for the days of the week, starting on the first day of the week according to the
1360
- * defined location (Sunday, Monday, etc.)
1361
- */
1362
- setWeekdays() {
1363
- const e = ce(this.currentDate, this._language);
1364
- this.weekdays = [...Array.from({ length: fe }).keys()].map(
1365
- (a) => {
1366
- const r = e.add({ days: a });
1367
- return {
1368
- narrow: this.formatDate(r, { weekday: "narrow" }),
1369
- long: this.formatDate(r, { weekday: "long" })
1370
- };
1371
- }
1372
- );
1373
- }
1374
- /**
1375
- * Defines the 2D-array with the dates of the current month
1376
- */
1377
- setCurrentMonthDates() {
1378
- const e = Ve(this.currentDate, this._language), a = Array.from({
1379
- length: e
1380
- });
1381
- for (const r of Array.from({ length: e }).keys())
1382
- a[r] = this.getDatesInWeek(
1383
- this.currentDate,
1384
- r
1385
- );
1386
- this.currentMonthDates = a;
1387
- }
1388
- /**
1389
- * Returns an array with all days of the week in a specific month, corresponding to the given index,
1390
- * starting with the first day of the week according to the language
1391
- *
1392
- * @param weekIndex - The index of the week
1393
- */
1394
- getDatesInWeek(e, a) {
1395
- const r = [];
1396
- let n = ce(
1397
- w(e).add({
1398
- weeks: a
1399
- }),
1400
- this._language
1401
- );
1402
- for (; r.length < fe; ) {
1403
- r.push(n);
1404
- const o = n.add({ days: 1 });
1405
- if (p(n, o)) break;
1406
- n = o;
1407
- }
1408
- return r;
1409
- }
1410
- isMinLimitReached(e) {
1411
- return !!(this._min && e.compare(this._min) < 0);
1412
- }
1413
- isMaxLimitReached(e) {
1414
- return !!(this._max && e.compare(this._max) > 0);
1415
- }
1416
- /**
1417
- * Formats a `CalendarDate` object using the current language and the provided date format options
1418
- *
1419
- * @param calendarDate - The `CalendarDate` object that will be formatted
1420
- * @param options - All date format options that will be used by the formatter
1421
- */
1422
- formatDate(e, a) {
1423
- return new vt(this._language, a).format(
1424
- e.toDate(this.timeZone)
1425
- );
1426
- }
1427
- setNumberFormatter() {
1428
- this.numberFormatter = new de(this._language);
1429
- }
1430
- formatNumber(e) {
1431
- return this.numberFormatter.format(e);
1432
- }
1433
- }
1434
- s([
1435
- F({ type: String })
1436
- ], c.prototype, "value", 2);
1437
- s([
1438
- F({ type: String })
1439
- ], c.prototype, "min", 2);
1440
- s([
1441
- F({ type: String })
1442
- ], c.prototype, "max", 2);
1443
- s([
1444
- F({ type: Boolean, reflect: !0 })
1445
- ], c.prototype, "disabled", 2);
1446
- s([
1447
- F({ type: String, reflect: !0 })
1448
- ], c.prototype, "language", 2);
1449
- s([
1450
- F({ type: Object })
1451
- ], c.prototype, "labels", 2);
1452
- s([
1453
- D()
1454
- ], c.prototype, "currentDate", 2);
1455
- s([
1456
- D()
1457
- ], c.prototype, "_value", 2);
1458
- s([
1459
- D()
1460
- ], c.prototype, "_min", 2);
1461
- s([
1462
- D()
1463
- ], c.prototype, "_max", 2);
1464
- s([
1465
- D()
1466
- ], c.prototype, "weekdays", 2);
1467
- s([
1468
- D()
1469
- ], c.prototype, "currentMonthDates", 2);
1470
- s([
1471
- D()
1472
- ], c.prototype, "isDateFocusIntent", 1);
1473
- customElements.get("luzmo-calendar") || customElements.define("luzmo-calendar", c);
1474
- export {
1475
- E as $,
1476
- c as L,
1477
- N as a,
1478
- S as b,
1479
- Bt as c,
1480
- Ft as d,
1481
- ee as e,
1482
- Ze as f,
1483
- Xe as g,
1484
- At as h,
1485
- _ as i,
1486
- Y as j,
1487
- P as k,
1488
- Se as l,
1489
- vt as m
1490
- };