@ac-design/design-system 1.0.3 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (235) hide show
  1. package/README.md +27 -18
  2. package/dist/lib/charts/ChartFrame.js +5 -0
  3. package/dist/lib/charts/ChartFrame.vue.d.ts +71 -0
  4. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +173 -0
  5. package/dist/lib/charts/cartesian.d.ts +324 -0
  6. package/dist/lib/charts/cartesian.js +137 -0
  7. package/dist/lib/charts/echarts.d.ts +86 -0
  8. package/dist/lib/charts/echarts.js +173 -0
  9. package/dist/lib/charts/graph.d.ts +77 -0
  10. package/dist/lib/charts/graph.js +155 -0
  11. package/dist/lib/charts/index.d.ts +11 -0
  12. package/dist/lib/charts/index.js +7 -0
  13. package/dist/lib/charts/shared.d.ts +53 -0
  14. package/dist/lib/charts/shared.js +96 -0
  15. package/dist/lib/charts/xy.d.ts +69 -0
  16. package/dist/lib/charts/xy.js +73 -0
  17. package/dist/lib/compat.css +2770 -1061
  18. package/dist/lib/components/AcAccordion.vue_vue_type_script_setup_true_lang.js +2 -2
  19. package/dist/lib/components/AcAccordionItem.vue.d.ts +1 -1
  20. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +5 -5
  21. package/dist/lib/components/AcAlert.vue.d.ts +10 -1
  22. package/dist/lib/components/AcAlert.vue_vue_type_script_setup_true_lang.js +139 -45
  23. package/dist/lib/components/AcAppSwitcher.vue_vue_type_script_setup_true_lang.js +19 -19
  24. package/dist/lib/components/AcAreaChart.js +5 -0
  25. package/dist/lib/components/AcAreaChart.vue.d.ts +47 -0
  26. package/dist/lib/components/AcAreaChart.vue_vue_type_script_setup_true_lang.js +205 -0
  27. package/dist/lib/components/AcAvatar.vue.d.ts +7 -4
  28. package/dist/lib/components/AcAvatar.vue_vue_type_script_setup_true_lang.js +66 -61
  29. package/dist/lib/components/AcBadge.vue.d.ts +20 -7
  30. package/dist/lib/components/AcBadge.vue_vue_type_script_setup_true_lang.js +67 -44
  31. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  32. package/dist/lib/components/AcBanner.vue_vue_type_script_setup_true_lang.js +30 -30
  33. package/dist/lib/components/AcBarChart.js +5 -0
  34. package/dist/lib/components/AcBarChart.vue.d.ts +46 -0
  35. package/dist/lib/components/AcBarChart.vue_vue_type_script_setup_true_lang.js +213 -0
  36. package/dist/lib/components/AcBreadcrumb.vue.d.ts +4 -1
  37. package/dist/lib/components/AcBreadcrumb.vue_vue_type_script_setup_true_lang.js +36 -34
  38. package/dist/lib/components/AcBulkActionBar.js +5 -0
  39. package/dist/lib/components/AcBulkActionBar.vue.d.ts +45 -0
  40. package/dist/lib/components/AcBulkActionBar.vue_vue_type_script_setup_true_lang.js +84 -0
  41. package/dist/lib/components/AcButton.vue.d.ts +13 -7
  42. package/dist/lib/components/AcButton.vue_vue_type_script_setup_true_lang.js +93 -47
  43. package/dist/lib/components/AcButtons.vue_vue_type_script_setup_true_lang.js +1 -1
  44. package/dist/lib/components/AcCard.vue.d.ts +42 -3
  45. package/dist/lib/components/AcCard.vue_vue_type_script_setup_true_lang.js +175 -14
  46. package/dist/lib/components/AcCellValue.vue.d.ts +6 -3
  47. package/dist/lib/components/AcCellValue.vue_vue_type_script_setup_true_lang.js +219 -178
  48. package/dist/lib/components/AcCheckBox.vue.d.ts +17 -3
  49. package/dist/lib/components/AcCheckBox.vue_vue_type_script_setup_true_lang.js +113 -30
  50. package/dist/lib/components/AcCheckList.js +5 -0
  51. package/dist/lib/components/AcCheckList.vue.d.ts +45 -0
  52. package/dist/lib/components/AcCheckList.vue_vue_type_script_setup_true_lang.js +64 -0
  53. package/dist/lib/components/AcCheckRadio.vue.d.ts +30 -5
  54. package/dist/lib/components/AcCheckRadio.vue_vue_type_script_setup_true_lang.js +102 -26
  55. package/dist/lib/components/AcCircularProgress.js +5 -0
  56. package/dist/lib/components/AcCircularProgress.vue.d.ts +44 -0
  57. package/dist/lib/components/AcCircularProgress.vue_vue_type_script_setup_true_lang.js +114 -0
  58. package/dist/lib/components/AcClusterSwitcher.vue_vue_type_script_setup_true_lang.js +142 -167
  59. package/dist/lib/components/AcCodeEditor.vue_vue_type_script_setup_true_lang.js +9 -9
  60. package/dist/lib/components/AcColorInput.js +5 -0
  61. package/dist/lib/components/AcColorInput.vue.d.ts +57 -0
  62. package/dist/lib/components/AcColorInput.vue_vue_type_script_setup_true_lang.js +217 -0
  63. package/dist/lib/components/AcCommandBlock.js +5 -0
  64. package/dist/lib/components/AcCommandBlock.vue.d.ts +34 -0
  65. package/dist/lib/components/AcCommandBlock.vue_vue_type_script_setup_true_lang.js +88 -0
  66. package/dist/lib/components/AcConfirmModal.js +5 -0
  67. package/dist/lib/components/AcConfirmModal.vue.d.ts +56 -0
  68. package/dist/lib/components/AcConfirmModal.vue_vue_type_script_setup_true_lang.js +96 -0
  69. package/dist/lib/components/AcContentHeader.vue.d.ts +1 -1
  70. package/dist/lib/components/AcContentHeader.vue_vue_type_script_setup_true_lang.js +5 -4
  71. package/dist/lib/components/AcContentLayout.vue_vue_type_script_setup_true_lang.js +2 -2
  72. package/dist/lib/components/AcCopyButton.js +5 -0
  73. package/dist/lib/components/AcCopyButton.vue.d.ts +43 -0
  74. package/dist/lib/components/AcCopyButton.vue_vue_type_script_setup_true_lang.js +92 -0
  75. package/dist/lib/components/AcCostSummary.js +5 -0
  76. package/dist/lib/components/AcCostSummary.vue.d.ts +102 -0
  77. package/dist/lib/components/AcCostSummary.vue_vue_type_script_setup_true_lang.js +179 -0
  78. package/dist/lib/components/AcDatePicker.vue.d.ts +8 -8
  79. package/dist/lib/components/AcDatePicker.vue_vue_type_script_setup_true_lang.js +634 -417
  80. package/dist/lib/components/AcDeleteModal.vue.d.ts +4 -4
  81. package/dist/lib/components/AcDeleteModal.vue_vue_type_script_setup_true_lang.js +57 -60
  82. package/dist/lib/components/AcDonutChart.js +5 -0
  83. package/dist/lib/components/AcDonutChart.vue.d.ts +83 -0
  84. package/dist/lib/components/AcDonutChart.vue_vue_type_script_setup_true_lang.js +237 -0
  85. package/dist/lib/components/AcDropdown.vue.d.ts +5 -2
  86. package/dist/lib/components/AcDropdown.vue_vue_type_script_setup_true_lang.js +91 -78
  87. package/dist/lib/components/AcDropdownDivider.vue_vue_type_script_setup_true_lang.js +11 -10
  88. package/dist/lib/components/AcDropdownItem.vue.d.ts +2 -2
  89. package/dist/lib/components/AcDropdownItem.vue_vue_type_script_setup_true_lang.js +18 -18
  90. package/dist/lib/components/AcEmptyState.vue.d.ts +4 -1
  91. package/dist/lib/components/AcEmptyState.vue_vue_type_script_setup_true_lang.js +50 -39
  92. package/dist/lib/components/AcErrorState.js +5 -0
  93. package/dist/lib/components/AcErrorState.vue.d.ts +46 -0
  94. package/dist/lib/components/AcErrorState.vue_vue_type_script_setup_true_lang.js +66 -0
  95. package/dist/lib/components/AcFeatureCard.vue.d.ts +6 -0
  96. package/dist/lib/components/AcFeatureCard.vue_vue_type_script_setup_true_lang.js +139 -116
  97. package/dist/lib/components/AcFileEditor.vue_vue_type_script_setup_true_lang.js +16 -16
  98. package/dist/lib/components/AcFileUpload.vue.d.ts +2 -2
  99. package/dist/lib/components/AcFileUpload.vue_vue_type_script_setup_true_lang.js +55 -53
  100. package/dist/lib/components/AcFontScale.vue_vue_type_script_setup_true_lang.js +2 -2
  101. package/dist/lib/components/AcFooter.js +5 -0
  102. package/dist/lib/components/AcFooter.vue.d.ts +37 -0
  103. package/dist/lib/components/AcFooter.vue_vue_type_script_setup_true_lang.js +107 -0
  104. package/dist/lib/components/AcForm.vue.d.ts +3 -0
  105. package/dist/lib/components/AcForm.vue_vue_type_script_setup_true_lang.js +4 -2
  106. package/dist/lib/components/AcFormArray.vue.d.ts +2 -2
  107. package/dist/lib/components/AcFormArray.vue_vue_type_script_setup_true_lang.js +149 -147
  108. package/dist/lib/components/AcFormFooter.vue.d.ts +3 -3
  109. package/dist/lib/components/AcFormFooter.vue_vue_type_script_setup_true_lang.js +2 -2
  110. package/dist/lib/components/AcFormSection.vue.d.ts +8 -1
  111. package/dist/lib/components/AcFormSection.vue_vue_type_script_setup_true_lang.js +31 -21
  112. package/dist/lib/components/AcGraphChart.js +5 -0
  113. package/dist/lib/components/AcGraphChart.vue.d.ts +124 -0
  114. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +578 -0
  115. package/dist/lib/components/AcHeader.vue.d.ts +20 -5
  116. package/dist/lib/components/AcHeader.vue_vue_type_script_setup_true_lang.js +82 -28
  117. package/dist/lib/components/AcInfoTable.vue.d.ts +1 -1
  118. package/dist/lib/components/AcInfoTable.vue_vue_type_script_setup_true_lang.js +17 -13
  119. package/dist/lib/components/AcInput.vue.d.ts +4 -4
  120. package/dist/lib/components/AcInput.vue_vue_type_script_setup_true_lang.js +99 -91
  121. package/dist/lib/components/AcKbd.vue_vue_type_script_setup_true_lang.js +1 -1
  122. package/dist/lib/components/AcKeyValueInput.js +5 -0
  123. package/dist/lib/components/AcKeyValueInput.vue.d.ts +114 -0
  124. package/dist/lib/components/AcKeyValueInput.vue_vue_type_script_setup_true_lang.js +336 -0
  125. package/dist/lib/components/AcLineChart.js +5 -0
  126. package/dist/lib/components/AcLineChart.vue.d.ts +44 -0
  127. package/dist/lib/components/AcLineChart.vue_vue_type_script_setup_true_lang.js +175 -0
  128. package/dist/lib/components/AcLoader.js +5 -0
  129. package/dist/lib/components/AcLoader.vue.d.ts +15 -0
  130. package/dist/lib/components/AcLoader.vue_vue_type_script_setup_true_lang.js +66 -0
  131. package/dist/lib/components/AcLocaleSwitcher.js +5 -0
  132. package/dist/lib/components/AcLocaleSwitcher.vue.d.ts +48 -0
  133. package/dist/lib/components/AcLocaleSwitcher.vue_vue_type_script_setup_true_lang.js +111 -0
  134. package/dist/lib/components/AcMapChart.js +5 -0
  135. package/dist/lib/components/AcMapChart.vue.d.ts +136 -0
  136. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +518 -0
  137. package/dist/lib/components/AcModal.vue.d.ts +6 -3
  138. package/dist/lib/components/AcModal.vue_vue_type_script_setup_true_lang.js +88 -64
  139. package/dist/lib/components/AcNavbar.vue.d.ts +8 -5
  140. package/dist/lib/components/AcNavbar.vue_vue_type_script_setup_true_lang.js +29 -21
  141. package/dist/lib/components/AcNavbarItem.vue.d.ts +2 -2
  142. package/dist/lib/components/AcNavbarItem.vue_vue_type_script_setup_true_lang.js +23 -24
  143. package/dist/lib/components/AcNotificationMenu.vue.d.ts +3 -3
  144. package/dist/lib/components/AcNotificationMenu.vue_vue_type_script_setup_true_lang.js +139 -174
  145. package/dist/lib/components/AcNumberInput.js +5 -0
  146. package/dist/lib/components/AcNumberInput.vue.d.ts +79 -0
  147. package/dist/lib/components/AcNumberInput.vue_vue_type_script_setup_true_lang.js +241 -0
  148. package/dist/lib/components/AcPage.vue.d.ts +2 -2
  149. package/dist/lib/components/AcPage.vue_vue_type_script_setup_true_lang.js +2 -2
  150. package/dist/lib/components/AcPagination.vue.d.ts +22 -5
  151. package/dist/lib/components/AcPagination.vue_vue_type_script_setup_true_lang.js +87 -56
  152. package/dist/lib/components/AcPreloader.vue.d.ts +3 -3
  153. package/dist/lib/components/AcPreloader.vue_vue_type_script_setup_true_lang.js +15 -16
  154. package/dist/lib/components/AcProductHero.js +5 -0
  155. package/dist/lib/components/AcProductHero.vue.d.ts +56 -0
  156. package/dist/lib/components/AcProductHero.vue_vue_type_script_setup_true_lang.js +95 -0
  157. package/dist/lib/components/AcProgress.vue.d.ts +19 -4
  158. package/dist/lib/components/AcProgress.vue_vue_type_script_setup_true_lang.js +85 -31
  159. package/dist/lib/components/AcResourceCard.vue.d.ts +3 -3
  160. package/dist/lib/components/AcResourceCard.vue_vue_type_script_setup_true_lang.js +17 -17
  161. package/dist/lib/components/AcSearchBar.vue.d.ts +1 -1
  162. package/dist/lib/components/AcSearchBar.vue_vue_type_script_setup_true_lang.js +14 -9
  163. package/dist/lib/components/AcSectionContent.vue.d.ts +2 -2
  164. package/dist/lib/components/AcSectionContent.vue_vue_type_script_setup_true_lang.js +8 -8
  165. package/dist/lib/components/AcSegmentedControl.vue.d.ts +1 -1
  166. package/dist/lib/components/AcSegmentedControl.vue_vue_type_script_setup_true_lang.js +4 -4
  167. package/dist/lib/components/AcSelect.vue.d.ts +6 -6
  168. package/dist/lib/components/AcSelect.vue_vue_type_script_setup_true_lang.js +246 -254
  169. package/dist/lib/components/AcSettingsRow.js +5 -0
  170. package/dist/lib/components/AcSettingsRow.vue.d.ts +29 -0
  171. package/dist/lib/components/AcSettingsRow.vue_vue_type_script_setup_true_lang.js +37 -0
  172. package/dist/lib/components/AcSidePanel.vue_vue_type_script_setup_true_lang.js +32 -32
  173. package/dist/lib/components/AcSideTabs.vue.d.ts +2 -2
  174. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +37 -37
  175. package/dist/lib/components/AcSidebar.vue.d.ts +6 -3
  176. package/dist/lib/components/AcSidebar.vue_vue_type_script_setup_true_lang.js +67 -57
  177. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  178. package/dist/lib/components/AcSidebarItem.vue_vue_type_script_setup_true_lang.js +46 -45
  179. package/dist/lib/components/AcSidebarSection.vue.d.ts +2 -2
  180. package/dist/lib/components/AcSidebarSection.vue_vue_type_script_setup_true_lang.js +23 -18
  181. package/dist/lib/components/AcSkeleton.vue_vue_type_script_setup_true_lang.js +8 -8
  182. package/dist/lib/components/AcSlider.vue.d.ts +1 -1
  183. package/dist/lib/components/AcSlider.vue_vue_type_script_setup_true_lang.js +174 -172
  184. package/dist/lib/components/AcStatCard.vue.d.ts +3 -3
  185. package/dist/lib/components/AcStatCard.vue_vue_type_script_setup_true_lang.js +90 -85
  186. package/dist/lib/components/AcStatusBar.vue.d.ts +1 -1
  187. package/dist/lib/components/AcStatusBar.vue_vue_type_script_setup_true_lang.js +6 -6
  188. package/dist/lib/components/AcSteps.vue_vue_type_script_setup_true_lang.js +28 -28
  189. package/dist/lib/components/AcSwitch.vue.d.ts +3 -0
  190. package/dist/lib/components/AcSwitch.vue_vue_type_script_setup_true_lang.js +31 -19
  191. package/dist/lib/components/AcSwitchCard.js +5 -0
  192. package/dist/lib/components/AcSwitchCard.vue.d.ts +59 -0
  193. package/dist/lib/components/AcSwitchCard.vue_vue_type_script_setup_true_lang.js +121 -0
  194. package/dist/lib/components/AcTable.vue_vue_type_script_setup_true_lang.js +97 -97
  195. package/dist/lib/components/AcTabs.vue.d.ts +9 -2
  196. package/dist/lib/components/AcTabs.vue_vue_type_script_setup_true_lang.js +43 -28
  197. package/dist/lib/components/AcTag.vue.d.ts +2 -2
  198. package/dist/lib/components/AcTag.vue_vue_type_script_setup_true_lang.js +22 -22
  199. package/dist/lib/components/AcTagInput.js +5 -0
  200. package/dist/lib/components/AcTagInput.vue.d.ts +74 -0
  201. package/dist/lib/components/AcTagInput.vue_vue_type_script_setup_true_lang.js +289 -0
  202. package/dist/lib/components/AcTextarea.vue.d.ts +4 -4
  203. package/dist/lib/components/AcTextarea.vue_vue_type_script_setup_true_lang.js +85 -63
  204. package/dist/lib/components/AcThemeMode.vue.d.ts +3 -3
  205. package/dist/lib/components/AcThemeMode.vue_vue_type_script_setup_true_lang.js +56 -24
  206. package/dist/lib/components/AcTimePicker.js +5 -0
  207. package/dist/lib/components/AcTimePicker.vue.d.ts +65 -0
  208. package/dist/lib/components/AcTimePicker.vue_vue_type_script_setup_true_lang.js +455 -0
  209. package/dist/lib/components/AcToaster.vue.d.ts +6 -3
  210. package/dist/lib/components/AcToaster.vue_vue_type_script_setup_true_lang.js +115 -82
  211. package/dist/lib/components/AcTooltip.vue.d.ts +34 -14
  212. package/dist/lib/components/AcTooltip.vue_vue_type_script_setup_true_lang.js +203 -79
  213. package/dist/lib/components/AcUsageCard.vue_vue_type_script_setup_true_lang.js +27 -27
  214. package/dist/lib/components/AcUserMenu.vue.d.ts +23 -1
  215. package/dist/lib/components/AcUserMenu.vue_vue_type_script_setup_true_lang.js +166 -115
  216. package/dist/lib/components/index.d.ts +21 -2
  217. package/dist/lib/components/status.d.ts +28 -0
  218. package/dist/lib/components/status.js +125 -0
  219. package/dist/lib/composables/copyText.d.ts +2 -1
  220. package/dist/lib/composables/copyText.js +2 -2
  221. package/dist/lib/composables/useApiPagination.d.ts +55 -0
  222. package/dist/lib/composables/useApiPagination.js +58 -0
  223. package/dist/lib/composables/useBulkSelection.d.ts +44 -0
  224. package/dist/lib/composables/useBulkSelection.js +41 -0
  225. package/dist/lib/composables/useFormValidation.d.ts +65 -0
  226. package/dist/lib/composables/useFormValidation.js +148 -0
  227. package/dist/lib/composables/useTablePagination.d.ts +49 -0
  228. package/dist/lib/composables/useTablePagination.js +41 -0
  229. package/dist/lib/composables/useToast.d.ts +17 -1
  230. package/dist/lib/composables/useToast.js +10 -2
  231. package/dist/lib/editor/theme.js +65 -62
  232. package/dist/lib/index.d.ts +21 -3
  233. package/dist/lib/index.js +99 -75
  234. package/dist/lib/theme.css +377 -273
  235. package/package.json +20 -4
@@ -1,8 +1,12 @@
1
1
  import e from "./AcButton.js";
2
- import { Fragment as t, Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as ee, nextTick as te, normalizeClass as p, normalizeStyle as ne, onBeforeUnmount as re, onMounted as ie, openBlock as m, reactive as ae, ref as h, renderList as g, resolveDynamicComponent as oe, toDisplayString as _, unref as v, useAttrs as se, useId as ce, useModel as le, watch as ue, withCtx as de } from "vue";
3
- import { Calendar as fe, CalendarRange as pe, ChevronLeft as me, ChevronRight as he, CircleAlert as ge, Timer as _e, X as ve } from "@lucide/vue";
2
+ import { Fragment as t, Teleport as n, Transition as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as ee, createVNode as l, defineComponent as u, mergeModels as d, mergeProps as te, nextTick as f, normalizeClass as p, normalizeStyle as ne, onBeforeUnmount as re, onMounted as ie, openBlock as m, reactive as ae, ref as h, renderList as g, resolveDynamicComponent as oe, toDisplayString as _, unref as v, useAttrs as se, useId as ce, useModel as le, watch as ue, withCtx as de } from "vue";
3
+ import { Calendar as fe, CalendarRange as pe, ChevronLeft as me, ChevronRight as he, Clock as ge, Timer as _e, X as ve } from "@lucide/vue";
4
4
  //#region src/lib/components/AcDatePicker.vue?vue&type=script&setup=true&lang.ts
5
- var ye = { class: "relative" }, be = [
5
+ var ye = ["for"], be = {
6
+ key: 0,
7
+ class: "text-danger",
8
+ "aria-hidden": "true"
9
+ }, xe = { class: "relative" }, Se = [
6
10
  "id",
7
11
  "disabled",
8
12
  "aria-expanded",
@@ -10,22 +14,18 @@ var ye = { class: "relative" }, be = [
10
14
  "aria-describedby",
11
15
  "aria-invalid",
12
16
  "aria-required"
13
- ], xe = ["for"], Se = {
17
+ ], Ce = ["aria-label"], we = ["name", "value"], Te = ["aria-label"], Ee = {
14
18
  key: 0,
15
- class: "text-danger",
16
- "aria-hidden": "true"
17
- }, Ce = { class: "pointer-events-none absolute inset-y-0 right-2 flex items-center gap-0.5 text-muted" }, we = ["aria-label"], Te = ["name", "value"], Ee = ["aria-label"], De = {
18
- key: 0,
19
- class: "flex shrink-0 flex-wrap gap-1 border-b border-border-light p-2 sm:w-40 sm:flex-col sm:flex-nowrap sm:border-r sm:border-b-0",
19
+ class: "flex shrink-0 flex-wrap gap-1 border-b border-border p-2 sm:w-44 sm:flex-col sm:flex-nowrap sm:border-r sm:border-b-0",
20
20
  role: "group",
21
21
  "aria-label": "Presets"
22
- }, Oe = ["onClick"], ke = {
22
+ }, De = ["onClick"], Oe = {
23
23
  key: 0,
24
24
  class: "p-4"
25
- }, Ae = { class: "text-base font-medium text-heading" }, je = {
25
+ }, ke = { class: "text-base font-medium text-heading" }, Ae = {
26
26
  class: "text-xs text-muted tabular-nums",
27
27
  "aria-live": "polite"
28
- }, Me = { class: "mt-3 grid grid-cols-3 gap-2" }, Ne = { class: "mb-1 block text-xs font-medium text-label" }, Pe = [
28
+ }, je = { class: "mt-3 grid grid-cols-3 gap-2" }, Me = { class: "mb-1.5 block text-xs font-medium text-heading" }, Ne = [
29
29
  "value",
30
30
  "aria-valuenow",
31
31
  "aria-valuemin",
@@ -33,10 +33,22 @@ var ye = { class: "relative" }, be = [
33
33
  "onKeydown",
34
34
  "onInput",
35
35
  "onBlur"
36
- ], Fe = {
36
+ ], Pe = [
37
+ "id",
38
+ "data-tab",
39
+ "aria-selected",
40
+ "aria-controls",
41
+ "tabindex",
42
+ "onClick"
43
+ ], Fe = [
44
+ "id",
45
+ "role",
46
+ "aria-labelledby"
47
+ ], Ie = { class: "mb-2 flex items-center justify-between gap-2" }, Le = ["aria-label"], Re = ["aria-label"], ze = {
37
48
  key: 1,
38
- class: "p-3"
39
- }, Ie = { class: "mb-2 flex items-center justify-between gap-2" }, Le = ["abbr"], Re = ["aria-selected"], ze = [
49
+ class: "rounded-10 bg-accent px-4 py-2 text-base font-semibold text-heading tabular-nums",
50
+ "aria-hidden": "true"
51
+ }, Be = ["aria-label"], Ve = ["abbr"], He = ["aria-selected"], Ue = [
40
52
  "data-day",
41
53
  "tabindex",
42
54
  "aria-label",
@@ -44,37 +56,47 @@ var ye = { class: "relative" }, be = [
44
56
  "aria-current",
45
57
  "onClick",
46
58
  "onMouseenter"
47
- ], Be = {
59
+ ], We = ["aria-label"], Ge = [
60
+ "data-pick",
61
+ "tabindex",
62
+ "aria-label",
63
+ "aria-selected",
64
+ "aria-disabled",
65
+ "onClick",
66
+ "onFocus"
67
+ ], Ke = { class: "flex justify-center gap-3" }, qe = {
48
68
  key: 0,
49
- class: "absolute bottom-1 left-1/2 size-1 -translate-x-1/2 rounded-full bg-primary",
69
+ class: "mt-6 h-32 w-px shrink-0 self-center bg-border",
50
70
  "aria-hidden": "true"
51
- }, Ve = {
71
+ }, Je = ["aria-label"], Ye = {
52
72
  key: 0,
53
- class: "mt-2 space-y-2 border-t border-border-light pt-3"
54
- }, He = ["aria-label"], Ue = { class: "text-xs font-medium text-label" }, We = { class: "flex items-center gap-1" }, Ge = {
73
+ class: "mb-1 text-center text-xs font-medium text-heading"
74
+ }, Xe = { class: "flex h-48 items-stretch justify-center gap-1" }, Ze = {
55
75
  key: 0,
56
- class: "text-muted",
76
+ class: "mt-6 self-center font-bold text-heading/50",
57
77
  "aria-hidden": "true"
58
- }, Ke = [
59
- "value",
78
+ }, Qe = { class: "flex h-full min-w-10 flex-1 flex-col items-center" }, $e = {
79
+ class: "mb-2 text-xm font-bold tracking-wider text-heading/50 uppercase",
80
+ "aria-hidden": "true"
81
+ }, et = [
60
82
  "aria-label",
61
- "aria-valuenow",
62
- "aria-valuemin",
63
- "aria-valuemax",
64
- "onKeydown",
65
- "onInput",
66
- "onBlur"
67
- ], qe = { class: "text-xs text-muted" }, Je = {
83
+ "data-time-list",
84
+ "onKeydown"
85
+ ], tt = { class: "flex w-full flex-col items-center py-20" }, nt = [
86
+ "tabindex",
87
+ "aria-selected",
88
+ "onClick"
89
+ ], rt = { class: "mt-3 text-center text-xs text-muted" }, it = {
68
90
  key: 2,
69
- class: "flex flex-wrap items-center gap-2 border-t border-border-light px-3 py-2.5"
70
- }, Ye = ["disabled"], Xe = {
91
+ class: "flex flex-wrap items-center gap-2 border-t border-border px-3 py-3"
92
+ }, at = ["disabled"], ot = {
71
93
  key: 1,
72
- class: "basis-full text-xs text-red-30",
94
+ class: "basis-full text-xs text-danger-strong",
73
95
  role: "alert"
74
- }, y = /*@__PURE__*/ d({
96
+ }, y = /*@__PURE__*/ u({
75
97
  inheritAttrs: !1,
76
98
  __name: "AcDatePicker",
77
- props: /*@__PURE__*/ f({
99
+ props: /*@__PURE__*/ d({
78
100
  label: { default: "" },
79
101
  placeholder: { default: "" },
80
102
  mode: { default: "date" },
@@ -110,7 +132,7 @@ var ye = { class: "relative" }, be = [
110
132
  },
111
133
  errorMsg: { default: "" },
112
134
  hint: { default: "" },
113
- size: { default: "small" },
135
+ size: { default: "normal" },
114
136
  name: { default: "" }
115
137
  }, {
116
138
  modelValue: { default: null },
@@ -122,8 +144,8 @@ var ye = { class: "relative" }, be = [
122
144
  openModifiers: {}
123
145
  }),
124
146
  emits: ["update:modelValue", "update:open"],
125
- setup(d, { expose: f }) {
126
- let y = d, Ze = le(d, "modelValue"), b = le(d, "open"), Qe = /^\d{4}-\d{2}-\d{2}$/, $e = /^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/, et = {
147
+ setup(u, { expose: d }) {
148
+ let y = u, st = le(u, "modelValue"), b = le(u, "open"), ct = /^\d{4}-\d{2}-\d{2}$/, lt = /^(\d{4}-\d{2}-\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/, ut = {
127
149
  w: 604800,
128
150
  d: 86400,
129
151
  h: 3600,
@@ -133,33 +155,46 @@ var ye = { class: "relative" }, be = [
133
155
  us: 1e-6,
134
156
  µs: 1e-6,
135
157
  ns: 1e-9
136
- }, tt = Date.UTC(2023, 0, 1), x = ce(), nt = se(), rt = i(() => ({
137
- class: nt.class,
138
- style: nt.style
139
- })), it = i(() => {
140
- let { class: e, style: t, ...n } = nt;
158
+ }, dt = Date.UTC(2023, 0, 1), ft = {
159
+ h: "Hrs",
160
+ m: "Min",
161
+ s: "Sec"
162
+ }, pt = [{
163
+ key: "date",
164
+ label: "Date",
165
+ icon: fe
166
+ }, {
167
+ key: "time",
168
+ label: "Time",
169
+ icon: ge
170
+ }], x = ce(), mt = se(), ht = i(() => ({
171
+ class: mt.class,
172
+ style: mt.style
173
+ })), gt = i(() => {
174
+ let { class: e, style: t, ...n } = mt;
141
175
  return n;
142
- }), at = `${x}-label`, ot = `${x}-value`, st = `${x}-month`, ct = `${x}-msg`, lt = /* @__PURE__ */ new Map(), ut = h(null), S = h(null), C = h(null), w = h({
176
+ }), _t = `${x}-label`, vt = `${x}-value`, yt = `${x}-month`, bt = `${x}-msg`, xt = `${x}-hint`, St = /* @__PURE__ */ new Map(), Ct = h(null), wt = h(null), S = h(null), C = h({
143
177
  left: 0,
144
- maxHeight: 480
145
- }), T = h("2026-01-01"), E = h("2026-01-01"), D = h(null), O = h(null), k = h(null), A = ae({
178
+ maxHeight: 480,
179
+ minWidth: 0
180
+ }), w = h("2026-01-01"), T = h("days"), E = h(2020), D = h(0), O = h("date"), k = h("2026-01-01"), A = h(null), j = h(null), M = h(null), N = ae({
146
181
  h: 0,
147
182
  m: 0,
148
183
  s: 0
149
- }), j = ae({
184
+ }), P = ae({
150
185
  h: 23,
151
186
  m: 59,
152
187
  s: 59
153
- }), M = ae({
188
+ }), F = ae({
154
189
  d: 0,
155
190
  h: 0,
156
191
  m: 0
157
- }), N = i(() => y.timeZone || Intl.DateTimeFormat().resolvedOptions().timeZone), P = i(() => y.range && y.mode !== "duration"), F = i(() => y.mode === "datetime"), dt = i(() => y.weekStartsOn ?? Vt()), ft = i(() => new Intl.DateTimeFormat(y.locale, {
192
+ }), I = i(() => y.timeZone || Intl.DateTimeFormat().resolvedOptions().timeZone), L = i(() => y.range && y.mode !== "duration"), R = i(() => y.mode === "datetime"), Tt = i(() => y.weekStartsOn ?? un()), Et = i(() => new Intl.DateTimeFormat(y.locale, {
158
193
  year: "numeric",
159
194
  month: "short",
160
195
  day: "numeric",
161
196
  timeZone: "UTC"
162
- })), I = i(() => new Intl.DateTimeFormat(y.locale, {
197
+ })), Dt = i(() => new Intl.DateTimeFormat(y.locale, {
163
198
  year: "numeric",
164
199
  month: "short",
165
200
  day: "numeric",
@@ -167,22 +202,22 @@ var ye = { class: "relative" }, be = [
167
202
  minute: "2-digit",
168
203
  second: y.showSeconds ? "2-digit" : void 0,
169
204
  hourCycle: "h23",
170
- timeZone: N.value,
205
+ timeZone: I.value,
171
206
  timeZoneName: "short"
172
- })), pt = i(() => new Intl.DateTimeFormat(y.locale, {
207
+ })), Ot = i(() => new Intl.DateTimeFormat(y.locale, {
173
208
  month: "long",
174
209
  year: "numeric",
175
210
  timeZone: "UTC"
176
- })), mt = i(() => new Intl.DateTimeFormat(y.locale, {
211
+ })), kt = i(() => new Intl.DateTimeFormat(y.locale, {
177
212
  weekday: "long",
178
213
  year: "numeric",
179
214
  month: "long",
180
215
  day: "numeric",
181
216
  timeZone: "UTC"
182
- })), ht = i(() => new Intl.DateTimeFormat(y.locale, {
217
+ })), At = i(() => new Intl.DateTimeFormat(y.locale, {
183
218
  day: "numeric",
184
219
  timeZone: "UTC"
185
- })), gt = i(() => {
220
+ })), jt = i(() => {
186
221
  let e = new Intl.DateTimeFormat(y.locale, {
187
222
  weekday: "short",
188
223
  timeZone: "UTC"
@@ -191,73 +226,105 @@ var ye = { class: "relative" }, be = [
191
226
  timeZone: "UTC"
192
227
  });
193
228
  return Array.from({ length: 7 }, (n, r) => {
194
- let i = new Date(tt + (dt.value + r) % 7 * 864e5);
229
+ let i = new Date(dt + (Tt.value + r) % 7 * 864e5);
195
230
  return {
196
231
  short: e.format(i),
197
232
  long: t.format(i)
198
233
  };
199
234
  });
200
- }), _t = i(() => new Intl.DateTimeFormat(y.locale, {
201
- timeZone: N.value,
235
+ }), Mt = i(() => new Intl.DateTimeFormat(y.locale, {
236
+ timeZone: I.value,
202
237
  timeZoneName: "short"
203
- }).formatToParts(Date.now()).find((e) => e.type === "timeZoneName")?.value ?? N.value), L = i(() => K(Date.now()).day), R = i(() => y.minDate ? Y(y.minDate) : null), z = i(() => y.maxDate ? Y(y.maxDate) : null), vt = i(() => y.minDate ? J(y.minDate) : null), yt = i(() => y.maxDate ? Qe.test(y.maxDate) ? q(W(y.maxDate, 1), 0, 0, 0) - 1e3 : J(y.maxDate) : null), B = i(() => {
204
- let e = Ze.value;
205
- return P.value ? Array.isArray(e) ? [e[0] || null, e[1] || null] : [null, null] : [typeof e == "string" && e ? e : null];
206
- }), bt = i(() => B.value.some(Boolean)), xt = i(() => {
207
- let [e, t] = B.value;
238
+ }).formatToParts(Date.now()).find((e) => e.type === "timeZoneName")?.value ?? I.value), Nt = i(() => X(Date.now()).day), z = i(() => y.minDate ? Q(y.minDate) : null), B = i(() => y.maxDate ? Q(y.maxDate) : null), Pt = i(() => y.minDate ? Z(y.minDate) : null), Ft = i(() => y.maxDate ? ct.test(y.maxDate) ? fn(J(y.maxDate, 1), 0, 0, 0) - 1e3 : Z(y.maxDate) : null), V = i(() => {
239
+ let e = st.value;
240
+ return L.value ? Array.isArray(e) ? [e[0] || null, e[1] || null] : [null, null] : [typeof e == "string" && e ? e : null];
241
+ }), It = i(() => V.value.some(Boolean)), Lt = i(() => {
242
+ let [e, t] = V.value;
208
243
  if (!e) return "";
209
244
  if (y.mode === "duration") {
210
- let t = Ut(e);
211
- return t === null ? e : Gt(t);
245
+ let t = mn(e);
246
+ return t === null ? e : gn(t);
212
247
  }
213
248
  if (y.mode === "date") {
214
- let n = Y(e), r = t ? Y(t) : null;
215
- return n ? P.value ? r ? ft.value.formatRange(U(n), U(r)) : `${ft.value.format(U(n))} –` : ft.value.format(U(n)) : e;
249
+ let n = Q(e), r = t ? Q(t) : null;
250
+ return n ? L.value ? r ? Et.value.formatRange(q(n), q(r)) : `${Et.value.format(q(n))} –` : Et.value.format(q(n)) : e;
216
251
  }
217
- let n = J(e), r = t ? J(t) : null;
218
- return n === null ? e : P.value ? r === null ? `${I.value.format(n)} –` : I.value.formatRange(n, r) : I.value.format(n);
219
- }), St = i(() => B.value.filter(Boolean).join("/")), Ct = i(() => {
220
- let e = (Bt(T.value) - dt.value + 7) % 7, t = W(T.value, -e);
221
- return Array.from({ length: 6 }, (e, n) => Array.from({ length: 7 }, (e, r) => W(t, n * 7 + r)));
222
- }), wt = i(() => !P.value || !O.value ? null : k.value ?? D.value ?? null), V = i(() => O.value ? q(O.value, A.h, A.m, A.s) : null), Tt = i(() => k.value ? q(k.value, j.h, j.m, j.s) : null), Et = i(() => {
223
- if (!F.value) return "";
224
- let e = P.value ? [V.value, Tt.value] : [V.value];
252
+ let n = Z(e), r = t ? Z(t) : null;
253
+ return n === null ? e : L.value ? r === null ? `${Dt.value.format(n)} –` : Dt.value.formatRange(n, r) : Dt.value.format(n);
254
+ }), Rt = i(() => V.value.filter(Boolean).join("/")), zt = i(() => {
255
+ let e = (ln(w.value) - Tt.value + 7) % 7, t = J(w.value, -e), n = Math.ceil((e + cn(w.value)) / 7);
256
+ return Array.from({ length: n }, (e, n) => Array.from({ length: 7 }, (e, r) => J(t, n * 7 + r)));
257
+ }), H = i(() => K(w.value).y), Bt = i(() => K(w.value).m - 1), Vt = i(() => {
258
+ let e = new Intl.DateTimeFormat(y.locale, {
259
+ month: "short",
260
+ timeZone: "UTC"
261
+ }), t = new Intl.DateTimeFormat(y.locale, {
262
+ month: "long",
263
+ year: "numeric",
264
+ timeZone: "UTC"
265
+ });
266
+ return Array.from({ length: 12 }, (n, r) => {
267
+ let i = G(H.value, r + 1, 1);
268
+ return {
269
+ value: r,
270
+ text: e.format(q(i)),
271
+ label: t.format(q(i)),
272
+ disabled: vn(i, G(H.value, r + 2, 0)),
273
+ selected: r === Bt.value
274
+ };
275
+ });
276
+ }), Ht = i(() => Array.from({ length: 12 }, (e, t) => {
277
+ let n = E.value + t;
278
+ return {
279
+ value: n,
280
+ text: String(n),
281
+ label: String(n),
282
+ disabled: vn(G(n, 1, 1), G(n, 12, 31)),
283
+ selected: n === H.value
284
+ };
285
+ })), Ut = i(() => T.value === "months" ? Vt.value : Ht.value), Wt = i(() => [
286
+ 0,
287
+ 4,
288
+ 8
289
+ ].map((e) => Ut.value.slice(e, e + 4))), Gt = i(() => Ut.value.some((e) => e.value === D.value) ? D.value : Ut.value[0].value), U = i(() => T.value === "days" ? Ot.value.format(q(w.value)) : T.value === "months" ? String(H.value) : `${E.value}–${E.value + 9}`), Kt = i(() => T.value === "days" ? ["Previous month", "Next month"] : T.value === "months" ? ["Previous year", "Next year"] : ["Previous years", "Next years"]), qt = i(() => !L.value || !j.value ? null : M.value ?? A.value ?? null), W = i(() => j.value ? fn(j.value, N.h, N.m, N.s) : null), Jt = i(() => M.value ? fn(M.value, P.h, P.m, P.s) : null), Yt = i(() => {
290
+ if (!R.value) return "";
291
+ let e = L.value ? [W.value, Jt.value] : [W.value];
225
292
  for (let t of e) if (t !== null) {
226
- if (vt.value !== null && t < vt.value) return `Choose a time from ${I.value.format(vt.value)}`;
227
- if (yt.value !== null && t > yt.value) return `Choose a time up to ${I.value.format(yt.value)}`;
293
+ if (Pt.value !== null && t < Pt.value) return `Choose a time from ${Dt.value.format(Pt.value)}`;
294
+ if (Ft.value !== null && t > Ft.value) return `Choose a time up to ${Dt.value.format(Ft.value)}`;
228
295
  }
229
- return P.value && V.value !== null && Tt.value !== null && Tt.value < V.value ? "The end must be after the start" : "";
230
- }), Dt = i(() => y.mode === "duration" ? !0 : !O.value || P.value && !k.value ? !1 : !Et.value), Ot = i(() => M.d * 86400 + M.h * 3600 + M.m * 60), kt = i(() => {
296
+ return L.value && W.value !== null && Jt.value !== null && Jt.value < W.value ? "The end must be after the start" : "";
297
+ }), Xt = i(() => y.mode === "duration" ? !0 : !j.value || L.value && !M.value ? !1 : !Yt.value), Zt = i(() => F.d * 86400 + F.h * 3600 + F.m * 60), Qt = i(() => {
231
298
  let e = [{
232
299
  key: "start",
233
- label: P.value ? "Start" : "Time",
234
- clock: A
300
+ label: L.value ? "Start" : "Time",
301
+ clock: N
235
302
  }];
236
- return P.value && e.push({
303
+ return L.value && e.push({
237
304
  key: "end",
238
305
  label: "End",
239
- clock: j
306
+ clock: P
240
307
  }), e.map((e) => ({
241
308
  ...e,
242
- spinners: Xt(e.clock, e.label)
309
+ spinners: Cn(e.clock, e.label)
243
310
  }));
244
- }), At = i(() => [
245
- Z("d", "Days", 0, 999, !1, !1, () => M.d, (e) => M.d = e),
246
- Z("h", "Hours", 0, 23, !1, !1, () => M.h, (e) => M.h = e),
247
- Z("m", "Minutes", 0, 59, !1, !1, () => M.m, (e) => M.m = e)
248
- ]), jt = h(!1), Mt = i(() => b.value || jt.value), Nt = i(() => !!y.label && (bt.value || Mt.value)), Pt = i(() => y.errorMsg || y.hint ? ct : void 0), Ft = i(() => {
311
+ }), $t = i(() => [
312
+ Sn("d", "Days", 0, 999, !1, !1, () => F.d, (e) => F.d = e),
313
+ Sn("h", "Hours", 0, 23, !1, !1, () => F.h, (e) => F.h = e),
314
+ Sn("m", "Minutes", 0, 59, !1, !1, () => F.m, (e) => F.m = e)
315
+ ]), en = h(!1), tn = i(() => b.value || en.value), nn = i(() => [y.hint && xt, y.errorMsg && bt].filter(Boolean).join(" ") || void 0), rn = i(() => {
249
316
  if (y.mode === "duration") return y.label || "Choose duration";
250
- let e = P.value ? "date range" : F.value ? "date and time" : "date";
317
+ let e = L.value ? "date range" : R.value ? "date and time" : "date";
251
318
  return y.label ? `${y.label}: choose ${e}` : `Choose ${e}`;
252
- }), It = i(() => y.mode === "duration" ? _e : P.value ? pe : fe);
253
- function Lt(e) {
319
+ }), an = i(() => y.mode === "duration" ? _e : L.value ? pe : fe);
320
+ function on(e) {
254
321
  return String(e).padStart(2, "0");
255
322
  }
256
- function Rt(e, t, n) {
323
+ function G(e, t, n) {
257
324
  let r = new Date(Date.UTC(e, t - 1, n));
258
- return `${r.getUTCFullYear()}-${Lt(r.getUTCMonth() + 1)}-${Lt(r.getUTCDate())}`;
325
+ return `${r.getUTCFullYear()}-${on(r.getUTCMonth() + 1)}-${on(r.getUTCDate())}`;
259
326
  }
260
- function H(e) {
327
+ function K(e) {
261
328
  let [t, n, r] = e.split("-").map(Number);
262
329
  return {
263
330
  y: t,
@@ -265,35 +332,39 @@ var ye = { class: "relative" }, be = [
265
332
  d: r
266
333
  };
267
334
  }
268
- function U(e) {
269
- let { y: t, m: n, d: r } = H(e);
335
+ function q(e) {
336
+ let { y: t, m: n, d: r } = K(e);
270
337
  return new Date(Date.UTC(t, n - 1, r));
271
338
  }
272
- function W(e, t) {
273
- let { y: n, m: r, d: i } = H(e);
274
- return Rt(n, r, i + t);
339
+ function J(e, t) {
340
+ let { y: n, m: r, d: i } = K(e);
341
+ return G(n, r, i + t);
275
342
  }
276
- function zt(e, t) {
277
- let { y: n, m: r, d: i } = H(e), a = new Date(Date.UTC(n, r - 1 + t + 1, 0)).getUTCDate();
278
- return Rt(n, r + t, Math.min(i, a));
343
+ function sn(e, t) {
344
+ let { y: n, m: r, d: i } = K(e), a = new Date(Date.UTC(n, r - 1 + t + 1, 0)).getUTCDate();
345
+ return G(n, r + t, Math.min(i, a));
279
346
  }
280
- function G(e) {
347
+ function Y(e) {
281
348
  return `${e.slice(0, 7)}-01`;
282
349
  }
283
- function Bt(e) {
284
- return U(e).getUTCDay();
350
+ function cn(e) {
351
+ let { y: t, m: n } = K(e);
352
+ return new Date(Date.UTC(t, n, 0)).getUTCDate();
353
+ }
354
+ function ln(e) {
355
+ return q(e).getUTCDay();
285
356
  }
286
- function Vt() {
357
+ function un() {
287
358
  try {
288
359
  let e = new Intl.Locale(y.locale ?? navigator.language), t = (e.getWeekInfo?.() ?? e.weekInfo)?.firstDay;
289
360
  if (t) return t % 7;
290
361
  } catch {}
291
362
  return 0;
292
363
  }
293
- function K(e) {
294
- let t = lt.get(N.value);
364
+ function X(e) {
365
+ let t = St.get(I.value);
295
366
  t || (t = new Intl.DateTimeFormat("en-US", {
296
- timeZone: N.value,
367
+ timeZone: I.value,
297
368
  hourCycle: "h23",
298
369
  year: "numeric",
299
370
  month: "2-digit",
@@ -301,53 +372,53 @@ var ye = { class: "relative" }, be = [
301
372
  hour: "2-digit",
302
373
  minute: "2-digit",
303
374
  second: "2-digit"
304
- }), lt.set(N.value, t));
375
+ }), St.set(I.value, t));
305
376
  let n = {};
306
377
  for (let { type: r, value: i } of t.formatToParts(e)) r !== "literal" && (n[r] = Number(i));
307
378
  return {
308
- day: Rt(n.year, n.month, n.day),
379
+ day: G(n.year, n.month, n.day),
309
380
  h: n.hour % 24,
310
381
  m: n.minute,
311
382
  s: n.second
312
383
  };
313
384
  }
314
- function Ht(e) {
315
- let t = K(e), { y: n, m: r, d: i } = H(t.day);
385
+ function dn(e) {
386
+ let t = X(e), { y: n, m: r, d: i } = K(t.day);
316
387
  return Date.UTC(n, r - 1, i, t.h, t.m, t.s) - Math.floor(e / 1e3) * 1e3;
317
388
  }
318
- function q(e, t, n, r) {
319
- let { y: i, m: a, d: o } = H(e), s = Date.UTC(i, a - 1, o, t, n, r), c = Ht(s), l = s - c, u = Ht(l);
320
- return u === c ? l : s - u;
389
+ function fn(e, t, n, r) {
390
+ let { y: i, m: a, d: o } = K(e), s = Date.UTC(i, a - 1, o, t, n, r), c = dn(s), ee = s - c, l = dn(ee);
391
+ return l === c ? ee : s - l;
321
392
  }
322
- function J(e) {
323
- let t = $e.exec(e);
324
- if (t) return q(t[1], Number(t[2]), Number(t[3]), Number(t[4] ?? 0));
325
- if (Qe.test(e)) return q(e, 0, 0, 0);
393
+ function Z(e) {
394
+ let t = lt.exec(e);
395
+ if (t) return fn(t[1], Number(t[2]), Number(t[3]), Number(t[4] ?? 0));
396
+ if (ct.test(e)) return fn(e, 0, 0, 0);
326
397
  let n = Date.parse(e);
327
398
  return Number.isNaN(n) ? null : n;
328
399
  }
329
- function Y(e) {
330
- if (Qe.test(e)) return e;
331
- let t = J(e);
332
- return t === null ? null : K(t).day;
400
+ function Q(e) {
401
+ if (ct.test(e)) return e;
402
+ let t = Z(e);
403
+ return t === null ? null : X(t).day;
333
404
  }
334
- function X(e) {
405
+ function pn(e) {
335
406
  return new Date(e).toISOString().replace(/\.000Z$/, "Z");
336
407
  }
337
- function Ut(e) {
408
+ function mn(e) {
338
409
  let t = e.replace(/\s+/g, "");
339
410
  if (!t) return null;
340
411
  if (t === "0") return 0;
341
412
  let n = /(\d+(?:\.\d+)?)(ns|us|µs|ms|w|d|h|m|s)/y, r = 0, i = 0, a;
342
- for (; a = n.exec(t);) r += Number(a[1]) * et[a[2]], i = n.lastIndex;
413
+ for (; a = n.exec(t);) r += Number(a[1]) * ut[a[2]], i = n.lastIndex;
343
414
  return i === t.length ? r : null;
344
415
  }
345
- function Wt(e) {
416
+ function hn(e) {
346
417
  if (e <= 0) return null;
347
418
  let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60), r = Math.round(e % 60);
348
419
  return `${t ? `${t}h` : ""}${n ? `${n}m` : ""}${r ? `${r}s` : ""}` || null;
349
420
  }
350
- function Gt(e) {
421
+ function gn(e) {
351
422
  let t = Math.floor(e / 86400), n = Math.floor(e % 86400 / 3600), r = Math.floor(e % 3600 / 60), i = Math.round(e % 60);
352
423
  return [
353
424
  t && `${t}d`,
@@ -356,23 +427,26 @@ var ye = { class: "relative" }, be = [
356
427
  i && `${i}s`
357
428
  ].filter(Boolean).join(" ") || "0m";
358
429
  }
359
- function Kt(e) {
360
- return R.value && e < R.value || z.value && e > z.value ? !0 : y.isDateDisabled?.(e) ?? !1;
430
+ function _n(e) {
431
+ return z.value && e < z.value || B.value && e > B.value ? !0 : y.isDateDisabled?.(e) ?? !1;
432
+ }
433
+ function vn(e, t) {
434
+ return !!z.value && t < z.value || !!B.value && e > B.value;
361
435
  }
362
- function qt(e) {
363
- return e === O.value || P.value && e === (k.value ?? wt.value);
436
+ function yn(e) {
437
+ return e === j.value || L.value && e === (M.value ?? qt.value);
364
438
  }
365
- function Jt(e) {
366
- let t = O.value, n = wt.value;
439
+ function bn(e) {
440
+ let t = j.value, n = qt.value;
367
441
  if (!t || !n) return !1;
368
442
  let [r, i] = t <= n ? [t, n] : [n, t];
369
443
  return e >= r && e <= i;
370
444
  }
371
- function Yt(e) {
372
- let t = O.value, n = wt.value, [r, i] = t <= n ? [t, n] : [n, t];
373
- return [e === r && "rounded-l-6", e === i && "rounded-r-6"];
445
+ function xn(e) {
446
+ let t = j.value, n = qt.value, [r, i] = t <= n ? [t, n] : [n, t];
447
+ return [e === r && "rounded-l-8", e === i && "rounded-r-8"];
374
448
  }
375
- function Z(e, t, n, r, i, a, o, s) {
449
+ function Sn(e, t, n, r, i, a, o, s) {
376
450
  return {
377
451
  key: e,
378
452
  label: t,
@@ -384,407 +458,550 @@ var ye = { class: "relative" }, be = [
384
458
  set: s
385
459
  };
386
460
  }
387
- function Xt(e, t) {
388
- let n = [Z("h", `${t} hours`, 0, 23, !0, !0, () => e.h, (t) => e.h = t), Z("m", `${t} minutes`, 0, 59, !0, !0, () => e.m, (t) => e.m = t)];
389
- return y.showSeconds && n.push(Z("s", `${t} seconds`, 0, 59, !0, !0, () => e.s, (t) => e.s = t)), n;
461
+ function Cn(e, t) {
462
+ let n = [Sn("h", `${t} hours`, 0, 23, !0, !0, () => e.h, (t) => e.h = t), Sn("m", `${t} minutes`, 0, 59, !0, !0, () => e.m, (t) => e.m = t)];
463
+ return y.showSeconds && n.push(Sn("s", `${t} seconds`, 0, 59, !0, !0, () => e.s, (t) => e.s = t)), n;
390
464
  }
391
- function Zt(e) {
392
- return e.padded ? Lt(e.get()) : String(e.get());
465
+ function wn(e) {
466
+ return e.padded ? on(e.get()) : String(e.get());
393
467
  }
394
- function Qt(e, t) {
468
+ function Tn(e, t) {
395
469
  let n = t.get(), r = t.max - t.min + 1, i = null;
396
- e.key === "ArrowUp" ? i = n + 1 : e.key === "ArrowDown" ? i = n - 1 : e.key === "PageUp" ? i = n + 10 : e.key === "PageDown" ? i = n - 10 : e.key === "Home" ? i = t.min : e.key === "End" && (i = t.max), i !== null && (e.preventDefault(), i = t.wrap ? ((i - t.min) % r + r) % r + t.min : Math.min(t.max, Math.max(t.min, i)), t.set(i), e.target.value = Zt(t));
470
+ e.key === "ArrowUp" ? i = n + 1 : e.key === "ArrowDown" ? i = n - 1 : e.key === "PageUp" ? i = n + 10 : e.key === "PageDown" ? i = n - 10 : e.key === "Home" ? i = t.min : e.key === "End" && (i = t.max), i !== null && (e.preventDefault(), i = t.wrap ? ((i - t.min) % r + r) % r + t.min : Math.min(t.max, Math.max(t.min, i)), t.set(i), e.target.value = wn(t));
397
471
  }
398
- function $t(e, t) {
472
+ function En(e, t) {
399
473
  let n = e.target, r = n.value.replace(/\D/g, "").slice(0, String(t.max).length);
400
474
  if (n.value = r, !r) return;
401
475
  let i = Number(r);
402
476
  i > t.max && (i = Number(r.slice(-1))), t.set(Math.max(t.min, i));
403
477
  }
404
- function en(e, t) {
405
- e.target.value = Zt(t);
478
+ function Dn(e, t) {
479
+ e.target.value = wn(t);
406
480
  }
407
- function tn() {
408
- if (D.value = null, y.mode === "duration") {
409
- let e = B.value[0] ? Ut(B.value[0]) ?? 0 : 0;
410
- M.d = Math.floor(e / 86400), M.h = Math.floor(e % 86400 / 3600), M.m = Math.floor(e % 3600 / 60);
481
+ function On() {
482
+ if (A.value = null, T.value = "days", O.value = "date", y.mode === "duration") {
483
+ let e = V.value[0] ? mn(V.value[0]) ?? 0 : 0;
484
+ F.d = Math.floor(e / 86400), F.h = Math.floor(e % 86400 / 3600), F.m = Math.floor(e % 3600 / 60);
411
485
  return;
412
486
  }
413
- let [e, t] = B.value;
414
- if (O.value = null, k.value = null, Object.assign(A, {
487
+ let [e, t] = V.value;
488
+ if (j.value = null, M.value = null, Object.assign(N, {
415
489
  h: 0,
416
490
  m: 0,
417
491
  s: 0
418
- }), Object.assign(j, {
492
+ }), Object.assign(P, {
419
493
  h: 23,
420
494
  m: 59,
421
495
  s: y.showSeconds ? 59 : 0
422
- }), F.value) {
423
- let n = e ? J(e) : null, r = t ? J(t) : null;
496
+ }), R.value) {
497
+ let n = e ? Z(e) : null, r = t ? Z(t) : null;
424
498
  if (n !== null) {
425
- let e = K(n);
426
- O.value = e.day, Object.assign(A, {
499
+ let e = X(n);
500
+ j.value = e.day, Object.assign(N, {
427
501
  h: e.h,
428
502
  m: e.m,
429
503
  s: e.s
430
504
  });
431
505
  }
432
506
  if (r !== null) {
433
- let e = K(r);
434
- k.value = e.day, Object.assign(j, {
507
+ let e = X(r);
508
+ M.value = e.day, Object.assign(P, {
435
509
  h: e.h,
436
510
  m: e.m,
437
511
  s: e.s
438
512
  });
439
513
  }
440
- } else O.value = e ? Y(e) : null, k.value = t ? Y(t) : null;
441
- let n = O.value ?? L.value;
442
- !O.value && R.value && n < R.value && (n = R.value), !O.value && z.value && n > z.value && (n = z.value), E.value = n, T.value = G(n);
514
+ } else j.value = e ? Q(e) : null, M.value = t ? Q(t) : null;
515
+ let n = j.value ?? Nt.value;
516
+ !j.value && z.value && n < z.value && (n = z.value), !j.value && B.value && n > B.value && (n = B.value), k.value = n, w.value = Y(n);
443
517
  }
444
- function nn() {
445
- let e = S.value;
518
+ function kn() {
519
+ let e = wt.value;
446
520
  if (!e) return;
447
- let t = e.getBoundingClientRect(), n = C.value?.offsetWidth ?? 300, r = C.value?.offsetHeight ?? 380, i = window.innerHeight - t.bottom - 6 - 8, a = t.top - 6 - 8, o = i < r && a > i, s = Math.max(8, Math.min(t.left, window.innerWidth - n - 8));
448
- w.value = o ? {
521
+ let t = e.getBoundingClientRect(), n = S.value?.offsetWidth ?? 300, r = S.value?.offsetHeight ?? 380, i = window.innerHeight - t.bottom - 6 - 8, a = t.top - 6 - 8, o = i < r && a > i, s = Math.max(8, Math.min(t.left, window.innerWidth - n - 8)), c = Math.min(t.width, 448);
522
+ C.value = o ? {
449
523
  bottom: window.innerHeight - t.top + 6,
450
524
  left: s,
451
- maxHeight: Math.max(200, a)
525
+ maxHeight: Math.max(200, a),
526
+ minWidth: c
452
527
  } : {
453
528
  top: t.bottom + 6,
454
529
  left: s,
455
- maxHeight: Math.max(200, i)
530
+ maxHeight: Math.max(200, i),
531
+ minWidth: c
456
532
  };
457
533
  }
458
- function rn() {
534
+ function An() {
459
535
  y.disabled || b.value || (b.value = !0);
460
536
  }
461
- function Q(e = !0) {
462
- b.value && (b.value = !1, e && S.value?.focus());
537
+ function jn(e = !0) {
538
+ b.value && (b.value = !1, e && wt.value?.focus());
463
539
  }
464
- async function an() {
465
- tn(), nn(), yn(), await te(), nn(), y.mode === "duration" ? C.value?.querySelector("input")?.focus() : on();
540
+ async function Mn() {
541
+ On(), kn(), ar(), await f(), kn(), y.mode === "duration" ? S.value?.querySelector("input")?.focus() : Nn();
466
542
  }
467
- function on() {
468
- te(() => C.value?.querySelector(`[data-day="${E.value}"]`)?.focus());
543
+ function Nn() {
544
+ f(() => S.value?.querySelector(`[data-day="${k.value}"]`)?.focus());
469
545
  }
470
546
  function $(e) {
471
- Ze.value = e, Q();
547
+ st.value = e, jn();
472
548
  }
473
- function sn(e) {
474
- if (!Kt(e)) {
475
- if (E.value = e, G(e) !== T.value && (T.value = G(e), on()), !P.value) {
476
- O.value = e, F.value || $(e);
549
+ function Pn(e) {
550
+ if (!_n(e)) {
551
+ if (k.value = e, Y(e) !== w.value && (w.value = Y(e), Nn()), !L.value) {
552
+ j.value = e, R.value || $(e);
477
553
  return;
478
554
  }
479
- if (!O.value || k.value) {
480
- O.value = e, k.value = null;
555
+ if (!j.value || M.value) {
556
+ j.value = e, M.value = null;
481
557
  return;
482
558
  }
483
- e < O.value ? (k.value = O.value, O.value = e) : k.value = e, D.value = null, F.value || $([O.value, k.value]);
559
+ e < j.value ? (M.value = j.value, j.value = e) : M.value = e, A.value = null, R.value || $([j.value, M.value]);
484
560
  }
485
561
  }
486
- function cn() {
487
- if (Dt.value) {
488
- if (y.mode === "duration") return $(Wt(Ot.value));
489
- if (!F.value) return $(P.value ? [O.value, k.value] : O.value);
490
- $(P.value ? [X(V.value), X(Tt.value)] : X(V.value));
562
+ function Fn() {
563
+ if (Xt.value) {
564
+ if (y.mode === "duration") return $(hn(Zt.value));
565
+ if (!R.value) return $(L.value ? [j.value, M.value] : j.value);
566
+ $(L.value ? [pn(W.value), pn(Jt.value)] : pn(W.value));
491
567
  }
492
568
  }
493
- function ln() {
494
- let e = K(Date.now());
495
- O.value = e.day, Object.assign(A, {
569
+ function In() {
570
+ let e = X(Date.now());
571
+ j.value = e.day, Object.assign(N, {
496
572
  h: e.h,
497
573
  m: e.m,
498
574
  s: y.showSeconds ? e.s : 0
499
- }), E.value = e.day, T.value = G(e.day);
575
+ }), k.value = e.day, w.value = Y(e.day), T.value = "days", O.value === "time" && f(() => Xn("smooth"));
500
576
  }
501
- function un() {
502
- sn(L.value);
577
+ function Ln() {
578
+ Pn(Nt.value);
503
579
  }
504
- function dn(e) {
580
+ function Rn(e) {
505
581
  if (e.value) return $(e.value());
506
582
  if (!e.duration) return;
507
- if (y.mode === "duration") return $(Wt(Ut(e.duration) ?? 0));
508
- let t = Math.floor(Date.now() / 1e3) * 1e3, n = t - (Ut(e.duration) ?? 0) * 1e3;
509
- if (y.mode === "date") return $(P.value ? [K(n).day, K(t).day] : K(n).day);
510
- $(P.value ? [X(n), X(t)] : X(n));
583
+ if (y.mode === "duration") return $(hn(mn(e.duration) ?? 0));
584
+ let t = Math.floor(Date.now() / 1e3) * 1e3, n = t - (mn(e.duration) ?? 0) * 1e3;
585
+ if (y.mode === "date") return $(L.value ? [X(n).day, X(t).day] : X(n).day);
586
+ $(L.value ? [pn(n), pn(t)] : pn(n));
511
587
  }
512
- function fn() {
513
- Ze.value = null, S.value?.focus();
588
+ function zn() {
589
+ st.value = null, wt.value?.focus();
514
590
  }
515
- function pn(e) {
516
- T.value = zt(T.value, e), E.value = zt(E.value, e);
591
+ function Bn(e) {
592
+ w.value = sn(w.value, e), k.value = sn(k.value, e);
517
593
  }
518
- function mn(e) {
519
- let t = E.value, n = (Bt(t) - dt.value + 7) % 7, r = {
520
- ArrowLeft: () => W(t, -1),
521
- ArrowRight: () => W(t, 1),
522
- ArrowUp: () => W(t, -7),
523
- ArrowDown: () => W(t, 7),
524
- Home: () => W(t, -n),
525
- End: () => W(t, 6 - n),
526
- PageUp: () => zt(t, e.shiftKey ? -12 : -1),
527
- PageDown: () => zt(t, e.shiftKey ? 12 : 1)
594
+ function Vn(e) {
595
+ T.value === "days" ? Bn(e) : T.value === "months" ? w.value = sn(w.value, 12 * e) : E.value += 10 * e;
596
+ }
597
+ function Hn() {
598
+ T.value = "months", D.value = Bt.value, Wn();
599
+ }
600
+ function Un() {
601
+ T.value = "years", E.value = Math.floor(H.value / 10) * 10, D.value = H.value, Wn();
602
+ }
603
+ function Wn() {
604
+ f(() => S.value?.querySelector(`[data-pick="${Gt.value}"]`)?.focus());
605
+ }
606
+ function Gn(e) {
607
+ if (!e.disabled) {
608
+ if (T.value === "years") {
609
+ w.value = G(e.value, Bt.value + 1, 1), Hn();
610
+ return;
611
+ }
612
+ w.value = G(H.value, e.value + 1, 1), k.value = G(H.value, e.value + 1, Math.min(K(k.value).d, cn(w.value))), T.value = "days", Nn();
613
+ }
614
+ }
615
+ function Kn(e) {
616
+ if (e.key === "Escape") {
617
+ e.preventDefault(), e.stopPropagation(), T.value === "years" ? Hn() : (T.value = "days", Nn());
618
+ return;
619
+ }
620
+ if (e.key === "Enter" || e.key === " ") {
621
+ e.preventDefault();
622
+ let t = Ut.value.find((e) => e.value === D.value);
623
+ t && Gn(t);
624
+ return;
625
+ }
626
+ let t = T.value === "years", n = t ? E.value : 0, r = {
627
+ ArrowLeft: -1,
628
+ ArrowRight: 1,
629
+ ArrowUp: -4,
630
+ ArrowDown: 4
631
+ }, i;
632
+ if (e.key in r) i = D.value + r[e.key];
633
+ else if (e.key === "Home") i = n;
634
+ else if (e.key === "End") i = n + 11;
635
+ else if (e.key === "PageUp" || e.key === "PageDown") {
636
+ e.preventDefault(), Vn(e.key === "PageUp" ? -1 : 1), t && (D.value += e.key === "PageUp" ? -10 : 10), Wn();
637
+ return;
638
+ } else return;
639
+ e.preventDefault(), t ? i < E.value ? E.value -= 10 : i > E.value + 11 && (E.value += 10) : i = Math.max(0, Math.min(11, i)), D.value = i, Wn();
640
+ }
641
+ function qn(e) {
642
+ O.value = e, e === "time" && f(() => Xn("instant"));
643
+ }
644
+ function Jn(e) {
645
+ if (![
646
+ "ArrowLeft",
647
+ "ArrowRight",
648
+ "Home",
649
+ "End"
650
+ ].includes(e.key)) return;
651
+ e.preventDefault();
652
+ let t = e.key === "Home" ? "date" : e.key === "End" || O.value === "date" ? "time" : "date";
653
+ qn(t), f(() => S.value?.querySelector(`[data-tab="${t}"]`)?.focus());
654
+ }
655
+ function Yn(e) {
656
+ return Array.from({ length: e.max - e.min + 1 }, (t, n) => e.min + n);
657
+ }
658
+ function Xn(e) {
659
+ let t = e === "smooth" && !window.matchMedia("(prefers-reduced-motion: reduce)").matches;
660
+ S.value?.querySelectorAll("[data-time-list]").forEach((e) => {
661
+ let n = e.querySelector("[aria-selected=true]");
662
+ n && e.scrollTo({
663
+ top: n.offsetTop - (e.clientHeight - n.offsetHeight) / 2,
664
+ behavior: t ? "smooth" : "instant"
665
+ });
666
+ });
667
+ }
668
+ function Zn(e) {
669
+ S.value?.querySelector(`[data-time-list="${e}"] [aria-selected=true]`)?.focus({ preventScroll: !0 });
670
+ }
671
+ function Qn(e, t, n) {
672
+ e.set(t), f(() => {
673
+ Xn("smooth"), Zn(n);
674
+ });
675
+ }
676
+ function $n(e, t, n) {
677
+ if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
678
+ e.preventDefault();
679
+ let t = [...S.value?.querySelectorAll("[data-time-list]") ?? []].map((e) => e.dataset.timeList), r = t[t.indexOf(n) + (e.key === "ArrowRight" ? 1 : -1)];
680
+ r && Zn(r);
681
+ return;
682
+ }
683
+ let r = t.get(), i = {
684
+ ArrowUp: r - 1,
685
+ ArrowDown: r + 1,
686
+ PageUp: r - 5,
687
+ PageDown: r + 5,
688
+ Home: t.min,
689
+ End: t.max
690
+ };
691
+ e.key in i && (e.preventDefault(), Qn(t, Math.min(t.max, Math.max(t.min, i[e.key])), n));
692
+ }
693
+ function er(e) {
694
+ let t = k.value, n = (ln(t) - Tt.value + 7) % 7, r = {
695
+ ArrowLeft: () => J(t, -1),
696
+ ArrowRight: () => J(t, 1),
697
+ ArrowUp: () => J(t, -7),
698
+ ArrowDown: () => J(t, 7),
699
+ Home: () => J(t, -n),
700
+ End: () => J(t, 6 - n),
701
+ PageUp: () => sn(t, e.shiftKey ? -12 : -1),
702
+ PageDown: () => sn(t, e.shiftKey ? 12 : 1)
528
703
  };
529
704
  if (e.key === "Enter" || e.key === " ") {
530
- e.preventDefault(), sn(t);
705
+ e.preventDefault(), Pn(t);
531
706
  return;
532
707
  }
533
708
  let i = r[e.key];
534
- i && (e.preventDefault(), E.value = i(), T.value = G(E.value), P.value && O.value && !k.value && (D.value = E.value), on());
709
+ i && (e.preventDefault(), k.value = i(), w.value = Y(k.value), L.value && j.value && !M.value && (A.value = k.value), Nn());
535
710
  }
536
- function hn(e) {
711
+ function tr(e) {
537
712
  if (e.key === "Escape") {
538
- e.preventDefault(), e.stopPropagation(), Q();
713
+ e.preventDefault(), e.stopPropagation(), jn();
539
714
  return;
540
715
  }
541
- if (e.key !== "Tab" || !C.value) return;
542
- let t = [...C.value.querySelectorAll("button:not([disabled]), input:not([disabled])")].filter((e) => e.tabIndex >= 0);
716
+ if (e.key !== "Tab" || !S.value) return;
717
+ let t = [...S.value.querySelectorAll("button:not([disabled]), input:not([disabled])")].filter((e) => e.tabIndex >= 0);
543
718
  if (!t.length) return;
544
719
  let n = t[0], r = t[t.length - 1];
545
720
  e.shiftKey && document.activeElement === n ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus());
546
721
  }
547
- function gn(e) {
548
- (e.key === "ArrowDown" || e.key === "ArrowUp" && e.altKey) && (e.preventDefault(), rn());
722
+ function nr(e) {
723
+ (e.key === "ArrowDown" || e.key === "ArrowUp" && e.altKey) && (e.preventDefault(), An());
549
724
  }
550
- function _n(e) {
725
+ function rr(e) {
551
726
  let t = e.target;
552
- ut.value?.contains(t) || C.value?.contains(t) || Q(!1);
727
+ Ct.value?.contains(t) || S.value?.contains(t) || jn(!1);
553
728
  }
554
- function vn(e) {
555
- e && C.value?.contains(e.target) || nn();
729
+ function ir(e) {
730
+ e?.target instanceof Node && S.value?.contains(e.target) || kn();
556
731
  }
557
- function yn() {
558
- document.addEventListener("pointerdown", _n, !0), window.addEventListener("scroll", vn, !0), window.addEventListener("resize", vn);
732
+ function ar() {
733
+ document.addEventListener("pointerdown", rr, !0), window.addEventListener("scroll", ir, !0), window.addEventListener("resize", ir);
559
734
  }
560
- function bn() {
561
- document.removeEventListener("pointerdown", _n, !0), window.removeEventListener("scroll", vn, !0), window.removeEventListener("resize", vn);
735
+ function or() {
736
+ document.removeEventListener("pointerdown", rr, !0), window.removeEventListener("scroll", ir, !0), window.removeEventListener("resize", ir);
562
737
  }
563
- return ue(b, (e) => e ? an() : bn()), ie(() => {
564
- b.value && an();
565
- }), re(bn), f({ focus: () => S.value?.focus() }), (i, f) => (m(), s("div", ee({
738
+ return ue(b, (e) => e ? Mn() : or()), ie(() => {
739
+ b.value && Mn();
740
+ }), re(or), d({ focus: () => wt.value?.focus() }), (i, d) => (m(), s("div", te({
566
741
  ref_key: "root",
567
- ref: ut
568
- }, rt.value, {
569
- class: ["w-full", d.disabled && "opacity-60"],
742
+ ref: Ct
743
+ }, ht.value, {
744
+ class: ["w-full", u.disabled && "opacity-50"],
570
745
  "data-ac-ds": "",
571
746
  "data-testid": "ac-date-picker"
572
747
  }), [
573
- c("div", ye, [
574
- c("button", ee({
575
- id: `${v(x)}-trigger`,
576
- ref_key: "trigger",
577
- ref: S
578
- }, it.value, {
579
- type: "button",
580
- disabled: d.disabled,
581
- "aria-haspopup": "dialog",
582
- "aria-expanded": b.value,
583
- "aria-labelledby": d.label ? `${at} ${ot}` : ot,
584
- "aria-describedby": Pt.value,
585
- "aria-invalid": !!d.errorMsg || void 0,
586
- "aria-required": d.required || void 0,
587
- class: ["flex w-full items-center rounded-6 border bg-surface pr-16 pl-3 text-left text-base text-heading shadow-xs transition-[border-color,box-shadow] duration-150 outline-none disabled:cursor-not-allowed disabled:bg-surface-muted", [
588
- d.size === "small" ? "h-9" : "h-10",
589
- d.disabled ? "" : "cursor-pointer",
590
- d.errorMsg ? ["border-red-60", Mt.value && "border-danger shadow-[0_0_0_3px_var(--color-red-90)]"] : Mt.value ? "focus-ring" : "border-border hover:border-border-dark"
591
- ]],
592
- onClick: f[0] ||= (e) => b.value ? Q() : rn(),
593
- onKeydown: gn,
594
- onFocus: f[1] ||= (e) => jt.value = !0,
595
- onBlur: f[2] ||= (e) => jt.value = !1
596
- }), [c("span", {
597
- id: ot,
598
- class: p(["truncate tabular-nums", !xt.value && "text-muted"])
599
- }, _(xt.value || (d.label ? "" : d.placeholder || (d.mode === "duration" ? "Choose duration" : "Choose date"))), 3)], 16, be),
600
- d.label ? (m(), s("label", {
601
- key: 0,
602
- id: at,
603
- for: `${v(x)}-trigger`,
604
- class: p(["pointer-events-none absolute left-2.5 rounded-2 px-1 transition-all duration-150 ease-out", [
605
- d.disabled ? "bg-linear-to-b from-surface from-50% to-surface-muted to-50%" : "bg-surface",
606
- Nt.value ? "top-0 -translate-y-1/2 text-xs font-medium" : "top-1/2 -translate-y-1/2 text-base text-muted",
607
- Nt.value && (d.errorMsg ? "text-red-30" : Mt.value ? "text-primary-20" : "text-label")
608
- ]])
609
- }, [l(_(d.label), 1), d.required ? (m(), s("span", Se, " *")) : o("", !0)], 10, xe)) : o("", !0),
610
- c("span", Ce, [d.clearable && bt.value && !d.disabled ? (m(), s("button", {
611
- key: 0,
612
- type: "button",
613
- class: "pointer-events-auto inline-flex size-6 cursor-pointer items-center justify-center rounded-4 transition hover:bg-surface-sunken hover:text-heading focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none",
614
- "aria-label": d.label ? `Clear ${d.label}` : "Clear",
615
- onClick: fn
616
- }, [u(v(ve), {
617
- class: "size-3.5",
618
- "aria-hidden": "true"
619
- })], 8, we)) : o("", !0), (m(), a(oe(It.value), {
620
- class: p(["mx-1 size-4", b.value && "text-heading"]),
621
- "aria-hidden": "true"
622
- }, null, 8, ["class"]))])
623
- ]),
624
- d.errorMsg ? (m(), s("p", {
748
+ u.label ? (m(), s("label", {
625
749
  key: 0,
626
- id: ct,
627
- class: "mt-1.5 flex items-center gap-1 text-xs text-red-30"
628
- }, [u(v(ge), {
629
- class: "size-3.5 shrink-0",
630
- "aria-hidden": "true"
631
- }), l(" " + _(d.errorMsg), 1)])) : d.hint ? (m(), s("p", {
750
+ id: _t,
751
+ for: `${v(x)}-trigger`,
752
+ class: "mb-2 flex items-center gap-1 text-base font-medium text-heading"
753
+ }, [c("span", null, _(u.label), 1), u.required ? (m(), s("span", be, "*")) : o("", !0)], 8, ye)) : o("", !0),
754
+ u.hint ? (m(), s("p", {
632
755
  key: 1,
633
- id: ct,
634
- class: "mt-1.5 text-xs text-muted"
635
- }, _(d.hint), 1)) : o("", !0),
636
- d.name ? (m(), s("input", {
756
+ id: xt,
757
+ class: "mb-2 text-base text-muted"
758
+ }, _(u.hint), 1)) : o("", !0),
759
+ c("div", xe, [c("button", te({
760
+ id: `${v(x)}-trigger`,
761
+ ref_key: "trigger",
762
+ ref: wt
763
+ }, gt.value, {
764
+ type: "button",
765
+ disabled: u.disabled,
766
+ "aria-haspopup": "dialog",
767
+ "aria-expanded": b.value,
768
+ "aria-labelledby": u.label ? `${_t} ${vt}` : vt,
769
+ "aria-describedby": nn.value,
770
+ "aria-invalid": !!u.errorMsg || void 0,
771
+ "aria-required": u.required || void 0,
772
+ class: ["flex w-full items-center rounded-10 border bg-background text-left text-base font-normal text-heading transition-[color,background-color,border-color,box-shadow] duration-200 outline-none disabled:cursor-not-allowed", [
773
+ u.size === "small" ? "h-9 pl-3" : "h-10.5 pl-4",
774
+ u.clearable && It.value && !u.disabled ? "pr-20" : "pr-10",
775
+ u.disabled ? "" : "cursor-pointer hover:bg-accent-hover",
776
+ u.errorMsg ? ["border-danger/60", tn.value && "border-danger shadow-[0_0_0_2px_color-mix(in_srgb,var(--color-danger)_20%,transparent)]"] : tn.value ? "focus-ring" : ["border-border", !u.disabled && "hover:border-accent-active"]
777
+ ]],
778
+ onClick: d[0] ||= (e) => b.value ? jn() : An(),
779
+ onKeydown: nr,
780
+ onFocus: d[1] ||= (e) => en.value = !0,
781
+ onBlur: d[2] ||= (e) => en.value = !1
782
+ }), [c("span", {
783
+ id: vt,
784
+ class: p(["truncate tabular-nums", !Lt.value && "text-muted/80"])
785
+ }, _(Lt.value || u.placeholder || (u.mode === "duration" ? "Choose duration" : "Choose date")), 3)], 16, Se), c("span", { class: p(["pointer-events-none absolute inset-y-0 flex items-center gap-4 text-muted", u.size === "small" ? "right-3" : "right-4"]) }, [u.clearable && It.value && !u.disabled ? (m(), s("button", {
786
+ key: 0,
787
+ type: "button",
788
+ class: "pointer-events-auto inline-flex cursor-pointer items-center justify-center rounded-full p-1 transition-colors duration-200 hover:bg-accent-hover hover:text-primary active:bg-accent-active focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
789
+ "aria-label": u.label ? `Clear ${u.label}` : "Clear",
790
+ onClick: zn
791
+ }, [l(v(ve), {
792
+ class: "size-4",
793
+ "aria-hidden": "true"
794
+ })], 8, Ce)) : o("", !0), (m(), a(oe(an.value), {
795
+ class: p(["size-4", b.value && "text-heading"]),
796
+ "aria-hidden": "true"
797
+ }, null, 8, ["class"]))], 2)]),
798
+ u.errorMsg ? (m(), s("p", {
637
799
  key: 2,
800
+ id: bt,
801
+ class: "mt-1 text-base text-danger-strong",
802
+ role: "alert"
803
+ }, _(u.errorMsg), 1)) : o("", !0),
804
+ u.name ? (m(), s("input", {
805
+ key: 3,
638
806
  type: "hidden",
639
- name: d.name,
640
- value: St.value
641
- }, null, 8, Te)) : o("", !0),
642
- (m(), a(n, { to: "body" }, [u(r, {
807
+ name: u.name,
808
+ value: Rt.value
809
+ }, null, 8, we)) : o("", !0),
810
+ (m(), a(n, { to: "body" }, [l(r, {
643
811
  "enter-active-class": "transition duration-150 ease-out motion-reduce:transition-opacity",
644
- "enter-from-class": "opacity-0 -translate-y-1 scale-[0.98]",
812
+ "enter-from-class": "opacity-0 scale-95",
645
813
  "leave-active-class": "transition duration-100 ease-in",
646
814
  "leave-to-class": "opacity-0"
647
815
  }, {
648
816
  default: de(() => [b.value ? (m(), s("div", {
649
817
  key: 0,
650
818
  ref_key: "panel",
651
- ref: C,
819
+ ref: S,
652
820
  role: "dialog",
653
821
  "aria-modal": "true",
654
- "aria-label": Ft.value,
655
- class: "ac-scrollbar fixed z-[90] flex max-w-[calc(100vw-16px)] flex-col rounded-10 border border-border bg-surface shadow-lg sm:flex-row",
822
+ "aria-label": rn.value,
823
+ class: "ac-scrollbar fixed z-[90] flex max-w-[calc(100vw-16px)] flex-col rounded-10 border border-border bg-surface shadow-sm sm:flex-row",
656
824
  style: ne({
657
- top: w.value.top === void 0 ? void 0 : `${w.value.top}px`,
658
- bottom: w.value.bottom === void 0 ? void 0 : `${w.value.bottom}px`,
659
- left: `${w.value.left}px`,
660
- maxHeight: `${w.value.maxHeight}px`
825
+ top: C.value.top === void 0 ? void 0 : `${C.value.top}px`,
826
+ bottom: C.value.bottom === void 0 ? void 0 : `${C.value.bottom}px`,
827
+ left: `${C.value.left}px`,
828
+ maxHeight: `${C.value.maxHeight}px`,
829
+ minWidth: `${C.value.minWidth}px`
661
830
  }),
662
831
  "data-ac-ds": "",
663
832
  "data-testid": "ac-date-picker-panel",
664
- onKeydown: hn
665
- }, [d.presets.length ? (m(), s("div", De, [(m(!0), s(t, null, g(d.presets, (e) => (m(), s("button", {
833
+ onKeydown: tr
834
+ }, [u.presets.length ? (m(), s("div", Ee, [(m(!0), s(t, null, g(u.presets, (e) => (m(), s("button", {
666
835
  key: e.label,
667
836
  type: "button",
668
- class: "cursor-pointer rounded-6 px-2.5 py-1.5 text-left text-base text-heading transition-colors hover:bg-surface-muted focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none max-sm:border max-sm:border-border max-sm:py-1 max-sm:text-xs",
669
- onClick: (t) => dn(e)
670
- }, _(e.label), 9, Oe))), 128))])) : o("", !0), c("div", { class: p(["max-w-full min-w-0", d.mode === "duration" ? "w-72" : "w-[calc(276px*var(--ac-scale))]"]) }, [d.mode === "duration" ? (m(), s("div", ke, [
671
- c("p", Ae, _(d.label || "Duration"), 1),
672
- c("p", je, _(Gt(Ot.value)), 1),
673
- c("div", Me, [(m(!0), s(t, null, g(At.value, (e) => (m(), s("label", {
837
+ class: "cursor-pointer rounded-8 px-3 py-2 text-left text-base text-heading transition-colors duration-200 hover:bg-accent-hover active:bg-accent-active focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset max-sm:rounded-full max-sm:border max-sm:border-border max-sm:px-2.5 max-sm:py-1 max-sm:text-xs",
838
+ onClick: (t) => Rn(e)
839
+ }, _(e.label), 9, De))), 128))])) : o("", !0), c("div", { class: p(["max-w-full min-w-0 flex-auto max-sm:w-auto", u.mode === "duration" ? "w-72" : "w-[calc(328px*var(--ac-scale))]"]) }, [u.mode === "duration" ? (m(), s("div", Oe, [
840
+ c("p", ke, _(u.label || "Duration"), 1),
841
+ c("p", Ae, _(gn(Zt.value)), 1),
842
+ c("div", je, [(m(!0), s(t, null, g($t.value, (e) => (m(), s("label", {
674
843
  key: e.key,
675
844
  class: "block"
676
- }, [c("span", Ne, _(e.label), 1), c("input", {
845
+ }, [c("span", Me, _(e.label), 1), c("input", {
677
846
  type: "text",
678
847
  inputmode: "numeric",
679
848
  role: "spinbutton",
680
849
  autocomplete: "off",
681
- value: Zt(e),
850
+ value: wn(e),
682
851
  "aria-valuenow": e.get(),
683
852
  "aria-valuemin": e.min,
684
853
  "aria-valuemax": e.max,
685
- class: "h-9 w-full rounded-6 border border-border bg-surface px-2.5 text-center text-base text-heading tabular-nums shadow-xs transition-[border-color,box-shadow] outline-none hover:border-border-dark focus:focus-ring",
686
- onKeydown: (t) => Qt(t, e),
687
- onInput: (t) => $t(t, e),
688
- onBlur: (t) => en(t, e),
689
- onFocus: f[3] ||= (e) => e.target.select()
690
- }, null, 40, Pe)]))), 128))]),
691
- f[10] ||= c("p", { class: "mt-2 text-xs text-muted" }, "↑ ↓ to adjust, or type a number.", -1)
692
- ])) : (m(), s("div", Fe, [
693
- c("div", Ie, [
694
- c("button", {
695
- type: "button",
696
- class: "inline-flex size-8 cursor-pointer items-center justify-center rounded-6 text-muted transition hover:bg-surface-muted hover:text-heading focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none",
697
- "aria-label": "Previous month",
698
- onClick: f[4] ||= (e) => pn(-1)
699
- }, [u(v(me), {
700
- class: "size-4",
701
- "aria-hidden": "true"
702
- })]),
703
- c("p", {
704
- id: st,
705
- class: "text-base font-semibold text-heading",
706
- "aria-live": "polite"
707
- }, _(pt.value.format(U(T.value))), 1),
708
- c("button", {
709
- type: "button",
710
- class: "inline-flex size-8 cursor-pointer items-center justify-center rounded-6 text-muted transition hover:bg-surface-muted hover:text-heading focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none",
711
- "aria-label": "Next month",
712
- onClick: f[5] ||= (e) => pn(1)
713
- }, [u(v(he), {
714
- class: "size-4",
715
- "aria-hidden": "true"
716
- })])
717
- ]),
718
- c("table", {
719
- role: "grid",
720
- "aria-labelledby": st,
721
- class: "border-collapse",
722
- onKeydown: mn
723
- }, [c("thead", null, [c("tr", null, [(m(!0), s(t, null, g(gt.value, (e) => (m(), s("th", {
724
- key: e.long,
725
- scope: "col",
726
- abbr: e.long,
727
- class: "h-8 w-9 text-center text-xs font-medium text-muted"
728
- }, _(e.short.slice(0, 2)), 9, Le))), 128))])]), c("tbody", { onMouseleave: f[6] ||= (e) => D.value = null }, [(m(!0), s(t, null, g(Ct.value, (e, n) => (m(), s("tr", { key: n }, [(m(!0), s(t, null, g(e, (e) => (m(), s("td", {
729
- key: e,
730
- role: "gridcell",
731
- "aria-selected": qt(e) || Jt(e),
732
- class: "p-0 py-0.5"
733
- }, [c("div", { class: p(Jt(e) && ["bg-primary-95", ...Yt(e)]) }, [c("button", {
854
+ class: "h-10 w-full rounded-10 border border-border bg-background px-2.5 text-center text-base text-heading tabular-nums transition-[border-color,box-shadow] duration-200 outline-none hover:border-accent-active focus:focus-ring",
855
+ onKeydown: (t) => Tn(t, e),
856
+ onInput: (t) => En(t, e),
857
+ onBlur: (t) => Dn(t, e),
858
+ onFocus: d[3] ||= (e) => e.target.select()
859
+ }, null, 40, Ne)]))), 128))]),
860
+ d[10] ||= c("p", { class: "mt-2 text-xs text-muted" }, "↑ ↓ to adjust, or type a number.", -1)
861
+ ])) : (m(), s(t, { key: 1 }, [R.value ? (m(), s("div", {
862
+ key: 0,
863
+ role: "tablist",
864
+ "aria-label": "Date or time",
865
+ class: "flex border-b border-border",
866
+ onKeydown: Jn
867
+ }, [(m(), s(t, null, g(pt, (e) => c("button", {
868
+ id: `${v(x)}-tab-${e.key}`,
869
+ key: e.key,
870
+ type: "button",
871
+ role: "tab",
872
+ "data-tab": e.key,
873
+ "aria-selected": O.value === e.key,
874
+ "aria-controls": `${v(x)}-tabpanel`,
875
+ tabindex: O.value === e.key ? 0 : -1,
876
+ class: p(["flex flex-1 cursor-pointer items-center justify-center gap-2 px-4 py-2 text-base font-medium transition-colors duration-200 focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset", O.value === e.key ? "bg-primary text-white focus-visible:ring-white/70" : "text-heading hover:bg-accent-hover focus-visible:ring-ring active:bg-accent-active"]),
877
+ onClick: (t) => qn(e.key)
878
+ }, [(m(), a(oe(e.icon), {
879
+ class: "size-4",
880
+ "aria-hidden": "true"
881
+ })), ee(" " + _(e.label), 1)], 10, Pe)), 64))], 32)) : o("", !0), c("div", {
882
+ id: `${v(x)}-tabpanel`,
883
+ class: "p-3",
884
+ role: R.value ? "tabpanel" : void 0,
885
+ "aria-labelledby": R.value ? `${v(x)}-tab-${O.value}` : void 0
886
+ }, [O.value === "date" ? (m(), s(t, { key: 0 }, [c("div", Ie, [
887
+ c("button", {
734
888
  type: "button",
735
- "data-day": e,
736
- tabindex: e === E.value ? 0 : -1,
737
- "aria-label": mt.value.format(U(e)),
738
- "aria-disabled": Kt(e) || void 0,
739
- "aria-current": e === L.value ? "date" : void 0,
740
- class: p(["relative inline-flex size-9 items-center justify-center rounded-6 text-base tabular-nums transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring", [Kt(e) ? "cursor-not-allowed text-slate-70 line-through" : qt(e) ? "cursor-pointer bg-primary font-semibold text-white shadow-button" : ["cursor-pointer hover:bg-surface-sunken", G(e) === T.value ? e === L.value ? "font-semibold text-primary-20" : "text-heading" : "text-muted"]]]),
741
- onClick: (t) => sn(e),
742
- onMouseenter: (t) => P.value && O.value && !k.value && (D.value = e)
743
- }, [l(_(ht.value.format(U(e))) + " ", 1), e === L.value && !qt(e) ? (m(), s("span", Be)) : o("", !0)], 42, ze)], 2)], 8, Re))), 128))]))), 128))], 32)], 32),
744
- F.value ? (m(), s("div", Ve, [(m(!0), s(t, null, g(kt.value, (e) => (m(), s("div", {
745
- key: e.key,
746
- class: "flex items-center justify-between gap-3",
747
- role: "group",
748
- "aria-label": `${e.label} time`
749
- }, [c("span", Ue, _(e.label), 1), c("span", We, [(m(!0), s(t, null, g(e.spinners, (e, n) => (m(), s(t, { key: e.key }, [n > 0 ? (m(), s("span", Ge, ":")) : o("", !0), c("input", {
750
- type: "text",
751
- inputmode: "numeric",
752
- role: "spinbutton",
753
- autocomplete: "off",
754
- maxlength: "2",
755
- value: Zt(e),
756
- "aria-label": e.label,
757
- "aria-valuenow": e.get(),
758
- "aria-valuemin": e.min,
759
- "aria-valuemax": e.max,
760
- class: "h-8 w-10 rounded-6 border border-border bg-surface text-center text-base text-heading tabular-nums shadow-xs transition-[border-color,box-shadow] outline-none hover:border-border-dark focus:focus-ring",
761
- onKeydown: (t) => Qt(t, e),
762
- onInput: (t) => $t(t, e),
763
- onBlur: (t) => en(t, e),
764
- onFocus: f[7] ||= (e) => e.target.select()
765
- }, null, 40, Ke)], 64))), 128))])], 8, He))), 128)), c("p", qe, [l("Times in " + _(_t.value), 1), _t.value === N.value ? o("", !0) : (m(), s(t, { key: 0 }, [l(" (" + _(N.value) + ")", 1)], 64))])])) : o("", !0)
766
- ])), F.value || d.mode === "duration" || !P.value ? (m(), s("div", Je, [
767
- d.mode !== "duration" && !P.value ? (m(), s("button", {
889
+ class: "inline-flex cursor-pointer items-center justify-center rounded-8 p-2 text-muted transition-colors duration-200 hover:bg-accent-hover hover:text-heading active:bg-accent-active focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
890
+ "aria-label": Kt.value[0],
891
+ onClick: d[4] ||= (e) => Vn(-1)
892
+ }, [l(v(me), {
893
+ class: "size-4",
894
+ "aria-hidden": "true"
895
+ })], 8, Le),
896
+ c("span", {
897
+ id: yt,
898
+ class: "sr-only",
899
+ "aria-live": "polite"
900
+ }, _(U.value), 1),
901
+ T.value === "years" ? (m(), s("span", ze, _(U.value), 1)) : (m(), s("button", {
902
+ key: 0,
903
+ type: "button",
904
+ class: "cursor-pointer rounded-10 bg-accent px-4 py-2 text-base font-semibold text-heading tabular-nums transition-colors duration-200 hover:bg-accent-hover active:bg-accent-active focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
905
+ "aria-label": T.value === "days" ? `${U.value}, choose month` : `${U.value}, choose year`,
906
+ onClick: d[5] ||= (e) => T.value === "days" ? Hn() : Un()
907
+ }, _(U.value), 9, Re)),
908
+ c("button", {
909
+ type: "button",
910
+ class: "inline-flex cursor-pointer items-center justify-center rounded-8 p-2 text-muted transition-colors duration-200 hover:bg-accent-hover hover:text-heading active:bg-accent-active focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none",
911
+ "aria-label": Kt.value[1],
912
+ onClick: d[6] ||= (e) => Vn(1)
913
+ }, [l(v(he), {
914
+ class: "size-4",
915
+ "aria-hidden": "true"
916
+ })], 8, Be)
917
+ ]), T.value === "days" ? (m(), s("table", {
918
+ key: 0,
919
+ role: "grid",
920
+ "aria-labelledby": yt,
921
+ class: "w-full table-fixed border-collapse",
922
+ onKeydown: er
923
+ }, [c("thead", null, [c("tr", null, [(m(!0), s(t, null, g(jt.value, (e) => (m(), s("th", {
924
+ key: e.long,
925
+ scope: "col",
926
+ abbr: e.long,
927
+ class: "pt-2 pb-2 text-center text-xs font-medium text-heading"
928
+ }, _(e.short.slice(0, 2)), 9, Ve))), 128))])]), c("tbody", { onMouseleave: d[7] ||= (e) => A.value = null }, [(m(!0), s(t, null, g(zt.value, (e, n) => (m(), s("tr", { key: n }, [(m(!0), s(t, null, g(e, (e) => (m(), s("td", {
929
+ key: e,
930
+ role: "gridcell",
931
+ "aria-selected": yn(e) || bn(e),
932
+ class: "p-0 py-0.5"
933
+ }, [c("div", { class: p(["px-0.5", bn(e) && Y(e) === w.value && ["bg-primary/10", ...xn(e)]]) }, [c("button", {
934
+ type: "button",
935
+ "data-day": e,
936
+ tabindex: e === k.value ? 0 : -1,
937
+ "aria-label": kt.value.format(q(e)),
938
+ "aria-disabled": _n(e) || void 0,
939
+ "aria-current": e === Nt.value ? "date" : void 0,
940
+ class: p(["relative flex aspect-square w-full items-center justify-center rounded-8 text-base tabular-nums transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface motion-reduce:transition-none", [Y(e) !== w.value && "invisible", _n(e) ? "cursor-not-allowed text-muted/50 line-through" : yn(e) ? "cursor-pointer bg-primary font-semibold text-white" : e === Nt.value ? "cursor-pointer bg-accent font-medium text-heading hover:bg-accent-hover active:bg-accent-active" : "cursor-pointer text-heading hover:bg-accent-hover hover:font-semibold active:bg-accent-active"]]),
941
+ onClick: (t) => Pn(e),
942
+ onMouseenter: (t) => L.value && j.value && !M.value && (A.value = e)
943
+ }, _(At.value.format(q(e))), 43, Ue)], 2)], 8, He))), 128))]))), 128))], 32)], 32)) : (m(), s("div", {
944
+ key: 1,
945
+ role: "grid",
946
+ "aria-label": T.value === "months" ? `Months of ${U.value}` : `Years ${U.value}`,
947
+ class: "grid gap-2",
948
+ onKeydown: Kn
949
+ }, [(m(!0), s(t, null, g(Wt.value, (e, n) => (m(), s("div", {
950
+ key: n,
951
+ role: "row",
952
+ class: "grid grid-cols-4 gap-2"
953
+ }, [(m(!0), s(t, null, g(e, (e) => (m(), s("button", {
954
+ key: e.value,
955
+ type: "button",
956
+ role: "gridcell",
957
+ "data-pick": e.value,
958
+ tabindex: e.value === Gt.value ? 0 : -1,
959
+ "aria-label": e.label,
960
+ "aria-selected": e.selected,
961
+ "aria-disabled": e.disabled || void 0,
962
+ class: p(["rounded-8 px-4 py-3 text-base tabular-nums transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface motion-reduce:transition-none", e.disabled ? "cursor-not-allowed text-muted/50 line-through" : e.selected ? "cursor-pointer bg-primary font-semibold text-white" : "cursor-pointer text-heading hover:bg-accent-hover hover:font-semibold active:bg-accent-active"]),
963
+ onClick: (t) => Gn(e),
964
+ onFocus: (t) => D.value = e.value
965
+ }, _(e.text), 43, Ge))), 128))]))), 128))], 40, We))], 64)) : (m(), s(t, { key: 1 }, [c("div", Ke, [(m(!0), s(t, null, g(Qt.value, (e, n) => (m(), s(t, { key: e.key }, [n > 0 ? (m(), s("span", qe)) : o("", !0), c("div", {
966
+ class: "flex min-w-0 flex-1 flex-col",
967
+ role: "group",
968
+ "aria-label": `${e.label} time`
969
+ }, [L.value ? (m(), s("p", Ye, _(e.label), 1)) : o("", !0), c("div", Xe, [(m(!0), s(t, null, g(e.spinners, (n, r) => (m(), s(t, { key: n.key }, [r > 0 ? (m(), s("span", Ze, ":")) : o("", !0), c("div", Qe, [c("span", $e, _(ft[n.key]), 1), c("div", {
970
+ role: "listbox",
971
+ "aria-label": n.label,
972
+ "data-time-list": `${e.key}-${n.key}`,
973
+ class: "relative min-h-0 w-full flex-1 scroll-smooth overflow-x-hidden overflow-y-auto [scrollbar-width:none] motion-reduce:scroll-auto [&::-webkit-scrollbar]:hidden",
974
+ onKeydown: (t) => $n(t, n, `${e.key}-${n.key}`)
975
+ }, [c("div", tt, [(m(!0), s(t, null, g(Yn(n), (t) => (m(), s("button", {
976
+ key: t,
977
+ type: "button",
978
+ role: "option",
979
+ tabindex: t === n.get() ? 0 : -1,
980
+ "aria-selected": t === n.get(),
981
+ class: p(["inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-8 text-base tabular-nums transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset motion-reduce:transition-none", t === n.get() ? "scale-110 bg-primary font-bold text-white" : "text-heading hover:bg-accent-hover hover:font-bold active:bg-accent-active"]),
982
+ onClick: (r) => Qn(n, t, `${e.key}-${n.key}`)
983
+ }, _(on(t)), 11, nt))), 128))])], 40, et)])], 64))), 128))])], 8, Je)], 64))), 128))]), c("p", rt, [ee("Times in " + _(Mt.value), 1), Mt.value === I.value ? o("", !0) : (m(), s(t, { key: 0 }, [ee(" (" + _(I.value) + ")", 1)], 64))])], 64))], 8, Fe)], 64)), R.value || u.mode === "duration" || !L.value ? (m(), s("div", it, [
984
+ u.mode !== "duration" && !L.value ? (m(), s("button", {
768
985
  key: 0,
769
986
  type: "button",
770
- class: "cursor-pointer rounded-4 text-xs font-medium text-primary-20 hover:underline focus-visible:ring-[3px] focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
771
- disabled: Kt(L.value),
772
- onClick: f[8] ||= (e) => F.value ? ln() : un()
773
- }, _(F.value ? "Now" : "Today"), 9, Ye)) : o("", !0),
774
- Et.value ? (m(), s("p", Xe, _(Et.value), 1)) : o("", !0),
775
- f[11] ||= c("span", { class: "flex-1" }, null, -1),
776
- F.value || d.mode === "duration" ? (m(), s(t, { key: 2 }, [u(e, {
987
+ class: "cursor-pointer rounded-8 bg-accent px-3 py-1.5 text-xs font-medium text-heading transition-colors duration-200 hover:bg-accent-hover active:bg-accent-active focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
988
+ disabled: _n(Nt.value),
989
+ onClick: d[8] ||= (e) => R.value ? In() : Ln()
990
+ }, _(R.value ? "Now" : "Today"), 9, at)) : o("", !0),
991
+ Yt.value ? (m(), s("p", ot, _(Yt.value), 1)) : o("", !0),
992
+ d[11] ||= c("span", { class: "flex-1" }, null, -1),
993
+ R.value || u.mode === "duration" ? (m(), s(t, { key: 2 }, [l(e, {
777
994
  title: "Cancel",
778
995
  color: "white",
779
996
  size: "small",
780
- onClick: f[9] ||= (e) => Q()
781
- }), u(e, {
997
+ onClick: d[9] ||= (e) => jn()
998
+ }), l(e, {
782
999
  title: "Apply",
783
1000
  size: "small",
784
- disabled: !Dt.value,
785
- onClick: cn
1001
+ disabled: !Xt.value,
1002
+ onClick: Fn
786
1003
  }, null, 8, ["disabled"])], 64)) : o("", !0)
787
- ])) : o("", !0)], 2)], 44, Ee)) : o("", !0)]),
1004
+ ])) : o("", !0)], 2)], 44, Te)) : o("", !0)]),
788
1005
  _: 1
789
1006
  })]))
790
1007
  ], 16));