hys-ui 0.6.0 → 0.8.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 (268) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/LICENSE +19 -0
  3. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  4. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1055 -753
  5. package/dist/components/HysDataGrid/gridColumnLayout.js +46 -0
  6. package/dist/components/HysDataGrid/gridPresentation.js +17 -0
  7. package/dist/components/HysDataGrid/useGridContextMenu.js +33 -0
  8. package/dist/components/HysDatePicker/HysDatePicker.vue.js +102 -48
  9. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  10. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +874 -532
  11. package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +2 -2
  12. package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +209 -168
  13. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +102 -48
  14. package/dist/components/HysDescriptions/HysDescriptions.vue.js +7 -0
  15. package/dist/components/HysDescriptions/HysDescriptions2.vue.js +146 -0
  16. package/dist/components/HysForm/HysForm2.vue.js +9 -8
  17. package/dist/components/HysIcon/HysIcon.vue.js +373 -0
  18. package/dist/components/HysIcon/HysIcon2.vue.js +5 -0
  19. package/dist/components/HysIcon/IconGraphic/IconGraphic.vue.js +147 -0
  20. package/dist/components/HysIcon/IconGraphic/IconGraphic2.vue.js +4 -0
  21. package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.js +7 -0
  22. package/dist/components/HysIcon/IconPickerPanel/IconPickerPanel2.vue.js +440 -0
  23. package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.js +29 -0
  24. package/dist/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic2.vue.js +4 -0
  25. package/dist/components/HysIcon/IconTooltip/IconTooltip.vue.js +19 -0
  26. package/dist/components/HysIcon/IconTooltip/IconTooltip2.vue.js +4 -0
  27. package/dist/components/HysIcon/builtins/access.js +180 -0
  28. package/dist/components/HysIcon/builtins/actions.js +327 -0
  29. package/dist/components/HysIcon/builtins/business.js +364 -0
  30. package/dist/components/HysIcon/builtins/catalog/access-1.json.js +51 -0
  31. package/dist/components/HysIcon/builtins/catalog/access-2.json.js +35 -0
  32. package/dist/components/HysIcon/builtins/catalog/accessibility.json.js +26 -0
  33. package/dist/components/HysIcon/builtins/catalog/arrows-1.json.js +45 -0
  34. package/dist/components/HysIcon/builtins/catalog/arrows-2.json.js +46 -0
  35. package/dist/components/HysIcon/builtins/catalog/arrows-3.json.js +42 -0
  36. package/dist/components/HysIcon/builtins/catalog/charts-1.json.js +50 -0
  37. package/dist/components/HysIcon/builtins/catalog/charts-2.json.js +13 -0
  38. package/dist/components/HysIcon/builtins/catalog/commerce.json.js +43 -0
  39. package/dist/components/HysIcon/builtins/catalog/communication-1.json.js +49 -0
  40. package/dist/components/HysIcon/builtins/catalog/communication-2.json.js +37 -0
  41. package/dist/components/HysIcon/builtins/catalog/design-1.json.js +61 -0
  42. package/dist/components/HysIcon/builtins/catalog/design-2.json.js +27 -0
  43. package/dist/components/HysIcon/builtins/catalog/development-1.json.js +58 -0
  44. package/dist/components/HysIcon/builtins/catalog/development-2.json.js +60 -0
  45. package/dist/components/HysIcon/builtins/catalog/development-3.json.js +25 -0
  46. package/dist/components/HysIcon/builtins/catalog/devices-1.json.js +52 -0
  47. package/dist/components/HysIcon/builtins/catalog/devices-2.json.js +55 -0
  48. package/dist/components/HysIcon/builtins/catalog/devices-3.json.js +23 -0
  49. package/dist/components/HysIcon/builtins/catalog/education.json.js +34 -0
  50. package/dist/components/HysIcon/builtins/catalog/emoji.json.js +24 -0
  51. package/dist/components/HysIcon/builtins/catalog/files-1.json.js +45 -0
  52. package/dist/components/HysIcon/builtins/catalog/files-2.json.js +47 -0
  53. package/dist/components/HysIcon/builtins/catalog/files-3.json.js +8 -0
  54. package/dist/components/HysIcon/builtins/catalog/food-1.json.js +67 -0
  55. package/dist/components/HysIcon/builtins/catalog/food-2.json.js +40 -0
  56. package/dist/components/HysIcon/builtins/catalog/home.json.js +36 -0
  57. package/dist/components/HysIcon/builtins/catalog/layout-1.json.js +46 -0
  58. package/dist/components/HysIcon/builtins/catalog/layout-2.json.js +45 -0
  59. package/dist/components/HysIcon/builtins/catalog/manifest.json.js +4 -0
  60. package/dist/components/HysIcon/builtins/catalog/maps-1.json.js +61 -0
  61. package/dist/components/HysIcon/builtins/catalog/maps-2.json.js +24 -0
  62. package/dist/components/HysIcon/builtins/catalog/media-1.json.js +57 -0
  63. package/dist/components/HysIcon/builtins/catalog/media-2.json.js +13 -0
  64. package/dist/components/HysIcon/builtins/catalog/medical.json.js +30 -0
  65. package/dist/components/HysIcon/builtins/catalog/nature.json.js +54 -0
  66. package/dist/components/HysIcon/builtins/catalog/recreation.json.js +51 -0
  67. package/dist/components/HysIcon/builtins/catalog/shapes.json.js +54 -0
  68. package/dist/components/HysIcon/builtins/catalog/text-1.json.js +52 -0
  69. package/dist/components/HysIcon/builtins/catalog/text-2.json.js +54 -0
  70. package/dist/components/HysIcon/builtins/catalog/text-3.json.js +58 -0
  71. package/dist/components/HysIcon/builtins/catalog/text-4.json.js +41 -0
  72. package/dist/components/HysIcon/builtins/catalog/time.json.js +39 -0
  73. package/dist/components/HysIcon/builtins/catalog/transport-1.json.js +57 -0
  74. package/dist/components/HysIcon/builtins/catalog/transport-2.json.js +7 -0
  75. package/dist/components/HysIcon/builtins/catalog/weather.json.js +46 -0
  76. package/dist/components/HysIcon/builtins/communication.js +314 -0
  77. package/dist/components/HysIcon/builtins/documents.js +315 -0
  78. package/dist/components/HysIcon/builtins/extendedCatalog.js +75 -0
  79. package/dist/components/HysIcon/builtins/iconInCategory.js +11 -0
  80. package/dist/components/HysIcon/builtins/media.js +255 -0
  81. package/dist/components/HysIcon/builtins/navigation.js +276 -0
  82. package/dist/components/HysIcon/builtins/technology.js +189 -0
  83. package/dist/components/HysIcon/iconBuiltins.js +228 -0
  84. package/dist/components/HysIcon/iconConfig.js +30 -0
  85. package/dist/components/HysIcon/iconRegistry.js +183 -0
  86. package/dist/components/HysIcon/iconSafety.js +191 -0
  87. package/dist/components/HysIcon/iconStyle.js +70 -0
  88. package/dist/components/HysIcon/useIconResource.js +75 -0
  89. package/dist/components/HysPopconfirm/HysPopconfirm.vue.js +7 -0
  90. package/dist/components/HysPopconfirm/HysPopconfirm2.vue.js +346 -0
  91. package/dist/components/HysPopconfirm/usePopconfirmAction.js +32 -0
  92. package/dist/components/HysResult/HysResult.vue.js +7 -0
  93. package/dist/components/HysResult/HysResult2.vue.js +124 -0
  94. package/dist/components/HysSpace/HysSpace.vue.js +7 -0
  95. package/dist/components/HysSpace/HysSpace2.vue.js +79 -0
  96. package/dist/components/HysSpace/spaceItems.js +17 -0
  97. package/dist/components/HysSpin/HysSpin.vue.js +7 -0
  98. package/dist/components/HysSpin/HysSpin2.vue.js +427 -0
  99. package/dist/components/HysSpin/SpinGlyph/SpinGlyph.vue.js +334 -0
  100. package/dist/components/HysSpin/SpinGlyph/SpinGlyph2.vue.js +5 -0
  101. package/dist/components/HysSpin/SpinPortal/SpinPortal.vue.js +7 -0
  102. package/dist/components/HysSpin/SpinPortal/SpinPortal2.vue.js +66 -0
  103. package/dist/components/HysSpin/SpinPortal/spinTarget.js +57 -0
  104. package/dist/components/HysSpin/spinCatalog.js +35 -0
  105. package/dist/components/HysSpin/spinConfig.js +32 -0
  106. package/dist/components/HysSpin/spinService.js +160 -0
  107. package/dist/components/HysSpin/spinStyle.js +39 -0
  108. package/dist/components/HysSpin/useHysSpinTask.js +92 -0
  109. package/dist/components/HysSpin/useSpinFullscreen.js +60 -0
  110. package/dist/components/HysSpin/useSpinVisibility.js +59 -0
  111. package/dist/components/HysSplitPane/HysSplitPane.vue.js +285 -204
  112. package/dist/components/HysSplitPane/splitPaneResize.js +75 -0
  113. package/dist/components/HysTabPane/HysTabPane.vue.js +49 -0
  114. package/dist/components/HysTabPane/HysTabPane2.vue.js +4 -0
  115. package/dist/components/HysTable/HysTable.vue.js +3 -3
  116. package/dist/components/HysTable/HysTable2.vue.js +412 -383
  117. package/dist/components/HysTable/tableSearch.js +24 -0
  118. package/dist/components/HysTabs/HysTabs.vue.js +172 -5
  119. package/dist/components/HysTabs/HysTabs2.vue.js +2 -275
  120. package/dist/components/HysTabs/TabsMore/TabsMore.vue.js +7 -0
  121. package/dist/components/HysTabs/TabsMore/TabsMore2.vue.js +133 -0
  122. package/dist/components/HysTabs/TabsPanels/TabsPanels.vue.js +161 -0
  123. package/dist/components/HysTabs/TabsPanels/TabsPanels2.vue.js +4 -0
  124. package/dist/components/HysTabs/TabsPrompts/TabsPrompts.vue.js +4 -0
  125. package/dist/components/HysTabs/TabsPrompts/TabsPrompts2.vue.js +88 -0
  126. package/dist/components/HysTabs/TabsSlot/TabsSlot.js +13 -0
  127. package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.js +7 -0
  128. package/dist/components/HysTabs/TabsWorkbench/TabsWorkbench2.vue.js +687 -0
  129. package/dist/components/HysTabs/tabsConfig.js +35 -0
  130. package/dist/components/HysTabs/tabsItems.js +79 -0
  131. package/dist/components/HysTabs/tabsPersistence.js +118 -0
  132. package/dist/components/HysTabs/useHysRouteTabs.js +77 -0
  133. package/dist/components/HysTabs/useTabsDragGhost.js +47 -0
  134. package/dist/components/HysTabs/useTabsNav.js +127 -0
  135. package/dist/components/HysTabs/useTabsOverlays.js +52 -0
  136. package/dist/components/HysTabs/useTabsPanels.js +101 -0
  137. package/dist/components/HysTabs/useTabsPointer.js +131 -0
  138. package/dist/components/HysTabs/useTabsState.js +263 -0
  139. package/dist/composables/datePicker.js +153 -94
  140. package/dist/composables/datePickerModel.js +156 -0
  141. package/dist/composables/datePickerPanels.js +78 -0
  142. package/dist/composables/datePickerRules.js +166 -0
  143. package/dist/composables/floatingPosition.js +32 -13
  144. package/dist/composables/formLayout.js +20 -42
  145. package/dist/composables/popupSurfaceStyle.js +30 -0
  146. package/dist/composables/useContainerWidth.js +24 -0
  147. package/dist/composables/useDatePicker.js +274 -381
  148. package/dist/composables/useFloating.js +42 -41
  149. package/dist/composables/usePageVisibility.js +19 -0
  150. package/dist/composables/usePopupSurface.js +153 -162
  151. package/dist/composables/usePopupSurfaceInteractions.js +91 -90
  152. package/dist/composables/useSplitPaneDrag.js +29 -26
  153. package/dist/composables/useSvgInstanceId.js +15 -0
  154. package/dist/composables/useTable.js +321 -306
  155. package/dist/composables/useTabularRowNavigation.js +46 -0
  156. package/dist/index.js +229 -185
  157. package/dist/internal/MultiSplitPane.vue.js +246 -205
  158. package/dist/internal/PopupSurfacePanel.vue.js +2 -2
  159. package/dist/internal/PopupSurfacePanel2.vue.js +35 -30
  160. package/dist/style.css +1 -1
  161. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +40 -2
  162. package/dist/types/components/HysDataGrid/gridColumnLayout.d.ts +22 -0
  163. package/dist/types/components/HysDataGrid/gridPresentation.d.ts +47 -0
  164. package/dist/types/components/HysDataGrid/useGridContextMenu.d.ts +14 -0
  165. package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +6 -9
  166. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +12 -0
  167. package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +6 -0
  168. package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +6 -9
  169. package/dist/types/components/HysDescriptions/HysDescriptions.vue.d.ts +20 -0
  170. package/dist/types/components/HysDescriptions/descriptionsTypes.d.ts +54 -0
  171. package/dist/types/components/HysForm/HysForm.vue.d.ts +1 -1
  172. package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +1 -1
  173. package/dist/types/components/HysIcon/HysIcon.vue.d.ts +76 -0
  174. package/dist/types/components/HysIcon/IconGraphic/IconGraphic.vue.d.ts +43 -0
  175. package/dist/types/components/HysIcon/IconPickerPanel/IconPickerPanel.vue.d.ts +17 -0
  176. package/dist/types/components/HysIcon/IconReferenceGraphic/IconReferenceGraphic.vue.d.ts +10 -0
  177. package/dist/types/components/HysIcon/IconTooltip/IconTooltip.vue.d.ts +11 -0
  178. package/dist/types/components/HysIcon/builtins/access.d.ts +15 -0
  179. package/dist/types/components/HysIcon/builtins/actions.d.ts +30 -0
  180. package/dist/types/components/HysIcon/builtins/business.d.ts +31 -0
  181. package/dist/types/components/HysIcon/builtins/communication.d.ts +27 -0
  182. package/dist/types/components/HysIcon/builtins/documents.d.ts +29 -0
  183. package/dist/types/components/HysIcon/builtins/extendedCatalog.d.ts +2 -0
  184. package/dist/types/components/HysIcon/builtins/iconInCategory.d.ts +2 -0
  185. package/dist/types/components/HysIcon/builtins/media.d.ts +24 -0
  186. package/dist/types/components/HysIcon/builtins/navigation.d.ts +30 -0
  187. package/dist/types/components/HysIcon/builtins/technology.d.ts +18 -0
  188. package/dist/types/components/HysIcon/iconBuiltins.d.ts +2 -0
  189. package/dist/types/components/HysIcon/iconConfig.d.ts +10 -0
  190. package/dist/types/components/HysIcon/iconRegistry.d.ts +5 -0
  191. package/dist/types/components/HysIcon/iconSafety.d.ts +8 -0
  192. package/dist/types/components/HysIcon/iconStyle.d.ts +6 -0
  193. package/dist/types/components/HysIcon/iconTypes.d.ts +192 -0
  194. package/dist/types/components/HysIcon/useIconResource.d.ts +14 -0
  195. package/dist/types/components/HysPopconfirm/HysPopconfirm.vue.d.ts +85 -0
  196. package/dist/types/components/HysPopconfirm/popconfirmTypes.d.ts +72 -0
  197. package/dist/types/components/HysPopconfirm/usePopconfirmAction.d.ts +6 -0
  198. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
  199. package/dist/types/components/HysResult/HysResult.vue.d.ts +22 -0
  200. package/dist/types/components/HysResult/resultTypes.d.ts +32 -0
  201. package/dist/types/components/HysSpace/HysSpace.vue.d.ts +15 -0
  202. package/dist/types/components/HysSpace/spaceItems.d.ts +9 -0
  203. package/dist/types/components/HysSpace/spaceTypes.d.ts +20 -0
  204. package/dist/types/components/HysSpin/HysSpin.vue.d.ts +84 -0
  205. package/dist/types/components/HysSpin/SpinGlyph/SpinGlyph.vue.d.ts +16 -0
  206. package/dist/types/components/HysSpin/SpinPortal/SpinPortal.vue.d.ts +21 -0
  207. package/dist/types/components/HysSpin/SpinPortal/spinTarget.d.ts +3 -0
  208. package/dist/types/components/HysSpin/spinCatalog.d.ts +122 -0
  209. package/dist/types/components/HysSpin/spinConfig.d.ts +10 -0
  210. package/dist/types/components/HysSpin/spinService.d.ts +7 -0
  211. package/dist/types/components/HysSpin/spinStyle.d.ts +5 -0
  212. package/dist/types/components/HysSpin/spinTypes.d.ts +133 -0
  213. package/dist/types/components/HysSpin/useHysSpinTask.d.ts +4 -0
  214. package/dist/types/components/HysSpin/useSpinFullscreen.d.ts +17 -0
  215. package/dist/types/components/HysSpin/useSpinVisibility.d.ts +10 -0
  216. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +25 -2
  217. package/dist/types/components/HysSplitPane/splitPaneResize.d.ts +17 -0
  218. package/dist/types/components/HysTabPane/HysTabPane.vue.d.ts +11 -0
  219. package/dist/types/components/HysTable/HysTable.vue.d.ts +16 -10
  220. package/dist/types/components/HysTable/tableSearch.d.ts +2 -0
  221. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +83 -74
  222. package/dist/types/components/HysTabs/TabsMore/TabsMore.vue.d.ts +14 -0
  223. package/dist/types/components/HysTabs/TabsPanels/TabsPanels.vue.d.ts +17 -0
  224. package/dist/types/components/HysTabs/TabsPrompts/TabsPrompts.vue.d.ts +7 -0
  225. package/dist/types/components/HysTabs/TabsSlot/TabsSlot.d.ts +9 -0
  226. package/dist/types/components/HysTabs/TabsWorkbench/TabsWorkbench.vue.d.ts +32 -0
  227. package/dist/types/components/HysTabs/tabsConfig.d.ts +4 -0
  228. package/dist/types/components/HysTabs/tabsItems.d.ts +14 -0
  229. package/dist/types/components/HysTabs/tabsPersistence.d.ts +6 -0
  230. package/dist/types/components/HysTabs/tabsTypes.d.ts +236 -0
  231. package/dist/types/components/HysTabs/useHysRouteTabs.d.ts +22 -0
  232. package/dist/types/components/HysTabs/useTabsDragGhost.d.ts +22 -0
  233. package/dist/types/components/HysTabs/useTabsNav.d.ts +20 -0
  234. package/dist/types/components/HysTabs/useTabsOverlays.d.ts +54 -0
  235. package/dist/types/components/HysTabs/useTabsPanels.d.ts +14 -0
  236. package/dist/types/components/HysTabs/useTabsPointer.d.ts +30 -0
  237. package/dist/types/components/HysTabs/useTabsState.d.ts +32 -0
  238. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +2 -2
  239. package/dist/types/components/HysToast/toastPresentation.d.ts +1 -1
  240. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +2 -2
  241. package/dist/types/composables/dataGrid.d.ts +34 -0
  242. package/dist/types/composables/datePicker.d.ts +14 -214
  243. package/dist/types/composables/datePickerModel.d.ts +63 -0
  244. package/dist/types/composables/datePickerPanels.d.ts +23 -0
  245. package/dist/types/composables/datePickerRules.d.ts +31 -0
  246. package/dist/types/composables/datePickerTypes.d.ts +277 -0
  247. package/dist/types/composables/floatingPosition.d.ts +1 -1
  248. package/dist/types/composables/formLayout.d.ts +1 -2
  249. package/dist/types/composables/popupSurfaceStyle.d.ts +7 -0
  250. package/dist/types/composables/table.d.ts +10 -1
  251. package/dist/types/composables/toastQueue.d.ts +4 -4
  252. package/dist/types/composables/toastQueueModel.d.ts +2 -2
  253. package/dist/types/composables/useColorPicker.d.ts +2 -4
  254. package/dist/types/composables/useContainerWidth.d.ts +2 -0
  255. package/dist/types/composables/useContextMenu.d.ts +2 -4
  256. package/dist/types/composables/useDatePicker.d.ts +20 -11
  257. package/dist/types/composables/useFloating.d.ts +4 -5
  258. package/dist/types/composables/usePageVisibility.d.ts +1 -0
  259. package/dist/types/composables/usePopupSurface.d.ts +9 -3
  260. package/dist/types/composables/usePopupSurfaceInteractions.d.ts +4 -2
  261. package/dist/types/composables/useSplitPaneDrag.d.ts +2 -2
  262. package/dist/types/composables/useSvgInstanceId.d.ts +1 -0
  263. package/dist/types/composables/useTable.d.ts +2 -0
  264. package/dist/types/composables/useTabularRowNavigation.d.ts +18 -0
  265. package/dist/types/index.d.ts +31 -3
  266. package/dist/types/internal/MultiSplitPane.vue.d.ts +10 -1
  267. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +3 -0
  268. package/package.json +1 -1
@@ -1,65 +1,92 @@
1
- import { defineComponent as ua, useSlots as da, computed as y, useAttrs as ca, ref as K, useId as va, provide as fa, watch as Q, nextTick as L, onMounted as pa, onUpdated as ya, onActivated as ma, onDeactivated as ha, onBeforeUnmount as ba, openBlock as s, createElementBlock as v, mergeProps as j, unref as a, withModifiers as Ne, normalizeClass as We, Fragment as $, renderSlot as S, createCommentVNode as m, renderList as M, createTextVNode as T, toDisplayString as h, createElementVNode as P, createVNode as oe, createBlock as A, resolveDynamicComponent as ka, Teleport as wa, withCtx as V, createSlots as ga, withDirectives as Ba, vShow as Ca, mergeDefaults as Sa } from "vue";
2
- import Pa from "../../motion/PopupMotion.js";
3
- import { X as $a, Clock3 as qe, CalendarDays as Da } from "lucide-vue-next";
4
- import Y from "../HysButton/HysButton.vue.js";
5
- import Ea from "../HysSelect/HysSelect.vue.js";
6
- import Fa from "./HysDatePickerPanel.vue.js";
7
- import { useHysRootAttrs as Ma } from "../../config.js";
8
- import { useHysFormItemContext as Ta, useHysControlState as Va, fieldKey as za } from "../../composables/formContext.js";
9
- import { useFloating as Aa } from "../../composables/useFloating.js";
10
- import { useChoiceNativeReset as Na } from "../../composables/choiceModel.js";
11
- import { useDatePicker as Wa } from "../../composables/useDatePicker.js";
12
- import { dateNative as qa, datePickerDefaults as Oa } from "../../composables/datePicker.js";
13
- const ja = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex", "aria-label", "aria-required", "aria-invalid", "aria-disabled", "aria-describedby"], Ra = {
1
+ import { defineComponent as Wa, useSlots as Na, computed as v, useAttrs as Aa, ref as Y, useId as ja, provide as Ra, watch as Q, nextTick as Z, onMounted as qa, onUpdated as Ha, onActivated as Ka, onDeactivated as Ia, onBeforeUnmount as La, openBlock as u, createElementBlock as d, mergeProps as R, unref as a, withModifiers as be, normalizeClass as We, Fragment as S, renderSlot as C, createBlock as O, resolveDynamicComponent as ge, createCommentVNode as p, renderList as z, createTextVNode as T, toDisplayString as m, createElementVNode as k, isRef as Ua, Teleport as Ya, createVNode as Ne, withCtx as N, createSlots as Xa, withKeys as ea, withDirectives as Ga, vShow as Ja, mergeDefaults as Qa } from "vue";
2
+ import Za from "../../motion/PopupMotion.js";
3
+ import { X as _a, Clock3 as aa, CalendarDays as xa } from "lucide-vue-next";
4
+ import _ from "../HysButton/HysButton.vue.js";
5
+ import et from "../HysSelect/HysSelect.vue.js";
6
+ import at from "./HysDatePickerPanel.vue.js";
7
+ import { useHysRootAttrs as tt } from "../../config.js";
8
+ import { useHysFormItemContext as lt, useHysControlState as ot, fieldKey as it } from "../../composables/formContext.js";
9
+ import { useFloating as nt } from "../../composables/useFloating.js";
10
+ import { useChoiceNativeReset as st } from "../../composables/choiceModel.js";
11
+ import { useDatePicker as ut } from "../../composables/useDatePicker.js";
12
+ import { calendarISO as ta } from "../../composables/calendar.js";
13
+ import { dateNative as rt, datePickerDefaults as dt, datePoint as ct, dateFormat as vt } from "../../composables/datePicker.js";
14
+ const pt = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex", "aria-label", "aria-required", "aria-invalid", "aria-disabled", "aria-describedby"], ft = {
14
15
  key: 0,
15
16
  class: "hys-ui-date-prefix"
16
- }, Ha = {
17
+ }, yt = {
17
18
  key: 0,
18
19
  class: "hys-ui-date-separator"
19
- }, Ia = ["id", "value", "aria-label", "aria-expanded", "aria-controls", "aria-invalid", "aria-required", "aria-describedby", "disabled", "readonly", "placeholder", "onInput", "onKeydown", "onBlur"], Ka = ["id", "disabled", "aria-label", "aria-expanded", "aria-controls", "aria-invalid", "aria-required", "aria-disabled", "aria-describedby", "aria-readonly"], La = {
20
+ }, mt = ["id", "value", "aria-label", "aria-expanded", "aria-controls", "aria-invalid", "aria-required", "aria-describedby", "disabled", "readonly", "placeholder", "onInput", "onKeydown", "onBlur"], ht = ["id", "disabled", "aria-label", "aria-expanded", "aria-controls", "aria-invalid", "aria-required", "aria-disabled", "aria-describedby", "aria-readonly"], bt = {
20
21
  key: 0,
21
22
  class: "hys-ui-date-prefix"
22
- }, Ua = { class: "hys-ui-date-icons" }, Xa = ["aria-label"], Ga = {
23
+ }, gt = { class: "hys-ui-date-separator" }, kt = { class: "hys-ui-date-icons" }, wt = ["aria-label"], Ct = {
23
24
  class: "hys-ui-date-suffix",
24
25
  "aria-hidden": "true"
25
- }, Ja = ["name", "value", "form", "disabled"], Qa = ["id"], Ya = ["id", "role", "aria-label"], Za = {
26
+ }, Bt = ["name", "value", "form", "disabled"], St = ["id"], Pt = ["id", "role", "aria-label"], Ft = {
26
27
  key: 0,
27
28
  class: "hys-ui-date-popup-header"
28
- }, xa = {
29
- key: 1,
29
+ }, Dt = {
30
+ key: 0,
30
31
  class: "hys-ui-date-shortcuts"
31
- }, _a = ["disabled", "onClick"], et = {
32
- key: 2,
32
+ }, $t = ["disabled", "onClick"], Tt = { class: "hys-ui-date-popup-main" }, Ot = {
33
+ key: 0,
33
34
  class: "hys-ui-date-range-status"
34
- }, at = ["disabled", "aria-pressed", "onClick"], tt = {
35
+ }, Mt = ["disabled", "aria-pressed", "onClick"], Et = {
35
36
  class: "hys-ui-date-range-instruction",
36
37
  role: "status"
37
- }, lt = { class: "hys-ui-date-panels" }, ot = {
38
+ }, Vt = {
39
+ key: 1,
40
+ class: "hys-ui-date-panel-jumps"
41
+ }, zt = ["aria-label", "onClick"], Wt = {
38
42
  key: 3,
43
+ class: "hys-ui-date-time-toolbar"
44
+ }, Nt = {
45
+ key: 4,
39
46
  class: "hys-ui-date-time-area",
40
47
  "data-hys-ui-form-internal": ""
41
- }, it = {
48
+ }, At = {
42
49
  key: 0,
43
- class: "hys-ui-date-time-colon"
44
- }, nt = {
45
- key: 4,
50
+ class: "hys-ui-date-time-fields"
51
+ }, jt = { key: 0 }, Rt = ["value", "placeholder", "disabled", "readonly", "onChange", "onKeydown"], qt = { key: 1 }, Ht = ["value", "placeholder", "disabled", "readonly", "onChange", "onKeydown"], Kt = { class: "hys-ui-date-time-controls" }, It = {
52
+ class: "hys-ui-date-time-caption",
53
+ "aria-hidden": "true"
54
+ }, Lt = {
55
+ key: 0,
56
+ class: "hys-ui-date-time-colon",
57
+ "aria-hidden": "true"
58
+ }, Ut = { class: "hys-ui-date-clock-part" }, Yt = {
59
+ key: 0,
60
+ class: "hys-ui-date-time-arrows"
61
+ }, Xt = ["aria-label", "disabled", "onClick"], Gt = {
62
+ key: 5,
46
63
  class: "hys-ui-date-partial"
47
- }, rt = ["disabled", "onClick"], st = ["id"], ut = {
48
- key: 6,
64
+ }, Jt = ["disabled", "onClick"], Qt = ["id"], Zt = {
65
+ key: 1,
66
+ class: "hys-ui-date-extra-footer"
67
+ }, _t = {
68
+ key: 2,
49
69
  class: "hys-ui-date-footer"
50
- }, dt = { class: "hys-ui-date-footer-shortcuts" }, ct = { class: "hys-ui-date-footer-actions" }, St = /* @__PURE__ */ ua({
70
+ }, xt = {
71
+ key: 0,
72
+ class: "hys-ui-date-footer-shortcuts"
73
+ }, el = { class: "hys-ui-date-footer-actions" }, fl = /* @__PURE__ */ Wa({
51
74
  inheritAttrs: !1,
52
75
  __name: "HysDatePickerControl",
53
- props: /* @__PURE__ */ Sa({
76
+ props: /* @__PURE__ */ Qa({
54
77
  popupTransition: {},
55
78
  popupTransitionDuration: {},
56
79
  modelValue: {},
80
+ value: {},
57
81
  defaultValue: {},
58
82
  clearValue: {},
83
+ emptyValues: {},
84
+ valueOnClear: { type: Function },
59
85
  type: {},
86
+ picker: {},
60
87
  valueType: {},
61
88
  valueFormat: {},
62
- format: {},
89
+ format: { type: [String, Function, Array] },
63
90
  inputFormats: {},
64
91
  disabled: { type: [Boolean, Array] },
65
92
  readonly: { type: Boolean },
@@ -67,6 +94,7 @@ const ja = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
67
94
  status: {},
68
95
  bordered: { type: Boolean },
69
96
  placeholder: {},
97
+ id: {},
70
98
  label: {},
71
99
  ariaLabel: {},
72
100
  name: {},
@@ -76,6 +104,9 @@ const ja = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
76
104
  max: {},
77
105
  disabledDate: { type: Function },
78
106
  disabledTime: { type: Function },
107
+ disabledHours: { type: Function },
108
+ disabledMinutes: { type: Function },
109
+ disabledSeconds: { type: Function },
79
110
  firstDayOfWeek: {},
80
111
  firstWeekContainsDate: {},
81
112
  weekNumberFormatter: { type: Function },
@@ -84,27 +115,40 @@ const ja = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
84
115
  locale: {},
85
116
  messages: {},
86
117
  showWeekNumbers: { type: Boolean },
118
+ showWeekNumber: { type: Boolean },
87
119
  showAdjacentDays: { type: Boolean },
88
120
  defaultPickerValue: {},
89
121
  panelValue: {},
122
+ panelValues: {},
90
123
  mode: {},
91
124
  defaultMode: {},
92
125
  shortcuts: {},
126
+ presets: {},
127
+ ranges: {},
128
+ shortcutPlacement: {},
93
129
  clearable: { type: Boolean },
130
+ allowClear: { type: Boolean },
94
131
  editable: { type: Boolean },
95
132
  inputReadonly: { type: Boolean },
96
133
  showOnFocus: { type: Boolean },
134
+ automaticDropdown: { type: Boolean },
97
135
  showToday: { type: Boolean },
98
136
  showNow: { type: Boolean },
99
137
  showFooter: { type: Boolean },
100
138
  showConfirm: { type: Boolean },
101
- showTime: { type: Boolean },
139
+ showTime: { type: [Boolean, Object] },
102
140
  defaultTime: {},
141
+ dateFormat: {},
142
+ timeFormat: {},
143
+ use12Hours: { type: Boolean },
144
+ hideDisabledOptions: { type: Boolean },
145
+ arrowControl: { type: Boolean },
103
146
  hourStep: {},
104
147
  minuteStep: {},
105
148
  secondStep: {},
106
149
  showSeconds: { type: Boolean },
107
150
  rangeSeparator: {},
151
+ separator: {},
108
152
  startPlaceholder: {},
109
153
  endPlaceholder: {},
110
154
  allowEmpty: {},
@@ -119,19 +163,31 @@ const ja = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
119
163
  inline: { type: Boolean },
120
164
  placement: {},
121
165
  appendTo: { type: [String, Boolean] },
166
+ teleported: { type: Boolean },
167
+ getPopupContainer: { type: Function },
168
+ fallbackPlacements: {},
169
+ popperOptions: {},
122
170
  popupWidth: {},
123
171
  popupClass: {},
172
+ popupClassName: {},
173
+ popperClass: {},
124
174
  popupStyle: {},
175
+ popperStyle: {},
176
+ prefixIcon: {},
177
+ clearIcon: {},
125
178
  validateEvent: { type: Boolean },
126
179
  cellClassName: { type: Function },
127
180
  range: { type: Boolean }
128
- }, Oa),
181
+ }, dt),
129
182
  emits: [
130
183
  "update:modelValue",
184
+ "update:value",
131
185
  "change",
132
186
  "value-change",
133
187
  "update:open",
134
188
  "visible-change",
189
+ "openChange",
190
+ "update:panelValues",
135
191
  "update:panelValue",
136
192
  "update:mode",
137
193
  "panelChange",
@@ -142,679 +198,965 @@ const ja = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
142
198
  "focus",
143
199
  "blur"
144
200
  ],
145
- setup(r, { expose: Oe, emit: je }) {
146
- const o = r, Re = da(), He = y(
201
+ setup(r, { expose: la, emit: oa }) {
202
+ const l = r, ia = Na(), na = v(
147
203
  () => ["prev-month", "next-month", "prev-year", "next-year"].filter(
148
- (e) => !!Re[e]
204
+ (e) => !!ia[e]
149
205
  )
150
- ), R = je, ie = ca(), he = Ma(), w = Ta(), B = Va({
206
+ ), K = oa, Ae = Aa(), je = tt(), F = lt(), M = ot({
151
207
  get disabled() {
152
208
  var e;
153
- return typeof o.disabled == "boolean" ? o.disabled : !!((e = o.disabled) != null && e.every(Boolean));
209
+ return typeof l.disabled == "boolean" ? l.disabled : !!((e = l.disabled) != null && e.every(Boolean));
154
210
  },
155
211
  get size() {
156
- return o.size;
212
+ return l.size;
157
213
  }
158
- }), C = K(), Z = K(), U = K(), ne = /* @__PURE__ */ new Map(), N = K(!0), f = y(() => !!o.range), b = y(
159
- () => !N.value || B.disabled.value || !!o.readonly
160
- ), z = va(), X = K(!1), H = K([]);
161
- fa(za, void 0);
162
- const l = Wa(
163
- o,
164
- f,
214
+ }), D = Y(), se = Y(), X = Y(), Re = Y(), ue = /* @__PURE__ */ new Map(), I = Y(!0), y = v(() => !!l.range), b = v(
215
+ () => !I.value || M.disabled.value || !!l.readonly
216
+ ), q = ja(), x = Y(!1), L = Y([]), ee = /* @__PURE__ */ new Set();
217
+ Ra(it, void 0);
218
+ const i = ut(
219
+ l,
220
+ y,
165
221
  b,
166
- (e, ...t) => R(e, ...t),
222
+ (e, ...t) => K(e, ...t),
167
223
  () => {
168
- o.validateEvent && w.validate("change");
224
+ l.validateEvent && F.validate("change");
169
225
  }
170
226
  ), {
171
- draft: k,
172
- words: d,
173
- current: re,
174
- selected: Ie,
175
- view: se,
176
- panels: be,
177
- error: I,
178
- time: x,
179
- needsConfirm: W
180
- } = l;
181
- l.begin();
182
- const ue = y(
183
- () => N.value && (o.inline || p.open.value)
184
- ), Ke = y(
185
- () => C.value ? {
186
- getBoundingClientRect: () => C.value.getBoundingClientRect(),
187
- contains: (e) => C.value.contains(e),
188
- focus: pe,
227
+ draft: g,
228
+ words: c,
229
+ current: ke,
230
+ selected: sa,
231
+ view: E,
232
+ panels: we,
233
+ error: H,
234
+ time: ae,
235
+ needsConfirm: A
236
+ } = i;
237
+ i.begin();
238
+ const te = v(
239
+ () => I.value && (l.inline || f.open.value)
240
+ ), ua = v(
241
+ () => D.value ? {
242
+ getBoundingClientRect: () => D.value.getBoundingClientRect(),
243
+ contains: (e) => D.value.contains(e),
244
+ focus: Oe,
189
245
  get isConnected() {
190
246
  var e;
191
- return !!((e = C.value) != null && e.isConnected);
247
+ return !!((e = D.value) != null && e.isConnected);
192
248
  }
193
249
  } : void 0
194
250
  );
195
- let de = !1, q = 0;
196
- const p = Aa(Ke, U, {
251
+ let Ce = !1, U = 0, le;
252
+ const ra = {
253
+ topLeft: "top-start",
254
+ topRight: "top-end",
255
+ bottomLeft: "bottom-start",
256
+ bottomRight: "bottom-end"
257
+ }, qe = v(
258
+ () => l.getPopupContainer && D.value && te.value ? l.getPopupContainer(D.value) : l.appendTo || "body"
259
+ ), f = nt(ua, X, {
197
260
  get placement() {
198
- return o.placement;
261
+ const e = l.placement ?? "bottom-start";
262
+ return ra[e] ?? e;
263
+ },
264
+ width: () => l.popupWidth,
265
+ get gap() {
266
+ var e;
267
+ return (e = l.popperOptions) == null ? void 0 : e.offset;
268
+ },
269
+ get padding() {
270
+ var e;
271
+ return (e = l.popperOptions) == null ? void 0 : e.padding;
272
+ },
273
+ get strategy() {
274
+ var e;
275
+ return (e = l.popperOptions) == null ? void 0 : e.strategy;
199
276
  },
200
- width: () => o.popupWidth,
201
- requestOpen: (e, t) => (e || (de = !!t), R("update:open", e), o.open === void 0 ? void 0 : !1)
202
- }), ke = y(() => o.inline || p.open.value), ce = y(
203
- () => o.placeholder || (f.value ? `${o.startPlaceholder ?? d.value.start}${o.rangeSeparator}${o.endPlaceholder ?? d.value.end}` : d.value.empty)
204
- ), we = y(() => {
205
- const e = l.describe();
206
- return f.value ? e.some(Boolean) ? [
207
- e[0] || o.startPlaceholder || d.value.start,
208
- e[1] || o.endPlaceholder || d.value.end
209
- ].join(o.rangeSeparator) : "" : e.filter(Boolean).join("、");
210
- }), ge = y(() => l.valid(k.value)), Le = y(
211
- () => W.value && (f.value ? k.value.every(Boolean) : k.value.length) && !ge.value ? d.value.invalid : ""
212
- ), Be = y(() => I.value || Le.value), Ce = y(
213
- () => o.clearable && !b.value && Ie.value.some((e, t) => e && !l.locked(t))
214
- ), G = y(() => String(ie.id ?? w.id.value ?? z)), J = y(
215
- () => o.ariaLabel || o.label || w.label.value || ce.value
216
- ), _ = y(
217
- () => o.status ?? (w.error.value || I.value ? "error" : w.status.value)
218
- ), Ue = y(
219
- () => o.inline ? {
220
- ...o.popupStyle,
277
+ get autoAdjustOverflow() {
278
+ var e;
279
+ return (e = l.popperOptions) == null ? void 0 : e.flip;
280
+ },
281
+ get fallbackPlacements() {
282
+ return l.fallbackPlacements;
283
+ },
284
+ requestOpen: (e, t) => (e || (Ce = !!t), K("update:open", e), l.open === void 0 ? void 0 : !1)
285
+ }), He = v(() => l.inline || f.open.value), Be = v(
286
+ () => {
287
+ var e;
288
+ return l.startPlaceholder ?? (typeof l.placeholder == "string" || (e = l.placeholder) == null ? void 0 : e[0]) ?? c.value.start;
289
+ }
290
+ ), Se = v(
291
+ () => {
292
+ var e;
293
+ return l.endPlaceholder ?? (typeof l.placeholder == "string" || (e = l.placeholder) == null ? void 0 : e[1]) ?? c.value.end;
294
+ }
295
+ ), Pe = v(() => l.separator ?? l.rangeSeparator), Fe = v(
296
+ () => typeof l.placeholder == "string" && l.placeholder ? l.placeholder : y.value ? [Be.value, Se.value].join(Pe.value) : c.value.empty
297
+ ), De = v(() => {
298
+ const [e, t] = i.describe();
299
+ return [e || Be.value, t || Se.value];
300
+ }), $e = v(() => {
301
+ const e = i.describe();
302
+ return y.value ? e.some(Boolean) ? De.value.join(Pe.value) : "" : e.filter(Boolean).join("、");
303
+ }), Ke = v(() => !H.value && i.valid(g.value)), da = v(() => i.valid([i.today.value])), ca = v(
304
+ () => A.value && (y.value ? g.value.every(Boolean) : g.value.length) && !Ke.value ? c.value.invalid : ""
305
+ ), Ie = v(() => H.value || ca.value), Le = v(
306
+ () => (l.allowClear ?? l.clearable) && !b.value && sa.value.some((e, t) => e && !i.locked(t))
307
+ ), oe = v(
308
+ () => {
309
+ var e;
310
+ return (typeof l.id == "string" ? l.id : (e = l.id) == null ? void 0 : e[0]) ?? F.id.value ?? q;
311
+ }
312
+ ), va = v(
313
+ () => {
314
+ var e;
315
+ return (typeof l.id == "string" || (e = l.id) == null ? void 0 : e[1]) ?? oe.value + "-end";
316
+ }
317
+ ), ie = v(
318
+ () => l.ariaLabel || l.label || F.label.value || Fe.value
319
+ ), re = v(
320
+ () => l.status ?? (F.error.value || H.value ? "error" : F.status.value)
321
+ ), pa = v(
322
+ () => l.inline ? {
323
+ ...l.popupStyle,
221
324
  position: "static",
222
325
  width: "100%",
223
326
  maxWidth: "100%",
224
327
  boxShadow: "none"
225
328
  } : {
226
- ...o.popupStyle,
227
- ...p.style.value,
228
- width: o.popupWidth ?? (f.value && !o.singlePanel ? "576px" : "304px"),
229
- maxWidth: "calc(100vw - 20px)",
329
+ ...l.popupStyle,
330
+ ...f.style.value,
331
+ width: f.style.value.width ?? (typeof l.popupWidth == "number" && Number.isFinite(l.popupWidth) ? Math.max(0, l.popupWidth) + "px" : typeof l.popupWidth == "string" ? l.popupWidth : void 0) ?? (y.value && !l.singlePanel ? 576 : 304) + (l.shortcutPlacement === "start" && i.shortcuts.value.length ? 100 : 0) + "px",
332
+ maxWidth: f.style.value.maxWidth ?? "calc(100vw - 20px)",
230
333
  maxHeight: "min(80dvh,calc(100dvh - 20px))"
231
334
  }
232
- ), Se = y(() => f.value && !o.singlePanel ? 2 : 1), ve = /* @__PURE__ */ new Map(), fe = y(
233
- () => k.value.map((e) => e ? qa(e) : null)
234
- ), Xe = y(
235
- () => f.value && l.stage.value === "end" ? l.preview.value : void 0
236
- ), Ge = () => Object.fromEntries(
237
- Object.entries(ie).filter(
335
+ ), Te = v(() => y.value && !l.singlePanel ? 2 : 1), de = /* @__PURE__ */ new Map(), ce = v(
336
+ () => g.value.map((e) => e ? rt(e) : null)
337
+ ), fa = v(
338
+ () => y.value && i.stage.value === "end" ? i.preview.value : void 0
339
+ ), ya = () => Object.fromEntries(
340
+ Object.entries(Ae).filter(
238
341
  ([e]) => e !== "id" && !e.startsWith("aria-")
239
342
  )
240
- ), Pe = () => Object.fromEntries(
241
- Object.entries(ie).filter(([e]) => e.startsWith("aria-"))
343
+ ), Ue = () => Object.fromEntries(
344
+ Object.entries(Ae).filter(([e]) => e.startsWith("aria-"))
242
345
  );
243
- function Je(e, t) {
244
- t instanceof HTMLInputElement ? ne.set(e, t) : ne.delete(e);
346
+ function ma(e, t) {
347
+ t instanceof HTMLInputElement ? ue.set(e, t) : ue.delete(e);
245
348
  }
246
- function g() {
247
- if (H.value = l.describe(), f.value) for (; H.value.length < 2; ) H.value.push("");
349
+ function P() {
350
+ if (ee.clear(), L.value = i.describe(), y.value) for (; L.value.length < 2; ) L.value.push("");
248
351
  }
249
- function pe() {
352
+ function Oe() {
250
353
  var e;
251
- B.disabled.value || (e = !o.inline && o.editable && !l.multiple.value ? ne.get(0) : Z.value ?? C.value) == null || e.focus();
354
+ M.disabled.value || (e = !l.inline && l.editable && !i.multiple.value ? ue.get(0) : se.value ?? D.value) == null || e.focus();
252
355
  }
253
- async function $e() {
254
- var e;
255
- await L(), await ((e = ve.get(0)) == null ? void 0 : e.focus());
356
+ async function Ye() {
357
+ var e, t, n;
358
+ await Z(), E.value === "time" ? (t = (e = X.value) == null ? void 0 : e.querySelector(".hys-ui-date-time-mode")) == null || t.focus() : await ((n = de.get(0)) == null ? void 0 : n.focus());
256
359
  }
257
- async function D(e = !0, t = !1) {
360
+ async function V(e = !0, t = !1) {
258
361
  if (b.value) return !1;
259
- const i = q, c = p.open.value;
260
- return o.inline || await p.show(t), await L(), !ue.value || i !== q ? !1 : (c || (l.begin(), g()), await L(), p.update(), e && await $e(), ue.value);
362
+ const n = U, o = f.open.value;
363
+ return l.inline || await f.show(t), await Z(), !te.value || n !== U ? !1 : (!o && !ee.size && (i.begin(), P()), await Z(), f.update(), e && await Ye(), te.value);
364
+ }
365
+ function W(e = !1) {
366
+ l.inline || f.close(e);
261
367
  }
262
- function E(e = !1) {
263
- o.inline || p.close(e);
368
+ function ha(e) {
369
+ const t = e.detail > 0 ? le ?? f.open.value : f.open.value;
370
+ le = void 0, t ? W() : V();
264
371
  }
265
- function ee() {
266
- l.begin(), g(), E(!0);
372
+ function ve() {
373
+ i.begin(), P(), W(!0);
267
374
  }
268
- async function ae() {
269
- const e = await l.clear();
270
- return e && (g(), E(!0)), e;
375
+ async function pe() {
376
+ const e = await i.clear();
377
+ return e && (P(), W(!0)), e;
271
378
  }
272
- async function te() {
273
- const e = await l.confirm();
274
- return e && (g(), E(!0)), e;
379
+ async function fe() {
380
+ const e = await i.confirm();
381
+ return e && (P(), W(!0)), e;
275
382
  }
276
- async function De(e) {
277
- const t = q, i = await l.choose(e);
278
- !N.value || t !== q || i && !W.value && !l.multiple.value && !o.inline && (g(), E(!0));
383
+ async function Xe(e) {
384
+ const t = U, n = await i.choose(e);
385
+ !I.value || t !== U || n && !A.value && !i.multiple.value && !l.inline && (P(), W(!0));
279
386
  }
280
- async function Qe(e) {
387
+ async function ba(e) {
281
388
  var t;
282
- if (l.pickShortcut(e))
283
- if (!W.value)
284
- await l.request(l.encode(k.value), "shortcut") && (g(), E(!0));
389
+ if (i.pickShortcut(e))
390
+ if (!A.value)
391
+ await i.request(i.encode(g.value), "shortcut") && (P(), W(!0));
285
392
  else {
286
- const i = (t = k.value.find(Boolean)) == null ? void 0 : t.day;
287
- i !== void 0 && l.setPanel(i);
393
+ const n = (t = g.value.find(Boolean)) == null ? void 0 : t.day;
394
+ n !== void 0 && i.setPanel(n);
288
395
  }
289
396
  }
290
- async function Ee(e) {
291
- if (o.inputReadonly || b.value) return !1;
292
- const t = await l.input(H.value[e] ?? "", e);
293
- return t && g(), t;
397
+ async function Ge(e) {
398
+ if (l.inputReadonly || b.value || !ee.delete(e))
399
+ return !1;
400
+ const t = L.value[e] ?? "";
401
+ A.value && !te.value && await V(!1);
402
+ const n = await i.input(t, e);
403
+ return n && (A.value || y.value && !i.valid(g.value)) ? L.value = i.describe(g.value) : n && P(), n;
294
404
  }
295
- function ye(e, t = 0) {
296
- e.isComposing || e.keyCode === 229 || (e.key === "ArrowDown" && !e.altKey ? (e.preventDefault(), D()) : e.key === "Enter" && o.editable ? (e.preventDefault(), Ee(t)) : e.key === "Escape" && ee());
405
+ function ga(e, t) {
406
+ ee.add(e), L.value[e] = t.target.value;
297
407
  }
298
- function Fe(e) {
299
- X.value || (X.value = !0, R("focus", e)), o.showOnFocus && !p.restoringFocus.value && !p.open.value && D(!1);
408
+ function Me(e, t = 0) {
409
+ e.isComposing || e.keyCode === 229 || (e.key === "ArrowDown" && !e.altKey ? (e.preventDefault(), V()) : e.key === "Enter" && l.editable ? (e.preventDefault(), Ge(t)) : e.key === "Escape" && ve());
300
410
  }
301
- async function me(e) {
302
- var t, i;
303
- await L(), !(!N.value || p.open.value || (t = C.value) != null && t.contains(document.activeElement) || (i = U.value) != null && i.contains(document.activeElement)) && X.value && (X.value = !1, R("blur", e), o.validateEvent && w.validate("blur"));
411
+ function Je(e) {
412
+ x.value || (x.value = !0, K("focus", e)), (l.automaticDropdown ?? l.showOnFocus) && !f.restoringFocus.value && !f.open.value && V(!1);
413
+ }
414
+ async function Ee(e) {
415
+ var t, n;
416
+ await Z(), !(!I.value || f.open.value || (t = D.value) != null && t.contains(document.activeElement) || (n = X.value) != null && n.contains(document.activeElement)) && x.value && (x.value = !1, K("blur", e), l.validateEvent && F.validate("blur"));
304
417
  }
305
- function Ye(e, t) {
306
- var c, u;
307
- const i = e.relatedTarget;
308
- !((c = U.value) != null && c.contains(i)) && !((u = C.value) != null && u.contains(i)) && Ee(t), me(e);
418
+ function ka(e, t) {
419
+ var o;
420
+ const n = e.relatedTarget;
421
+ n !== ue.get(t) && !((o = X.value) != null && o.contains(n)) && Ge(t), Ee(e);
309
422
  }
310
- function Ze(e, t) {
311
- b.value || l.setPanel(e, t);
423
+ function wa(e, t) {
424
+ b.value || i.setPanel(e, t);
312
425
  }
313
- async function xe(e) {
314
- const t = l.boundary(e);
315
- if (!t || !await D(!1)) return !1;
316
- const i = l.setPanel(t.day);
317
- return await L(), p.update(), i;
426
+ function Ca(e) {
427
+ var $;
428
+ const t = Re.value, n = ($ = de.get(e)) == null ? void 0 : $.element;
429
+ if (!t || !n) return;
430
+ const o = t.getBoundingClientRect(), s = n.getBoundingClientRect(), h = getComputedStyle(t).direction === "rtl";
431
+ t.scrollLeft += h ? s.right - o.right : s.left - o.left;
318
432
  }
319
- async function _e(e) {
320
- const t = await l.setValue(e);
321
- return t && (l.begin(), g()), t;
433
+ async function Ba(e) {
434
+ const t = i.boundary(e);
435
+ if (!t || !await V(!1)) return !1;
436
+ const n = i.setPanel(t.day);
437
+ return await Z(), f.update(), n;
322
438
  }
323
- function Me(e = !1) {
324
- const t = l.today.value;
325
- if (e && x.value) {
326
- if (k.value = [{ ...t }], f.value) return;
327
- te();
328
- } else De(t.day);
439
+ async function Sa(e) {
440
+ const t = await i.setValue(e);
441
+ return t && (i.begin(), P()), t;
329
442
  }
330
- function ea(e) {
331
- l.locked(e) || (l.stage.value = e ? "end" : "start");
443
+ function Qe(e = !1) {
444
+ const t = ct(/* @__PURE__ */ new Date());
445
+ if (e && ae.value) {
446
+ if (y.value || !i.valid([t])) return;
447
+ g.value = [t], fe();
448
+ } else Xe(t.day);
332
449
  }
333
- function aa(e) {
450
+ function Pa(e) {
451
+ i.locked(e) || (i.stage.value = e ? "end" : "start");
452
+ }
453
+ function Fa(e) {
334
454
  var t;
335
- !((t = o.allowEmpty) != null && t[e]) || l.locked(e) || b.value || (k.value = k.value.map((i, c) => c === e ? null : i), l.error.value = "");
336
- }
337
- function ta(e, t) {
338
- const i = k.value[e];
339
- if (!i) return [];
340
- const c = Math.floor(i.second / 3600), u = Math.floor(i.second / 60) % 60, n = l.timeDisabled(i, e), O = t === "hour" ? o.hourStep : t === "minute" ? o.minuteStep : o.secondStep, Ve = t === "hour" ? 24 : 60, ra = Math.max(
341
- 1,
342
- Math.min(Ve, Number.isFinite(O) ? Math.floor(O) : 1)
343
- ), sa = t === "hour" ? c : t === "minute" ? u : i.second % 60;
344
- return Array.from({ length: Ve }, (F, le) => le).filter((F) => F % ra === 0 || F === sa).map((F) => {
345
- var le, ze, Ae;
346
- return {
347
- label: String(F).padStart(2, "0"),
348
- value: F,
349
- disabled: t === "hour" ? (le = n.hours) == null ? void 0 : le.includes(F) : t === "minute" ? (ze = n.minutes) == null ? void 0 : ze.call(n, c).includes(F) : (Ae = n.seconds) == null ? void 0 : Ae.call(n, c, u).includes(F)
350
- };
351
- });
352
- }
353
- function la(e, t) {
354
- var c;
355
- const i = ((c = k.value[e]) == null ? void 0 : c.second) ?? 0;
356
- return t === 0 ? Math.floor(i / 3600) : t === 1 ? Math.floor(i / 60) % 60 : i % 60;
357
- }
358
- function oa(e, t, i) {
359
- var n;
360
- if (typeof i != "number") return;
361
- const c = ((n = k.value[e]) == null ? void 0 : n.second) ?? 0, u = t === 0 ? i * 3600 + c % 3600 : t === 1 ? Math.floor(c / 3600) * 3600 + i * 60 + c % 60 : Math.floor(c / 60) * 60 + i;
362
- l.setTime(e, u) && !W.value && l.request(l.encode(k.value), "time");
363
- }
364
- function ia(e) {
455
+ !((t = l.allowEmpty) != null && t[e]) || i.locked(e) || b.value || (g.value = g.value.map((n, o) => o === e ? null : n), i.error.value = "", i.emitDraft(e));
456
+ }
457
+ const G = v(
458
+ () => typeof l.showTime == "object" ? l.showTime : void 0
459
+ ), j = v(
460
+ () => {
461
+ var e;
462
+ return l.timeFormat ?? ((e = G.value) == null ? void 0 : e.format);
463
+ }
464
+ ), J = v(
465
+ () => l.dateFormat ?? (E.value === "time" ? "YYYY-MM-DD" : void 0)
466
+ ), Da = v(
467
+ () => {
468
+ var e;
469
+ return l.use12Hours ?? ((e = G.value) == null ? void 0 : e.use12Hours) ?? /(^|[^a-z])h{1,2}/.test(j.value ?? "");
470
+ }
471
+ ), $a = v(
472
+ () => j.value ? /s/.test(j.value.replace(/\[[^\]]*\]/g, "")) : l.showSeconds
473
+ ), Ta = v(
474
+ () => $a.value ? [c.value.hour, c.value.minute, c.value.second] : [c.value.hour, c.value.minute]
475
+ ), Oa = v(
476
+ () => i.unit.value === "week" ? "date" : i.unit.value
477
+ ), Ma = v(
478
+ () => l.locale.startsWith("zh") ? E.value === "time" ? "选择日期" : "选择时间" : E.value === "time" ? "Choose date" : "Choose time"
479
+ ), Ve = v(
480
+ () => g.value.map((e, t) => {
481
+ var h, $, B;
482
+ if (!e) return [];
483
+ const n = i.timeDisabled(e, t), o = ne(t, 0), s = ne(t, 1);
484
+ return [
485
+ ze(
486
+ 24,
487
+ o,
488
+ ((h = G.value) == null ? void 0 : h.hourStep) ?? l.hourStep,
489
+ n.hours,
490
+ Da.value
491
+ ),
492
+ ze(
493
+ 60,
494
+ s,
495
+ (($ = G.value) == null ? void 0 : $.minuteStep) ?? l.minuteStep,
496
+ n.minutes(o)
497
+ ),
498
+ ze(
499
+ 60,
500
+ ne(t, 2),
501
+ ((B = G.value) == null ? void 0 : B.secondStep) ?? l.secondStep,
502
+ n.seconds(o, s)
503
+ )
504
+ ];
505
+ })
506
+ );
507
+ function ze(e, t, n, o, s = !1) {
508
+ var B;
509
+ const h = Number.isFinite(n) ? Math.max(1, Math.min(e, Math.floor(n))) : 1, $ = l.hideDisabledOptions ?? ((B = G.value) == null ? void 0 : B.hideDisabledOptions);
510
+ return Array.from({ length: e }, (w, he) => he).filter(
511
+ (w) => (w % h === 0 || w === t) && (!$ || !o.includes(w))
512
+ ).map((w) => ({
513
+ label: s ? String(w % 12 || 12).padStart(2, "0") + (w < 12 ? " AM" : " PM") : String(w).padStart(2, "0"),
514
+ value: w,
515
+ disabled: o.includes(w)
516
+ }));
517
+ }
518
+ function Ea(e, t, n) {
519
+ var $, B;
520
+ const o = ne(e, t), s = ((B = ($ = Ve.value[e]) == null ? void 0 : $[t]) == null ? void 0 : B.filter((w) => !w.disabled)) ?? [], h = n > 0 ? s.find((w) => w.value > o) ?? s[0] : s.filter((w) => w.value < o).at(-1) ?? s.at(-1);
521
+ h && Ze(e, t, h.value);
522
+ }
523
+ function ye(e, t) {
524
+ const n = g.value[e];
525
+ return n ? vt(
526
+ n,
527
+ t,
528
+ i.first.value,
529
+ i.weekContains.value,
530
+ l.locale
531
+ ) : "";
532
+ }
533
+ function me(e, t, n, o) {
534
+ if (e instanceof KeyboardEvent && (e.isComposing || e.keyCode === 229))
535
+ return;
536
+ const s = e.target;
537
+ if (s.value === ye(t, n)) {
538
+ H.value = "";
539
+ return;
540
+ }
541
+ i.editDraft(t, s.value, n, o) && (s.value = ye(t, n));
542
+ }
543
+ function ne(e, t) {
544
+ var o;
545
+ const n = ((o = g.value[e]) == null ? void 0 : o.second) ?? 0;
546
+ return t === 0 ? Math.floor(n / 3600) : t === 1 ? Math.floor(n / 60) % 60 : n % 60;
547
+ }
548
+ function Ze(e, t, n) {
549
+ var h;
550
+ if (typeof n != "number") return;
551
+ const o = ((h = g.value[e]) == null ? void 0 : h.second) ?? 0, s = t === 0 ? n * 3600 + o % 3600 : t === 1 ? Math.floor(o / 3600) * 3600 + n * 60 + o % 60 : Math.floor(o / 60) * 60 + n;
552
+ i.setTime(e, s) && !A.value && i.request(i.encode(g.value), "time");
553
+ }
554
+ function Va(e) {
365
555
  return e instanceof Date ? e.toISOString() : e == null ? "" : String(e);
366
556
  }
367
- const na = y(() => {
368
- const e = re.value;
369
- return (Array.isArray(e) ? e : [e]).map((t, i) => ({
370
- value: ia(t),
371
- name: Array.isArray(o.name) ? o.name[i] : o.name
557
+ const za = v(() => {
558
+ const e = ke.value;
559
+ return (Array.isArray(e) ? e : [e]).map((t, n) => ({
560
+ value: Va(t),
561
+ name: Array.isArray(l.name) ? l.name[n] : l.name
372
562
  })).filter((t) => !!t.name);
373
563
  });
374
564
  Q(
375
- () => o.open,
565
+ () => l.open,
376
566
  (e) => {
377
- if (!(!N.value || o.inline))
378
- if (e) D(!1, !0);
567
+ if (!(!I.value || l.inline))
568
+ if (e) V(!1, !0);
379
569
  else {
380
- const t = de;
381
- de = !1, p.close(t, !0);
570
+ const t = Ce;
571
+ Ce = !1, f.close(t, !0);
382
572
  }
383
573
  }
384
- ), Q(p.open, (e) => {
385
- R("visible-change", e), e || (q++, l.begin(), g());
574
+ ), Q(f.open, (e) => {
575
+ K("visible-change", e), K("openChange", e), e || (U++, i.begin(), P());
386
576
  }), Q(b, (e) => {
387
- e && (q++, l.model.invalidate(), p.close(!1, !0), o.open && R("update:open", !1));
577
+ e && (U++, i.model.invalidate(), f.close(!1, !0), l.open && K("update:open", !1));
388
578
  }), Q(
389
- re,
579
+ ke,
390
580
  () => {
391
- l.begin(), g();
581
+ i.begin(), P();
392
582
  },
393
583
  { deep: !0 }
394
584
  ), Q(
395
- [be, se, () => o.singlePanel, () => o.popupWidth],
396
- () => void L(() => p.update())
397
- ), Na(
398
- C,
585
+ [
586
+ i.displayPattern,
587
+ () => l.locale,
588
+ () => l.type,
589
+ () => l.picker
590
+ ],
399
591
  () => {
400
- l.model.reset(), l.begin(), g(), E();
592
+ ee.size || P();
593
+ }
594
+ ), Q(
595
+ [
596
+ we,
597
+ E,
598
+ () => l.singlePanel,
599
+ () => l.popupWidth,
600
+ () => l.placement,
601
+ () => l.popperOptions,
602
+ () => l.fallbackPlacements,
603
+ qe
604
+ ],
605
+ () => void Z(() => f.update())
606
+ ), st(
607
+ D,
608
+ () => {
609
+ i.model.reset(), i.begin(), P(), W();
401
610
  },
402
- g,
403
- () => o.form
404
- ), g(), pa(() => {
405
- (o.open ?? o.defaultOpen) && D(!1, !0), o.autofocus && pe();
406
- }), ya(() => {
407
- !o.editable && w.id.value && Z.value && (Z.value.id = G.value);
408
- }), ma(() => {
409
- N.value = !0, o.open && !o.inline && D(!1, !0);
611
+ P,
612
+ () => l.form
613
+ ), P(), qa(() => {
614
+ (l.open ?? l.defaultOpen) && V(!1, !0), l.autofocus && Oe();
615
+ }), Ha(() => {
616
+ !l.editable && F.id.value && se.value && (se.value.id = oe.value);
617
+ }), Ka(() => {
618
+ I.value = !0, l.open && !l.inline && V(!1, !0);
410
619
  });
411
- function Te() {
412
- N.value = !1, q++, X.value = !1, p.close(!1, !0), l.error.value = "";
413
- }
414
- return ha(Te), ba(Te), Oe({
415
- element: C,
416
- open: ue,
417
- value: re,
418
- draft: fe,
419
- focus: pe,
620
+ function _e() {
621
+ I.value = !1, U++, x.value = !1, f.close(!1, !0), i.error.value = "";
622
+ }
623
+ return Ia(_e), La(_e), la({
624
+ element: D,
625
+ open: te,
626
+ value: ke,
627
+ draft: ce,
628
+ focus: Oe,
420
629
  blur: () => {
421
- var e, t, i;
422
- E(), ((e = C.value) != null && e.contains(document.activeElement) || (t = U.value) != null && t.contains(document.activeElement)) && ((i = document.activeElement) == null || i.blur());
630
+ var e, t, n;
631
+ W(), ((e = D.value) != null && e.contains(document.activeElement) || (t = X.value) != null && t.contains(document.activeElement)) && ((n = document.activeElement) == null || n.blur());
423
632
  },
424
- show: () => D(),
425
- hide: E,
426
- handleOpen: () => D(),
427
- handleClose: E,
428
- clear: ae,
429
- setValue: _e,
430
- confirm: te,
431
- cancel: ee,
432
- showMonth: xe,
433
- setMode: (e) => !b.value && l.setMode(e)
434
- }), (e, t) => (s(), v("div", j({
633
+ show: () => V(),
634
+ hide: W,
635
+ handleOpen: () => V(),
636
+ handleClose: W,
637
+ clear: pe,
638
+ setValue: Sa,
639
+ confirm: fe,
640
+ cancel: ve,
641
+ showMonth: Ba,
642
+ setMode: (e) => !b.value && i.setMode(e)
643
+ }), (e, t) => (u(), d("div", R({
435
644
  ref_key: "root",
436
- ref: C
437
- }, { ...a(he), ...Ge() }, {
645
+ ref: D
646
+ }, { ...a(je), ...ya() }, {
438
647
  class: ["hys-ui-pf-date-picker hys-ui-date-picker", [
439
- "hys-ui-date-picker-" + a(B).size.value,
648
+ "hys-ui-date-picker-" + a(M).size.value,
440
649
  {
441
- "hys-ui-date-picker-disabled": a(B).disabled.value,
650
+ "hys-ui-date-picker-disabled": a(M).disabled.value,
442
651
  "hys-ui-date-picker-readonly": r.readonly,
443
652
  "hys-ui-date-picker-borderless": !r.bordered
444
653
  }
445
654
  ]],
446
- "data-status": _.value,
447
- id: r.inline ? G.value : void 0,
655
+ "data-status": re.value,
656
+ id: r.inline ? oe.value : void 0,
448
657
  role: r.inline ? "group" : void 0,
449
658
  "data-hys-ui-field-managed": r.inline ? "" : void 0,
450
- tabindex: r.inline ? a(B).disabled.value ? -1 : 0 : void 0,
451
- "aria-label": r.inline ? J.value : void 0,
452
- "aria-required": r.inline && a(w).required.value || void 0,
453
- "aria-invalid": r.inline && _.value === "error" || void 0,
454
- "aria-disabled": r.inline && a(B).disabled.value || void 0,
455
- "aria-describedby": r.inline ? a(w).describedBy.value : void 0,
456
- onFocus: t[6] || (t[6] = Ne((i) => r.inline && $e(), ["self"])),
457
- onKeydown: t[7] || (t[7] = (i) => r.inline && i.target === C.value && ye(i)),
458
- onFocusin: Fe,
459
- onFocusout: me
659
+ tabindex: r.inline ? a(M).disabled.value ? -1 : 0 : void 0,
660
+ "aria-label": r.inline ? ie.value : void 0,
661
+ "aria-required": r.inline && a(F).required.value || void 0,
662
+ "aria-invalid": r.inline && re.value === "error" || void 0,
663
+ "aria-disabled": r.inline && a(M).disabled.value || void 0,
664
+ "aria-describedby": r.inline ? a(F).describedBy.value : void 0,
665
+ onFocus: t[7] || (t[7] = be((n) => r.inline && Ye(), ["self"])),
666
+ onKeydown: t[8] || (t[8] = (n) => r.inline && n.target === D.value && Me(n)),
667
+ onFocusin: Je,
668
+ onFocusout: Ee
460
669
  }), [
461
- r.inline ? m("", !0) : (s(), v("div", {
670
+ r.inline ? p("", !0) : (u(), d("div", {
462
671
  key: 0,
463
672
  class: We(["hys-ui-date-control", {
464
- "hys-ui-date-control-open": a(p).open.value,
465
- "hys-ui-date-control-editable": r.editable && !a(l).multiple.value
673
+ "hys-ui-date-control-open": a(f).open.value,
674
+ "hys-ui-date-control-editable": r.editable && !a(i).multiple.value
466
675
  }])
467
676
  }, [
468
- r.editable && !a(l).multiple.value ? (s(), v($, { key: 0 }, [
469
- e.$slots.prefix ? (s(), v("span", Ra, [
470
- S(e.$slots, "prefix", {}, void 0, !0)
471
- ])) : m("", !0),
472
- (s(!0), v($, null, M(f.value ? 2 : 1, (i) => (s(), v($, { key: i }, [
473
- i === 2 ? (s(), v("span", Ha, [
474
- S(e.$slots, "range-separator", {}, () => [
475
- T(h(r.rangeSeparator), 1)
677
+ r.editable && !a(i).multiple.value ? (u(), d(S, { key: 0 }, [
678
+ e.$slots.prefix || r.prefixIcon ? (u(), d("span", ft, [
679
+ C(e.$slots, "prefix", {}, () => [
680
+ (u(), O(ge(r.prefixIcon), {
681
+ size: 16,
682
+ "aria-hidden": "true"
683
+ }))
684
+ ], !0)
685
+ ])) : p("", !0),
686
+ (u(!0), d(S, null, z(y.value ? 2 : 1, (n) => (u(), d(S, { key: n }, [
687
+ n === 2 ? (u(), d("span", yt, [
688
+ C(e.$slots, "range-separator", {}, () => [
689
+ T(m(Pe.value), 1)
476
690
  ], !0)
477
- ])) : m("", !0),
478
- P("input", j({
691
+ ])) : p("", !0),
692
+ k("input", R({
479
693
  ref_for: !0,
480
- ref: (c) => Je(i - 1, c)
481
- }, { ref_for: !0 }, Pe(), {
482
- id: i === 1 ? G.value : G.value + "-end",
694
+ ref: (o) => ma(n - 1, o)
695
+ }, { ref_for: !0 }, Ue(), {
696
+ id: n === 1 ? oe.value : va.value,
483
697
  "data-hys-ui-field-managed": "",
484
698
  class: "hys-ui-date-input",
485
699
  type: "text",
486
700
  autocomplete: "off",
487
- value: H.value[i - 1] ?? "",
488
- "aria-label": f.value ? J.value + " " + (i === 1 ? a(d).start : a(d).end) : J.value,
701
+ value: L.value[n - 1] ?? "",
702
+ "aria-label": y.value ? ie.value + " " + (n === 1 ? a(c).start : a(c).end) : ie.value,
489
703
  "aria-haspopup": "dialog",
490
- "aria-expanded": a(p).open.value,
491
- "aria-controls": a(p).open.value ? a(z) + "-panel" : void 0,
492
- "aria-invalid": _.value === "error" || void 0,
493
- "aria-required": a(w).required.value || void 0,
494
- "aria-describedby": [a(w).describedBy.value, a(I) ? a(z) + "-error" : void 0].filter(Boolean).join(" ") || void 0,
495
- disabled: a(B).disabled.value || a(l).locked(i - 1),
704
+ "aria-expanded": a(f).open.value,
705
+ "aria-controls": a(f).open.value ? a(q) + "-panel" : void 0,
706
+ "aria-invalid": re.value === "error" || void 0,
707
+ "aria-required": a(F).required.value || void 0,
708
+ "aria-describedby": [a(F).describedBy.value, a(H) ? a(q) + "-error" : void 0].filter(Boolean).join(" ") || void 0,
709
+ disabled: a(M).disabled.value || a(i).locked(n - 1),
496
710
  readonly: r.readonly || r.inputReadonly,
497
- placeholder: f.value ? i === 1 ? r.startPlaceholder ?? a(d).start : r.endPlaceholder ?? a(d).end : ce.value,
498
- onInput: (c) => H.value[i - 1] = c.target.value,
499
- onClick: t[0] || (t[0] = (c) => D(!1)),
500
- onKeydown: (c) => ye(c, i - 1),
501
- onBlur: (c) => Ye(c, i - 1)
502
- }), null, 16, Ia)
711
+ placeholder: y.value ? n === 1 ? Be.value : Se.value : Fe.value,
712
+ onInput: (o) => ga(n - 1, o),
713
+ onClick: t[0] || (t[0] = (o) => V(!1)),
714
+ onKeydown: (o) => Me(o, n - 1),
715
+ onBlur: (o) => ka(o, n - 1)
716
+ }), null, 16, mt)
503
717
  ], 64))), 128))
504
- ], 64)) : (s(), v("button", j({
718
+ ], 64)) : (u(), d("button", R({
505
719
  key: 1,
506
720
  ref_key: "button",
507
- ref: Z
508
- }, Pe(), {
509
- id: G.value,
721
+ ref: se
722
+ }, Ue(), {
723
+ id: oe.value,
510
724
  type: "button",
511
725
  "data-hys-ui-field-managed": "",
512
726
  role: "combobox",
513
727
  class: "hys-ui-date-trigger",
514
- disabled: a(B).disabled.value,
515
- "aria-label": J.value,
728
+ disabled: a(M).disabled.value,
729
+ "aria-label": ie.value,
516
730
  "aria-haspopup": "dialog",
517
- "aria-expanded": a(p).open.value,
518
- "aria-controls": a(p).open.value ? a(z) + "-panel" : void 0,
519
- "aria-invalid": _.value === "error" || void 0,
520
- "aria-required": a(w).required.value || void 0,
521
- "aria-disabled": a(B).disabled.value || void 0,
522
- "aria-describedby": [a(w).describedBy.value, a(I) ? a(z) + "-error" : void 0].filter(Boolean).join(" ") || void 0,
731
+ "aria-expanded": a(f).open.value,
732
+ "aria-controls": a(f).open.value ? a(q) + "-panel" : void 0,
733
+ "aria-invalid": re.value === "error" || void 0,
734
+ "aria-required": a(F).required.value || void 0,
735
+ "aria-disabled": a(M).disabled.value || void 0,
736
+ "aria-describedby": [a(F).describedBy.value, a(H) ? a(q) + "-error" : void 0].filter(Boolean).join(" ") || void 0,
523
737
  "aria-readonly": r.readonly || void 0,
524
- onClick: t[1] || (t[1] = (i) => a(p).open.value ? E() : D()),
525
- onKeydown: ye
738
+ onPointerdown: t[1] || (t[1] = (n) => Ua(le) ? le.value = a(f).open.value : le = a(f).open.value),
739
+ onClick: ha,
740
+ onKeydown: Me
526
741
  }), [
527
- e.$slots.prefix ? (s(), v("span", La, [
528
- S(e.$slots, "prefix", {}, void 0, !0)
529
- ])) : m("", !0),
530
- P("span", {
531
- class: We(["hys-ui-date-display", { "hys-ui-pf-placeholder": !we.value }])
532
- }, h(we.value || ce.value), 3)
533
- ], 16, Ka)),
534
- P("span", Ua, [
535
- Ce.value ? (s(), v("button", {
742
+ e.$slots.prefix || r.prefixIcon ? (u(), d("span", bt, [
743
+ C(e.$slots, "prefix", {}, () => [
744
+ (u(), O(ge(r.prefixIcon), {
745
+ size: 16,
746
+ "aria-hidden": "true"
747
+ }))
748
+ ], !0)
749
+ ])) : p("", !0),
750
+ k("span", {
751
+ class: We(["hys-ui-date-display", { "hys-ui-pf-placeholder": !$e.value }])
752
+ }, [
753
+ y.value && e.$slots["range-separator"] && ($e.value || typeof l.placeholder != "string") ? (u(), d(S, { key: 0 }, [
754
+ T(m(De.value[0]), 1),
755
+ k("span", gt, [
756
+ C(e.$slots, "range-separator", {}, void 0, !0)
757
+ ]),
758
+ T(m(De.value[1]), 1)
759
+ ], 64)) : (u(), d(S, { key: 1 }, [
760
+ T(m($e.value || Fe.value), 1)
761
+ ], 64))
762
+ ], 2)
763
+ ], 16, ht)),
764
+ k("span", kt, [
765
+ Le.value ? (u(), d("button", {
536
766
  key: 0,
537
767
  type: "button",
538
768
  class: "hys-ui-date-clear",
539
- "aria-label": a(d).clear,
540
- onMousedown: t[2] || (t[2] = Ne(() => {
769
+ "aria-label": a(c).clear,
770
+ onMousedown: t[2] || (t[2] = be(() => {
541
771
  }, ["prevent"])),
542
- onClick: ae
772
+ onClick: pe
543
773
  }, [
544
- S(e.$slots, "clear-icon", {}, () => [
545
- oe(a($a), { size: 14 })
774
+ C(e.$slots, "clear-icon", {}, () => [
775
+ (u(), O(ge(r.clearIcon || a(_a)), {
776
+ size: 14,
777
+ "aria-hidden": "true"
778
+ }))
546
779
  ], !0)
547
- ], 40, Xa)) : m("", !0),
548
- P("span", Ga, [
549
- S(e.$slots, "suffix", {}, () => [
550
- (s(), A(ka(a(x) ? a(qe) : a(Da)), { size: 16 }))
780
+ ], 40, wt)) : p("", !0),
781
+ k("span", Ct, [
782
+ C(e.$slots, "suffix", {}, () => [
783
+ (u(), O(ge(a(ae) ? a(aa) : a(xa)), { size: 16 }))
551
784
  ], !0)
552
785
  ])
553
786
  ])
554
787
  ], 2)),
555
- (s(!0), v($, null, M(na.value, (i, c) => (s(), v("input", {
556
- key: c,
788
+ (u(!0), d(S, null, z(za.value, (n, o) => (u(), d("input", {
789
+ key: o,
557
790
  type: "hidden",
558
- name: i.name,
559
- value: i.value,
791
+ name: n.name,
792
+ value: n.value,
560
793
  form: r.form,
561
- disabled: a(B).disabled.value
562
- }, null, 8, Ja))), 128)),
563
- a(I) && !ke.value ? (s(), v("p", {
794
+ disabled: a(M).disabled.value
795
+ }, null, 8, Bt))), 128)),
796
+ a(H) && !He.value ? (u(), d("p", {
564
797
  key: 1,
565
- id: a(z) + "-error",
798
+ id: a(q) + "-error",
566
799
  class: "hys-ui-date-error",
567
800
  role: "alert"
568
- }, h(a(I)), 9, Qa)) : m("", !0),
569
- (s(), A(wa, {
570
- to: r.appendTo || "body",
571
- disabled: r.inline || r.appendTo === !1
801
+ }, m(a(H)), 9, St)) : p("", !0),
802
+ (u(), O(Ya, {
803
+ to: qe.value,
804
+ disabled: r.inline || r.teleported === !1 || r.appendTo === !1
572
805
  }, [
573
- oe(a(Pa), {
574
- "popup-transition": o.popupTransition,
575
- "popup-transition-duration": o.popupTransitionDuration,
576
- placement: a(p).placement.value,
806
+ Ne(a(Za), {
807
+ "popup-transition": l.popupTransition,
808
+ "popup-transition-duration": l.popupTransitionDuration,
809
+ placement: a(f).placement.value,
577
810
  disabled: r.inline
578
811
  }, {
579
- default: V(() => {
580
- var i, c;
812
+ default: N(() => {
813
+ var n;
581
814
  return [
582
- ke.value ? (s(), v("div", j({
815
+ He.value ? (u(), d("div", R({
583
816
  key: 0,
584
- id: a(z) + "-panel",
817
+ id: a(q) + "-panel",
585
818
  ref_key: "panel",
586
- ref: U
587
- }, a(he), {
819
+ ref: X
820
+ }, a(je), {
588
821
  class: ["hys-ui-date-popup", [
589
822
  r.popupClass,
590
- "hys-ui-date-popup-" + a(B).size.value,
823
+ r.popupClassName,
824
+ r.popperClass,
825
+ "hys-ui-date-popup-" + a(M).size.value,
591
826
  {
592
827
  "hys-ui-date-inline": r.inline,
593
- "hys-ui-date-dual": Se.value === 2
828
+ "hys-ui-date-dual": Te.value === 2
594
829
  }
595
830
  ]],
596
- style: Ue.value,
831
+ style: [r.popperStyle, pa.value],
597
832
  role: r.inline ? "group" : "dialog",
598
- "aria-label": J.value,
599
- onFocusin: Fe,
600
- onFocusout: me
833
+ "aria-label": ie.value,
834
+ onFocusin: Je,
835
+ onFocusout: Ee
601
836
  }), [
602
- e.$slots.header ? (s(), v("header", Za, [
603
- S(e.$slots, "header", {
604
- dates: fe.value,
605
- view: a(se)
837
+ e.$slots.header ? (u(), d("header", Ft, [
838
+ C(e.$slots, "header", {
839
+ dates: ce.value,
840
+ view: a(E)
606
841
  }, void 0, !0)
607
- ])) : m("", !0),
608
- (i = r.shortcuts) != null && i.length ? (s(), v("div", xa, [
609
- (s(!0), v($, null, M(r.shortcuts, (u, n) => (s(), v("button", {
610
- key: n,
611
- type: "button",
612
- disabled: b.value || u.disabled,
613
- onClick: (O) => Qe(n)
614
- }, [
615
- S(e.$slots, "shortcut", {
616
- shortcut: u,
617
- index: n
618
- }, () => [
619
- T(h(u.label), 1)
620
- ], !0)
621
- ], 8, _a))), 128))
622
- ])) : m("", !0),
623
- f.value ? (s(), v("div", et, [
624
- (s(!0), v($, null, M([a(d).start, a(d).end], (u, n) => (s(), v("button", {
625
- key: n,
626
- type: "button",
627
- disabled: b.value || a(l).locked(n),
628
- "aria-pressed": a(l).stage.value === (n ? "end" : "start"),
629
- onClick: (O) => ea(n)
630
- }, [
631
- P("span", null, h(u), 1),
632
- P("strong", null, h(a(l).describe(a(k))[n] || "—"), 1)
633
- ], 8, at))), 128)),
634
- P("span", tt, h(a(l).stage.value === "end" ? a(d).chooseEnd : a(d).chooseStart), 1)
635
- ])) : m("", !0),
636
- P("div", lt, [
637
- (s(!0), v($, null, M(Se.value, (u) => (s(), A(Fa, {
638
- key: u,
639
- ref_for: !0,
640
- ref: (n) => {
641
- n ? a(ve).set(u - 1, n) : a(ve).delete(u - 1);
642
- },
643
- month: a(be)[u - 1],
644
- view: u === 1 ? a(se) : a(l).rightView.value,
645
- unit: a(l).unit.value,
646
- selected: a(k),
647
- range: f.value,
648
- preview: Xe.value,
649
- first: a(l).first.value,
650
- "week-contains": a(l).weekContains.value,
651
- "week-number-formatter": r.weekNumberFormatter,
652
- locale: r.locale,
653
- words: a(d),
654
- "week-numbers": !!r.showWeekNumbers || a(l).unit.value === "week",
655
- adjacent: r.showAdjacentDays,
656
- disabled: b.value,
657
- available: (n) => a(l).available(
658
- n,
659
- f.value && a(l).stage.value === "end" ? 1 : 0
660
- ),
661
- "period-available": a(l).periodAvailable,
662
- "cell-class-name": r.cellClassName,
663
- onBrowse: (n) => Ze(n, u - 1),
664
- onMode: (n) => a(l).setMode(n, u - 1),
665
- onPick: De,
666
- onPreview: t[3] || (t[3] = (n) => a(l).preview.value = n)
667
- }, ga({
668
- cell: V((n) => [
669
- S(e.$slots, "cell", j({ ref_for: !0 }, n), () => [
670
- S(e.$slots, "default", j({ ref_for: !0 }, n), () => [
671
- T(h(n.text), 1)
672
- ], !0)
842
+ ])) : p("", !0),
843
+ k("div", {
844
+ class: We(["hys-ui-date-popup-body", {
845
+ "hys-ui-date-popup-aside": r.shortcutPlacement === "start" && a(i).shortcuts.value.length
846
+ }])
847
+ }, [
848
+ a(i).shortcuts.value.length ? (u(), d("div", Dt, [
849
+ (u(!0), d(S, null, z(a(i).shortcuts.value, (o, s) => (u(), d("button", {
850
+ key: s,
851
+ type: "button",
852
+ disabled: b.value || o.disabled,
853
+ onClick: (h) => ba(s)
854
+ }, [
855
+ C(e.$slots, "shortcut", {
856
+ shortcut: o,
857
+ index: s
858
+ }, () => [
859
+ T(m(o.label), 1)
673
860
  ], !0)
674
- ]),
675
- _: 2
676
- }, [
677
- e.$slots["week-number"] ? {
678
- name: "week-number",
679
- fn: V((n) => [
680
- S(e.$slots, "week-number", j({ ref_for: !0 }, n), void 0, !0)
681
- ]),
682
- key: "0"
683
- } : void 0,
684
- M(He.value, (n) => ({
685
- name: n,
686
- fn: V(() => [
687
- S(e.$slots, n, {}, void 0, !0)
688
- ])
689
- }))
690
- ]), 1032, ["month", "view", "unit", "selected", "range", "preview", "first", "week-contains", "week-number-formatter", "locale", "words", "week-numbers", "adjacent", "disabled", "available", "period-available", "cell-class-name", "onBrowse", "onMode"]))), 128))
691
- ]),
692
- a(x) ? (s(), v("div", ot, [
693
- (s(!0), v($, null, M(f.value ? 2 : 1, (u) => (s(), v("div", {
694
- key: u,
695
- class: "hys-ui-date-time-row"
696
- }, [
697
- P("span", null, [
698
- T(h(f.value ? u === 1 ? a(d).start : a(d).end : ""), 1),
699
- f.value ? m("", !0) : (s(), A(a(qe), {
700
- key: 0,
701
- size: 14
702
- }))
703
- ]),
704
- (s(!0), v($, null, M(r.showSeconds ? 3 : 2, (n) => (s(), v($, { key: n }, [
705
- n > 1 ? (s(), v("span", it, ":")) : m("", !0),
706
- oe(Ea, {
707
- "model-value": la(u - 1, n - 1),
708
- options: ta(
709
- u - 1,
710
- n === 1 ? "hour" : n === 2 ? "minute" : "second"
861
+ ], 8, $t))), 128))
862
+ ])) : p("", !0),
863
+ k("div", Tt, [
864
+ y.value ? (u(), d("div", Ot, [
865
+ (u(!0), d(S, null, z([a(c).start, a(c).end], (o, s) => (u(), d("button", {
866
+ key: s,
867
+ type: "button",
868
+ disabled: b.value || a(i).locked(s),
869
+ "aria-pressed": a(i).stage.value === (s ? "end" : "start"),
870
+ onClick: (h) => Pa(s)
871
+ }, [
872
+ k("span", null, m(o), 1),
873
+ k("strong", null, m(a(i).describe(a(g))[s] || "—"), 1)
874
+ ], 8, Mt))), 128)),
875
+ k("span", Et, m(a(i).stage.value === "end" ? a(c).chooseEnd : a(c).chooseStart), 1)
876
+ ])) : p("", !0),
877
+ a(E) !== "time" && Te.value === 2 ? (u(), d("div", Vt, [
878
+ (u(!0), d(S, null, z(a(we), (o, s) => (u(), d("button", {
879
+ key: s,
880
+ type: "button",
881
+ "aria-label": (s ? a(c).end : a(c).start) + " " + a(ta)(o).slice(0, 7),
882
+ onClick: (h) => Ca(s)
883
+ }, m(a(ta)(o).slice(0, 7)), 9, zt))), 128))
884
+ ])) : p("", !0),
885
+ a(E) !== "time" ? (u(), d("div", {
886
+ key: 2,
887
+ ref_key: "calendarStrip",
888
+ ref: Re,
889
+ class: "hys-ui-date-panels"
890
+ }, [
891
+ (u(!0), d(S, null, z(Te.value, (o) => (u(), O(at, {
892
+ key: o,
893
+ ref_for: !0,
894
+ ref: (s) => {
895
+ s ? a(de).set(o - 1, s) : a(de).delete(o - 1);
896
+ },
897
+ month: a(we)[o - 1],
898
+ view: o === 1 ? a(E) : a(i).rightView.value,
899
+ unit: a(i).unit.value,
900
+ selected: a(g),
901
+ range: y.value,
902
+ stage: a(i).stage.value,
903
+ preview: fa.value,
904
+ first: a(i).first.value,
905
+ "week-contains": a(i).weekContains.value,
906
+ "week-number-formatter": r.weekNumberFormatter,
907
+ locale: r.locale,
908
+ words: a(c),
909
+ "week-numbers": (r.showWeekNumber ?? r.showWeekNumbers) || a(i).unit.value === "week",
910
+ adjacent: r.showAdjacentDays,
911
+ disabled: b.value,
912
+ available: (s) => a(i).available(
913
+ s,
914
+ y.value && a(i).stage.value === "end" ? 1 : 0
711
915
  ),
712
- disabled: b.value || a(l).locked(u - 1) || !a(k)[u - 1],
713
- size: a(B).size.value,
714
- "aria-label": (f.value ? (u === 1 ? a(d).start : a(d).end) + " " : "") + (n === 1 ? a(d).hour : n === 2 ? a(d).minute : a(d).second),
715
- "popup-match-width": !1,
716
- "onUpdate:modelValue": (O) => oa(u - 1, n - 1, O)
717
- }, null, 8, ["model-value", "options", "disabled", "size", "aria-label", "onUpdate:modelValue"])
718
- ], 64))), 128))
719
- ]))), 128))
720
- ])) : m("", !0),
721
- f.value && ((c = r.allowEmpty) != null && c.some(Boolean)) ? (s(), v("div", nt, [
722
- (s(), v($, null, M(2, (u) => {
723
- var n;
724
- return Ba(P("button", {
725
- key: u,
726
- type: "button",
727
- disabled: b.value || a(l).locked(u - 1),
728
- onClick: (O) => aa(u - 1)
729
- }, h(a(d).clear) + " " + h(u === 1 ? a(d).start : a(d).end), 9, rt), [
730
- [Ca, (n = r.allowEmpty) == null ? void 0 : n[u - 1]]
731
- ]);
732
- }), 64))
733
- ])) : m("", !0),
734
- Be.value ? (s(), v("p", {
735
- key: 5,
736
- id: a(z) + "-error",
737
- class: "hys-ui-date-error hys-ui-date-popup-error",
738
- role: "alert"
739
- }, h(Be.value), 9, st)) : m("", !0),
740
- e.$slots.footer || r.showFooter || a(W) ? (s(), v("footer", ut, [
741
- S(e.$slots, "footer", {
742
- dates: fe.value,
743
- confirm: te,
744
- cancel: ee,
745
- clear: ae
916
+ "period-available": a(i).periodAvailable,
917
+ "cell-class-name": r.cellClassName,
918
+ onBrowse: (s) => wa(s, o - 1),
919
+ onMode: (s) => a(i).setMode(s, o - 1),
920
+ onPick: Xe,
921
+ onPreview: t[3] || (t[3] = (s) => a(i).preview.value = s)
922
+ }, Xa({
923
+ cell: N((s) => [
924
+ C(e.$slots, "cell", R({ ref_for: !0 }, s), () => [
925
+ s.type === "date" && e.$slots["date-render"] ? C(e.$slots, "date-render", R({ ref_for: !0 }, s), void 0, !0, 0) : s.type === "month" && e.$slots["month-cell-render"] ? C(e.$slots, "month-cell-render", R({ ref_for: !0 }, s), void 0, !0, 1) : C(e.$slots, "default", R({ ref_for: !0 }, s), () => [
926
+ T(m(s.text), 1)
927
+ ], !0, 2)
928
+ ], !0)
929
+ ]),
930
+ _: 2
931
+ }, [
932
+ e.$slots["week-number"] ? {
933
+ name: "week-number",
934
+ fn: N((s) => [
935
+ C(e.$slots, "week-number", R({ ref_for: !0 }, s), void 0, !0)
936
+ ]),
937
+ key: "0"
938
+ } : void 0,
939
+ z(na.value, (s) => ({
940
+ name: s,
941
+ fn: N(() => [
942
+ C(e.$slots, s, {}, void 0, !0)
943
+ ])
944
+ }))
945
+ ]), 1032, ["month", "view", "unit", "selected", "range", "stage", "preview", "first", "week-contains", "week-number-formatter", "locale", "words", "week-numbers", "adjacent", "disabled", "available", "period-available", "cell-class-name", "onBrowse", "onMode"]))), 128))
946
+ ], 512)) : p("", !0),
947
+ a(ae) ? (u(), d("div", Wt, [
948
+ Ne(_, {
949
+ class: "hys-ui-date-time-mode",
950
+ size: "sm",
951
+ variant: "ghost",
952
+ disabled: b.value,
953
+ onClick: t[4] || (t[4] = (o) => a(i).setMode(a(E) === "time" ? Oa.value : "time"))
954
+ }, {
955
+ default: N(() => [
956
+ T(m(Ma.value), 1)
957
+ ]),
958
+ _: 1
959
+ }, 8, ["disabled"])
960
+ ])) : p("", !0),
961
+ a(ae) ? (u(), d("div", Nt, [
962
+ (u(!0), d(S, null, z(y.value ? 2 : 1, (o) => (u(), d("div", {
963
+ key: o,
964
+ class: "hys-ui-date-time-row"
965
+ }, [
966
+ J.value || j.value ? (u(), d("div", At, [
967
+ J.value ? (u(), d("label", jt, [
968
+ k("span", null, m(y.value ? o === 1 ? a(c).start : a(c).end : a(c).empty), 1),
969
+ k("input", {
970
+ type: "text",
971
+ value: ye(o - 1, J.value),
972
+ placeholder: J.value,
973
+ disabled: b.value || a(i).locked(o - 1),
974
+ readonly: r.inputReadonly,
975
+ onChange: (s) => me(
976
+ s,
977
+ o - 1,
978
+ J.value,
979
+ "date"
980
+ ),
981
+ onKeydown: ea(be((s) => me(
982
+ s,
983
+ o - 1,
984
+ J.value,
985
+ "date"
986
+ ), ["prevent"]), ["enter"])
987
+ }, null, 40, Rt)
988
+ ])) : p("", !0),
989
+ j.value ? (u(), d("label", qt, [
990
+ k("span", null, m(y.value ? (o === 1 ? a(c).start : a(c).end) + " " : "") + m(a(c).hour), 1),
991
+ k("input", {
992
+ type: "text",
993
+ value: ye(o - 1, j.value),
994
+ placeholder: j.value,
995
+ disabled: b.value || a(i).locked(o - 1) || !a(g)[o - 1],
996
+ readonly: r.inputReadonly,
997
+ onChange: (s) => me(
998
+ s,
999
+ o - 1,
1000
+ j.value,
1001
+ "time"
1002
+ ),
1003
+ onKeydown: ea(be((s) => me(
1004
+ s,
1005
+ o - 1,
1006
+ j.value,
1007
+ "time"
1008
+ ), ["prevent"]), ["enter"])
1009
+ }, null, 40, Ht)
1010
+ ])) : p("", !0)
1011
+ ])) : p("", !0),
1012
+ k("div", Kt, [
1013
+ k("span", It, [
1014
+ T(m(y.value ? o === 1 ? a(c).start : a(c).end : ""), 1),
1015
+ y.value ? p("", !0) : (u(), O(a(aa), {
1016
+ key: 0,
1017
+ size: 14
1018
+ }))
1019
+ ]),
1020
+ (u(!0), d(S, null, z(Ta.value, (s, h) => {
1021
+ var $;
1022
+ return u(), d(S, { key: h }, [
1023
+ h ? (u(), d("span", Lt, ":")) : p("", !0),
1024
+ k("div", Ut, [
1025
+ Ne(et, {
1026
+ "model-value": ne(o - 1, h),
1027
+ options: (($ = Ve.value[o - 1]) == null ? void 0 : $[h]) ?? [],
1028
+ disabled: b.value || a(i).locked(o - 1) || !a(g)[o - 1],
1029
+ size: "sm",
1030
+ "aria-label": (y.value ? (o === 1 ? a(c).start : a(c).end) + " " : "") + s,
1031
+ "popup-match-width": !1,
1032
+ "onUpdate:modelValue": (B) => Ze(o - 1, h, B)
1033
+ }, null, 8, ["model-value", "options", "disabled", "aria-label", "onUpdate:modelValue"]),
1034
+ r.arrowControl ? (u(), d("div", Yt, [
1035
+ (u(), d(S, null, z([-1, 1], (B) => {
1036
+ var w, he;
1037
+ return k("button", {
1038
+ key: B,
1039
+ type: "button",
1040
+ "aria-label": s + (B < 0 ? " −" : " +"),
1041
+ disabled: b.value || a(i).locked(o - 1) || !((he = (w = Ve.value[o - 1]) == null ? void 0 : w[h]) != null && he.some(
1042
+ (xe) => !xe.disabled
1043
+ )),
1044
+ onClick: (xe) => Ea(o - 1, h, B)
1045
+ }, m(B < 0 ? "−" : "+"), 9, Xt);
1046
+ }), 64))
1047
+ ])) : p("", !0)
1048
+ ])
1049
+ ], 64);
1050
+ }), 128))
1051
+ ])
1052
+ ]))), 128))
1053
+ ])) : p("", !0),
1054
+ y.value && ((n = r.allowEmpty) != null && n.some(Boolean)) ? (u(), d("div", Gt, [
1055
+ (u(), d(S, null, z(2, (o) => {
1056
+ var s;
1057
+ return Ga(k("button", {
1058
+ key: o,
1059
+ type: "button",
1060
+ disabled: b.value || a(i).locked(o - 1),
1061
+ onClick: (h) => Fa(o - 1)
1062
+ }, m(a(c).clear) + " " + m(o === 1 ? a(c).start : a(c).end), 9, Jt), [
1063
+ [Ja, (s = r.allowEmpty) == null ? void 0 : s[o - 1]]
1064
+ ]);
1065
+ }), 64))
1066
+ ])) : p("", !0),
1067
+ Ie.value ? (u(), d("p", {
1068
+ key: 6,
1069
+ id: a(q) + "-error",
1070
+ class: "hys-ui-date-error hys-ui-date-popup-error",
1071
+ role: "alert"
1072
+ }, m(Ie.value), 9, Qt)) : p("", !0)
1073
+ ])
1074
+ ], 2),
1075
+ e.$slots["extra-footer"] ? (u(), d("div", Zt, [
1076
+ C(e.$slots, "extra-footer", {
1077
+ dates: ce.value,
1078
+ view: a(E)
1079
+ }, void 0, !0)
1080
+ ])) : p("", !0),
1081
+ e.$slots.footer || r.showFooter || a(A) ? (u(), d("footer", _t, [
1082
+ C(e.$slots, "footer", {
1083
+ dates: ce.value,
1084
+ confirm: fe,
1085
+ cancel: ve,
1086
+ clear: pe
746
1087
  }, () => [
747
- P("div", dt, [
748
- r.showToday && !f.value ? (s(), A(Y, {
1088
+ r.showFooter ? (u(), d("div", xt, [
1089
+ r.showToday && !y.value ? (u(), O(_, {
749
1090
  key: 0,
750
1091
  size: "sm",
751
1092
  variant: "ghost",
752
- disabled: b.value || !a(l).available(a(l).today.value.day),
753
- onClick: t[4] || (t[4] = (u) => Me(!1))
1093
+ disabled: b.value || !a(i).available(a(i).today.value.day),
1094
+ onClick: t[5] || (t[5] = (o) => Qe(!1))
754
1095
  }, {
755
- default: V(() => [
756
- T(h(a(d).today), 1)
1096
+ default: N(() => [
1097
+ T(m(a(c).today), 1)
757
1098
  ]),
758
1099
  _: 1
759
- }, 8, ["disabled"])) : m("", !0),
760
- a(x) && r.showNow && !f.value ? (s(), A(Y, {
1100
+ }, 8, ["disabled"])) : p("", !0),
1101
+ a(ae) && r.showNow && !y.value ? (u(), O(_, {
761
1102
  key: 1,
762
1103
  size: "sm",
763
1104
  variant: "ghost",
764
- disabled: b.value,
765
- onClick: t[5] || (t[5] = (u) => Me(!0))
1105
+ disabled: b.value || !da.value,
1106
+ onClick: t[6] || (t[6] = (o) => Qe(!0))
766
1107
  }, {
767
- default: V(() => [
768
- T(h(a(d).now), 1)
1108
+ default: N(() => [
1109
+ T(m(a(c).now), 1)
769
1110
  ]),
770
1111
  _: 1
771
- }, 8, ["disabled"])) : m("", !0),
772
- Ce.value ? (s(), A(Y, {
1112
+ }, 8, ["disabled"])) : p("", !0),
1113
+ Le.value ? (u(), O(_, {
773
1114
  key: 2,
774
1115
  size: "sm",
775
1116
  variant: "ghost",
776
- onClick: ae
1117
+ onClick: pe
777
1118
  }, {
778
- default: V(() => [
779
- T(h(a(d).clear), 1)
1119
+ default: N(() => [
1120
+ T(m(a(c).clear), 1)
780
1121
  ]),
781
1122
  _: 1
782
- })) : m("", !0)
783
- ]),
784
- P("div", ct, [
785
- oe(Y, {
1123
+ })) : p("", !0)
1124
+ ])) : p("", !0),
1125
+ k("div", el, [
1126
+ r.showFooter ? (u(), O(_, {
1127
+ key: 0,
786
1128
  size: "sm",
787
1129
  variant: "ghost",
788
- onClick: ee
1130
+ onClick: ve
789
1131
  }, {
790
- default: V(() => [
791
- T(h(a(W) || f.value ? a(d).cancel : a(d).close), 1)
1132
+ default: N(() => [
1133
+ T(m(a(A) || y.value ? a(c).cancel : a(c).close), 1)
792
1134
  ]),
793
1135
  _: 1
794
- }),
795
- a(W) ? (s(), A(Y, {
796
- key: 0,
1136
+ })) : p("", !0),
1137
+ a(A) ? (u(), O(_, {
1138
+ key: 1,
797
1139
  size: "sm",
798
- disabled: b.value || !ge.value,
799
- onClick: te
1140
+ disabled: b.value || !Ke.value,
1141
+ onClick: fe
800
1142
  }, {
801
- default: V(() => [
802
- T(h(a(d).confirm), 1)
1143
+ default: N(() => [
1144
+ T(m(a(c).confirm), 1)
803
1145
  ]),
804
1146
  _: 1
805
- }, 8, ["disabled"])) : m("", !0)
1147
+ }, 8, ["disabled"])) : p("", !0)
806
1148
  ])
807
1149
  ], !0)
808
- ])) : m("", !0)
809
- ], 16, Ya)) : m("", !0)
1150
+ ])) : p("", !0)
1151
+ ], 16, Pt)) : p("", !0)
810
1152
  ];
811
1153
  }),
812
1154
  _: 3
813
1155
  }, 8, ["popup-transition", "popup-transition-duration", "placement", "disabled"])
814
1156
  ], 8, ["to", "disabled"]))
815
- ], 16, ja));
1157
+ ], 16, pt));
816
1158
  }
817
1159
  });
818
1160
  export {
819
- St as default
1161
+ fl as default
820
1162
  };