hys-ui 0.2.0 → 0.4.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 (261) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/README.md +68 -59
  3. package/dist/components/HysAlert/HysAlert.vue.js +5 -54
  4. package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
  5. package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +5 -41
  6. package/dist/components/HysAnimatedNumber/HysAnimatedNumber2.vue.js +146 -2
  7. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
  8. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
  9. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
  10. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
  11. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
  12. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
  13. package/dist/components/HysButton/HysButton.vue.js +2 -2
  14. package/dist/components/HysButton/HysButton2.vue.js +227 -60
  15. package/dist/components/HysButtonGroup/HysButtonGroup.vue.js +7 -0
  16. package/dist/components/HysButtonGroup/HysButtonGroup2.vue.js +51 -0
  17. package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
  18. package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
  19. package/dist/components/HysCascader/HysCascader.vue.js +2 -2
  20. package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
  21. package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
  22. package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
  23. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  24. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
  25. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
  26. package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
  27. package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
  28. package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
  29. package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
  30. package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
  31. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  32. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
  33. package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
  34. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  35. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
  36. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
  37. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  38. package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
  39. package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
  40. package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
  41. package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
  42. package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
  43. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  44. package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
  45. package/dist/components/HysMention/HysMention.vue.js +1 -1
  46. package/dist/components/HysMention/HysMention2.vue.js +1092 -142
  47. package/dist/components/HysModal/HysModal.vue.js +2 -2
  48. package/dist/components/HysModal/HysModal2.vue.js +491 -85
  49. package/dist/components/HysPagination/HysPagination.vue.js +2 -2
  50. package/dist/components/HysPagination/HysPagination2.vue.js +243 -180
  51. package/dist/components/HysPopover/HysPopover.vue.js +5 -91
  52. package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
  53. package/dist/components/HysProgress/HysProgress.vue.js +2 -2
  54. package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
  55. package/dist/components/HysSearch/HysSearch.vue.js +5 -82
  56. package/dist/components/HysSearch/HysSearch2.vue.js +176 -2
  57. package/dist/components/HysSelect/HysSelect.vue.js +2 -2
  58. package/dist/components/HysSelect/HysSelect2.vue.js +755 -590
  59. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  60. package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
  61. package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
  62. package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
  63. package/dist/components/HysSplitPane/HysSplitPane.vue.js +315 -58
  64. package/dist/components/HysSplitPane/HysSplitPane3.vue.js +5 -0
  65. package/dist/components/HysTable/HysTable.vue.js +2 -2
  66. package/dist/components/HysTable/HysTable2.vue.js +1416 -1127
  67. package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
  68. package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
  69. package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
  70. package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
  71. package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
  72. package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
  73. package/dist/components/HysTour/HysTour.vue.js +291 -63
  74. package/dist/components/HysTour/HysTour3.vue.js +5 -0
  75. package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
  76. package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
  77. package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
  78. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
  79. package/dist/components/HysTree/HysTree.vue.js +2 -2
  80. package/dist/components/HysTree/HysTree2.vue.js +195 -184
  81. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
  82. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
  83. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  84. package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
  85. package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
  86. package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
  87. package/dist/composables/buttonGroup.js +12 -0
  88. package/dist/composables/color.js +97 -0
  89. package/dist/composables/dataGrid.js +68 -0
  90. package/dist/composables/drawer.js +17 -0
  91. package/dist/composables/feedback.js +14 -0
  92. package/dist/composables/floatingPosition.js +18 -0
  93. package/dist/composables/mentionDocument.js +79 -0
  94. package/dist/composables/mentionEditor.js +58 -0
  95. package/dist/composables/menu.js +96 -0
  96. package/dist/composables/modal.js +14 -0
  97. package/dist/composables/overlayManager.js +48 -18
  98. package/dist/composables/progress.js +94 -0
  99. package/dist/composables/selectOptions.js +44 -38
  100. package/dist/composables/splitPaneSizes.js +58 -0
  101. package/dist/composables/table.js +128 -105
  102. package/dist/composables/tagInput.js +16 -0
  103. package/dist/composables/timeline.js +19 -0
  104. package/dist/composables/transfer.js +19 -17
  105. package/dist/composables/upload.js +55 -0
  106. package/dist/composables/uploadRequest.js +58 -0
  107. package/dist/composables/useAlert.js +124 -0
  108. package/dist/composables/useColorPicker.js +402 -0
  109. package/dist/composables/useContextMenu.js +514 -0
  110. package/dist/composables/useDataGridRemote.js +67 -0
  111. package/dist/composables/useDialog.js +86 -43
  112. package/dist/composables/useDrawerPush.js +33 -0
  113. package/dist/composables/useDrawerResize.js +221 -0
  114. package/dist/composables/useFloating.js +118 -80
  115. package/dist/composables/useHysModal.js +185 -0
  116. package/dist/composables/useMentionCaret.js +81 -0
  117. package/dist/composables/useMentionList.js +81 -0
  118. package/dist/composables/useMentionModel.js +90 -0
  119. package/dist/composables/useMentionOptions.js +421 -0
  120. package/dist/composables/useModal.js +295 -0
  121. package/dist/composables/useModalInteraction.js +394 -0
  122. package/dist/composables/usePopupSurface.js +458 -0
  123. package/dist/composables/useSplitPaneDrag.js +52 -0
  124. package/dist/composables/useSplitPaneStorage.js +38 -0
  125. package/dist/composables/useTable.js +344 -312
  126. package/dist/composables/useTableSticky.js +79 -0
  127. package/dist/composables/useTagInput.js +313 -0
  128. package/dist/composables/useTourLayout.js +129 -0
  129. package/dist/composables/useTransferMotion.js +185 -0
  130. package/dist/composables/useUpload.js +472 -0
  131. package/dist/composables/useUploadModel.js +65 -0
  132. package/dist/composables/useUploadRequests.js +266 -0
  133. package/dist/composables/useVirtualTableLayout.js +277 -0
  134. package/dist/composables/virtualTable.js +43 -0
  135. package/dist/config.js +11 -11
  136. package/dist/index.js +175 -153
  137. package/dist/internal/MultiSplitPane.vue.js +305 -0
  138. package/dist/internal/MultiSplitPane2.vue.js +4 -0
  139. package/dist/internal/PopupReference.js +39 -0
  140. package/dist/internal/PopupSurfacePanel.vue.js +7 -0
  141. package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
  142. package/dist/motion/PopupMotion.js +105 -0
  143. package/dist/motion/popup.js +10 -0
  144. package/dist/style.css +1 -1
  145. package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
  146. package/dist/types/components/HysAnimatedNumber/HysAnimatedNumber.vue.d.ts +61 -7
  147. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
  148. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
  149. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
  150. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
  151. package/dist/types/components/HysButton/HysButton.vue.d.ts +82 -22
  152. package/dist/types/components/HysButtonGroup/HysButtonGroup.vue.d.ts +30 -0
  153. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
  154. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
  155. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
  156. package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
  157. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
  158. package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
  159. package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
  160. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
  161. package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
  162. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
  163. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +3 -3
  164. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
  165. package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
  166. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
  167. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
  168. package/dist/types/components/HysMention/HysMention.vue.d.ts +91 -39
  169. package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
  170. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +2 -2
  171. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +55 -4
  172. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
  173. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
  174. package/dist/types/components/HysRating/HysRating.vue.d.ts +1 -1
  175. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
  176. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +45 -7
  177. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +19 -5
  178. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
  179. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
  180. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +125 -14
  181. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +1 -1
  182. package/dist/types/components/HysTable/HysTable.vue.d.ts +1742 -5
  183. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
  184. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
  185. package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
  186. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
  187. package/dist/types/components/HysTour/HysTour.vue.d.ts +46 -8
  188. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
  189. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
  190. package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
  191. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
  192. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
  193. package/dist/types/composables/autocomplete.d.ts +3 -0
  194. package/dist/types/composables/avatar.d.ts +3 -0
  195. package/dist/types/composables/buttonGroup.d.ts +9 -0
  196. package/dist/types/composables/cascader.d.ts +3 -0
  197. package/dist/types/composables/color.d.ts +97 -0
  198. package/dist/types/composables/dataGrid.d.ts +100 -0
  199. package/dist/types/composables/datePicker.d.ts +3 -0
  200. package/dist/types/composables/drawer.d.ts +102 -0
  201. package/dist/types/composables/feedback.d.ts +98 -0
  202. package/dist/types/composables/floatingPosition.d.ts +14 -0
  203. package/dist/types/composables/formContext.d.ts +2 -0
  204. package/dist/types/composables/mention.d.ts +284 -0
  205. package/dist/types/composables/mentionDocument.d.ts +15 -0
  206. package/dist/types/composables/mentionEditor.d.ts +7 -0
  207. package/dist/types/composables/menu.d.ts +183 -0
  208. package/dist/types/composables/modal.d.ts +185 -0
  209. package/dist/types/composables/overlayManager.d.ts +7 -3
  210. package/dist/types/composables/popupSurface.d.ts +83 -0
  211. package/dist/types/composables/progress.d.ts +92 -0
  212. package/dist/types/composables/selectOptions.d.ts +7 -0
  213. package/dist/types/composables/splitPaneSizes.d.ts +11 -0
  214. package/dist/types/composables/table.d.ts +119 -6
  215. package/dist/types/composables/tagInput.d.ts +96 -0
  216. package/dist/types/composables/timeline.d.ts +82 -0
  217. package/dist/types/composables/tour.d.ts +68 -0
  218. package/dist/types/composables/transfer.d.ts +7 -0
  219. package/dist/types/composables/tree.d.ts +3 -0
  220. package/dist/types/composables/treeSelect.d.ts +3 -0
  221. package/dist/types/composables/upload.d.ts +202 -0
  222. package/dist/types/composables/uploadRequest.d.ts +3 -0
  223. package/dist/types/composables/useAlert.d.ts +21 -0
  224. package/dist/types/composables/useCascader.d.ts +1 -1
  225. package/dist/types/composables/useColorPicker.d.ts +101 -0
  226. package/dist/types/composables/useContextMenu.d.ts +81 -0
  227. package/dist/types/composables/useDataGridRemote.d.ts +15 -0
  228. package/dist/types/composables/useDialog.d.ts +16 -3
  229. package/dist/types/composables/useDrawerPush.d.ts +6 -0
  230. package/dist/types/composables/useDrawerResize.d.ts +27 -0
  231. package/dist/types/composables/useFloating.d.ts +22 -3
  232. package/dist/types/composables/useHysModal.d.ts +44 -0
  233. package/dist/types/composables/useMentionCaret.d.ts +6 -0
  234. package/dist/types/composables/useMentionList.d.ts +23 -0
  235. package/dist/types/composables/useMentionModel.d.ts +14 -0
  236. package/dist/types/composables/useMentionOptions.d.ts +26 -0
  237. package/dist/types/composables/useModal.d.ts +62 -0
  238. package/dist/types/composables/useModalInteraction.d.ts +27 -0
  239. package/dist/types/composables/usePopupSurface.d.ts +3341 -0
  240. package/dist/types/composables/useSplitPaneDrag.d.ts +14 -0
  241. package/dist/types/composables/useSplitPaneStorage.d.ts +4 -0
  242. package/dist/types/composables/useTable.d.ts +7 -3
  243. package/dist/types/composables/useTableSticky.d.ts +22 -0
  244. package/dist/types/composables/useTagInput.d.ts +66 -0
  245. package/dist/types/composables/useTourLayout.d.ts +33 -0
  246. package/dist/types/composables/useTransferMotion.d.ts +36 -0
  247. package/dist/types/composables/useUpload.d.ts +94 -0
  248. package/dist/types/composables/useUploadModel.d.ts +14 -0
  249. package/dist/types/composables/useUploadRequests.d.ts +38 -0
  250. package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
  251. package/dist/types/composables/virtualTable.d.ts +126 -0
  252. package/dist/types/config.d.ts +1 -0
  253. package/dist/types/index.d.ts +53 -3
  254. package/dist/types/internal/MultiSplitPane.vue.d.ts +54 -0
  255. package/dist/types/internal/PopupReference.d.ts +18 -0
  256. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
  257. package/dist/types/motion/PopupMotion.d.ts +59 -0
  258. package/dist/types/motion/popup.d.ts +12 -0
  259. package/package.json +3 -2
  260. package/dist/components/HysSplitPane/HysSplitPane2.vue.js +0 -4
  261. package/dist/components/HysTour/HysTour2.vue.js +0 -4
@@ -1,55 +1,58 @@
1
- import { defineComponent as ua, useSlots as da, computed as p, useAttrs as ca, ref as K, useId as va, provide as fa, watch as Q, nextTick as L, onMounted as ya, onUpdated as pa, onActivated as ma, onDeactivated as ha, onBeforeUnmount as ba, openBlock as u, createElementBlock as c, 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 V, toDisplayString as h, createElementVNode as P, createVNode as me, createBlock as z, resolveDynamicComponent as ka, Teleport as wa, createSlots as ga, withCtx as A, withDirectives as Ba, vShow as Ca, mergeDefaults as Sa } from "vue";
2
- import { X as Pa, Clock3 as qe, CalendarDays as $a } from "lucide-vue-next";
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";
3
4
  import Y from "../HysButton/HysButton.vue.js";
4
- import Da from "../HysSelect/HysSelect.vue.js";
5
- import Ea from "./HysDatePickerPanel.vue.js";
6
- import { useHysRootAttrs as Fa } from "../../config.js";
7
- import { useHysFormItemContext as Ma, useHysControlState as Va, fieldKey as Ta } from "../../composables/formContext.js";
8
- import { useFloating as za } from "../../composables/useFloating.js";
9
- import { useChoiceNativeReset as Aa } from "../../composables/choiceModel.js";
10
- import { useDatePicker as Na } from "../../composables/useDatePicker.js";
11
- import { dateNative as Wa, datePickerDefaults as qa } from "../../composables/datePicker.js";
12
- const Oa = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex", "aria-label", "aria-required", "aria-invalid", "aria-disabled", "aria-describedby"], ja = {
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 = {
13
14
  key: 0,
14
15
  class: "hys-ui-date-prefix"
15
- }, Ra = {
16
+ }, Ha = {
16
17
  key: 0,
17
18
  class: "hys-ui-date-separator"
18
- }, Ha = ["id", "value", "aria-label", "aria-expanded", "aria-controls", "aria-invalid", "aria-required", "aria-describedby", "disabled", "readonly", "placeholder", "onInput", "onKeydown", "onBlur"], Ia = ["id", "disabled", "aria-label", "aria-expanded", "aria-controls", "aria-invalid", "aria-required", "aria-disabled", "aria-describedby", "aria-readonly"], Ka = {
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 = {
19
20
  key: 0,
20
21
  class: "hys-ui-date-prefix"
21
- }, La = { class: "hys-ui-date-icons" }, Ua = ["aria-label"], Xa = {
22
+ }, Ua = { class: "hys-ui-date-icons" }, Xa = ["aria-label"], Ga = {
22
23
  class: "hys-ui-date-suffix",
23
24
  "aria-hidden": "true"
24
- }, Ga = ["name", "value", "form", "disabled"], Ja = ["id"], Qa = ["id", "role", "aria-label"], Ya = {
25
+ }, Ja = ["name", "value", "form", "disabled"], Qa = ["id"], Ya = ["id", "role", "aria-label"], Za = {
25
26
  key: 0,
26
27
  class: "hys-ui-date-popup-header"
27
- }, Za = {
28
+ }, xa = {
28
29
  key: 1,
29
30
  class: "hys-ui-date-shortcuts"
30
- }, xa = ["disabled", "onClick"], _a = {
31
+ }, _a = ["disabled", "onClick"], et = {
31
32
  key: 2,
32
33
  class: "hys-ui-date-range-status"
33
- }, et = ["disabled", "aria-pressed", "onClick"], at = {
34
+ }, at = ["disabled", "aria-pressed", "onClick"], tt = {
34
35
  class: "hys-ui-date-range-instruction",
35
36
  role: "status"
36
- }, tt = { class: "hys-ui-date-panels" }, lt = {
37
+ }, lt = { class: "hys-ui-date-panels" }, ot = {
37
38
  key: 3,
38
39
  class: "hys-ui-date-time-area",
39
40
  "data-hys-ui-form-internal": ""
40
- }, ot = {
41
+ }, it = {
41
42
  key: 0,
42
43
  class: "hys-ui-date-time-colon"
43
- }, it = {
44
+ }, nt = {
44
45
  key: 4,
45
46
  class: "hys-ui-date-partial"
46
- }, nt = ["disabled", "onClick"], st = ["id"], rt = {
47
+ }, rt = ["disabled", "onClick"], st = ["id"], ut = {
47
48
  key: 6,
48
49
  class: "hys-ui-date-footer"
49
- }, ut = { class: "hys-ui-date-footer-shortcuts" }, dt = { class: "hys-ui-date-footer-actions" }, Bt = /* @__PURE__ */ ua({
50
+ }, dt = { class: "hys-ui-date-footer-shortcuts" }, ct = { class: "hys-ui-date-footer-actions" }, St = /* @__PURE__ */ ua({
50
51
  inheritAttrs: !1,
51
52
  __name: "HysDatePickerControl",
52
53
  props: /* @__PURE__ */ Sa({
54
+ popupTransition: {},
55
+ popupTransitionDuration: {},
53
56
  modelValue: {},
54
57
  defaultValue: {},
55
58
  clearValue: {},
@@ -122,7 +125,7 @@ const Oa = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
122
125
  validateEvent: { type: Boolean },
123
126
  cellClassName: { type: Function },
124
127
  range: { type: Boolean }
125
- }, qa),
128
+ }, Oa),
126
129
  emits: [
127
130
  "update:modelValue",
128
131
  "change",
@@ -139,284 +142,284 @@ const Oa = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
139
142
  "focus",
140
143
  "blur"
141
144
  ],
142
- setup(s, { expose: Oe, emit: je }) {
143
- const i = s, Re = da(), He = p(
145
+ setup(r, { expose: Oe, emit: je }) {
146
+ const o = r, Re = da(), He = y(
144
147
  () => ["prev-month", "next-month", "prev-year", "next-year"].filter(
145
148
  (e) => !!Re[e]
146
149
  )
147
- ), R = je, oe = ca(), he = Fa(), w = Ma(), B = Va({
150
+ ), R = je, ie = ca(), he = Ma(), w = Ta(), B = Va({
148
151
  get disabled() {
149
152
  var e;
150
- return typeof i.disabled == "boolean" ? i.disabled : !!((e = i.disabled) != null && e.every(Boolean));
153
+ return typeof o.disabled == "boolean" ? o.disabled : !!((e = o.disabled) != null && e.every(Boolean));
151
154
  },
152
155
  get size() {
153
- return i.size;
156
+ return o.size;
154
157
  }
155
- }), C = K(), Z = K(), U = K(), ie = /* @__PURE__ */ new Map(), N = K(!0), v = p(() => !!i.range), b = p(
156
- () => !N.value || B.disabled.value || !!i.readonly
157
- ), T = va(), X = K(!1), H = K([]);
158
- fa(Ta, void 0);
159
- const o = Na(
160
- i,
161
- v,
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,
162
165
  b,
163
166
  (e, ...t) => R(e, ...t),
164
167
  () => {
165
- i.validateEvent && w.validate("change");
168
+ o.validateEvent && w.validate("change");
166
169
  }
167
170
  ), {
168
171
  draft: k,
169
172
  words: d,
170
- current: ne,
173
+ current: re,
171
174
  selected: Ie,
172
175
  view: se,
173
176
  panels: be,
174
177
  error: I,
175
178
  time: x,
176
179
  needsConfirm: W
177
- } = o;
178
- o.begin();
179
- const re = p(
180
- () => N.value && (i.inline || f.open.value)
181
- ), Ke = p(
180
+ } = l;
181
+ l.begin();
182
+ const ue = y(
183
+ () => N.value && (o.inline || p.open.value)
184
+ ), Ke = y(
182
185
  () => C.value ? {
183
186
  getBoundingClientRect: () => C.value.getBoundingClientRect(),
184
187
  contains: (e) => C.value.contains(e),
185
- focus: fe,
188
+ focus: pe,
186
189
  get isConnected() {
187
190
  var e;
188
191
  return !!((e = C.value) != null && e.isConnected);
189
192
  }
190
193
  } : void 0
191
194
  );
192
- let ue = !1, q = 0;
193
- const f = za(Ke, U, {
195
+ let de = !1, q = 0;
196
+ const p = Aa(Ke, U, {
194
197
  get placement() {
195
- return i.placement;
198
+ return o.placement;
196
199
  },
197
- width: () => i.popupWidth,
198
- requestOpen: (e, t) => (e || (ue = !!t), R("update:open", e), i.open === void 0 ? void 0 : !1)
199
- }), ke = p(() => i.inline || f.open.value), de = p(
200
- () => i.placeholder || (v.value ? `${i.startPlaceholder ?? d.value.start}${i.rangeSeparator}${i.endPlaceholder ?? d.value.end}` : d.value.empty)
201
- ), we = p(() => {
202
- const e = o.describe();
203
- return v.value ? e.some(Boolean) ? [
204
- e[0] || i.startPlaceholder || d.value.start,
205
- e[1] || i.endPlaceholder || d.value.end
206
- ].join(i.rangeSeparator) : "" : e.filter(Boolean).join("、");
207
- }), ge = p(() => o.valid(k.value)), Le = p(
208
- () => W.value && (v.value ? k.value.every(Boolean) : k.value.length) && !ge.value ? d.value.invalid : ""
209
- ), Be = p(() => I.value || Le.value), Ce = p(
210
- () => i.clearable && !b.value && Ie.value.some((e, t) => e && !o.locked(t))
211
- ), G = p(() => String(oe.id ?? w.id.value ?? T)), J = p(
212
- () => i.ariaLabel || i.label || w.label.value || de.value
213
- ), _ = p(
214
- () => i.status ?? (w.error.value || I.value ? "error" : w.status.value)
215
- ), Ue = p(
216
- () => i.inline ? {
217
- ...i.popupStyle,
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,
218
221
  position: "static",
219
222
  width: "100%",
220
223
  maxWidth: "100%",
221
224
  boxShadow: "none"
222
225
  } : {
223
- ...i.popupStyle,
224
- ...f.style.value,
225
- width: i.popupWidth ?? (v.value && !i.singlePanel ? "576px" : "304px"),
226
+ ...o.popupStyle,
227
+ ...p.style.value,
228
+ width: o.popupWidth ?? (f.value && !o.singlePanel ? "576px" : "304px"),
226
229
  maxWidth: "calc(100vw - 20px)",
227
230
  maxHeight: "min(80dvh,calc(100dvh - 20px))"
228
231
  }
229
- ), Se = p(() => v.value && !i.singlePanel ? 2 : 1), ce = /* @__PURE__ */ new Map(), ve = p(
230
- () => k.value.map((e) => e ? Wa(e) : null)
231
- ), Xe = p(
232
- () => v.value && o.stage.value === "end" ? o.preview.value : void 0
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
233
236
  ), Ge = () => Object.fromEntries(
234
- Object.entries(oe).filter(
237
+ Object.entries(ie).filter(
235
238
  ([e]) => e !== "id" && !e.startsWith("aria-")
236
239
  )
237
240
  ), Pe = () => Object.fromEntries(
238
- Object.entries(oe).filter(([e]) => e.startsWith("aria-"))
241
+ Object.entries(ie).filter(([e]) => e.startsWith("aria-"))
239
242
  );
240
243
  function Je(e, t) {
241
- t instanceof HTMLInputElement ? ie.set(e, t) : ie.delete(e);
244
+ t instanceof HTMLInputElement ? ne.set(e, t) : ne.delete(e);
242
245
  }
243
246
  function g() {
244
- if (H.value = o.describe(), v.value) for (; H.value.length < 2; ) H.value.push("");
247
+ if (H.value = l.describe(), f.value) for (; H.value.length < 2; ) H.value.push("");
245
248
  }
246
- function fe() {
249
+ function pe() {
247
250
  var e;
248
- B.disabled.value || (e = !i.inline && i.editable && !o.multiple.value ? ie.get(0) : Z.value ?? C.value) == null || e.focus();
251
+ B.disabled.value || (e = !o.inline && o.editable && !l.multiple.value ? ne.get(0) : Z.value ?? C.value) == null || e.focus();
249
252
  }
250
253
  async function $e() {
251
254
  var e;
252
- await L(), await ((e = ce.get(0)) == null ? void 0 : e.focus());
255
+ await L(), await ((e = ve.get(0)) == null ? void 0 : e.focus());
253
256
  }
254
257
  async function D(e = !0, t = !1) {
255
258
  if (b.value) return !1;
256
- const r = q, y = f.open.value;
257
- return i.inline || await f.show(t), await L(), !re.value || r !== q ? !1 : (y || (o.begin(), g()), await L(), f.update(), e && await $e(), re.value);
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);
258
261
  }
259
262
  function E(e = !1) {
260
- i.inline || f.close(e);
263
+ o.inline || p.close(e);
261
264
  }
262
265
  function ee() {
263
- o.begin(), g(), E(!0);
266
+ l.begin(), g(), E(!0);
264
267
  }
265
268
  async function ae() {
266
- const e = await o.clear();
269
+ const e = await l.clear();
267
270
  return e && (g(), E(!0)), e;
268
271
  }
269
272
  async function te() {
270
- const e = await o.confirm();
273
+ const e = await l.confirm();
271
274
  return e && (g(), E(!0)), e;
272
275
  }
273
276
  async function De(e) {
274
- const t = q, r = await o.choose(e);
275
- !N.value || t !== q || r && !W.value && !o.multiple.value && !i.inline && (g(), E(!0));
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));
276
279
  }
277
280
  async function Qe(e) {
278
281
  var t;
279
- if (o.pickShortcut(e))
282
+ if (l.pickShortcut(e))
280
283
  if (!W.value)
281
- await o.request(o.encode(k.value), "shortcut") && (g(), E(!0));
284
+ await l.request(l.encode(k.value), "shortcut") && (g(), E(!0));
282
285
  else {
283
- const r = (t = k.value.find(Boolean)) == null ? void 0 : t.day;
284
- r !== void 0 && o.setPanel(r);
286
+ const i = (t = k.value.find(Boolean)) == null ? void 0 : t.day;
287
+ i !== void 0 && l.setPanel(i);
285
288
  }
286
289
  }
287
290
  async function Ee(e) {
288
- if (i.inputReadonly || b.value) return !1;
289
- const t = await o.input(H.value[e] ?? "", e);
291
+ if (o.inputReadonly || b.value) return !1;
292
+ const t = await l.input(H.value[e] ?? "", e);
290
293
  return t && g(), t;
291
294
  }
292
295
  function ye(e, t = 0) {
293
- e.isComposing || e.keyCode === 229 || (e.key === "ArrowDown" && !e.altKey ? (e.preventDefault(), D()) : e.key === "Enter" && i.editable ? (e.preventDefault(), Ee(t)) : e.key === "Escape" && ee());
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());
294
297
  }
295
298
  function Fe(e) {
296
- X.value || (X.value = !0, R("focus", e)), i.showOnFocus && !f.restoringFocus.value && !f.open.value && D(!1);
299
+ X.value || (X.value = !0, R("focus", e)), o.showOnFocus && !p.restoringFocus.value && !p.open.value && D(!1);
297
300
  }
298
- async function pe(e) {
299
- var t, r;
300
- await L(), !(!N.value || f.open.value || (t = C.value) != null && t.contains(document.activeElement) || (r = U.value) != null && r.contains(document.activeElement)) && X.value && (X.value = !1, R("blur", e), i.validateEvent && w.validate("blur"));
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"));
301
304
  }
302
305
  function Ye(e, t) {
303
- var y, n;
304
- const r = e.relatedTarget;
305
- !((y = U.value) != null && y.contains(r)) && !((n = C.value) != null && n.contains(r)) && Ee(t), pe(e);
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);
306
309
  }
307
310
  function Ze(e, t) {
308
- b.value || o.setPanel(e, t);
311
+ b.value || l.setPanel(e, t);
309
312
  }
310
313
  async function xe(e) {
311
- const t = o.boundary(e);
314
+ const t = l.boundary(e);
312
315
  if (!t || !await D(!1)) return !1;
313
- const r = o.setPanel(t.day);
314
- return await L(), f.update(), r;
316
+ const i = l.setPanel(t.day);
317
+ return await L(), p.update(), i;
315
318
  }
316
319
  async function _e(e) {
317
- const t = await o.setValue(e);
318
- return t && (o.begin(), g()), t;
320
+ const t = await l.setValue(e);
321
+ return t && (l.begin(), g()), t;
319
322
  }
320
323
  function Me(e = !1) {
321
- const t = o.today.value;
324
+ const t = l.today.value;
322
325
  if (e && x.value) {
323
- if (k.value = [{ ...t }], v.value) return;
326
+ if (k.value = [{ ...t }], f.value) return;
324
327
  te();
325
328
  } else De(t.day);
326
329
  }
327
330
  function ea(e) {
328
- o.locked(e) || (o.stage.value = e ? "end" : "start");
331
+ l.locked(e) || (l.stage.value = e ? "end" : "start");
329
332
  }
330
333
  function aa(e) {
331
334
  var t;
332
- !((t = i.allowEmpty) != null && t[e]) || o.locked(e) || b.value || (k.value = k.value.map((r, y) => y === e ? null : r), o.error.value = "");
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 = "");
333
336
  }
334
337
  function ta(e, t) {
335
- const r = k.value[e];
336
- if (!r) return [];
337
- const y = Math.floor(r.second / 3600), n = Math.floor(r.second / 60) % 60, l = o.timeDisabled(r, e), O = t === "hour" ? i.hourStep : t === "minute" ? i.minuteStep : i.secondStep, Te = t === "hour" ? 24 : 60, sa = Math.max(
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(
338
341
  1,
339
- Math.min(Te, Number.isFinite(O) ? Math.floor(O) : 1)
340
- ), ra = t === "hour" ? y : t === "minute" ? n : r.second % 60;
341
- return Array.from({ length: Te }, (F, le) => le).filter((F) => F % sa === 0 || F === ra).map((F) => {
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) => {
342
345
  var le, ze, Ae;
343
346
  return {
344
347
  label: String(F).padStart(2, "0"),
345
348
  value: F,
346
- disabled: t === "hour" ? (le = l.hours) == null ? void 0 : le.includes(F) : t === "minute" ? (ze = l.minutes) == null ? void 0 : ze.call(l, y).includes(F) : (Ae = l.seconds) == null ? void 0 : Ae.call(l, y, n).includes(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)
347
350
  };
348
351
  });
349
352
  }
350
353
  function la(e, t) {
351
- var y;
352
- const r = ((y = k.value[e]) == null ? void 0 : y.second) ?? 0;
353
- return t === 0 ? Math.floor(r / 3600) : t === 1 ? Math.floor(r / 60) % 60 : r % 60;
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;
354
357
  }
355
- function oa(e, t, r) {
356
- var l;
357
- if (typeof r != "number") return;
358
- const y = ((l = k.value[e]) == null ? void 0 : l.second) ?? 0, n = t === 0 ? r * 3600 + y % 3600 : t === 1 ? Math.floor(y / 3600) * 3600 + r * 60 + y % 60 : Math.floor(y / 60) * 60 + r;
359
- o.setTime(e, n) && !W.value && o.request(o.encode(k.value), "time");
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");
360
363
  }
361
364
  function ia(e) {
362
365
  return e instanceof Date ? e.toISOString() : e == null ? "" : String(e);
363
366
  }
364
- const na = p(() => {
365
- const e = ne.value;
366
- return (Array.isArray(e) ? e : [e]).map((t, r) => ({
367
+ const na = y(() => {
368
+ const e = re.value;
369
+ return (Array.isArray(e) ? e : [e]).map((t, i) => ({
367
370
  value: ia(t),
368
- name: Array.isArray(i.name) ? i.name[r] : i.name
371
+ name: Array.isArray(o.name) ? o.name[i] : o.name
369
372
  })).filter((t) => !!t.name);
370
373
  });
371
374
  Q(
372
- () => i.open,
375
+ () => o.open,
373
376
  (e) => {
374
- if (!(!N.value || i.inline))
377
+ if (!(!N.value || o.inline))
375
378
  if (e) D(!1, !0);
376
379
  else {
377
- const t = ue;
378
- ue = !1, f.close(t, !0);
380
+ const t = de;
381
+ de = !1, p.close(t, !0);
379
382
  }
380
383
  }
381
- ), Q(f.open, (e) => {
382
- R("visible-change", e), e || (q++, o.begin(), g());
384
+ ), Q(p.open, (e) => {
385
+ R("visible-change", e), e || (q++, l.begin(), g());
383
386
  }), Q(b, (e) => {
384
- e && (q++, o.model.invalidate(), f.close(!1, !0), i.open && R("update:open", !1));
387
+ e && (q++, l.model.invalidate(), p.close(!1, !0), o.open && R("update:open", !1));
385
388
  }), Q(
386
- ne,
389
+ re,
387
390
  () => {
388
- o.begin(), g();
391
+ l.begin(), g();
389
392
  },
390
393
  { deep: !0 }
391
394
  ), Q(
392
- [be, se, () => i.singlePanel, () => i.popupWidth],
393
- () => void L(() => f.update())
394
- ), Aa(
395
+ [be, se, () => o.singlePanel, () => o.popupWidth],
396
+ () => void L(() => p.update())
397
+ ), Na(
395
398
  C,
396
399
  () => {
397
- o.model.reset(), o.begin(), g(), E();
400
+ l.model.reset(), l.begin(), g(), E();
398
401
  },
399
402
  g,
400
- () => i.form
401
- ), g(), ya(() => {
402
- (i.open ?? i.defaultOpen) && D(!1, !0), i.autofocus && fe();
403
- }), pa(() => {
404
- !i.editable && w.id.value && Z.value && (Z.value.id = G.value);
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);
405
408
  }), ma(() => {
406
- N.value = !0, i.open && !i.inline && D(!1, !0);
409
+ N.value = !0, o.open && !o.inline && D(!1, !0);
407
410
  });
408
- function Ve() {
409
- N.value = !1, q++, X.value = !1, f.close(!1, !0), o.error.value = "";
411
+ function Te() {
412
+ N.value = !1, q++, X.value = !1, p.close(!1, !0), l.error.value = "";
410
413
  }
411
- return ha(Ve), ba(Ve), Oe({
414
+ return ha(Te), ba(Te), Oe({
412
415
  element: C,
413
- open: re,
414
- value: ne,
415
- draft: ve,
416
- focus: fe,
416
+ open: ue,
417
+ value: re,
418
+ draft: fe,
419
+ focus: pe,
417
420
  blur: () => {
418
- var e, t, r;
419
- E(), ((e = C.value) != null && e.contains(document.activeElement) || (t = U.value) != null && t.contains(document.activeElement)) && ((r = document.activeElement) == null || r.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());
420
423
  },
421
424
  show: () => D(),
422
425
  hide: E,
@@ -427,381 +430,391 @@ const Oa = ["data-status", "id", "role", "data-hys-ui-field-managed", "tabindex"
427
430
  confirm: te,
428
431
  cancel: ee,
429
432
  showMonth: xe,
430
- setMode: (e) => !b.value && o.setMode(e)
431
- }), (e, t) => {
432
- var r, y;
433
- return u(), c("div", j({
434
- ref_key: "root",
435
- ref: C
436
- }, { ...a(he), ...Ge() }, {
437
- class: ["hys-ui-pf-date-picker hys-ui-date-picker", [
438
- "hys-ui-date-picker-" + a(B).size.value,
439
- {
440
- "hys-ui-date-picker-disabled": a(B).disabled.value,
441
- "hys-ui-date-picker-readonly": s.readonly,
442
- "hys-ui-date-picker-borderless": !s.bordered
443
- }
444
- ]],
445
- "data-status": _.value,
446
- id: s.inline ? G.value : void 0,
447
- role: s.inline ? "group" : void 0,
448
- "data-hys-ui-field-managed": s.inline ? "" : void 0,
449
- tabindex: s.inline ? a(B).disabled.value ? -1 : 0 : void 0,
450
- "aria-label": s.inline ? J.value : void 0,
451
- "aria-required": s.inline && a(w).required.value || void 0,
452
- "aria-invalid": s.inline && _.value === "error" || void 0,
453
- "aria-disabled": s.inline && a(B).disabled.value || void 0,
454
- "aria-describedby": s.inline ? a(w).describedBy.value : void 0,
455
- onFocus: t[6] || (t[6] = Ne((n) => s.inline && $e(), ["self"])),
456
- onKeydown: t[7] || (t[7] = (n) => s.inline && n.target === C.value && ye(n)),
457
- onFocusin: Fe,
458
- onFocusout: pe
459
- }), [
460
- s.inline ? m("", !0) : (u(), c("div", {
461
- key: 0,
462
- class: We(["hys-ui-date-control", {
463
- "hys-ui-date-control-open": a(f).open.value,
464
- "hys-ui-date-control-editable": s.editable && !a(o).multiple.value
465
- }])
466
- }, [
467
- s.editable && !a(o).multiple.value ? (u(), c($, { key: 0 }, [
468
- e.$slots.prefix ? (u(), c("span", ja, [
469
- S(e.$slots, "prefix", {}, void 0, !0)
470
- ])) : m("", !0),
471
- (u(!0), c($, null, M(v.value ? 2 : 1, (n) => (u(), c($, { key: n }, [
472
- n === 2 ? (u(), c("span", Ra, [
473
- S(e.$slots, "range-separator", {}, () => [
474
- V(h(s.rangeSeparator), 1)
475
- ], !0)
476
- ])) : m("", !0),
477
- P("input", j({
478
- ref_for: !0,
479
- ref: (l) => Je(n - 1, l)
480
- }, { ref_for: !0 }, Pe(), {
481
- id: n === 1 ? G.value : G.value + "-end",
482
- "data-hys-ui-field-managed": "",
483
- class: "hys-ui-date-input",
484
- type: "text",
485
- autocomplete: "off",
486
- value: H.value[n - 1] ?? "",
487
- "aria-label": v.value ? J.value + " " + (n === 1 ? a(d).start : a(d).end) : J.value,
488
- "aria-haspopup": "dialog",
489
- "aria-expanded": a(f).open.value,
490
- "aria-controls": a(f).open.value ? a(T) + "-panel" : void 0,
491
- "aria-invalid": _.value === "error" || void 0,
492
- "aria-required": a(w).required.value || void 0,
493
- "aria-describedby": [a(w).describedBy.value, a(I) ? a(T) + "-error" : void 0].filter(Boolean).join(" ") || void 0,
494
- disabled: a(B).disabled.value || a(o).locked(n - 1),
495
- readonly: s.readonly || s.inputReadonly,
496
- placeholder: v.value ? n === 1 ? s.startPlaceholder ?? a(d).start : s.endPlaceholder ?? a(d).end : de.value,
497
- onInput: (l) => H.value[n - 1] = l.target.value,
498
- onClick: t[0] || (t[0] = (l) => D(!1)),
499
- onKeydown: (l) => ye(l, n - 1),
500
- onBlur: (l) => Ye(l, n - 1)
501
- }), null, 16, Ha)
502
- ], 64))), 128))
503
- ], 64)) : (u(), c("button", j({
504
- key: 1,
505
- ref_key: "button",
506
- ref: Z
507
- }, Pe(), {
508
- id: G.value,
509
- type: "button",
510
- "data-hys-ui-field-managed": "",
511
- role: "combobox",
512
- class: "hys-ui-date-trigger",
513
- disabled: a(B).disabled.value,
514
- "aria-label": J.value,
515
- "aria-haspopup": "dialog",
516
- "aria-expanded": a(f).open.value,
517
- "aria-controls": a(f).open.value ? a(T) + "-panel" : void 0,
518
- "aria-invalid": _.value === "error" || void 0,
519
- "aria-required": a(w).required.value || void 0,
520
- "aria-disabled": a(B).disabled.value || void 0,
521
- "aria-describedby": [a(w).describedBy.value, a(I) ? a(T) + "-error" : void 0].filter(Boolean).join(" ") || void 0,
522
- "aria-readonly": s.readonly || void 0,
523
- onClick: t[1] || (t[1] = (n) => a(f).open.value ? E() : D()),
524
- onKeydown: ye
525
- }), [
526
- e.$slots.prefix ? (u(), c("span", Ka, [
527
- S(e.$slots, "prefix", {}, void 0, !0)
528
- ])) : m("", !0),
529
- P("span", {
530
- class: We(["hys-ui-date-display", { "hys-ui-pf-placeholder": !we.value }])
531
- }, h(we.value || de.value), 3)
532
- ], 16, Ia)),
533
- P("span", La, [
534
- Ce.value ? (u(), c("button", {
535
- key: 0,
536
- type: "button",
537
- class: "hys-ui-date-clear",
538
- "aria-label": a(d).clear,
539
- onMousedown: t[2] || (t[2] = Ne(() => {
540
- }, ["prevent"])),
541
- onClick: ae
542
- }, [
543
- S(e.$slots, "clear-icon", {}, () => [
544
- me(a(Pa), { size: 14 })
545
- ], !0)
546
- ], 40, Ua)) : m("", !0),
547
- P("span", Xa, [
548
- S(e.$slots, "suffix", {}, () => [
549
- (u(), z(ka(a(x) ? a(qe) : a($a)), { size: 16 }))
433
+ setMode: (e) => !b.value && l.setMode(e)
434
+ }), (e, t) => (s(), v("div", j({
435
+ ref_key: "root",
436
+ ref: C
437
+ }, { ...a(he), ...Ge() }, {
438
+ class: ["hys-ui-pf-date-picker hys-ui-date-picker", [
439
+ "hys-ui-date-picker-" + a(B).size.value,
440
+ {
441
+ "hys-ui-date-picker-disabled": a(B).disabled.value,
442
+ "hys-ui-date-picker-readonly": r.readonly,
443
+ "hys-ui-date-picker-borderless": !r.bordered
444
+ }
445
+ ]],
446
+ "data-status": _.value,
447
+ id: r.inline ? G.value : void 0,
448
+ role: r.inline ? "group" : void 0,
449
+ "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
460
+ }), [
461
+ r.inline ? m("", !0) : (s(), v("div", {
462
+ key: 0,
463
+ 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
466
+ }])
467
+ }, [
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)
550
476
  ], !0)
551
- ])
552
- ])
553
- ], 2)),
554
- (u(!0), c($, null, M(na.value, (n, l) => (u(), c("input", {
555
- key: l,
556
- type: "hidden",
557
- name: n.name,
558
- value: n.value,
559
- form: s.form,
560
- disabled: a(B).disabled.value
561
- }, null, 8, Ga))), 128)),
562
- a(I) && !ke.value ? (u(), c("p", {
477
+ ])) : m("", !0),
478
+ P("input", j({
479
+ ref_for: !0,
480
+ ref: (c) => Je(i - 1, c)
481
+ }, { ref_for: !0 }, Pe(), {
482
+ id: i === 1 ? G.value : G.value + "-end",
483
+ "data-hys-ui-field-managed": "",
484
+ class: "hys-ui-date-input",
485
+ type: "text",
486
+ 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,
489
+ "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),
496
+ 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)
503
+ ], 64))), 128))
504
+ ], 64)) : (s(), v("button", j({
563
505
  key: 1,
564
- id: a(T) + "-error",
565
- class: "hys-ui-date-error",
566
- role: "alert"
567
- }, h(a(I)), 9, Ja)) : m("", !0),
568
- (u(), z(wa, {
569
- to: s.appendTo || "body",
570
- disabled: s.inline || s.appendTo === !1
571
- }, [
572
- ke.value ? (u(), c("div", j({
506
+ ref_key: "button",
507
+ ref: Z
508
+ }, Pe(), {
509
+ id: G.value,
510
+ type: "button",
511
+ "data-hys-ui-field-managed": "",
512
+ role: "combobox",
513
+ class: "hys-ui-date-trigger",
514
+ disabled: a(B).disabled.value,
515
+ "aria-label": J.value,
516
+ "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,
523
+ "aria-readonly": r.readonly || void 0,
524
+ onClick: t[1] || (t[1] = (i) => a(p).open.value ? E() : D()),
525
+ onKeydown: ye
526
+ }), [
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", {
573
536
  key: 0,
574
- id: a(T) + "-panel",
575
- ref_key: "panel",
576
- ref: U
577
- }, a(he), {
578
- class: ["hys-ui-date-popup", [
579
- s.popupClass,
580
- "hys-ui-date-popup-" + a(B).size.value,
581
- {
582
- "hys-ui-date-inline": s.inline,
583
- "hys-ui-date-dual": Se.value === 2
584
- }
585
- ]],
586
- style: Ue.value,
587
- role: s.inline ? "group" : "dialog",
588
- "aria-label": J.value,
589
- onFocusin: Fe,
590
- onFocusout: pe
591
- }), [
592
- e.$slots.header ? (u(), c("header", Ya, [
593
- S(e.$slots, "header", {
594
- dates: ve.value,
595
- view: a(se)
596
- }, void 0, !0)
597
- ])) : m("", !0),
598
- (r = s.shortcuts) != null && r.length ? (u(), c("div", Za, [
599
- (u(!0), c($, null, M(s.shortcuts, (n, l) => (u(), c("button", {
600
- key: l,
601
- type: "button",
602
- disabled: b.value || n.disabled,
603
- onClick: (O) => Qe(l)
604
- }, [
605
- S(e.$slots, "shortcut", {
606
- shortcut: n,
607
- index: l
608
- }, () => [
609
- V(h(n.label), 1)
610
- ], !0)
611
- ], 8, xa))), 128))
612
- ])) : m("", !0),
613
- v.value ? (u(), c("div", _a, [
614
- (u(!0), c($, null, M([a(d).start, a(d).end], (n, l) => (u(), c("button", {
615
- key: l,
616
- type: "button",
617
- disabled: b.value || a(o).locked(l),
618
- "aria-pressed": a(o).stage.value === (l ? "end" : "start"),
619
- onClick: (O) => ea(l)
620
- }, [
621
- P("span", null, h(n), 1),
622
- P("strong", null, h(a(o).describe(a(k))[l] || "—"), 1)
623
- ], 8, et))), 128)),
624
- P("span", at, h(a(o).stage.value === "end" ? a(d).chooseEnd : a(d).chooseStart), 1)
625
- ])) : m("", !0),
626
- P("div", tt, [
627
- (u(!0), c($, null, M(Se.value, (n) => (u(), z(Ea, {
628
- key: n,
629
- ref_for: !0,
630
- ref: (l) => {
631
- l ? a(ce).set(n - 1, l) : a(ce).delete(n - 1);
632
- },
633
- month: a(be)[n - 1],
634
- view: n === 1 ? a(se) : a(o).rightView.value,
635
- unit: a(o).unit.value,
636
- selected: a(k),
637
- range: v.value,
638
- preview: Xe.value,
639
- first: a(o).first.value,
640
- "week-contains": a(o).weekContains.value,
641
- "week-number-formatter": s.weekNumberFormatter,
642
- locale: s.locale,
643
- words: a(d),
644
- "week-numbers": !!s.showWeekNumbers || a(o).unit.value === "week",
645
- adjacent: s.showAdjacentDays,
646
- disabled: b.value,
647
- available: (l) => a(o).available(
648
- l,
649
- v.value && a(o).stage.value === "end" ? 1 : 0
650
- ),
651
- "period-available": a(o).periodAvailable,
652
- "cell-class-name": s.cellClassName,
653
- onBrowse: (l) => Ze(l, n - 1),
654
- onMode: (l) => a(o).setMode(l, n - 1),
655
- onPick: De,
656
- onPreview: t[3] || (t[3] = (l) => a(o).preview.value = l)
657
- }, ga({
658
- cell: A((l) => [
659
- S(e.$slots, "cell", j({ ref_for: !0 }, l), () => [
660
- S(e.$slots, "default", j({ ref_for: !0 }, l), () => [
661
- V(h(l.text), 1)
537
+ type: "button",
538
+ class: "hys-ui-date-clear",
539
+ "aria-label": a(d).clear,
540
+ onMousedown: t[2] || (t[2] = Ne(() => {
541
+ }, ["prevent"])),
542
+ onClick: ae
543
+ }, [
544
+ S(e.$slots, "clear-icon", {}, () => [
545
+ oe(a($a), { size: 14 })
546
+ ], !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 }))
551
+ ], !0)
552
+ ])
553
+ ])
554
+ ], 2)),
555
+ (s(!0), v($, null, M(na.value, (i, c) => (s(), v("input", {
556
+ key: c,
557
+ type: "hidden",
558
+ name: i.name,
559
+ value: i.value,
560
+ form: r.form,
561
+ disabled: a(B).disabled.value
562
+ }, null, 8, Ja))), 128)),
563
+ a(I) && !ke.value ? (s(), v("p", {
564
+ key: 1,
565
+ id: a(z) + "-error",
566
+ class: "hys-ui-date-error",
567
+ 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
572
+ }, [
573
+ oe(a(Pa), {
574
+ "popup-transition": o.popupTransition,
575
+ "popup-transition-duration": o.popupTransitionDuration,
576
+ placement: a(p).placement.value,
577
+ disabled: r.inline
578
+ }, {
579
+ default: V(() => {
580
+ var i, c;
581
+ return [
582
+ ke.value ? (s(), v("div", j({
583
+ key: 0,
584
+ id: a(z) + "-panel",
585
+ ref_key: "panel",
586
+ ref: U
587
+ }, a(he), {
588
+ class: ["hys-ui-date-popup", [
589
+ r.popupClass,
590
+ "hys-ui-date-popup-" + a(B).size.value,
591
+ {
592
+ "hys-ui-date-inline": r.inline,
593
+ "hys-ui-date-dual": Se.value === 2
594
+ }
595
+ ]],
596
+ style: Ue.value,
597
+ role: r.inline ? "group" : "dialog",
598
+ "aria-label": J.value,
599
+ onFocusin: Fe,
600
+ onFocusout: me
601
+ }), [
602
+ e.$slots.header ? (s(), v("header", Za, [
603
+ S(e.$slots, "header", {
604
+ dates: fe.value,
605
+ view: a(se)
606
+ }, 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)
662
620
  ], !0)
663
- ], !0)
664
- ]),
665
- _: 2
666
- }, [
667
- e.$slots["week-number"] ? {
668
- name: "week-number",
669
- fn: A((l) => [
670
- S(e.$slots, "week-number", j({ ref_for: !0 }, l), void 0, !0)
671
- ]),
672
- key: "0"
673
- } : void 0,
674
- M(He.value, (l) => ({
675
- name: l,
676
- fn: A(() => [
677
- S(e.$slots, l, {}, void 0, !0)
678
- ])
679
- }))
680
- ]), 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))
681
- ]),
682
- a(x) ? (u(), c("div", lt, [
683
- (u(!0), c($, null, M(v.value ? 2 : 1, (n) => (u(), c("div", {
684
- key: n,
685
- class: "hys-ui-date-time-row"
686
- }, [
687
- P("span", null, [
688
- V(h(v.value ? n === 1 ? a(d).start : a(d).end : ""), 1),
689
- v.value ? m("", !0) : (u(), z(a(qe), {
690
- key: 0,
691
- size: 14
692
- }))
693
- ]),
694
- (u(!0), c($, null, M(s.showSeconds ? 3 : 2, (l) => (u(), c($, { key: l }, [
695
- l > 1 ? (u(), c("span", ot, ":")) : m("", !0),
696
- me(Da, {
697
- "model-value": la(n - 1, l - 1),
698
- options: ta(
699
- n - 1,
700
- l === 1 ? "hour" : l === 2 ? "minute" : "second"
701
- ),
702
- disabled: b.value || a(o).locked(n - 1) || !a(k)[n - 1],
703
- size: a(B).size.value,
704
- "aria-label": (v.value ? (n === 1 ? a(d).start : a(d).end) + " " : "") + (l === 1 ? a(d).hour : l === 2 ? a(d).minute : a(d).second),
705
- "popup-match-width": !1,
706
- "onUpdate:modelValue": (O) => oa(n - 1, l - 1, O)
707
- }, null, 8, ["model-value", "options", "disabled", "size", "aria-label", "onUpdate:modelValue"])
708
- ], 64))), 128))
709
- ]))), 128))
710
- ])) : m("", !0),
711
- v.value && ((y = s.allowEmpty) != null && y.some(Boolean)) ? (u(), c("div", it, [
712
- (u(), c($, null, M(2, (n) => {
713
- var l;
714
- return Ba(P("button", {
715
- key: n,
716
- type: "button",
717
- disabled: b.value || a(o).locked(n - 1),
718
- onClick: (O) => aa(n - 1)
719
- }, h(a(d).clear) + " " + h(n === 1 ? a(d).start : a(d).end), 9, nt), [
720
- [Ca, (l = s.allowEmpty) == null ? void 0 : l[n - 1]]
721
- ]);
722
- }), 64))
723
- ])) : m("", !0),
724
- Be.value ? (u(), c("p", {
725
- key: 5,
726
- id: a(T) + "-error",
727
- class: "hys-ui-date-error hys-ui-date-popup-error",
728
- role: "alert"
729
- }, h(Be.value), 9, st)) : m("", !0),
730
- e.$slots.footer || s.showFooter || a(W) ? (u(), c("footer", rt, [
731
- S(e.$slots, "footer", {
732
- dates: ve.value,
733
- confirm: te,
734
- cancel: ee,
735
- clear: ae
736
- }, () => [
737
- P("div", ut, [
738
- s.showToday && !v.value ? (u(), z(Y, {
739
- key: 0,
740
- size: "sm",
741
- variant: "ghost",
742
- disabled: b.value || !a(o).available(a(o).today.value.day),
743
- onClick: t[4] || (t[4] = (n) => Me(!1))
744
- }, {
745
- default: A(() => [
746
- V(h(a(d).today), 1)
747
- ]),
748
- _: 1
749
- }, 8, ["disabled"])) : m("", !0),
750
- a(x) && s.showNow && !v.value ? (u(), z(Y, {
751
- key: 1,
752
- size: "sm",
753
- variant: "ghost",
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,
754
656
  disabled: b.value,
755
- onClick: t[5] || (t[5] = (n) => Me(!0))
756
- }, {
757
- default: A(() => [
758
- V(h(a(d).now), 1)
759
- ]),
760
- _: 1
761
- }, 8, ["disabled"])) : m("", !0),
762
- Ce.value ? (u(), z(Y, {
763
- key: 2,
764
- size: "sm",
765
- variant: "ghost",
766
- onClick: ae
767
- }, {
768
- default: A(() => [
769
- V(h(a(d).clear), 1)
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)
673
+ ], !0)
770
674
  ]),
771
- _: 1
772
- })) : m("", !0)
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))
773
691
  ]),
774
- P("div", dt, [
775
- me(Y, {
776
- size: "sm",
777
- variant: "ghost",
778
- onClick: ee
779
- }, {
780
- default: A(() => [
781
- V(h(a(W) || v.value ? a(d).cancel : a(d).close), 1)
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
+ }))
782
703
  ]),
783
- _: 1
784
- }),
785
- a(W) ? (u(), z(Y, {
786
- key: 0,
787
- size: "sm",
788
- disabled: b.value || !ge.value,
789
- onClick: te
790
- }, {
791
- default: A(() => [
792
- V(h(a(d).confirm), 1)
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"
711
+ ),
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
746
+ }, () => [
747
+ P("div", dt, [
748
+ r.showToday && !f.value ? (s(), A(Y, {
749
+ key: 0,
750
+ size: "sm",
751
+ variant: "ghost",
752
+ disabled: b.value || !a(l).available(a(l).today.value.day),
753
+ onClick: t[4] || (t[4] = (u) => Me(!1))
754
+ }, {
755
+ default: V(() => [
756
+ T(h(a(d).today), 1)
757
+ ]),
758
+ _: 1
759
+ }, 8, ["disabled"])) : m("", !0),
760
+ a(x) && r.showNow && !f.value ? (s(), A(Y, {
761
+ key: 1,
762
+ size: "sm",
763
+ variant: "ghost",
764
+ disabled: b.value,
765
+ onClick: t[5] || (t[5] = (u) => Me(!0))
766
+ }, {
767
+ default: V(() => [
768
+ T(h(a(d).now), 1)
769
+ ]),
770
+ _: 1
771
+ }, 8, ["disabled"])) : m("", !0),
772
+ Ce.value ? (s(), A(Y, {
773
+ key: 2,
774
+ size: "sm",
775
+ variant: "ghost",
776
+ onClick: ae
777
+ }, {
778
+ default: V(() => [
779
+ T(h(a(d).clear), 1)
780
+ ]),
781
+ _: 1
782
+ })) : m("", !0)
793
783
  ]),
794
- _: 1
795
- }, 8, ["disabled"])) : m("", !0)
796
- ])
797
- ], !0)
798
- ])) : m("", !0)
799
- ], 16, Qa)) : m("", !0)
800
- ], 8, ["to", "disabled"]))
801
- ], 16, Oa);
802
- };
784
+ P("div", ct, [
785
+ oe(Y, {
786
+ size: "sm",
787
+ variant: "ghost",
788
+ onClick: ee
789
+ }, {
790
+ default: V(() => [
791
+ T(h(a(W) || f.value ? a(d).cancel : a(d).close), 1)
792
+ ]),
793
+ _: 1
794
+ }),
795
+ a(W) ? (s(), A(Y, {
796
+ key: 0,
797
+ size: "sm",
798
+ disabled: b.value || !ge.value,
799
+ onClick: te
800
+ }, {
801
+ default: V(() => [
802
+ T(h(a(d).confirm), 1)
803
+ ]),
804
+ _: 1
805
+ }, 8, ["disabled"])) : m("", !0)
806
+ ])
807
+ ], !0)
808
+ ])) : m("", !0)
809
+ ], 16, Ya)) : m("", !0)
810
+ ];
811
+ }),
812
+ _: 3
813
+ }, 8, ["popup-transition", "popup-transition-duration", "placement", "disabled"])
814
+ ], 8, ["to", "disabled"]))
815
+ ], 16, ja));
803
816
  }
804
817
  });
805
818
  export {
806
- Bt as default
819
+ St as default
807
820
  };