@editora/ui-core 0.1.9 → 0.1.12

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 (526) hide show
  1. package/README.md +35 -0
  2. package/dist/ElementBase-1b301e7f.js +1 -0
  3. package/dist/ElementBase-909688f3.mjs +79 -0
  4. package/dist/accordion.cjs.js +360 -0
  5. package/dist/accordion.esm.js +647 -0
  6. package/dist/alert-dialog.cjs.js +567 -0
  7. package/dist/alert-dialog.esm.js +1043 -0
  8. package/dist/alert.cjs.js +351 -0
  9. package/dist/alert.esm.js +450 -0
  10. package/dist/anchor.cjs.js +30 -0
  11. package/dist/anchor.esm.js +62 -0
  12. package/dist/animated-beam.cjs.js +720 -0
  13. package/dist/animated-beam.esm.js +1540 -0
  14. package/dist/animated-list.cjs.js +672 -0
  15. package/dist/animated-list.esm.js +1137 -0
  16. package/dist/animated-text.cjs.js +683 -0
  17. package/dist/animated-text.esm.js +1020 -0
  18. package/dist/app-header.cjs.js +345 -0
  19. package/dist/app-header.esm.js +398 -0
  20. package/dist/aspect-ratio.cjs.js +294 -0
  21. package/dist/aspect-ratio.esm.js +416 -0
  22. package/dist/avatar.cjs.js +365 -0
  23. package/dist/avatar.esm.js +513 -0
  24. package/dist/badge.cjs.js +432 -0
  25. package/dist/badge.esm.js +554 -0
  26. package/dist/block-controls.cjs.js +347 -0
  27. package/dist/block-controls.esm.js +556 -0
  28. package/dist/box.cjs.js +226 -0
  29. package/dist/box.esm.js +556 -0
  30. package/dist/breadcrumb.cjs.js +288 -0
  31. package/dist/breadcrumb.esm.js +523 -0
  32. package/dist/button.cjs.js +521 -0
  33. package/dist/button.esm.js +671 -0
  34. package/dist/calendar-2c11b824.mjs +1685 -0
  35. package/dist/calendar-a8735e40.js +741 -0
  36. package/dist/calendar.cjs.js +1 -0
  37. package/dist/calendar.esm.js +11 -0
  38. package/dist/card.cjs.js +306 -0
  39. package/dist/card.esm.js +378 -0
  40. package/dist/chart.cjs.js +783 -0
  41. package/dist/chart.esm.js +1369 -0
  42. package/dist/checkbox.cjs.js +338 -0
  43. package/dist/checkbox.esm.js +455 -0
  44. package/dist/collapsible.cjs.js +381 -0
  45. package/dist/collapsible.esm.js +548 -0
  46. package/dist/collection-a1aac0c6.mjs +56 -0
  47. package/dist/collection-a2969ad2.js +1 -0
  48. package/dist/collection.cjs.js +1 -0
  49. package/dist/collection.esm.js +136 -0
  50. package/dist/color-picker.cjs.js +803 -0
  51. package/dist/color-picker.esm.js +1809 -0
  52. package/dist/combobox.cjs.js +525 -0
  53. package/dist/combobox.esm.js +1023 -0
  54. package/dist/command-palette.cjs.js +67 -0
  55. package/dist/command-palette.esm.js +181 -0
  56. package/dist/command.cjs.js +130 -0
  57. package/dist/command.esm.js +307 -0
  58. package/dist/components/ui-icon.d.ts.map +1 -1
  59. package/dist/components/ui-split-button.d.ts +2 -0
  60. package/dist/components/ui-split-button.d.ts.map +1 -1
  61. package/dist/container.cjs.js +115 -0
  62. package/dist/container.esm.js +156 -0
  63. package/dist/context-menu.cjs.js +357 -0
  64. package/dist/context-menu.esm.js +1204 -0
  65. package/dist/control-group.cjs.js +80 -0
  66. package/dist/control-group.esm.js +110 -0
  67. package/dist/data-table.cjs.js +682 -0
  68. package/dist/data-table.esm.js +1660 -0
  69. package/dist/date-field.cjs.js +142 -0
  70. package/dist/date-field.esm.js +384 -0
  71. package/dist/date-picker.cjs.js +570 -0
  72. package/dist/date-picker.esm.js +1067 -0
  73. package/dist/date-range-picker.cjs.js +455 -0
  74. package/dist/date-range-picker.esm.js +973 -0
  75. package/dist/date-range-time-picker.cjs.js +573 -0
  76. package/dist/date-range-time-picker.esm.js +1137 -0
  77. package/dist/date-time-picker.cjs.js +495 -0
  78. package/dist/date-time-picker.esm.js +1062 -0
  79. package/dist/date-time-utils-5cf58cd0.js +1 -0
  80. package/dist/date-time-utils-bdceb7af.mjs +273 -0
  81. package/dist/description.cjs.js +85 -0
  82. package/dist/description.esm.js +136 -0
  83. package/dist/dialog.cjs.js +406 -0
  84. package/dist/dialog.esm.js +822 -0
  85. package/dist/direction-provider.cjs.js +30 -0
  86. package/dist/direction-provider.esm.js +74 -0
  87. package/dist/dismissable-layer-193e3bed.js +1 -0
  88. package/dist/dismissable-layer-9c7e6b58.mjs +112 -0
  89. package/dist/dismissable-layer.cjs.js +6 -0
  90. package/dist/dismissable-layer.esm.js +115 -0
  91. package/dist/dock.cjs.js +347 -0
  92. package/dist/dock.esm.js +826 -0
  93. package/dist/drawer.cjs.js +538 -0
  94. package/dist/drawer.esm.js +872 -0
  95. package/dist/dropdown.cjs.js +511 -0
  96. package/dist/dropdown.esm.js +1084 -0
  97. package/dist/dropzone.cjs.js +1 -0
  98. package/dist/dropzone.esm.js +11 -0
  99. package/dist/empty-state.cjs.js +169 -0
  100. package/dist/empty-state.esm.js +199 -0
  101. package/dist/field-error.cjs.js +74 -0
  102. package/dist/field-error.esm.js +125 -0
  103. package/dist/field.cjs.js +398 -0
  104. package/dist/field.esm.js +542 -0
  105. package/dist/fieldset.cjs.js +214 -0
  106. package/dist/fieldset.esm.js +298 -0
  107. package/dist/file-upload.cjs.js +353 -0
  108. package/dist/file-upload.esm.js +740 -0
  109. package/dist/flex.cjs.js +54 -0
  110. package/dist/flex.esm.js +168 -0
  111. package/dist/floating-toolbar.cjs.js +223 -0
  112. package/dist/floating-toolbar.esm.js +513 -0
  113. package/dist/focus-scope-103833ee.mjs +147 -0
  114. package/dist/focus-scope-2b12b4e7.js +1 -0
  115. package/dist/focus-scope.cjs.js +6 -0
  116. package/dist/focus-scope.esm.js +97 -0
  117. package/dist/form.cjs.js +377 -0
  118. package/dist/form.esm.js +862 -0
  119. package/dist/gantt.cjs.js +157 -0
  120. package/dist/gantt.esm.js +214 -0
  121. package/dist/grid.cjs.js +67 -0
  122. package/dist/grid.esm.js +211 -0
  123. package/dist/hover-card.cjs.js +284 -0
  124. package/dist/hover-card.esm.js +470 -0
  125. package/dist/icon-9e9da03b.js +207 -0
  126. package/dist/icon-cloud.cjs.js +495 -0
  127. package/dist/icon-cloud.esm.js +828 -0
  128. package/dist/icon-e2a85cc1.mjs +368 -0
  129. package/dist/icon.cjs.js +1 -0
  130. package/dist/icon.esm.js +6 -0
  131. package/dist/icons.d.ts +1 -1
  132. package/dist/icons.d.ts.map +1 -1
  133. package/dist/index.cjs.js +1 -36010
  134. package/dist/index.esm.js +440 -66615
  135. package/dist/inline-edit.cjs.js +118 -0
  136. package/dist/inline-edit.esm.js +206 -0
  137. package/dist/input.cjs.js +535 -0
  138. package/dist/input.esm.js +790 -0
  139. package/dist/label.cjs.js +195 -0
  140. package/dist/label.esm.js +301 -0
  141. package/dist/layout.cjs.js +266 -0
  142. package/dist/layout.esm.js +408 -0
  143. package/dist/listbox-308789a0.mjs +210 -0
  144. package/dist/listbox-ef2f708e.js +46 -0
  145. package/dist/listbox.cjs.js +1 -0
  146. package/dist/listbox.esm.js +6 -0
  147. package/dist/marquee.cjs.js +513 -0
  148. package/dist/marquee.esm.js +767 -0
  149. package/dist/masonry-grid.cjs.js +65 -0
  150. package/dist/masonry-grid.esm.js +180 -0
  151. package/dist/menu-item-styles-27fdbac4.mjs +181 -0
  152. package/dist/menu-item-styles-83ad1e22.js +152 -0
  153. package/dist/menu.cjs.js +275 -0
  154. package/dist/menu.esm.js +743 -0
  155. package/dist/menubar.cjs.js +455 -0
  156. package/dist/menubar.esm.js +1195 -0
  157. package/dist/meter.cjs.js +241 -0
  158. package/dist/meter.esm.js +334 -0
  159. package/dist/multi-select.cjs.js +549 -0
  160. package/dist/multi-select.esm.js +914 -0
  161. package/dist/navigation-menu.cjs.js +382 -0
  162. package/dist/navigation-menu.esm.js +614 -0
  163. package/dist/number-field.cjs.js +351 -0
  164. package/dist/number-field.esm.js +771 -0
  165. package/dist/number-ticker.cjs.js +209 -0
  166. package/dist/number-ticker.esm.js +749 -0
  167. package/dist/odometer.cjs.js +313 -0
  168. package/dist/odometer.esm.js +565 -0
  169. package/dist/orbiter.cjs.js +495 -0
  170. package/dist/orbiter.esm.js +831 -0
  171. package/dist/overlayManager-86454af7.mjs +58 -0
  172. package/dist/overlayManager-ece06517.js +1 -0
  173. package/dist/pagination.cjs.js +201 -0
  174. package/dist/pagination.esm.js +297 -0
  175. package/dist/panel-group-40254cdd.js +36 -0
  176. package/dist/panel-group-a376cc5e.mjs +326 -0
  177. package/dist/panel-group.cjs.js +1 -0
  178. package/dist/panel-group.esm.js +7 -0
  179. package/dist/panel.cjs.js +22 -0
  180. package/dist/panel.esm.js +46 -0
  181. package/dist/password-field.cjs.js +626 -0
  182. package/dist/password-field.esm.js +925 -0
  183. package/dist/pin-input.cjs.js +185 -0
  184. package/dist/pin-input.esm.js +412 -0
  185. package/dist/placement-grid.cjs.js +99 -0
  186. package/dist/placement-grid.esm.js +486 -0
  187. package/dist/plugin-panel.cjs.js +131 -0
  188. package/dist/plugin-panel.esm.js +173 -0
  189. package/dist/popover.cjs.js +286 -0
  190. package/dist/popover.esm.js +483 -0
  191. package/dist/portal-1cf392ca.mjs +114 -0
  192. package/dist/portal-d8d7fbca.js +1 -0
  193. package/dist/portal.cjs.js +39 -0
  194. package/dist/portal.esm.js +187 -0
  195. package/dist/positioner-accc6e5f.js +1 -0
  196. package/dist/positioner-fbd61bf1.mjs +132 -0
  197. package/dist/positioner.cjs.js +6 -0
  198. package/dist/positioner.esm.js +137 -0
  199. package/dist/presence.cjs.js +164 -0
  200. package/dist/presence.esm.js +301 -0
  201. package/dist/progress.cjs.js +329 -0
  202. package/dist/progress.esm.js +453 -0
  203. package/dist/quick-actions.cjs.js +202 -0
  204. package/dist/quick-actions.esm.js +357 -0
  205. package/dist/radio-group.cjs.js +257 -0
  206. package/dist/radio-group.esm.js +477 -0
  207. package/dist/rating.cjs.js +355 -0
  208. package/dist/rating.esm.js +637 -0
  209. package/dist/roving-focus-group-4350c9a7.mjs +50 -0
  210. package/dist/roving-focus-group-5c059bf9.js +1 -0
  211. package/dist/roving-focus-group.cjs.js +1 -0
  212. package/dist/roving-focus-group.esm.js +72 -0
  213. package/dist/{runtime-3cc1c386.mjs → runtime-4ac0107b.mjs} +348 -459
  214. package/dist/runtime-5f282bc8.js +1 -0
  215. package/dist/runtime.cjs.js +1 -1
  216. package/dist/runtime.esm.js +24 -23
  217. package/dist/scroll-area.cjs.js +294 -0
  218. package/dist/scroll-area.esm.js +478 -0
  219. package/dist/scroll-lock-48793569.js +1 -0
  220. package/dist/scroll-lock-9de6d328.mjs +53 -0
  221. package/dist/section.cjs.js +167 -0
  222. package/dist/section.esm.js +202 -0
  223. package/dist/select.cjs.js +799 -0
  224. package/dist/select.esm.js +1266 -0
  225. package/dist/selection-popup.cjs.js +203 -0
  226. package/dist/selection-popup.esm.js +392 -0
  227. package/dist/separator.cjs.js +221 -0
  228. package/dist/separator.esm.js +241 -0
  229. package/dist/sidebar.cjs.js +769 -0
  230. package/dist/sidebar.esm.js +1219 -0
  231. package/dist/skeleton.cjs.js +205 -0
  232. package/dist/skeleton.esm.js +249 -0
  233. package/dist/slider.cjs.js +493 -0
  234. package/dist/slider.esm.js +694 -0
  235. package/dist/slot.cjs.js +159 -0
  236. package/dist/slot.esm.js +227 -0
  237. package/dist/sortable.cjs.js +855 -1
  238. package/dist/sortable.esm.js +2176 -2
  239. package/dist/spinning-text.cjs.js +395 -0
  240. package/dist/spinning-text.esm.js +635 -0
  241. package/dist/split-button.cjs.js +485 -0
  242. package/dist/split-button.esm.js +709 -0
  243. package/dist/splitter.cjs.js +70 -0
  244. package/dist/splitter.esm.js +105 -0
  245. package/dist/standalone/accordion.d.ts +2 -0
  246. package/dist/standalone/accordion.d.ts.map +1 -0
  247. package/dist/standalone/alert-dialog.d.ts +2 -0
  248. package/dist/standalone/alert-dialog.d.ts.map +1 -0
  249. package/dist/standalone/alert.d.ts +2 -0
  250. package/dist/standalone/alert.d.ts.map +1 -0
  251. package/dist/standalone/anchor.d.ts +2 -0
  252. package/dist/standalone/anchor.d.ts.map +1 -0
  253. package/dist/standalone/animated-beam.d.ts +2 -0
  254. package/dist/standalone/animated-beam.d.ts.map +1 -0
  255. package/dist/standalone/animated-list.d.ts +2 -0
  256. package/dist/standalone/animated-list.d.ts.map +1 -0
  257. package/dist/standalone/animated-text.d.ts +2 -0
  258. package/dist/standalone/animated-text.d.ts.map +1 -0
  259. package/dist/standalone/app-header.d.ts +2 -0
  260. package/dist/standalone/app-header.d.ts.map +1 -0
  261. package/dist/standalone/aspect-ratio.d.ts +2 -0
  262. package/dist/standalone/aspect-ratio.d.ts.map +1 -0
  263. package/dist/standalone/avatar.d.ts +2 -0
  264. package/dist/standalone/avatar.d.ts.map +1 -0
  265. package/dist/standalone/badge.d.ts +2 -0
  266. package/dist/standalone/badge.d.ts.map +1 -0
  267. package/dist/standalone/block-controls.d.ts +2 -0
  268. package/dist/standalone/block-controls.d.ts.map +1 -0
  269. package/dist/standalone/box.d.ts +2 -0
  270. package/dist/standalone/box.d.ts.map +1 -0
  271. package/dist/standalone/breadcrumb.d.ts +2 -0
  272. package/dist/standalone/breadcrumb.d.ts.map +1 -0
  273. package/dist/standalone/button.d.ts +2 -0
  274. package/dist/standalone/button.d.ts.map +1 -0
  275. package/dist/standalone/calendar.d.ts +2 -0
  276. package/dist/standalone/calendar.d.ts.map +1 -0
  277. package/dist/standalone/card.d.ts +2 -0
  278. package/dist/standalone/card.d.ts.map +1 -0
  279. package/dist/standalone/chart.d.ts +2 -0
  280. package/dist/standalone/chart.d.ts.map +1 -0
  281. package/dist/standalone/checkbox.d.ts +2 -0
  282. package/dist/standalone/checkbox.d.ts.map +1 -0
  283. package/dist/standalone/collapsible.d.ts +2 -0
  284. package/dist/standalone/collapsible.d.ts.map +1 -0
  285. package/dist/standalone/collection.d.ts +2 -0
  286. package/dist/standalone/collection.d.ts.map +1 -0
  287. package/dist/standalone/color-picker.d.ts +2 -0
  288. package/dist/standalone/color-picker.d.ts.map +1 -0
  289. package/dist/standalone/combobox.d.ts +2 -0
  290. package/dist/standalone/combobox.d.ts.map +1 -0
  291. package/dist/standalone/command-palette.d.ts +2 -0
  292. package/dist/standalone/command-palette.d.ts.map +1 -0
  293. package/dist/standalone/command.d.ts +2 -0
  294. package/dist/standalone/command.d.ts.map +1 -0
  295. package/dist/standalone/container.d.ts +2 -0
  296. package/dist/standalone/container.d.ts.map +1 -0
  297. package/dist/standalone/context-menu.d.ts +2 -0
  298. package/dist/standalone/context-menu.d.ts.map +1 -0
  299. package/dist/standalone/control-group.d.ts +2 -0
  300. package/dist/standalone/control-group.d.ts.map +1 -0
  301. package/dist/standalone/data-table.d.ts +2 -0
  302. package/dist/standalone/data-table.d.ts.map +1 -0
  303. package/dist/standalone/date-field.d.ts +2 -0
  304. package/dist/standalone/date-field.d.ts.map +1 -0
  305. package/dist/standalone/date-picker.d.ts +2 -0
  306. package/dist/standalone/date-picker.d.ts.map +1 -0
  307. package/dist/standalone/date-range-picker.d.ts +2 -0
  308. package/dist/standalone/date-range-picker.d.ts.map +1 -0
  309. package/dist/standalone/date-range-time-picker.d.ts +2 -0
  310. package/dist/standalone/date-range-time-picker.d.ts.map +1 -0
  311. package/dist/standalone/date-time-picker.d.ts +2 -0
  312. package/dist/standalone/date-time-picker.d.ts.map +1 -0
  313. package/dist/standalone/description.d.ts +2 -0
  314. package/dist/standalone/description.d.ts.map +1 -0
  315. package/dist/standalone/dialog.d.ts +2 -0
  316. package/dist/standalone/dialog.d.ts.map +1 -0
  317. package/dist/standalone/direction-provider.d.ts +2 -0
  318. package/dist/standalone/direction-provider.d.ts.map +1 -0
  319. package/dist/standalone/dismissable-layer.d.ts +2 -0
  320. package/dist/standalone/dismissable-layer.d.ts.map +1 -0
  321. package/dist/standalone/dock.d.ts +2 -0
  322. package/dist/standalone/dock.d.ts.map +1 -0
  323. package/dist/standalone/drawer.d.ts +2 -0
  324. package/dist/standalone/drawer.d.ts.map +1 -0
  325. package/dist/standalone/dropdown.d.ts +2 -0
  326. package/dist/standalone/dropdown.d.ts.map +1 -0
  327. package/dist/standalone/dropzone.d.ts +2 -0
  328. package/dist/standalone/dropzone.d.ts.map +1 -0
  329. package/dist/standalone/empty-state.d.ts +2 -0
  330. package/dist/standalone/empty-state.d.ts.map +1 -0
  331. package/dist/standalone/field-error.d.ts +2 -0
  332. package/dist/standalone/field-error.d.ts.map +1 -0
  333. package/dist/standalone/field.d.ts +2 -0
  334. package/dist/standalone/field.d.ts.map +1 -0
  335. package/dist/standalone/fieldset.d.ts +2 -0
  336. package/dist/standalone/fieldset.d.ts.map +1 -0
  337. package/dist/standalone/file-upload.d.ts +2 -0
  338. package/dist/standalone/file-upload.d.ts.map +1 -0
  339. package/dist/standalone/flex.d.ts +2 -0
  340. package/dist/standalone/flex.d.ts.map +1 -0
  341. package/dist/standalone/floating-toolbar.d.ts +2 -0
  342. package/dist/standalone/floating-toolbar.d.ts.map +1 -0
  343. package/dist/standalone/focus-scope.d.ts +2 -0
  344. package/dist/standalone/focus-scope.d.ts.map +1 -0
  345. package/dist/standalone/form.d.ts +2 -0
  346. package/dist/standalone/form.d.ts.map +1 -0
  347. package/dist/standalone/gantt.d.ts +2 -0
  348. package/dist/standalone/gantt.d.ts.map +1 -0
  349. package/dist/standalone/grid.d.ts +2 -0
  350. package/dist/standalone/grid.d.ts.map +1 -0
  351. package/dist/standalone/hover-card.d.ts +2 -0
  352. package/dist/standalone/hover-card.d.ts.map +1 -0
  353. package/dist/standalone/icon-cloud.d.ts +2 -0
  354. package/dist/standalone/icon-cloud.d.ts.map +1 -0
  355. package/dist/standalone/icon.d.ts +2 -0
  356. package/dist/standalone/icon.d.ts.map +1 -0
  357. package/dist/standalone/inline-edit.d.ts +2 -0
  358. package/dist/standalone/inline-edit.d.ts.map +1 -0
  359. package/dist/standalone/input.d.ts +2 -0
  360. package/dist/standalone/input.d.ts.map +1 -0
  361. package/dist/standalone/label.d.ts +2 -0
  362. package/dist/standalone/label.d.ts.map +1 -0
  363. package/dist/standalone/layout.d.ts +2 -0
  364. package/dist/standalone/layout.d.ts.map +1 -0
  365. package/dist/standalone/listbox.d.ts +2 -0
  366. package/dist/standalone/listbox.d.ts.map +1 -0
  367. package/dist/standalone/marquee.d.ts +2 -0
  368. package/dist/standalone/marquee.d.ts.map +1 -0
  369. package/dist/standalone/masonry-grid.d.ts +2 -0
  370. package/dist/standalone/masonry-grid.d.ts.map +1 -0
  371. package/dist/standalone/menu.d.ts +2 -0
  372. package/dist/standalone/menu.d.ts.map +1 -0
  373. package/dist/standalone/menubar.d.ts +2 -0
  374. package/dist/standalone/menubar.d.ts.map +1 -0
  375. package/dist/standalone/meter.d.ts +2 -0
  376. package/dist/standalone/meter.d.ts.map +1 -0
  377. package/dist/standalone/multi-select.d.ts +2 -0
  378. package/dist/standalone/multi-select.d.ts.map +1 -0
  379. package/dist/standalone/navigation-menu.d.ts +2 -0
  380. package/dist/standalone/navigation-menu.d.ts.map +1 -0
  381. package/dist/standalone/number-field.d.ts +2 -0
  382. package/dist/standalone/number-field.d.ts.map +1 -0
  383. package/dist/standalone/number-ticker.d.ts +2 -0
  384. package/dist/standalone/number-ticker.d.ts.map +1 -0
  385. package/dist/standalone/odometer.d.ts +2 -0
  386. package/dist/standalone/odometer.d.ts.map +1 -0
  387. package/dist/standalone/orbiter.d.ts +2 -0
  388. package/dist/standalone/orbiter.d.ts.map +1 -0
  389. package/dist/standalone/pagination.d.ts +2 -0
  390. package/dist/standalone/pagination.d.ts.map +1 -0
  391. package/dist/standalone/panel-group.d.ts +2 -0
  392. package/dist/standalone/panel-group.d.ts.map +1 -0
  393. package/dist/standalone/panel.d.ts +2 -0
  394. package/dist/standalone/panel.d.ts.map +1 -0
  395. package/dist/standalone/password-field.d.ts +2 -0
  396. package/dist/standalone/password-field.d.ts.map +1 -0
  397. package/dist/standalone/pin-input.d.ts +2 -0
  398. package/dist/standalone/pin-input.d.ts.map +1 -0
  399. package/dist/standalone/placement-grid.d.ts +2 -0
  400. package/dist/standalone/placement-grid.d.ts.map +1 -0
  401. package/dist/standalone/plugin-panel.d.ts +2 -0
  402. package/dist/standalone/plugin-panel.d.ts.map +1 -0
  403. package/dist/standalone/popover.d.ts +2 -0
  404. package/dist/standalone/popover.d.ts.map +1 -0
  405. package/dist/standalone/portal.d.ts +2 -0
  406. package/dist/standalone/portal.d.ts.map +1 -0
  407. package/dist/standalone/positioner.d.ts +2 -0
  408. package/dist/standalone/positioner.d.ts.map +1 -0
  409. package/dist/standalone/presence.d.ts +2 -0
  410. package/dist/standalone/presence.d.ts.map +1 -0
  411. package/dist/standalone/progress.d.ts +2 -0
  412. package/dist/standalone/progress.d.ts.map +1 -0
  413. package/dist/standalone/quick-actions.d.ts +2 -0
  414. package/dist/standalone/quick-actions.d.ts.map +1 -0
  415. package/dist/standalone/radio-group.d.ts +2 -0
  416. package/dist/standalone/radio-group.d.ts.map +1 -0
  417. package/dist/standalone/rating.d.ts +2 -0
  418. package/dist/standalone/rating.d.ts.map +1 -0
  419. package/dist/standalone/roving-focus-group.d.ts +2 -0
  420. package/dist/standalone/roving-focus-group.d.ts.map +1 -0
  421. package/dist/standalone/scroll-area.d.ts +2 -0
  422. package/dist/standalone/scroll-area.d.ts.map +1 -0
  423. package/dist/standalone/section.d.ts +2 -0
  424. package/dist/standalone/section.d.ts.map +1 -0
  425. package/dist/standalone/select.d.ts +2 -0
  426. package/dist/standalone/select.d.ts.map +1 -0
  427. package/dist/standalone/selection-popup.d.ts +2 -0
  428. package/dist/standalone/selection-popup.d.ts.map +1 -0
  429. package/dist/standalone/separator.d.ts +2 -0
  430. package/dist/standalone/separator.d.ts.map +1 -0
  431. package/dist/standalone/sidebar.d.ts +2 -0
  432. package/dist/standalone/sidebar.d.ts.map +1 -0
  433. package/dist/standalone/skeleton.d.ts +2 -0
  434. package/dist/standalone/skeleton.d.ts.map +1 -0
  435. package/dist/standalone/slider.d.ts +2 -0
  436. package/dist/standalone/slider.d.ts.map +1 -0
  437. package/dist/standalone/slot.d.ts +2 -0
  438. package/dist/standalone/slot.d.ts.map +1 -0
  439. package/dist/standalone/spinning-text.d.ts +2 -0
  440. package/dist/standalone/spinning-text.d.ts.map +1 -0
  441. package/dist/standalone/split-button.d.ts +2 -0
  442. package/dist/standalone/split-button.d.ts.map +1 -0
  443. package/dist/standalone/splitter.d.ts +2 -0
  444. package/dist/standalone/splitter.d.ts.map +1 -0
  445. package/dist/standalone/stepper.d.ts +2 -0
  446. package/dist/standalone/stepper.d.ts.map +1 -0
  447. package/dist/standalone/switch.d.ts +2 -0
  448. package/dist/standalone/switch.d.ts.map +1 -0
  449. package/dist/standalone/table.d.ts +2 -0
  450. package/dist/standalone/table.d.ts.map +1 -0
  451. package/dist/standalone/tabs.d.ts +2 -0
  452. package/dist/standalone/tabs.d.ts.map +1 -0
  453. package/dist/standalone/tags-input.d.ts +2 -0
  454. package/dist/standalone/tags-input.d.ts.map +1 -0
  455. package/dist/standalone/textarea.d.ts +2 -0
  456. package/dist/standalone/textarea.d.ts.map +1 -0
  457. package/dist/standalone/time-field.d.ts +2 -0
  458. package/dist/standalone/time-field.d.ts.map +1 -0
  459. package/dist/standalone/time-picker.d.ts +2 -0
  460. package/dist/standalone/time-picker.d.ts.map +1 -0
  461. package/dist/standalone/timeline.d.ts +2 -0
  462. package/dist/standalone/timeline.d.ts.map +1 -0
  463. package/dist/standalone/toast.d.ts +2 -0
  464. package/dist/standalone/toast.d.ts.map +1 -0
  465. package/dist/standalone/toggle-group.d.ts +2 -0
  466. package/dist/standalone/toggle-group.d.ts.map +1 -0
  467. package/dist/standalone/toggle.d.ts +2 -0
  468. package/dist/standalone/toggle.d.ts.map +1 -0
  469. package/dist/standalone/toolbar.d.ts +2 -0
  470. package/dist/standalone/toolbar.d.ts.map +1 -0
  471. package/dist/standalone/tooltip.d.ts +2 -0
  472. package/dist/standalone/tooltip.d.ts.map +1 -0
  473. package/dist/standalone/transfer-list.d.ts +2 -0
  474. package/dist/standalone/transfer-list.d.ts.map +1 -0
  475. package/dist/standalone/tree-item.d.ts +2 -0
  476. package/dist/standalone/tree-item.d.ts.map +1 -0
  477. package/dist/standalone/tree.d.ts +2 -0
  478. package/dist/standalone/tree.d.ts.map +1 -0
  479. package/dist/standalone/visually-hidden.d.ts +2 -0
  480. package/dist/standalone/visually-hidden.d.ts.map +1 -0
  481. package/dist/standalone/wizard.d.ts +2 -0
  482. package/dist/standalone/wizard.d.ts.map +1 -0
  483. package/dist/stepper.cjs.js +337 -0
  484. package/dist/stepper.esm.js +578 -0
  485. package/dist/switch.cjs.js +397 -0
  486. package/dist/switch.esm.js +543 -0
  487. package/dist/table.cjs.js +212 -0
  488. package/dist/table.esm.js +432 -0
  489. package/dist/tabs.cjs.js +515 -0
  490. package/dist/tabs.esm.js +808 -0
  491. package/dist/tags-input.cjs.js +202 -0
  492. package/dist/tags-input.esm.js +436 -0
  493. package/dist/textarea.cjs.js +329 -0
  494. package/dist/textarea.esm.js +520 -0
  495. package/dist/time-field.cjs.js +142 -0
  496. package/dist/time-field.esm.js +387 -0
  497. package/dist/time-picker.cjs.js +284 -0
  498. package/dist/time-picker.esm.js +686 -0
  499. package/dist/timeline.cjs.js +198 -0
  500. package/dist/timeline.esm.js +248 -0
  501. package/dist/toast.cjs.js +234 -0
  502. package/dist/toast.esm.js +399 -0
  503. package/dist/toggle-group.cjs.js +131 -0
  504. package/dist/toggle-group.esm.js +382 -0
  505. package/dist/toggle.cjs.js +237 -0
  506. package/dist/toggle.esm.js +346 -0
  507. package/dist/toolbar.cjs.js +126 -0
  508. package/dist/toolbar.esm.js +240 -0
  509. package/dist/tooltip.cjs.js +159 -0
  510. package/dist/tooltip.esm.js +376 -0
  511. package/dist/transfer-list.cjs.js +734 -0
  512. package/dist/transfer-list.esm.js +969 -0
  513. package/dist/tree-0a7a8d05.js +39 -0
  514. package/dist/tree-dcd74a4a.mjs +294 -0
  515. package/dist/tree-item.cjs.js +103 -0
  516. package/dist/tree-item.esm.js +143 -0
  517. package/dist/tree.cjs.js +1 -0
  518. package/dist/tree.esm.js +7 -0
  519. package/dist/visually-hidden.cjs.js +42 -0
  520. package/dist/visually-hidden.esm.js +68 -0
  521. package/dist/wizard.cjs.js +677 -0
  522. package/dist/wizard.esm.js +1068 -0
  523. package/package.json +7 -1
  524. package/dist/runtime-41717c1e.js +0 -1
  525. package/dist/sortable-06a3bd6c.js +0 -855
  526. package/dist/sortable-23bf110b.mjs +0 -2254
@@ -0,0 +1,1685 @@
1
+ import { E as Ae } from "./ElementBase-909688f3.mjs";
2
+ const Te = {
3
+ calendarLabel: "Calendar",
4
+ today: "Today",
5
+ clear: "Clear",
6
+ apply: "Apply",
7
+ cancel: "Cancel",
8
+ now: "Now",
9
+ previousMonth: "Previous month",
10
+ nextMonth: "Next month",
11
+ chooseMonthYear: "Choose month and year",
12
+ previousYear: "Previous year",
13
+ nextYear: "Next year",
14
+ syncingSchedule: "Syncing schedule...",
15
+ unableToSyncEvents: "Unable to sync events",
16
+ scheduleSynced: "Schedule synced",
17
+ event: "Event",
18
+ selectDate: "Select date",
19
+ selectDateRange: "Select date range",
20
+ startDate: "Start date",
21
+ endDate: "End date",
22
+ startEnd: "Start — End",
23
+ toggleCalendar: "Toggle calendar",
24
+ clearDate: "Clear date",
25
+ clearDateRange: "Clear date range",
26
+ invalidDate: "Invalid date",
27
+ dateOutOfRange: "Date is outside the allowed range",
28
+ invalidRange: "Invalid range",
29
+ invalidTime: "Invalid time",
30
+ invalidDateTime: "Invalid date-time",
31
+ invalidRangeOrder: "Invalid range order",
32
+ rangeIncomplete: "Range is incomplete",
33
+ last7Days: "Last 7 days",
34
+ thisMonth: "This month",
35
+ hour: "Hour",
36
+ minute: "Minute",
37
+ second: "Second",
38
+ meridiem: "Meridiem",
39
+ am: "AM",
40
+ pm: "PM",
41
+ startTime: "Start time",
42
+ endTime: "End time",
43
+ datePickerPanel: "Date picker panel",
44
+ timePlaceholder: "HH:mm",
45
+ timePlaceholderSeconds: "HH:mm:ss",
46
+ dateTimePlaceholder: "YYYY-MM-DD HH:mm",
47
+ dateRangeTimePlaceholder: "Start — End"
48
+ }, Re = {
49
+ calendarLabel: "日历",
50
+ today: "今天",
51
+ clear: "清除",
52
+ apply: "应用",
53
+ cancel: "取消",
54
+ now: "现在",
55
+ previousMonth: "上个月",
56
+ nextMonth: "下个月",
57
+ chooseMonthYear: "选择月份和年份",
58
+ previousYear: "上一年",
59
+ nextYear: "下一年",
60
+ syncingSchedule: "正在同步日程...",
61
+ unableToSyncEvents: "无法同步事件",
62
+ scheduleSynced: "日程已同步",
63
+ event: "事件",
64
+ selectDate: "选择日期",
65
+ selectDateRange: "选择日期范围",
66
+ startDate: "开始日期",
67
+ endDate: "结束日期",
68
+ startEnd: "开始 — 结束",
69
+ toggleCalendar: "切换日历",
70
+ clearDate: "清除日期",
71
+ clearDateRange: "清除日期范围",
72
+ invalidDate: "日期无效",
73
+ dateOutOfRange: "日期超出允许范围",
74
+ invalidRange: "范围无效",
75
+ invalidTime: "时间无效",
76
+ invalidDateTime: "日期时间无效",
77
+ invalidRangeOrder: "范围顺序无效",
78
+ rangeIncomplete: "范围不完整",
79
+ last7Days: "最近7天",
80
+ thisMonth: "本月",
81
+ hour: "小时",
82
+ minute: "分钟",
83
+ second: "秒",
84
+ meridiem: "上午/下午",
85
+ am: "上午",
86
+ pm: "下午",
87
+ startTime: "开始时间",
88
+ endTime: "结束时间",
89
+ datePickerPanel: "日期选择面板",
90
+ timePlaceholder: "HH:mm",
91
+ timePlaceholderSeconds: "HH:mm:ss",
92
+ dateTimePlaceholder: "YYYY-MM-DD HH:mm",
93
+ dateRangeTimePlaceholder: "开始 — 结束"
94
+ }, ze = {
95
+ calendarLabel: "Calendrier",
96
+ today: "Aujourd'hui",
97
+ clear: "Effacer",
98
+ apply: "Appliquer",
99
+ cancel: "Annuler",
100
+ now: "Maintenant",
101
+ previousMonth: "Mois precedent",
102
+ nextMonth: "Mois suivant",
103
+ chooseMonthYear: "Choisir le mois et l annee",
104
+ previousYear: "Annee precedente",
105
+ nextYear: "Annee suivante",
106
+ syncingSchedule: "Synchronisation du planning...",
107
+ unableToSyncEvents: "Impossible de synchroniser les evenements",
108
+ scheduleSynced: "Planning synchronise",
109
+ event: "Evenement",
110
+ selectDate: "Selectionner une date",
111
+ selectDateRange: "Selectionner une periode",
112
+ startDate: "Date de debut",
113
+ endDate: "Date de fin",
114
+ startEnd: "Debut — Fin",
115
+ toggleCalendar: "Afficher le calendrier",
116
+ clearDate: "Effacer la date",
117
+ clearDateRange: "Effacer la periode",
118
+ invalidDate: "Date invalide",
119
+ dateOutOfRange: "La date est hors de la plage autorisee",
120
+ invalidRange: "Periode invalide",
121
+ invalidTime: "Heure invalide",
122
+ invalidDateTime: "Date/heure invalide",
123
+ invalidRangeOrder: "Ordre de periode invalide",
124
+ rangeIncomplete: "Periode incomplete",
125
+ last7Days: "7 derniers jours",
126
+ thisMonth: "Ce mois-ci",
127
+ hour: "Heure",
128
+ minute: "Minute",
129
+ second: "Seconde",
130
+ meridiem: "AM/PM",
131
+ am: "AM",
132
+ pm: "PM",
133
+ startTime: "Heure de debut",
134
+ endTime: "Heure de fin",
135
+ datePickerPanel: "Panneau de selection de date",
136
+ timePlaceholder: "HH:mm",
137
+ timePlaceholderSeconds: "HH:mm:ss",
138
+ dateTimePlaceholder: "YYYY-MM-DD HH:mm",
139
+ dateRangeTimePlaceholder: "Debut — Fin"
140
+ }, $e = {
141
+ en: Te,
142
+ zh: Re,
143
+ fr: ze
144
+ }, oe = /* @__PURE__ */ new Map();
145
+ function Ee(r) {
146
+ return r.trim().toLowerCase().replace(/_/g, "-");
147
+ }
148
+ function Pe(r) {
149
+ const e = r || (typeof navigator < "u" && navigator.language ? navigator.language : "en"), t = Ee(e || "");
150
+ return t === "zh" || t.startsWith("zh-") || t === "cn" || t === "chinese" || t === "zh-cn" || t === "zh-hans" || t === "zh-hant" ? "zh" : t === "fr" || t.startsWith("fr-") || t === "french" ? "fr" : "en";
151
+ }
152
+ function de(r) {
153
+ if (!r || typeof r != "object" || Array.isArray(r))
154
+ return {};
155
+ const e = {};
156
+ return Object.entries(r).forEach(([t, a]) => {
157
+ typeof a == "string" && (e[t] = a);
158
+ }), e;
159
+ }
160
+ function Oe(r, e) {
161
+ if (!r)
162
+ return {};
163
+ try {
164
+ const t = JSON.parse(r);
165
+ if (!t || typeof t != "object" || Array.isArray(t))
166
+ return {};
167
+ const a = de(t), n = de(t[e]);
168
+ return { ...a, ...n };
169
+ } catch {
170
+ return {};
171
+ }
172
+ }
173
+ function Le(r, e) {
174
+ const t = Pe(r), a = `${t}::${e || ""}`, n = oe.get(a);
175
+ if (n)
176
+ return n;
177
+ const i = $e[t], s = Oe(e, t), o = { ...i, ...s };
178
+ return oe.set(a, o), o;
179
+ }
180
+ const Be = `
181
+ :host {
182
+ --ui-calendar-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 95%, transparent);
183
+ --ui-calendar-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent);
184
+ --ui-calendar-text: var(--ui-color-text, #0f172a);
185
+ --ui-calendar-muted: var(--ui-color-muted, #64748b);
186
+ --ui-calendar-accent: var(--ui-color-primary, #2563eb);
187
+
188
+ --ui-calendar-radius: 14px;
189
+ --ui-calendar-shadow: none;
190
+ --ui-calendar-gap: 10px;
191
+ --ui-calendar-day-radius: 10px;
192
+ --ui-calendar-day-hover-bg: color-mix(in srgb, var(--ui-calendar-accent) 10%, transparent);
193
+ --ui-calendar-selected-bg: color-mix(in srgb, var(--ui-calendar-accent) 14%, transparent);
194
+ --ui-calendar-selected-border: color-mix(in srgb, var(--ui-calendar-accent) 44%, transparent);
195
+ --ui-calendar-today-ring: color-mix(in srgb, var(--ui-calendar-accent) 56%, transparent);
196
+ --ui-calendar-range-bg: color-mix(in srgb, var(--ui-calendar-accent) 9%, transparent);
197
+ --ui-calendar-range-edge: color-mix(in srgb, var(--ui-calendar-accent) 20%, transparent);
198
+ --ui-calendar-disabled-opacity: 0.45;
199
+
200
+ --ui-calendar-day-height: 52px;
201
+ --ui-calendar-day-font-size: 12px;
202
+ --ui-calendar-weekday-font-size: 11px;
203
+ --ui-calendar-title-font-size: 14px;
204
+ --ui-calendar-day-padding-block: 6px;
205
+ --ui-calendar-day-padding-inline: 6px;
206
+ --ui-calendar-frame-padding: 12px;
207
+ --ui-calendar-week-gap: 6px;
208
+ --ui-calendar-control-height: 30px;
209
+
210
+ display: block;
211
+ min-inline-size: 280px;
212
+ max-inline-size: 100%;
213
+ color-scheme: light dark;
214
+ font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
215
+ }
216
+
217
+ :host([tone="neutral"]) {
218
+ --ui-calendar-accent: color-mix(in srgb, var(--ui-color-muted, #64748b) 76%, var(--ui-color-text, #0f172a) 24%);
219
+ }
220
+
221
+ :host([tone="info"]) {
222
+ --ui-calendar-accent: var(--ui-color-primary, #2563eb);
223
+ }
224
+
225
+ :host([tone="success"]) {
226
+ --ui-calendar-accent: var(--ui-color-success, #16a34a);
227
+ }
228
+
229
+ :host([tone="warning"]) {
230
+ --ui-calendar-accent: var(--ui-color-warning, #d97706);
231
+ }
232
+
233
+ :host([tone="danger"]) {
234
+ --ui-calendar-accent: var(--ui-color-danger, #dc2626);
235
+ }
236
+
237
+ :host([state="error"]) {
238
+ --ui-calendar-accent: var(--ui-color-danger, #dc2626);
239
+ }
240
+
241
+ :host([state="success"]) {
242
+ --ui-calendar-accent: var(--ui-color-success, #16a34a);
243
+ }
244
+
245
+ :host([size="sm"]) {
246
+ --ui-calendar-gap: 8px;
247
+ --ui-calendar-day-height: 42px;
248
+ --ui-calendar-day-font-size: 11px;
249
+ --ui-calendar-weekday-font-size: 10px;
250
+ --ui-calendar-title-font-size: 13px;
251
+ --ui-calendar-day-radius: 8px;
252
+ }
253
+
254
+ :host([size="lg"]) {
255
+ --ui-calendar-gap: 12px;
256
+ --ui-calendar-day-height: 58px;
257
+ --ui-calendar-day-font-size: 13px;
258
+ --ui-calendar-weekday-font-size: 12px;
259
+ --ui-calendar-title-font-size: 15px;
260
+ --ui-calendar-day-radius: 12px;
261
+ }
262
+
263
+ .frame {
264
+ position: relative;
265
+ border: 1px solid var(--ui-calendar-border);
266
+ border-radius: var(--ui-calendar-radius);
267
+ background: var(--ui-calendar-bg);
268
+ box-shadow: var(--ui-calendar-shadow);
269
+ padding: var(--ui-calendar-frame-padding);
270
+ display: grid;
271
+ gap: var(--ui-calendar-gap);
272
+ min-inline-size: 0;
273
+ }
274
+
275
+ :host([bare]) .frame {
276
+ border: 1px solid var(--ui-calendar-bare-border, var(--ui-calendar-border));
277
+ border-radius: var(--ui-calendar-bare-radius, var(--ui-calendar-radius));
278
+ background: var(--ui-calendar-bare-bg, var(--ui-calendar-bg));
279
+ box-shadow: none;
280
+ padding: var(--ui-calendar-bare-padding, 10px);
281
+ }
282
+
283
+ :host([headless]) .frame {
284
+ display: none !important;
285
+ }
286
+
287
+ .header {
288
+ display: grid;
289
+ grid-template-columns: auto 1fr auto;
290
+ align-items: center;
291
+ gap: 8px;
292
+ min-inline-size: 0;
293
+ }
294
+
295
+ .nav,
296
+ .header-actions {
297
+ display: inline-flex;
298
+ align-items: center;
299
+ gap: 6px;
300
+ }
301
+
302
+ .title-wrap {
303
+ display: flex;
304
+ position: relative;
305
+ justify-content: center;
306
+ min-inline-size: 0;
307
+ overflow: visible;
308
+ }
309
+
310
+ .status {
311
+ display: inline-flex;
312
+ align-items: center;
313
+ gap: 8px;
314
+ min-block-size: var(--ui-calendar-control-height);
315
+ border: 1px solid color-mix(in srgb, var(--ui-calendar-border) 84%, transparent);
316
+ border-radius: 10px;
317
+ padding: 0 10px;
318
+ font: 600 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
319
+ color: var(--ui-calendar-text);
320
+ background: color-mix(in srgb, var(--ui-calendar-bg) 96%, transparent);
321
+ }
322
+
323
+ .status[hidden] {
324
+ display: none !important;
325
+ }
326
+
327
+ .status-dot {
328
+ inline-size: 8px;
329
+ block-size: 8px;
330
+ border-radius: 999px;
331
+ background: var(--ui-calendar-accent);
332
+ }
333
+
334
+ :host([state="loading"]) .status-dot {
335
+ position: relative;
336
+ overflow: hidden;
337
+ }
338
+
339
+ :host([state="loading"]) .status-dot::after {
340
+ content: '';
341
+ position: absolute;
342
+ inset: 0;
343
+ border-radius: inherit;
344
+ border: 2px solid color-mix(in srgb, var(--ui-calendar-accent) 24%, transparent);
345
+ border-top-color: var(--ui-calendar-accent);
346
+ animation: ui-calendar-spin 800ms linear infinite;
347
+ }
348
+
349
+ .title-btn,
350
+ .nav-btn,
351
+ .today-btn,
352
+ .picker-btn,
353
+ .picker-month,
354
+ .picker-year-btn {
355
+ border: 1px solid color-mix(in srgb, var(--ui-calendar-border) 82%, transparent);
356
+ background: color-mix(in srgb, var(--ui-calendar-bg) 94%, transparent);
357
+ color: var(--ui-calendar-text);
358
+ border-radius: 9px;
359
+ cursor: pointer;
360
+ transition: background-color 130ms ease, border-color 130ms ease, transform 120ms ease;
361
+ }
362
+
363
+ .nav-btn,
364
+ .today-btn,
365
+ .picker-year-btn {
366
+ min-block-size: var(--ui-calendar-control-height);
367
+ padding: 0 10px;
368
+ display: inline-flex;
369
+ align-items: center;
370
+ justify-content: center;
371
+ gap: var(--ui-calendar-week-gap);
372
+ font: 600 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
373
+ }
374
+
375
+ .nav-btn {
376
+ inline-size: 30px;
377
+ padding: 0;
378
+ }
379
+
380
+ .title-btn {
381
+ min-block-size: 32px;
382
+ padding: 0 12px;
383
+ display: inline-flex;
384
+ align-items: center;
385
+ justify-content: center;
386
+ gap: 8px;
387
+ font: 700 var(--ui-calendar-title-font-size)/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
388
+ letter-spacing: 0.01em;
389
+ min-inline-size: 0;
390
+ white-space: nowrap;
391
+ overflow: hidden;
392
+ text-overflow: ellipsis;
393
+ }
394
+
395
+ .nav-btn:hover,
396
+ .today-btn:hover,
397
+ .title-btn:hover,
398
+ .picker-btn:hover,
399
+ .picker-month:hover,
400
+ .picker-year-btn:hover {
401
+ border-color: color-mix(in srgb, var(--ui-calendar-accent) 38%, var(--ui-calendar-border));
402
+ background: var(--ui-calendar-day-hover-bg);
403
+ }
404
+
405
+ .nav-btn:active,
406
+ .today-btn:active,
407
+ .title-btn:active,
408
+ .picker-btn:active,
409
+ .picker-month:active,
410
+ .picker-year-btn:active {
411
+ transform: translateY(1px);
412
+ }
413
+
414
+ .nav-btn:focus-visible,
415
+ .today-btn:focus-visible,
416
+ .title-btn:focus-visible,
417
+ .picker-btn:focus-visible,
418
+ .picker-month:focus-visible,
419
+ .picker-year-btn:focus-visible,
420
+ .day:focus-visible {
421
+ outline: 2px solid var(--ui-calendar-accent);
422
+ outline-offset: 1px;
423
+ }
424
+
425
+ .nav-btn[disabled],
426
+ .today-btn[disabled],
427
+ .title-btn[disabled],
428
+ .picker-btn[disabled],
429
+ .picker-month[disabled],
430
+ .picker-year-btn[disabled],
431
+ .day[aria-disabled="true"] {
432
+ opacity: var(--ui-calendar-disabled-opacity);
433
+ cursor: not-allowed;
434
+ pointer-events: none;
435
+ }
436
+
437
+ .monthyear-pop {
438
+ position: absolute;
439
+ inset-block-start: calc(100% + 8px);
440
+ inset-inline-start: 50%;
441
+ transform: translateX(-50%);
442
+ z-index: 10;
443
+ border: 1px solid color-mix(in srgb, var(--ui-calendar-border) 84%, transparent);
444
+ border-radius: 12px;
445
+ background: color-mix(in srgb, var(--ui-calendar-bg) 96%, transparent);
446
+ box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
447
+ padding: 10px;
448
+ display: grid;
449
+ gap: 8px;
450
+ }
451
+
452
+ .monthyear-pop[hidden] {
453
+ display: none;
454
+ }
455
+
456
+ .picker-header {
457
+ display: inline-flex;
458
+ align-items: center;
459
+ justify-content: space-between;
460
+ gap: 8px;
461
+ }
462
+
463
+ .picker-year {
464
+ font: 700 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
465
+ color: var(--ui-calendar-text);
466
+ }
467
+
468
+ .picker-months {
469
+ display: grid;
470
+ grid-template-columns: repeat(3, minmax(0, 1fr));
471
+ gap: 6px;
472
+ }
473
+
474
+ .picker-month {
475
+ min-block-size: 28px;
476
+ padding: 0 8px;
477
+ font: 600 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
478
+ }
479
+
480
+ .picker-month[data-active="true"] {
481
+ border-color: var(--ui-calendar-selected-border);
482
+ background: var(--ui-calendar-selected-bg);
483
+ }
484
+
485
+ .grid-wrap {
486
+ min-inline-size: 0;
487
+ display: grid;
488
+ gap: var(--ui-calendar-week-gap);
489
+ }
490
+
491
+ :host([state="loading"]) .grid-wrap {
492
+ opacity: 0.68;
493
+ pointer-events: none;
494
+ }
495
+
496
+ .weekdays,
497
+ .week {
498
+ display: grid;
499
+ grid-template-columns: repeat(7, minmax(0, 1fr));
500
+ gap: var(--ui-calendar-week-gap);
501
+ }
502
+
503
+ .weekday {
504
+ text-align: center;
505
+ font-size: var(--ui-calendar-weekday-font-size);
506
+ text-transform: uppercase;
507
+ letter-spacing: 0.06em;
508
+ color: var(--ui-calendar-muted);
509
+ padding: 4px 2px;
510
+ }
511
+
512
+ .day {
513
+ border: 1px solid color-mix(in srgb, var(--ui-calendar-border) 78%, transparent);
514
+ border-radius: var(--ui-calendar-day-radius);
515
+ min-block-size: var(--ui-calendar-day-height);
516
+ padding: var(--ui-calendar-day-padding-block) var(--ui-calendar-day-padding-inline);
517
+ background: color-mix(in srgb, var(--ui-calendar-bg) 98%, transparent);
518
+ color: var(--ui-calendar-text);
519
+ display: grid;
520
+ align-content: center;
521
+ justify-items: center;
522
+ gap: 4px;
523
+ text-align: center;
524
+ cursor: pointer;
525
+ position: relative;
526
+ overflow: hidden;
527
+ transition: border-color 130ms ease, background-color 130ms ease;
528
+ }
529
+
530
+ .day:hover {
531
+ border-color: color-mix(in srgb, var(--ui-calendar-accent) 34%, var(--ui-calendar-border));
532
+ background: var(--ui-calendar-day-hover-bg);
533
+ }
534
+
535
+ .day[data-outside="true"] {
536
+ color: color-mix(in srgb, var(--ui-calendar-muted) 88%, transparent);
537
+ background: color-mix(in srgb, var(--ui-calendar-bg) 92%, transparent);
538
+ }
539
+
540
+ .day[data-today="true"] {
541
+ box-shadow: inset 0 0 0 1px var(--ui-calendar-today-ring);
542
+ }
543
+
544
+ .day[data-selected="true"] {
545
+ border-color: var(--ui-calendar-selected-border);
546
+ background: var(--ui-calendar-selected-bg);
547
+ }
548
+
549
+ .day[data-range="true"] {
550
+ background: var(--ui-calendar-range-bg);
551
+ border-color: color-mix(in srgb, var(--ui-calendar-accent) 26%, var(--ui-calendar-border));
552
+ border-radius: 0;
553
+ }
554
+
555
+ .day[data-range-start="true"],
556
+ .day[data-range-end="true"] {
557
+ background: var(--ui-calendar-range-edge);
558
+ border-color: var(--ui-calendar-selected-border);
559
+ border-radius: var(--ui-calendar-day-radius);
560
+ }
561
+
562
+ .day[data-range-preview="true"] {
563
+ background: color-mix(in srgb, var(--ui-calendar-accent) 7%, transparent);
564
+ }
565
+
566
+ :host([state="loading"]) .day {
567
+ position: relative;
568
+ overflow: hidden;
569
+ }
570
+
571
+ :host([state="loading"]) .day::after {
572
+ content: '';
573
+ position: absolute;
574
+ inset: 0;
575
+ background: linear-gradient(
576
+ 100deg,
577
+ color-mix(in srgb, transparent 100%, #ffffff) 0%,
578
+ color-mix(in srgb, var(--ui-calendar-accent) 12%, transparent) 45%,
579
+ color-mix(in srgb, transparent 100%, #ffffff) 100%
580
+ );
581
+ background-size: 220% 100%;
582
+ animation: ui-calendar-shimmer 1.35s linear infinite;
583
+ pointer-events: none;
584
+ }
585
+
586
+ .day-number {
587
+ font-size: var(--ui-calendar-day-font-size);
588
+ font-weight: 650;
589
+ line-height: 1;
590
+ justify-self: center;
591
+ }
592
+
593
+ .events {
594
+ min-block-size: 10px;
595
+ display: inline-flex;
596
+ align-items: center;
597
+ justify-content: center;
598
+ gap: 4px;
599
+ max-inline-size: 100%;
600
+ overflow: hidden;
601
+ }
602
+
603
+ .event-dot {
604
+ inline-size: 7px;
605
+ block-size: 7px;
606
+ border-radius: 999px;
607
+ background: var(--event-tone, var(--ui-calendar-accent));
608
+ flex: 0 0 auto;
609
+ }
610
+
611
+ .event-badge {
612
+ max-inline-size: 100%;
613
+ border-radius: 999px;
614
+ padding: 1px 6px;
615
+ font: 600 10px/1.25 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
616
+ background: color-mix(in srgb, var(--event-tone, var(--ui-calendar-accent)) 18%, transparent);
617
+ color: var(--ui-calendar-text);
618
+ white-space: nowrap;
619
+ overflow: hidden;
620
+ text-overflow: ellipsis;
621
+ }
622
+
623
+ .event-count {
624
+ inline-size: 16px;
625
+ block-size: 16px;
626
+ border-radius: 999px;
627
+ display: inline-grid;
628
+ place-items: center;
629
+ font: 700 10px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
630
+ background: color-mix(in srgb, var(--ui-calendar-accent) 18%, transparent);
631
+ color: var(--ui-calendar-text);
632
+ }
633
+
634
+ .event-more {
635
+ font: 600 10px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
636
+ color: var(--ui-calendar-muted);
637
+ white-space: nowrap;
638
+ }
639
+
640
+ .tooltip {
641
+ position: absolute;
642
+ inset-inline-start: 50%;
643
+ inset-block-end: calc(100% + 6px);
644
+ transform: translateX(-50%);
645
+ min-inline-size: 120px;
646
+ max-inline-size: 220px;
647
+ padding: 6px 8px;
648
+ border-radius: 8px;
649
+ border: 1px solid color-mix(in srgb, var(--ui-calendar-border) 80%, transparent);
650
+ background: color-mix(in srgb, var(--ui-calendar-bg) 98%, #ffffff 2%);
651
+ box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
652
+ color: var(--ui-calendar-text);
653
+ font: 500 11px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
654
+ opacity: 0;
655
+ pointer-events: none;
656
+ z-index: 5;
657
+ }
658
+
659
+ .tooltip[hidden] {
660
+ display: none;
661
+ }
662
+
663
+ .day:hover .tooltip,
664
+ .day:focus-visible .tooltip,
665
+ .day:focus-within .tooltip {
666
+ opacity: 1;
667
+ }
668
+
669
+ .live-region {
670
+ position: absolute;
671
+ inline-size: 1px;
672
+ block-size: 1px;
673
+ margin: -1px;
674
+ padding: 0;
675
+ border: 0;
676
+ overflow: hidden;
677
+ clip: rect(0 0 0 0);
678
+ clip-path: inset(50%);
679
+ white-space: nowrap;
680
+ }
681
+
682
+ :host([variant="contrast"]) {
683
+ --ui-calendar-bg: #0f172a;
684
+ --ui-calendar-border: #334155;
685
+ --ui-calendar-text: #e2e8f0;
686
+ --ui-calendar-muted: #93a4bd;
687
+ --ui-calendar-accent: #93c5fd;
688
+ --ui-calendar-shadow: 0 16px 38px rgba(2, 6, 23, 0.5);
689
+ --ui-calendar-selected-bg: color-mix(in srgb, #93c5fd 22%, transparent);
690
+ --ui-calendar-selected-border: color-mix(in srgb, #93c5fd 72%, transparent);
691
+ --ui-calendar-range-bg: color-mix(in srgb, #93c5fd 12%, transparent);
692
+ --ui-calendar-range-edge: color-mix(in srgb, #93c5fd 20%, transparent);
693
+ }
694
+
695
+ :host([disabled]) .frame {
696
+ opacity: 0.74;
697
+ }
698
+
699
+ :host([state="error"]) .frame {
700
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-color-danger, #dc2626) 28%, transparent), var(--ui-calendar-shadow);
701
+ }
702
+
703
+ :host([state="success"]) .frame {
704
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--ui-color-success, #16a34a) 28%, transparent), var(--ui-calendar-shadow);
705
+ }
706
+
707
+ @media (max-width: 420px) {
708
+ .frame {
709
+ padding: 10px;
710
+ }
711
+
712
+ .header {
713
+ grid-template-columns: 1fr;
714
+ gap: 6px;
715
+ }
716
+
717
+ .title-wrap {
718
+ justify-content: flex-start;
719
+ }
720
+ }
721
+
722
+ @media (prefers-reduced-motion: reduce) {
723
+ .day,
724
+ .nav-btn,
725
+ .today-btn,
726
+ .title-btn,
727
+ .picker-btn,
728
+ .picker-month,
729
+ .picker-year-btn {
730
+ transition: none !important;
731
+ }
732
+
733
+ :host([state="loading"]) .day::after,
734
+ :host([state="loading"]) .status-dot::after {
735
+ animation: none !important;
736
+ }
737
+ }
738
+
739
+ @media (prefers-contrast: more) {
740
+ .frame {
741
+ box-shadow: none;
742
+ border-width: 2px;
743
+ }
744
+
745
+ .day,
746
+ .nav-btn,
747
+ .today-btn,
748
+ .title-btn,
749
+ .picker-btn,
750
+ .picker-month,
751
+ .picker-year-btn {
752
+ border-width: 2px;
753
+ }
754
+ }
755
+
756
+ @media (forced-colors: active) {
757
+ :host {
758
+ --ui-calendar-bg: Canvas;
759
+ --ui-calendar-border: CanvasText;
760
+ --ui-calendar-text: CanvasText;
761
+ --ui-calendar-muted: CanvasText;
762
+ --ui-calendar-accent: Highlight;
763
+ --ui-calendar-shadow: none;
764
+ --ui-calendar-selected-bg: Highlight;
765
+ --ui-calendar-selected-border: Highlight;
766
+ --ui-calendar-range-bg: Highlight;
767
+ --ui-calendar-range-edge: Highlight;
768
+ --ui-calendar-today-ring: Highlight;
769
+ }
770
+
771
+ .frame,
772
+ .day,
773
+ .nav-btn,
774
+ .today-btn,
775
+ .title-btn,
776
+ .picker-btn,
777
+ .picker-month,
778
+ .picker-year-btn,
779
+ .monthyear-pop,
780
+ .tooltip,
781
+ .status,
782
+ .event-dot,
783
+ .event-badge,
784
+ .event-count {
785
+ forced-color-adjust: none;
786
+ box-shadow: none;
787
+ background: Canvas;
788
+ color: CanvasText;
789
+ border-color: CanvasText;
790
+ }
791
+
792
+ .day[data-selected="true"],
793
+ .day[data-range="true"],
794
+ .day[data-range-start="true"],
795
+ .day[data-range-end="true"] {
796
+ background: Highlight;
797
+ color: HighlightText;
798
+ border-color: Highlight;
799
+ }
800
+
801
+ .day[data-today="true"] {
802
+ box-shadow: inset 0 0 0 2px Highlight;
803
+ }
804
+
805
+ .event-dot,
806
+ .event-badge,
807
+ .event-count {
808
+ background: Highlight;
809
+ color: HighlightText;
810
+ border-color: Highlight;
811
+ }
812
+ }
813
+
814
+ @keyframes ui-calendar-spin {
815
+ to { transform: rotate(360deg); }
816
+ }
817
+
818
+ @keyframes ui-calendar-shimmer {
819
+ from { background-position: 120% 0; }
820
+ to { background-position: -120% 0; }
821
+ }
822
+ `, K = {
823
+ default: "var(--ui-color-primary, #2563eb)",
824
+ info: "var(--ui-color-info, #0891b2)",
825
+ success: "var(--ui-color-success, #16a34a)",
826
+ warning: "var(--ui-color-warning, #d97706)",
827
+ danger: "var(--ui-color-danger, #dc2626)"
828
+ };
829
+ function O(r, e, t) {
830
+ return Math.max(e, Math.min(t, r));
831
+ }
832
+ function B(r) {
833
+ return String(r).padStart(2, "0");
834
+ }
835
+ function v(r) {
836
+ return `${r.y}-${B(r.m)}-${B(r.d)}`;
837
+ }
838
+ function c(r) {
839
+ const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec((r || "").trim());
840
+ if (!e)
841
+ return null;
842
+ const t = Number(e[1]), a = Number(e[2]), n = Number(e[3]);
843
+ if (!Number.isInteger(t) || !Number.isInteger(a) || !Number.isInteger(n) || a < 1 || a > 12)
844
+ return null;
845
+ const i = H(t, a);
846
+ return n < 1 || n > i ? null : { y: t, m: a, d: n };
847
+ }
848
+ function H(r, e) {
849
+ return new Date(Date.UTC(r, e, 0)).getUTCDate();
850
+ }
851
+ function F(r) {
852
+ return new Date(Date.UTC(r.y, r.m - 1, r.d));
853
+ }
854
+ function ge(r) {
855
+ return {
856
+ y: r.getUTCFullYear(),
857
+ m: r.getUTCMonth() + 1,
858
+ d: r.getUTCDate()
859
+ };
860
+ }
861
+ function w(r, e) {
862
+ const t = c(r), a = c(e);
863
+ return !t || !a ? r.localeCompare(e) : t.y !== a.y ? t.y - a.y : t.m !== a.m ? t.m - a.m : t.d - a.d;
864
+ }
865
+ function Fe(r, e) {
866
+ const t = c(r);
867
+ if (!t)
868
+ return r;
869
+ const a = F(t);
870
+ return a.setUTCDate(a.getUTCDate() + e), v(ge(a));
871
+ }
872
+ function L(r, e) {
873
+ const t = new Date(Date.UTC(r.y, r.m - 1, 1));
874
+ t.setUTCMonth(t.getUTCMonth() + e);
875
+ const a = t.getUTCFullYear(), n = t.getUTCMonth() + 1, i = O(r.d, 1, H(a, n));
876
+ return { y: a, m: n, d: i };
877
+ }
878
+ function He(r, e) {
879
+ const t = c(r);
880
+ return t ? v(L(t, e)) : r;
881
+ }
882
+ function le(r, e) {
883
+ return { y: r, m: e, d: 1 };
884
+ }
885
+ function Ue(r, e) {
886
+ return { y: r, m: e, d: H(r, e) };
887
+ }
888
+ function ce(r) {
889
+ const e = c(r);
890
+ return e ? F(e).getUTCDay() : 0;
891
+ }
892
+ function W(r, e) {
893
+ if (r == null || r === "")
894
+ return e;
895
+ const t = Number(r);
896
+ return Number.isFinite(t) ? Math.trunc(t) : e;
897
+ }
898
+ function ue(r, e) {
899
+ const t = W(r, e);
900
+ return t < 1 ? e : t;
901
+ }
902
+ function Ne(r, e) {
903
+ if (r == null)
904
+ return e;
905
+ const t = String(r).toLowerCase();
906
+ return t !== "false" && t !== "0" && t !== "off";
907
+ }
908
+ function m(r) {
909
+ return r.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
910
+ }
911
+ function J(r, e, t) {
912
+ return w(r, e) >= 0 && w(r, t) <= 0;
913
+ }
914
+ function E(r, e) {
915
+ return w(r, e) <= 0 ? { start: r, end: e } : { start: e, end: r };
916
+ }
917
+ function he(r, e) {
918
+ var a;
919
+ const t = Number(r);
920
+ if (t === 0 || t === 1 || t === 6)
921
+ return t;
922
+ try {
923
+ const n = new Intl.Locale(e || void 0), i = (a = n == null ? void 0 : n.weekInfo) == null ? void 0 : a.firstDay;
924
+ if (i === 7)
925
+ return 0;
926
+ if (i === 1 || i === 6)
927
+ return i;
928
+ } catch {
929
+ }
930
+ return 0;
931
+ }
932
+ function Ye(r) {
933
+ return r === "range" || r === "multiple" ? r : "single";
934
+ }
935
+ function je(r) {
936
+ return r === "none" || r === "select" ? r : "navigate";
937
+ }
938
+ function Ve(r) {
939
+ return r === "badges" || r === "count" ? r : "dots";
940
+ }
941
+ function qe(r) {
942
+ return r === "sm" || r === "lg" ? r : "md";
943
+ }
944
+ function Ke(r) {
945
+ return r === "neutral" || r === "info" || r === "success" || r === "warning" || r === "danger" ? r : null;
946
+ }
947
+ function pe(r) {
948
+ return r === "loading" || r === "error" || r === "success" ? r : "idle";
949
+ }
950
+ function fe(r) {
951
+ const e = [], t = /* @__PURE__ */ new Set();
952
+ return r.forEach((a) => {
953
+ const n = c(a);
954
+ if (!n)
955
+ return;
956
+ const i = v(n);
957
+ t.has(i) || (t.add(i), e.push(i));
958
+ }), e.sort(w), e;
959
+ }
960
+ function P(r) {
961
+ return r.mode === "single" ? { mode: "single", value: r.value } : r.mode === "range" ? { mode: "range", start: r.start, end: r.end } : { mode: "multiple", values: [...r.values] };
962
+ }
963
+ class Je extends Ae {
964
+ constructor() {
965
+ super(), this._eventsRawCache = null, this._eventsParsedCache = [], this._eventsByDateCache = /* @__PURE__ */ new Map(), this._valueRawCache = null, this._valueModeCache = null, this._valueParsedCache = { mode: "single", value: null }, this._focusedIso = "", this._hoverIso = null, this._pickerOpen = !1, this._syncingValueAttribute = !1, this._rangeKeyboardAnchor = null, this._shouldRefocus = !1, this._docPointerDownBound = (e) => this._onDocumentPointerDown(e), this._onClick = this._onClick.bind(this), this._onKeyDown = this._onKeyDown.bind(this), this._onPointerOver = this._onPointerOver.bind(this), this._onMouseLeave = this._onMouseLeave.bind(this), this._onFocusIn = this._onFocusIn.bind(this);
966
+ }
967
+ static get observedAttributes() {
968
+ return [
969
+ "year",
970
+ "month",
971
+ "events",
972
+ "value",
973
+ "variant",
974
+ "headless",
975
+ "selection",
976
+ "min",
977
+ "max",
978
+ "disabled",
979
+ "readonly",
980
+ "week-start",
981
+ "locale",
982
+ "translations",
983
+ "outside-click",
984
+ "events-max",
985
+ "events-display",
986
+ "max-selections",
987
+ "size",
988
+ "hide-today",
989
+ "show-today",
990
+ "tone",
991
+ "state",
992
+ "bare",
993
+ "aria-label"
994
+ ];
995
+ }
996
+ connectedCallback() {
997
+ super.connectedCallback(), this.root.addEventListener("click", this._onClick), this.root.addEventListener("keydown", this._onKeyDown), this.root.addEventListener("pointerover", this._onPointerOver), this.root.addEventListener("mouseleave", this._onMouseLeave), this.root.addEventListener("focusin", this._onFocusIn), this._syncDocumentListener();
998
+ }
999
+ disconnectedCallback() {
1000
+ this.root.removeEventListener("click", this._onClick), this.root.removeEventListener("keydown", this._onKeyDown), this.root.removeEventListener("pointerover", this._onPointerOver), this.root.removeEventListener("mouseleave", this._onMouseLeave), this.root.removeEventListener("focusin", this._onFocusIn), typeof document < "u" && document.removeEventListener("pointerdown", this._docPointerDownBound, !0), super.disconnectedCallback();
1001
+ }
1002
+ attributeChangedCallback(e, t, a) {
1003
+ t !== a && (e === "events" && (this._eventsRawCache = null), e === "value" && !this._syncingValueAttribute && (this._rangeKeyboardAnchor = null, this._valueRawCache = null), e === "selection" && (this._rangeKeyboardAnchor = null, this._valueModeCache = null), e === "disabled" && this.hasAttribute("disabled") && (this._pickerOpen = !1, this._hoverIso = null), e === "state" && pe(a) === "loading" && (this._pickerOpen = !1, this._hoverIso = null), this.isConnected && (this._syncDocumentListener(), this.requestRender()));
1004
+ }
1005
+ focusDate(e) {
1006
+ const t = c(e);
1007
+ t && (this.goToMonth(t.y, t.m), this._focusedIso = v(t), this._shouldRefocus = !0, this.requestRender());
1008
+ }
1009
+ goToMonth(e, t, a = "api") {
1010
+ if (!Number.isFinite(e) || !Number.isFinite(t))
1011
+ return;
1012
+ let n = Math.trunc(e), i = Math.trunc(t);
1013
+ for (; i < 1; )
1014
+ i += 12, n -= 1;
1015
+ for (; i > 12; )
1016
+ i -= 12, n += 1;
1017
+ let s = !1;
1018
+ if (String(n) !== (this.getAttribute("year") || "") && (this.setAttribute("year", String(n)), s = !0), String(i) !== (this.getAttribute("month") || "") && (this.setAttribute("month", String(i)), s = !0), s) {
1019
+ const o = { year: n, month: i, source: a };
1020
+ this.dispatchEvent(
1021
+ new CustomEvent("month-change", {
1022
+ detail: o,
1023
+ bubbles: !0,
1024
+ composed: !0
1025
+ })
1026
+ ), this.dispatchEvent(
1027
+ new CustomEvent("ui-month-change", {
1028
+ detail: o,
1029
+ bubbles: !0,
1030
+ composed: !0
1031
+ })
1032
+ );
1033
+ }
1034
+ }
1035
+ selectDate(e) {
1036
+ const t = c(e);
1037
+ if (!t)
1038
+ return;
1039
+ const a = v(t);
1040
+ this._shouldRefocus = !0, this._applySelection(a, !1, "api");
1041
+ }
1042
+ _syncDocumentListener() {
1043
+ typeof document > "u" || (document.removeEventListener("pointerdown", this._docPointerDownBound, !0), this._pickerOpen && document.addEventListener("pointerdown", this._docPointerDownBound, !0));
1044
+ }
1045
+ _onDocumentPointerDown(e) {
1046
+ !this._pickerOpen || e.composedPath().includes(this) || (this._pickerOpen = !1, this.requestRender());
1047
+ }
1048
+ _resolveLocale() {
1049
+ return (this.getAttribute("locale") || "").trim() || (typeof navigator < "u" ? navigator.language : "en-US");
1050
+ }
1051
+ _resolvedView() {
1052
+ const e = /* @__PURE__ */ new Date(), t = W(this.getAttribute("year"), e.getFullYear()), a = W(this.getAttribute("month"), e.getMonth() + 1);
1053
+ return {
1054
+ year: t,
1055
+ month: O(a, 1, 12)
1056
+ };
1057
+ }
1058
+ _todayIso() {
1059
+ const e = /* @__PURE__ */ new Date();
1060
+ return `${e.getFullYear()}-${B(e.getMonth() + 1)}-${B(e.getDate())}`;
1061
+ }
1062
+ _resolveMinIso() {
1063
+ const e = c(this.getAttribute("min") || "");
1064
+ return e ? v(e) : null;
1065
+ }
1066
+ _resolveMaxIso() {
1067
+ const e = c(this.getAttribute("max") || "");
1068
+ return e ? v(e) : null;
1069
+ }
1070
+ _monthHasAllowedDay(e, t, a, n) {
1071
+ const i = v(le(e, t)), s = v(Ue(e, t));
1072
+ return !(a && w(s, a) < 0 || n && w(i, n) > 0);
1073
+ }
1074
+ _resolveSelectionMode() {
1075
+ return Ye(this.getAttribute("selection"));
1076
+ }
1077
+ _resolveEventsDisplay() {
1078
+ return Ve(this.getAttribute("events-display"));
1079
+ }
1080
+ _resolveOutsideClickMode() {
1081
+ return je(this.getAttribute("outside-click"));
1082
+ }
1083
+ _resolveCalendarSize() {
1084
+ return qe(this.getAttribute("size"));
1085
+ }
1086
+ _resolveTone() {
1087
+ return Ke(this.getAttribute("tone"));
1088
+ }
1089
+ _resolveState() {
1090
+ return pe(this.getAttribute("state"));
1091
+ }
1092
+ _resolveLabel() {
1093
+ const e = (this.getAttribute("aria-label") || "").trim();
1094
+ return e || this._translations().calendarLabel;
1095
+ }
1096
+ _translations() {
1097
+ return Le(
1098
+ this.getAttribute("locale"),
1099
+ this.getAttribute("translations")
1100
+ );
1101
+ }
1102
+ _resolveBounds() {
1103
+ let e = this._resolveMinIso(), t = this._resolveMaxIso();
1104
+ if (e && t && w(e, t) > 0) {
1105
+ const a = e;
1106
+ e = t, t = a;
1107
+ }
1108
+ return { minIso: e, maxIso: t };
1109
+ }
1110
+ _direction() {
1111
+ const e = this.getAttribute("dir");
1112
+ if (e === "rtl" || e === "ltr")
1113
+ return e;
1114
+ const t = this.closest("[dir]"), a = t == null ? void 0 : t.getAttribute("dir");
1115
+ return a === "rtl" || a === "ltr" ? a : getComputedStyle(this).direction === "rtl" ? "rtl" : "ltr";
1116
+ }
1117
+ _maxSelections() {
1118
+ return ue(this.getAttribute("max-selections"), Number.MAX_SAFE_INTEGER);
1119
+ }
1120
+ _eventsMax() {
1121
+ return O(ue(this.getAttribute("events-max"), 3), 1, 9);
1122
+ }
1123
+ _showTodayButton() {
1124
+ return this.hasAttribute("hide-today") ? !1 : Ne(this.getAttribute("show-today"), !0);
1125
+ }
1126
+ _isDisabled() {
1127
+ return this.hasAttribute("disabled");
1128
+ }
1129
+ _isReadonly() {
1130
+ return this.hasAttribute("readonly");
1131
+ }
1132
+ _isInteractionDisabled() {
1133
+ return this._isDisabled() || this._resolveState() === "loading";
1134
+ }
1135
+ _isDateOutOfBounds(e, t, a) {
1136
+ return !!(t && w(e, t) < 0 || a && w(e, a) > 0);
1137
+ }
1138
+ _isDateBlocked(e, t, a, n) {
1139
+ return !!(this._isInteractionDisabled() || this._isDateOutOfBounds(e, a, n) || t && this._resolveOutsideClickMode() === "none");
1140
+ }
1141
+ _normalizeValueForMode(e) {
1142
+ const t = this.getAttribute("value") || "";
1143
+ if (this._valueRawCache === t && this._valueModeCache === e)
1144
+ return P(this._valueParsedCache);
1145
+ let a;
1146
+ if (e === "multiple") {
1147
+ try {
1148
+ const i = JSON.parse(t);
1149
+ if (!Array.isArray(i))
1150
+ a = { mode: e, values: [] };
1151
+ else {
1152
+ const s = fe(i.map((o) => String(o || "")));
1153
+ a = { mode: e, values: s };
1154
+ }
1155
+ } catch {
1156
+ a = { mode: e, values: [] };
1157
+ }
1158
+ return this._valueRawCache = t, this._valueModeCache = e, this._valueParsedCache = P(a), a;
1159
+ }
1160
+ if (e === "range") {
1161
+ try {
1162
+ const i = JSON.parse(t), s = i && typeof i == "object" ? String(i.start || "") : "", o = i && typeof i == "object" ? String(i.end || "") : "", d = c(s), u = c(o), h = d ? v(d) : null, p = u ? v(u) : null;
1163
+ if (h && p) {
1164
+ const f = E(h, p);
1165
+ a = { mode: e, start: f.start, end: f.end };
1166
+ } else
1167
+ a = { mode: e, start: h, end: null };
1168
+ } catch {
1169
+ a = { mode: e, start: null, end: null };
1170
+ }
1171
+ return this._valueRawCache = t, this._valueModeCache = e, this._valueParsedCache = P(a), a;
1172
+ }
1173
+ const n = c(t);
1174
+ return a = { mode: e, value: n ? v(n) : null }, this._valueRawCache = t, this._valueModeCache = e, this._valueParsedCache = P(a), a;
1175
+ }
1176
+ _serializeSelection(e) {
1177
+ if (e.mode === "single")
1178
+ return e.value;
1179
+ if (e.mode === "multiple")
1180
+ return JSON.stringify(e.values);
1181
+ const t = {};
1182
+ return e.start && (t.start = e.start), e.end && (t.end = e.end), !t.start && !t.end ? null : JSON.stringify(t);
1183
+ }
1184
+ _emitSelectionEvents(e, t, a) {
1185
+ e.mode === "single" && t && (this.dispatchEvent(
1186
+ new CustomEvent("select", {
1187
+ detail: { value: t, source: a },
1188
+ bubbles: !0,
1189
+ composed: !0
1190
+ })
1191
+ ), this.dispatchEvent(
1192
+ new CustomEvent("ui-select", {
1193
+ detail: { value: t, source: a },
1194
+ bubbles: !0,
1195
+ composed: !0
1196
+ })
1197
+ ));
1198
+ const n = { mode: e.mode, source: a };
1199
+ e.mode === "single" ? n.value = e.value : e.mode === "range" ? (n.value = e.start && e.end ? { start: e.start, end: e.end } : null, n.start = e.start, n.end = e.end) : (n.value = [...e.values], n.values = [...e.values]), this.dispatchEvent(
1200
+ new CustomEvent("change", {
1201
+ detail: n,
1202
+ bubbles: !0,
1203
+ composed: !0
1204
+ })
1205
+ ), this.dispatchEvent(
1206
+ new CustomEvent("ui-change", {
1207
+ detail: n,
1208
+ bubbles: !0,
1209
+ composed: !0
1210
+ })
1211
+ );
1212
+ }
1213
+ _setValueAttribute(e) {
1214
+ this._syncingValueAttribute = !0;
1215
+ try {
1216
+ e ? this.getAttribute("value") !== e && this.setAttribute("value", e) : this.hasAttribute("value") && this.removeAttribute("value");
1217
+ } finally {
1218
+ this._syncingValueAttribute = !1;
1219
+ }
1220
+ }
1221
+ _applySelection(e, t, a) {
1222
+ if (!c(e))
1223
+ return;
1224
+ const n = this._resolveSelectionMode(), { minIso: i, maxIso: s } = this._resolveBounds();
1225
+ if (this._isDateOutOfBounds(e, i, s))
1226
+ return;
1227
+ const o = this._isReadonly();
1228
+ if (this._isInteractionDisabled() || o)
1229
+ return;
1230
+ let d = this._normalizeValueForMode(n);
1231
+ if (n === "single")
1232
+ d = { mode: n, value: e };
1233
+ else if (n === "multiple") {
1234
+ const p = this._normalizeValueForMode("multiple"), f = new Set(p.values);
1235
+ f.has(e) ? f.delete(e) : f.size < this._maxSelections() && f.add(e), d = { mode: n, values: fe(Array.from(f)) };
1236
+ } else {
1237
+ const p = this._normalizeValueForMode("range"), f = p.start, _ = p.end;
1238
+ if (t) {
1239
+ const l = this._rangeKeyboardAnchor || f || this._focusedIso || e;
1240
+ if (!c(l))
1241
+ this._rangeKeyboardAnchor = e, d = { mode: n, start: e, end: null };
1242
+ else {
1243
+ const b = E(l, e);
1244
+ d = { mode: n, start: b.start, end: b.end };
1245
+ }
1246
+ } else if (!f || f && _)
1247
+ this._rangeKeyboardAnchor = e, d = { mode: n, start: e, end: null };
1248
+ else if (f && !_) {
1249
+ const l = E(f, e);
1250
+ d = { mode: n, start: l.start, end: l.end };
1251
+ }
1252
+ }
1253
+ const u = this.getAttribute("value"), h = this._serializeSelection(d);
1254
+ u !== h ? (this._setValueAttribute(h), this._emitSelectionEvents(d, n === "single" ? e : null, a)) : n === "single" && this._emitSelectionEvents(d, e, a), this._focusedIso = e, this._hoverIso = null, this._shouldRefocus = !0, a !== "api" && this.requestRender();
1255
+ }
1256
+ _monthLabel(e, t, a) {
1257
+ try {
1258
+ return new Intl.DateTimeFormat(a, {
1259
+ month: "long",
1260
+ year: "numeric",
1261
+ timeZone: "UTC"
1262
+ }).format(new Date(Date.UTC(e, t - 1, 1)));
1263
+ } catch {
1264
+ return `${String(t)} ${e}`;
1265
+ }
1266
+ }
1267
+ _monthPickerLabels(e) {
1268
+ try {
1269
+ const t = new Intl.DateTimeFormat(e, {
1270
+ month: "short",
1271
+ timeZone: "UTC"
1272
+ });
1273
+ return Array.from({ length: 12 }, (a, n) => t.format(new Date(Date.UTC(2024, n, 1))));
1274
+ } catch {
1275
+ return ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
1276
+ }
1277
+ }
1278
+ _weekdayLabels(e, t) {
1279
+ const a = [], n = new Intl.DateTimeFormat(e, { weekday: "short", timeZone: "UTC" });
1280
+ for (let i = 0; i < 7; i += 1) {
1281
+ const s = (t + i) % 7, o = new Date(Date.UTC(2024, 0, 7 + s));
1282
+ a.push(n.format(o));
1283
+ }
1284
+ return a;
1285
+ }
1286
+ _dayAriaLabel(e, t) {
1287
+ const a = c(e);
1288
+ if (!a)
1289
+ return e;
1290
+ try {
1291
+ return new Intl.DateTimeFormat(t, {
1292
+ weekday: "long",
1293
+ year: "numeric",
1294
+ month: "long",
1295
+ day: "numeric",
1296
+ timeZone: "UTC"
1297
+ }).format(F(a));
1298
+ } catch {
1299
+ return e;
1300
+ }
1301
+ }
1302
+ _ensureEventsCache() {
1303
+ const e = this.getAttribute("events");
1304
+ if (e !== this._eventsRawCache && (this._eventsRawCache = e, this._eventsParsedCache = [], this._eventsByDateCache = /* @__PURE__ */ new Map(), !!e))
1305
+ try {
1306
+ const t = JSON.parse(e);
1307
+ if (!Array.isArray(t))
1308
+ return;
1309
+ const a = [];
1310
+ t.forEach((n) => {
1311
+ if (!n || typeof n != "object")
1312
+ return;
1313
+ const i = String(n.date || "").trim(), s = c(i), o = s ? v(s) : "";
1314
+ if (!o)
1315
+ return;
1316
+ const d = String(n.tone || "default"), u = d === "success" || d === "warning" || d === "danger" || d === "info" ? d : "default", h = n.title != null ? String(n.title) : void 0;
1317
+ a.push({ date: o, title: h, tone: u });
1318
+ }), this._eventsParsedCache = a, a.forEach((n) => {
1319
+ this._eventsByDateCache.has(n.date) || this._eventsByDateCache.set(n.date, []), this._eventsByDateCache.get(n.date).push(n);
1320
+ });
1321
+ } catch {
1322
+ }
1323
+ }
1324
+ _buildCells(e, t, a, n, i, s) {
1325
+ const o = v(le(e, t)), u = (ce(o) - a + 7) % 7, h = c(o);
1326
+ if (!h)
1327
+ return [];
1328
+ const p = F(h);
1329
+ p.setUTCDate(p.getUTCDate() - u);
1330
+ const f = [];
1331
+ for (let _ = 0; _ < 42; _ += 1) {
1332
+ _ > 0 && p.setUTCDate(p.getUTCDate() + 1);
1333
+ const l = ge(p), b = v(l), D = l.y !== e || l.m !== t, y = this._isDateBlocked(b, D, n, i);
1334
+ f.push({
1335
+ iso: b,
1336
+ parts: l,
1337
+ outside: D,
1338
+ disabled: y,
1339
+ today: b === s
1340
+ });
1341
+ }
1342
+ return f;
1343
+ }
1344
+ _resolveFocusIso(e, t, a) {
1345
+ var d;
1346
+ const n = /* @__PURE__ */ new Map();
1347
+ e.forEach((u) => n.set(u.iso, u));
1348
+ const i = (u) => {
1349
+ if (!u)
1350
+ return null;
1351
+ const h = n.get(u);
1352
+ return !h || h.disabled ? null : u;
1353
+ };
1354
+ let s = i(this._focusedIso);
1355
+ if (s || (t.mode === "single" && (s = i(t.value)), !s && t.mode === "range" && (s = i(t.end || t.start)), !s && t.mode === "multiple" && (s = i(t.values[0])), s || (s = i(a)), s))
1356
+ return s;
1357
+ const o = e.find((u) => !u.disabled);
1358
+ return o ? o.iso : ((d = e[0]) == null ? void 0 : d.iso) || "";
1359
+ }
1360
+ _focusDateButton(e) {
1361
+ if (!e)
1362
+ return;
1363
+ const t = this.root.activeElement;
1364
+ if ((t == null ? void 0 : t.getAttribute("data-date")) === e)
1365
+ return;
1366
+ const a = `.day[data-date="${e}"]`, n = this.root.querySelector(a);
1367
+ if (n)
1368
+ try {
1369
+ n.focus({ preventScroll: !0 });
1370
+ } catch {
1371
+ n.focus();
1372
+ }
1373
+ }
1374
+ _moveFocusByDays(e, t, a) {
1375
+ const n = Fe(e, t), i = c(n);
1376
+ i && (this.goToMonth(i.y, i.m, "keyboard"), this._focusedIso = n, this._shouldRefocus = !0, a && this._resolveSelectionMode() === "range" && !this._isReadonly() && !this._isInteractionDisabled() ? this._applySelection(n, !0, "keyboard") : this.requestRender());
1377
+ }
1378
+ _moveFocusByMonths(e, t) {
1379
+ const a = He(e, t), n = c(a);
1380
+ n && (this.goToMonth(n.y, n.m, "keyboard"), this._focusedIso = a, this._shouldRefocus = !0, this.requestRender());
1381
+ }
1382
+ _focusWeekBoundary(e, t, a) {
1383
+ const i = (ce(e) - a + 7) % 7, s = t === "start" ? -i : 6 - i;
1384
+ this._moveFocusByDays(e, s, !1);
1385
+ }
1386
+ _onPointerOver(e) {
1387
+ if (this._resolveSelectionMode() !== "range")
1388
+ return;
1389
+ const t = this._normalizeValueForMode("range");
1390
+ if (!t.start || t.end)
1391
+ return;
1392
+ const a = e.target, n = a == null ? void 0 : a.closest(".day");
1393
+ if (!n)
1394
+ return;
1395
+ const i = n.getAttribute("data-date") || "";
1396
+ if (!c(i))
1397
+ return;
1398
+ const s = n.getAttribute("data-outside") === "true", { minIso: o, maxIso: d } = this._resolveBounds();
1399
+ this._isDateBlocked(i, s, o, d) || this._hoverIso !== i && (this._hoverIso = i, this.requestRender());
1400
+ }
1401
+ _onMouseLeave() {
1402
+ this._hoverIso != null && (this._hoverIso = null, this.requestRender());
1403
+ }
1404
+ _onFocusIn(e) {
1405
+ const t = e.target, a = t == null ? void 0 : t.closest(".day");
1406
+ if (!a)
1407
+ return;
1408
+ const n = a.getAttribute("data-date") || "";
1409
+ if (c(n) && (this._focusedIso = n, this._resolveSelectionMode() === "range")) {
1410
+ const i = this._normalizeValueForMode("range");
1411
+ i.start && !i.end && (this._hoverIso = n, this.requestRender());
1412
+ }
1413
+ }
1414
+ _toggleMonthYearPicker(e) {
1415
+ this._isInteractionDisabled() || (this._pickerOpen = typeof e == "boolean" ? e : !this._pickerOpen, this._syncDocumentListener(), this.requestRender());
1416
+ }
1417
+ _onClick(e) {
1418
+ const t = e.target;
1419
+ if (!t)
1420
+ return;
1421
+ const a = t.closest("[data-action]"), n = (a == null ? void 0 : a.getAttribute("data-action")) || "", { year: i, month: s } = this._resolvedView(), o = this._todayIso(), d = c(o);
1422
+ if (n === "prev-month" || n === "next-month") {
1423
+ if (this._isInteractionDisabled())
1424
+ return;
1425
+ const l = n === "prev-month" ? -1 : 1, D = (this._focusedIso ? c(this._focusedIso) : null) || { y: i, m: s, d: 1 }, y = L(D, l);
1426
+ this.goToMonth(y.y, y.m, "pointer"), this._focusedIso = v({ y: y.y, m: y.m, d: O(D.d, 1, H(y.y, y.m)) }), this._shouldRefocus = !0, this.requestRender();
1427
+ return;
1428
+ }
1429
+ if (n === "today") {
1430
+ if (this._isInteractionDisabled())
1431
+ return;
1432
+ this.goToMonth(d.y, d.m, "pointer"), this._focusedIso = o, this._shouldRefocus = !0, this._isReadonly() ? this.requestRender() : this._applySelection(o, !1, "pointer");
1433
+ return;
1434
+ }
1435
+ if (n === "toggle-monthyear") {
1436
+ this._toggleMonthYearPicker();
1437
+ return;
1438
+ }
1439
+ if (n === "picker-prev-year" || n === "picker-next-year") {
1440
+ if (this._isInteractionDisabled())
1441
+ return;
1442
+ const l = n === "picker-prev-year" ? -1 : 1;
1443
+ this.goToMonth(i + l, s, "pointer"), this._pickerOpen = !0, this._shouldRefocus = !0, this.requestRender();
1444
+ return;
1445
+ }
1446
+ if (n === "pick-month") {
1447
+ if (this._isInteractionDisabled())
1448
+ return;
1449
+ const l = Number((a == null ? void 0 : a.getAttribute("data-month")) || "");
1450
+ if (!Number.isInteger(l) || l < 1 || l > 12)
1451
+ return;
1452
+ this.goToMonth(i, l, "pointer"), this._pickerOpen = !1, this._shouldRefocus = !0, this.requestRender();
1453
+ return;
1454
+ }
1455
+ const u = t.closest(".day");
1456
+ if (!u)
1457
+ return;
1458
+ const h = u.getAttribute("data-date") || "";
1459
+ if (!c(h))
1460
+ return;
1461
+ const p = u.getAttribute("data-outside") === "true", { minIso: f, maxIso: _ } = this._resolveBounds();
1462
+ if (!this._isDateBlocked(h, p, f, _)) {
1463
+ if (p) {
1464
+ const l = this._resolveOutsideClickMode();
1465
+ if (l === "none")
1466
+ return;
1467
+ if (l === "navigate") {
1468
+ const b = c(h);
1469
+ this.goToMonth(b.y, b.m, "pointer");
1470
+ }
1471
+ }
1472
+ if (this._isReadonly()) {
1473
+ this._focusedIso = h, this._shouldRefocus = !0, this.requestRender();
1474
+ return;
1475
+ }
1476
+ this._applySelection(h, !1, "pointer");
1477
+ }
1478
+ }
1479
+ _onKeyDown(e) {
1480
+ if (e.key === "Escape" && this._pickerOpen) {
1481
+ e.preventDefault(), this._toggleMonthYearPicker(!1);
1482
+ return;
1483
+ }
1484
+ const t = e.target, a = t == null ? void 0 : t.closest(".day");
1485
+ if (!a)
1486
+ return;
1487
+ const n = a.getAttribute("data-date") || "";
1488
+ if (!c(n))
1489
+ return;
1490
+ const i = he(this.getAttribute("week-start"), this._resolveLocale()), s = this._direction() === "rtl", o = e.shiftKey;
1491
+ if (e.key === "ArrowRight") {
1492
+ e.preventDefault(), this._moveFocusByDays(n, s ? -1 : 1, o);
1493
+ return;
1494
+ }
1495
+ if (e.key === "ArrowLeft") {
1496
+ e.preventDefault(), this._moveFocusByDays(n, s ? 1 : -1, o);
1497
+ return;
1498
+ }
1499
+ if (e.key === "ArrowDown") {
1500
+ e.preventDefault(), this._moveFocusByDays(n, 7, o);
1501
+ return;
1502
+ }
1503
+ if (e.key === "ArrowUp") {
1504
+ e.preventDefault(), this._moveFocusByDays(n, -7, o);
1505
+ return;
1506
+ }
1507
+ if (e.key === "Home") {
1508
+ e.preventDefault(), this._focusWeekBoundary(n, "start", i);
1509
+ return;
1510
+ }
1511
+ if (e.key === "End") {
1512
+ e.preventDefault(), this._focusWeekBoundary(n, "end", i);
1513
+ return;
1514
+ }
1515
+ if (e.key === "PageUp") {
1516
+ e.preventDefault(), this._moveFocusByMonths(n, e.shiftKey ? -12 : -1);
1517
+ return;
1518
+ }
1519
+ if (e.key === "PageDown") {
1520
+ e.preventDefault(), this._moveFocusByMonths(n, e.shiftKey ? 12 : 1);
1521
+ return;
1522
+ }
1523
+ if (e.key === "Enter" || e.key === " ") {
1524
+ e.preventDefault();
1525
+ const d = a.getAttribute("data-outside") === "true", { minIso: u, maxIso: h } = this._resolveBounds();
1526
+ if (this._isDateBlocked(n, d, u, h))
1527
+ return;
1528
+ if (d && this._resolveOutsideClickMode() === "navigate") {
1529
+ const p = c(n);
1530
+ this.goToMonth(p.y, p.m, "keyboard");
1531
+ }
1532
+ this._isReadonly() || this._applySelection(n, !1, "keyboard");
1533
+ }
1534
+ }
1535
+ render() {
1536
+ const e = this._resolveLocale(), t = this._translations(), a = he(this.getAttribute("week-start"), e), { year: n, month: i } = this._resolvedView(), s = this._resolveSelectionMode(), { minIso: o, maxIso: d } = this._resolveBounds(), u = this._todayIso(), h = this._resolveEventsDisplay(), p = this._eventsMax(), f = this._resolveCalendarSize(), _ = this._resolveTone(), l = this._resolveState(), b = this._isInteractionDisabled(), D = this._resolveLabel();
1537
+ _ ? this.setAttribute("tone", _) : this.removeAttribute("tone"), l !== "idle" ? this.setAttribute("state", l) : this.removeAttribute("state"), l === "loading" ? this.setAttribute("aria-busy", "true") : this.removeAttribute("aria-busy"), this._ensureEventsCache();
1538
+ const y = this._normalizeValueForMode(s), Z = this._buildCells(n, i, a, o, d, u);
1539
+ this._focusedIso = this._resolveFocusIso(Z, y, u);
1540
+ const X = this._monthLabel(n, i, e), G = L({ y: n, m: i, d: 1 }, -1), Q = L({ y: n, m: i, d: 1 }, 1), be = this._monthHasAllowedDay(G.y, G.m, o, d), ve = this._monthHasAllowedDay(Q.y, Q.m, o, d), me = this._weekdayLabels(e, a), C = s === "range" ? y : null, S = (C == null ? void 0 : C.start) || null, M = (C == null ? void 0 : C.end) || null, U = s === "multiple" ? new Set(y.values) : null;
1541
+ let N = null, Y = null;
1542
+ if (s === "range" && S && !M && this._hoverIso && c(this._hoverIso)) {
1543
+ const x = E(S, this._hoverIso);
1544
+ N = x.start, Y = x.end;
1545
+ }
1546
+ const ee = [];
1547
+ for (let x = 0; x < 6; x += 1) {
1548
+ const A = Z.slice(x * 7, x * 7 + 7).map((g) => {
1549
+ const k = this._eventsByDateCache.get(g.iso) || [], De = this._dayAriaLabel(g.iso, e);
1550
+ let T = !1;
1551
+ s === "single" ? T = y.value === g.iso : s === "multiple" ? T = (U == null ? void 0 : U.has(g.iso)) || !1 : S && M && (T = J(g.iso, S, M));
1552
+ const R = !!(S && M && J(g.iso, S, M)), j = !!(S && g.iso === S), V = !!(M && g.iso === M), Se = !!(N && Y && J(g.iso, N, Y)), Me = !g.disabled && g.iso === this._focusedIso ? 0 : -1;
1553
+ let I = "";
1554
+ k.length > 0 && (h === "count" ? I = `<span class="event-count" part="event-more" style="--event-tone:${K[k[0].tone || "default"]}">${k.length}</span>` : h === "badges" ? I = k.slice(0, p).map(($) => {
1555
+ const q = m($.title || t.event);
1556
+ return `<span class="event-badge" part="event-dot" style="--event-tone:${K[$.tone || "default"]}" title="${q}">${q}</span>`;
1557
+ }).join("") : I = k.slice(0, p).map(($) => `<span class="event-dot" part="event-dot" style="--event-tone:${K[$.tone || "default"]}"></span>`).join(""), k.length > p && h !== "count" && (I += `<span class="event-more" part="event-more">+${k.length - p}</span>`));
1558
+ const ne = `ui-calendar-tip-${g.iso}`, re = k.length ? k.map((z) => m(z.title || t.event)).join("<br/>") : "", ie = re.length > 0, Ce = I ? `<span class="events" part="events">${I}</span>` : "", Ie = ie ? `<span class="tooltip" part="tooltip" id="${ne}">${re}</span>` : "", se = T || R || j || V;
1559
+ return `
1560
+ <button
1561
+ type="button"
1562
+ class="day"
1563
+ part="${R || j || V ? "day range" : "day"}"
1564
+ role="gridcell"
1565
+ data-date="${g.iso}"
1566
+ data-outside="${g.outside ? "true" : "false"}"
1567
+ data-disabled="${g.disabled ? "true" : "false"}"
1568
+ data-today="${g.today ? "true" : "false"}"
1569
+ data-selected="${se ? "true" : "false"}"
1570
+ data-range="${R ? "true" : "false"}"
1571
+ data-range-start="${j ? "true" : "false"}"
1572
+ data-range-end="${V ? "true" : "false"}"
1573
+ data-range-preview="${!R && Se ? "true" : "false"}"
1574
+ aria-selected="${se ? "true" : "false"}"
1575
+ aria-disabled="${g.disabled ? "true" : "false"}"
1576
+ ${g.today ? 'aria-current="date"' : ""}
1577
+ aria-label="${m(De)}"
1578
+ ${ie ? `aria-describedby="${ne}"` : ""}
1579
+ tabindex="${Me}"
1580
+ >
1581
+ <span class="day-number" part="day-number">${g.parts.d}</span>
1582
+ ${Ce}
1583
+ ${Ie}
1584
+ </button>
1585
+ `;
1586
+ }).join("");
1587
+ ee.push(`<div class="week" role="row">${A}</div>`);
1588
+ }
1589
+ const ye = this._monthPickerLabels(e).map((x, ae) => {
1590
+ const A = ae + 1;
1591
+ return `
1592
+ <button
1593
+ type="button"
1594
+ class="picker-month"
1595
+ part="monthyear"
1596
+ data-action="pick-month"
1597
+ data-month="${A}"
1598
+ data-active="${A === i ? "true" : "false"}"
1599
+ ${b ? "disabled" : ""}
1600
+ >
1601
+ ${x}
1602
+ </button>
1603
+ `;
1604
+ }).join(""), _e = me.map((x) => `<span class="weekday" part="weekday" role="columnheader">${m(x)}</span>`).join(""), xe = this._showTodayButton() ? `<button type="button" class="today-btn" part="today" data-action="today" ${b ? "disabled" : ""}>${m(t.today)}</button>` : "", te = l === "loading" ? t.syncingSchedule : l === "error" ? t.unableToSyncEvents : l === "success" ? t.scheduleSynced : "";
1605
+ this.setContent(`
1606
+ <style>${Be}</style>
1607
+ <section
1608
+ class="frame"
1609
+ part="frame"
1610
+ data-size="${f}"
1611
+ data-state="${l}"
1612
+ aria-disabled="${b ? "true" : "false"}"
1613
+ aria-label="${m(D)}"
1614
+ >
1615
+ <div class="live-region" aria-live="polite" aria-atomic="true">${m(X)}</div>
1616
+
1617
+ <header class="header" part="header">
1618
+ <div class="nav" part="nav">
1619
+ <button type="button" class="nav-btn" part="prev" data-action="prev-month" ${!be || b ? "disabled" : ""} aria-label="${m(t.previousMonth)}">
1620
+ <svg viewBox="0 0 24 24" width="14" height="14" aria-hidden="true" focusable="false"><path d="M14.7 6.3a1 1 0 0 1 0 1.4L10.41 12l4.29 4.3a1 1 0 1 1-1.42 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.42 0Z" fill="currentColor"/></svg>
1621
+ </button>
1622
+ <button type="button" class="nav-btn" part="next" data-action="next-month" ${!ve || b ? "disabled" : ""} aria-label="${m(t.nextMonth)}">
1623
+ <svg viewBox="0 0 24 24" width="14" height="14" aria-hidden="true" focusable="false"><path d="M9.3 17.7a1 1 0 0 1 0-1.4L13.59 12 9.3 7.7a1 1 0 0 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-1.4 0Z" fill="currentColor"/></svg>
1624
+ </button>
1625
+ </div>
1626
+
1627
+ <div class="title-wrap">
1628
+ <button
1629
+ type="button"
1630
+ class="title-btn"
1631
+ part="title monthyear"
1632
+ data-action="toggle-monthyear"
1633
+ ${b ? "disabled" : ""}
1634
+ aria-expanded="${this._pickerOpen ? "true" : "false"}"
1635
+ aria-label="${m(t.chooseMonthYear)}"
1636
+ >
1637
+ <span>${m(X)}</span>
1638
+ <svg viewBox="0 0 24 24" width="14" height="14" aria-hidden="true" focusable="false"><path d="M6.7 9.7a1 1 0 0 1 1.4 0L12 13.59l3.9-3.9a1 1 0 1 1 1.4 1.42l-4.6 4.6a1 1 0 0 1-1.4 0l-4.6-4.6a1 1 0 0 1 0-1.42Z" fill="currentColor"/></svg>
1639
+ </button>
1640
+ <section class="monthyear-pop" part="monthyear" ${this._pickerOpen ? "" : "hidden"}>
1641
+ <div class="picker-header">
1642
+ <button type="button" class="picker-year-btn" part="prev" data-action="picker-prev-year" ${b ? "disabled" : ""} aria-label="${m(t.previousYear)}">-</button>
1643
+ <span class="picker-year">${n}</span>
1644
+ <button type="button" class="picker-year-btn" part="next" data-action="picker-next-year" ${b ? "disabled" : ""} aria-label="${m(t.nextYear)}">+</button>
1645
+ </div>
1646
+ <div class="picker-months">${ye}</div>
1647
+ </section>
1648
+ </div>
1649
+
1650
+ <div class="header-actions">
1651
+ ${xe}
1652
+ </div>
1653
+ </header>
1654
+
1655
+ <div class="status" part="status" ${te ? "" : "hidden"}>
1656
+ <span class="status-dot" aria-hidden="true"></span>
1657
+ <span>${m(te)}</span>
1658
+ </div>
1659
+
1660
+ <section class="grid-wrap" part="grid" role="grid" aria-label="${m(D)}">
1661
+ <div class="weekdays" role="row">${_e}</div>
1662
+ ${ee.join("")}
1663
+ </section>
1664
+ </section>
1665
+ `);
1666
+ const ke = this._focusedIso, we = this._shouldRefocus;
1667
+ this._shouldRefocus = !1, we && queueMicrotask(() => {
1668
+ this.isConnected && this._focusDateButton(ke);
1669
+ });
1670
+ }
1671
+ shouldRenderOnAttributeChange(e, t, a) {
1672
+ return !1;
1673
+ }
1674
+ }
1675
+ typeof customElements < "u" && !customElements.get("ui-calendar") && customElements.define("ui-calendar", Je);
1676
+ export {
1677
+ Je as U,
1678
+ Fe as a,
1679
+ He as b,
1680
+ w as c,
1681
+ Ue as e,
1682
+ c as p,
1683
+ Le as r,
1684
+ le as s
1685
+ };