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,51 +1,54 @@
1
- import { defineComponent as Ze, useAttrs as _e, ref as I, useId as ea, provide as aa, computed as x, watch as U, nextTick as j, onMounted as la, onUpdated as ta, onActivated as ia, onBeforeUnmount as oa, onDeactivated as na, openBlock as r, createElementBlock as u, mergeProps as ee, unref as a, createElementVNode as O, withModifiers as ae, renderSlot as f, createCommentVNode as m, toDisplayString as w, Fragment as H, renderList as fe, normalizeClass as Ae, createTextVNode as P, createBlock as E, resolveDynamicComponent as De, createVNode as V, withCtx as M, Teleport as sa, createSlots as He, normalizeProps as ra, guardReactiveProps as ua, normalizeStyle as da } from "vue";
2
- import { X as Me, LoaderCircle as ye, ChevronDown as ca, Search as ha } from "lucide-vue-next";
3
- import va from "../HysInput/HysInput.vue.js";
1
+ import { defineComponent as Ze, useAttrs as _e, ref as I, useId as ea, provide as aa, computed as x, watch as U, nextTick as j, onMounted as la, onUpdated as ta, onActivated as ia, onBeforeUnmount as oa, onDeactivated as na, openBlock as r, createElementBlock as u, mergeProps as ee, unref as a, createElementVNode as V, withModifiers as ae, renderSlot as f, createCommentVNode as p, toDisplayString as w, Fragment as M, renderList as fe, normalizeClass as De, createTextVNode as P, createBlock as E, resolveDynamicComponent as He, createVNode as R, withCtx as L, Teleport as sa, createSlots as Ae, normalizeProps as ra, guardReactiveProps as ua, normalizeStyle as da } from "vue";
2
+ import ca from "../../motion/PopupMotion.js";
3
+ import { X as Me, LoaderCircle as ye, ChevronDown as ha, Search as va } from "lucide-vue-next";
4
+ import fa from "../HysInput/HysInput.vue.js";
4
5
  import me from "../HysButton/HysButton.vue.js";
5
- import fa from "../HysTooltip/HysTooltip.vue.js";
6
+ import ya from "../HysTooltip/HysTooltip.vue.js";
6
7
  import Re from "./HysCascaderColumn.vue.js";
7
- import { useHysRootAttrs as ya } from "../../config.js";
8
- import { useFloating as ma } from "../../composables/useFloating.js";
9
- import { useHysControlState as ga, useHysFormItemContext as ba, fieldKey as pa } from "../../composables/formContext.js";
10
- import { useCascader as ka } from "../../composables/useCascader.js";
8
+ import { useHysRootAttrs as ma } from "../../config.js";
9
+ import { useFloating as pa } from "../../composables/useFloating.js";
10
+ import { useHysControlState as ga, useHysFormItemContext as ba, fieldKey as ka } from "../../composables/formContext.js";
11
+ import { useCascader as wa } from "../../composables/useCascader.js";
11
12
  import { cascaderToken as J } from "../../composables/cascader.js";
12
- const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-invalid", "aria-describedby", "aria-disabled", "tabindex"], xa = ["disabled"], Ca = ["id", "aria-controls", "aria-expanded", "aria-label", "aria-disabled", "aria-readonly", "aria-invalid", "aria-describedby", "aria-required", "aria-busy", "tabindex"], Ba = {
13
+ const xa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-invalid", "aria-describedby", "aria-disabled", "tabindex"], Ca = ["disabled"], Ta = ["id", "aria-controls", "aria-expanded", "aria-label", "aria-disabled", "aria-readonly", "aria-invalid", "aria-describedby", "aria-required", "aria-busy", "tabindex"], Ba = {
13
14
  key: 0,
14
15
  class: "hys-ui-cascader-prefix"
15
16
  }, Sa = {
16
17
  key: 1,
17
18
  class: "hys-ui-cascader-placeholder"
18
- }, Ta = {
19
+ }, Pa = {
19
20
  key: 2,
20
21
  class: "hys-ui-cascader-tags"
21
- }, Pa = { class: "hys-ui-cascader-tag-label" }, Ea = ["disabled", "aria-label", "onClick"], za = ["aria-label"], $a = {
22
+ }, Ea = { class: "hys-ui-cascader-tag-label" }, za = ["disabled", "aria-label", "onClick"], $a = ["aria-label"], La = {
22
23
  key: 3,
23
24
  class: "hys-ui-cascader-value"
24
- }, La = { class: "hys-ui-cascader-indicators" }, Aa = ["aria-label"], Da = ["name", "form", "value", "disabled"], Ha = ["id", "role", "aria-label", "aria-busy"], Ma = {
25
+ }, Da = { class: "hys-ui-cascader-indicators" }, Ha = ["aria-label"], Aa = ["name", "form", "value", "disabled"], Ma = ["id", "role", "aria-label", "aria-busy"], Ra = {
25
26
  key: 0,
26
27
  class: "hys-ui-cascader-header"
27
- }, Ra = {
28
+ }, Wa = {
28
29
  key: 2,
29
30
  class: "hys-ui-cascader-status",
30
31
  role: "status"
31
- }, Wa = {
32
+ }, Na = {
32
33
  key: 3,
33
34
  class: "hys-ui-cascader-status hys-ui-cascader-error",
34
35
  role: "alert"
35
- }, Na = {
36
+ }, Oa = {
36
37
  key: 1,
37
38
  class: "hys-ui-cascader-status",
38
39
  role: "status"
39
- }, Oa = {
40
+ }, Va = {
40
41
  class: "hys-ui-cascader-status",
41
42
  role: "status"
42
- }, Va = {
43
+ }, Fa = {
43
44
  key: 6,
44
45
  class: "hys-ui-cascader-footer"
45
- }, Za = /* @__PURE__ */ Ze({
46
+ }, el = /* @__PURE__ */ Ze({
46
47
  inheritAttrs: !1,
47
48
  __name: "HysCascader",
48
49
  props: {
50
+ popupTransition: {},
51
+ popupTransitionDuration: {},
49
52
  options: {},
50
53
  modelValue: {},
51
54
  defaultValue: {},
@@ -122,25 +125,25 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
122
125
  },
123
126
  emits: ["update:modelValue", "change", "value-change", "update:open", "visible-change", "update:searchValue", "search", "search-error", "update:expandedPath", "expandChange", "node-expand", "node-collapse", "load-error", "children-loaded", "load", "root-load", "root-load-error", "select", "remove-tag", "clear", "limit", "focus", "blur", "scroll"],
124
127
  setup(o, { expose: We, emit: Ne }) {
125
- const n = o, L = Ne, Oe = _e(), ge = ya(), d = ga(n), g = ba(), b = I(), le = I(), be = I(), pe = I(), te = ea(), ne = I(""), F = I(!0);
126
- aa(pa, void 0);
128
+ const n = o, D = Ne, Oe = _e(), pe = ma(), d = ga(n), g = ba(), b = I(), le = I(), ge = I(), be = I(), te = ea(), ne = I(""), F = I(!0);
129
+ aa(ka, void 0);
127
130
  let X = !1, se = !1, C = 0, re = !1, ie;
128
- const p = ma(b, le, {
131
+ const m = pa(b, le, {
129
132
  get placement() {
130
133
  return n.placement;
131
134
  },
132
135
  matchWidth: () => n.popupMatchWidth ? !0 : "min",
133
136
  width: () => n.popupWidth,
134
- requestOpen: (e, l) => (e || (re = !!l), L("update:open", e), n.open === void 0 ? void 0 : !1)
135
- }), A = p.open, z = x(() => F.value && (n.inline || A.value)), t = ka(
137
+ requestOpen: (e, l) => (e || (re = !!l), D("update:open", e), n.open === void 0 ? void 0 : !1)
138
+ }), H = m.open, z = x(() => F.value && (n.inline || H.value)), t = wa(
136
139
  n,
137
140
  d.disabled,
138
141
  z,
139
- (e, ...l) => L(e, ...l),
142
+ (e, ...l) => D(e, ...l),
140
143
  () => {
141
144
  g.validate("change");
142
145
  }
143
- ), { items: k, multiple: B, blocked: R, words: c } = t, G = t.engine.query, Ve = x(() => n.inline || A.value), Fe = x(
146
+ ), { items: k, multiple: T, blocked: W, words: c } = t, G = t.engine.query, Ve = x(() => n.inline || H.value), Fe = x(
144
147
  () => n.inline ? {
145
148
  ...n.popupStyle,
146
149
  position: "static",
@@ -149,17 +152,17 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
149
152
  boxShadow: "none"
150
153
  } : {
151
154
  ...n.popupStyle,
152
- ...p.style.value,
155
+ ...m.style.value,
153
156
  maxHeight: "min(65dvh,calc(100dvh - 20px))"
154
157
  }
155
158
  ), Ke = x(() => ({
156
159
  "--hys-ui-cascader-control-height": (d.size.value === "sm" ? 30 : d.size.value === "lg" ? 44 : 38) + "px"
157
- })), S = x(() => !!n.filterable && !!G.value.trim()), D = x(
158
- () => R.value || t.checking.value || t.rootPending.value
160
+ })), B = x(() => !!n.filterable && !!G.value.trim()), A = x(
161
+ () => W.value || t.checking.value || t.rootPending.value
159
162
  ), ke = x(
160
163
  () => Number.isFinite(n.maxTagCount) ? Math.max(0, Math.floor(n.maxTagCount)) : 1 / 0
161
164
  ), qe = x(() => k.value.slice(0, ke.value)), K = x(() => k.value.slice(ke.value)), Ie = x(
162
- () => n.clearable && !R.value && k.value.some((e) => !e.disabled)
165
+ () => n.clearable && !W.value && k.value.some((e) => !e.disabled)
163
166
  ), Q = /* @__PURE__ */ new Map();
164
167
  function we(e, l) {
165
168
  l ? Q.set(e, l) : Q.delete(e);
@@ -178,7 +181,7 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
178
181
  level: e.path.length - 1,
179
182
  leaf: !(l != null && l.hasChildren),
180
183
  expanded: t.engine.tree.expanded.value.has(e.value),
181
- checked: B.value ? t.engine.tree.checked.value.has(e.value) : t.modelKeys.value.includes(e.value),
184
+ checked: T.value ? t.engine.tree.checked.value.has(e.value) : t.modelKeys.value.includes(e.value),
182
185
  indeterminate: t.engine.tree.halfChecked.value.has(e.value),
183
186
  loading: t.engine.tree.loadingKeys.value.has(e.value)
184
187
  };
@@ -189,11 +192,11 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
189
192
  }, xe = x(
190
193
  () => n.itemHeight ?? (d.size.value === "sm" ? 30 : d.size.value === "lg" ? 42 : 36)
191
194
  ), Ce = (e) => t.engine.tree.failures.value.get(e.value), ce = (e, l) => e.replace("{label}", l);
192
- function Be(e) {
195
+ function Te(e) {
193
196
  var l;
194
197
  return ((l = n.displayRender) == null ? void 0 : l.call(n, e)) ?? e.label;
195
198
  }
196
- function Se(e) {
199
+ function Be(e) {
197
200
  return n.maxTagTextLength !== void 0 && n.maxTagTextLength >= 0 ? e.label.slice(0, n.maxTagTextLength) + (e.label.length > n.maxTagTextLength ? "…" : "") : void 0;
198
201
  }
199
202
  function je() {
@@ -201,34 +204,34 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
201
204
  Object.entries(Oe).filter(([e]) => !["class", "style"].includes(e))
202
205
  );
203
206
  }
204
- function Te() {
207
+ function Se() {
205
208
  var i;
206
209
  const e = (i = b.value) == null ? void 0 : i.closest("label");
207
210
  if (!e) return;
208
211
  const l = e.cloneNode(!0);
209
212
  l.querySelectorAll(".hys-ui-cascader-wrap").forEach((s) => s.remove()), ne.value = (l.textContent ?? "").replace(/\s+/g, " ").trim();
210
213
  }
211
- function W() {
214
+ function N() {
212
215
  clearTimeout(ie), ie = void 0;
213
216
  }
214
- async function N(e, l) {
217
+ async function O(e, l) {
215
218
  var h, v;
216
- if (Q.has(e) || await j(), !z.value || D.value) return;
219
+ if (Q.has(e) || await j(), !z.value || A.value) return;
217
220
  await ((h = Q.get(e)) == null ? void 0 : h.focus(l));
218
- const i = (v = Q.get(e)) == null ? void 0 : v.element, s = pe.value;
221
+ const i = (v = Q.get(e)) == null ? void 0 : v.element, s = be.value;
219
222
  if (i && s) {
220
223
  const y = i.getBoundingClientRect().left - s.getBoundingClientRect().left + s.scrollLeft;
221
224
  y < s.scrollLeft ? s.scrollLeft = y : y + i.offsetWidth > s.scrollLeft + s.clientWidth && (s.scrollLeft = y + i.offsetWidth - s.clientWidth);
222
225
  }
223
226
  }
224
227
  async function Y(e, l = !1) {
225
- if (D.value || e.disabled) return !1;
226
- W();
228
+ if (A.value || e.disabled) return !1;
229
+ N();
227
230
  const i = C, s = await t.expandPath(e.path);
228
- return await j(), !z.value || i !== C ? !1 : (p.update(), l && s && await N(e.path.length), s);
231
+ return await j(), !z.value || i !== C ? !1 : (m.update(), l && s && await O(e.path.length), s);
229
232
  }
230
233
  function Je(e) {
231
- W(), !(n.expandTrigger !== "hover" || !e || !$(e) || D.value || e.disabled) && (ie = setTimeout(
234
+ N(), !(n.expandTrigger !== "hover" || !e || !$(e) || A.value || e.disabled) && (ie = setTimeout(
232
235
  () => {
233
236
  ie = void 0, Y(e);
234
237
  },
@@ -236,59 +239,59 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
236
239
  ));
237
240
  }
238
241
  async function oe(e, l, i) {
239
- if (D.value || e.disabled) return;
240
- W();
242
+ if (A.value || e.disabled) return;
243
+ N();
241
244
  const s = C;
242
- if ($(e) && i === void 0 && !S.value && !await Y(e) || !z.value || s !== C || !(i !== void 0 || S.value || n.changeOnSelect && !B.value || n.checkOnClickNode || !n.showPrefix || !$(e) && n.checkOnClickLeaf) || !B.value && !t.anyLevel.value && $(e))
245
+ if ($(e) && i === void 0 && !B.value && !await Y(e) || !z.value || s !== C || !(i !== void 0 || B.value || n.changeOnSelect && !T.value || n.checkOnClickNode || !n.showPrefix || !$(e) && n.checkOnClickLeaf) || !T.value && !t.anyLevel.value && $(e))
243
246
  return;
244
247
  const y = await t.pick(e.value, l, i);
245
- !z.value || s !== C || (!B.value && (y || t.modelKeys.value.includes(e.value)) && !$(e) && !n.inline || !B.value && n.checkStrictly && i !== void 0 && y && !n.inline) && p.close(!0);
248
+ !z.value || s !== C || (!T.value && (y || t.modelKeys.value.includes(e.value)) && !$(e) && !n.inline || !T.value && n.checkStrictly && i !== void 0 && y && !n.inline) && m.close(!0);
246
249
  }
247
250
  async function Pe(e) {
248
- await t.reloadNode(e.path) && await N(e.path.length);
251
+ await t.reloadNode(e.path) && await O(e.path.length);
249
252
  }
250
253
  function Ee(e, l, i) {
251
254
  var Le;
252
- if (e.isComposing || e.keyCode === 229 || D.value) return;
255
+ if (e.isComposing || e.keyCode === 229 || A.value) return;
253
256
  const s = e.target;
254
257
  if (s.closest("button") || s.matches("input") && ["Enter", " "].includes(e.key))
255
258
  return;
256
- const h = S.value ? t.searchResults.value : t.columns.value[i] ?? [], v = h.filter((_) => !_.disabled), y = v.findIndex((_) => _.value === l.value);
259
+ const h = B.value ? t.searchResults.value : t.columns.value[i] ?? [], v = h.filter((_) => !_.disabled), y = v.findIndex((_) => _.value === l.value);
257
260
  if (["ArrowDown", "ArrowUp", "Home", "End"].includes(e.key)) {
258
261
  e.preventDefault();
259
262
  const _ = e.key === "Home" ? 0 : e.key === "End" ? v.length - 1 : (y + (e.key === "ArrowDown" ? 1 : -1) + v.length) % v.length;
260
- N(i, (Le = v[_]) == null ? void 0 : Le.value);
261
- } else e.key === "ArrowRight" && !S.value ? (e.preventDefault(), $(l) && Y(l, !0)) : e.key === "ArrowLeft" && !S.value && i > 0 ? (e.preventDefault(), N(i - 1, J(l.path.slice(0, i)))) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), B.value || n.checkStrictly ? oe(l, e, !de(l).checked) : $(l) ? Y(l, !0) : oe(l, e));
263
+ O(i, (Le = v[_]) == null ? void 0 : Le.value);
264
+ } else e.key === "ArrowRight" && !B.value ? (e.preventDefault(), $(l) && Y(l, !0)) : e.key === "ArrowLeft" && !B.value && i > 0 ? (e.preventDefault(), O(i - 1, J(l.path.slice(0, i)))) : (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T.value || n.checkStrictly ? oe(l, e, !de(l).checked) : $(l) ? Y(l, !0) : oe(l, e));
262
265
  }
263
266
  function Xe(e) {
264
267
  var l, i;
265
- if (!(e.isComposing || e.keyCode === 229 || D.value) && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
268
+ if (!(e.isComposing || e.keyCode === 229 || A.value) && (e.key === "ArrowDown" || e.key === "ArrowUp")) {
266
269
  e.preventDefault();
267
- const s = S.value ? -1 : 0, h = S.value ? t.searchResults.value : t.columns.value[0] ?? [], v = h.filter((y) => !y.disabled);
268
- N(
270
+ const s = B.value ? -1 : 0, h = B.value ? t.searchResults.value : t.columns.value[0] ?? [], v = h.filter((y) => !y.disabled);
271
+ O(
269
272
  s,
270
273
  e.key === "ArrowUp" ? (l = v.at(-1)) == null ? void 0 : l.value : (i = v[0]) == null ? void 0 : i.value
271
274
  );
272
275
  }
273
276
  }
274
- async function T(e = !0, l = !1) {
277
+ async function S(e = !0, l = !1) {
275
278
  var v, y;
276
279
  if (!F.value || d.disabled.value || n.readonly) return !1;
277
- const i = C, s = A.value, h = !se;
278
- return n.inline || await p.show(l), await j(), !z.value || i !== C || (!n.inline && !s && se && !n.retainSearch && t.filter(""), se = !0, !h && !s && !n.inline && n.expandedPath === void 0 && await t.engine.tree.setExpandedKeys([]), !t.browsing.value.length && ((v = t.selectedPaths.value[0]) != null && v.length) && t.expandPath(t.selectedPaths.value[0]), await j(), !z.value || i !== C) ? !1 : (e && (n.filterable ? (y = be.value) == null || y.focus() : await N(0)), !0);
280
+ const i = C, s = H.value, h = !se;
281
+ return n.inline || await m.show(l), await j(), !z.value || i !== C || (!n.inline && !s && se && !n.retainSearch && t.filter(""), se = !0, !h && !s && !n.inline && n.expandedPath === void 0 && await t.engine.tree.setExpandedKeys([]), !t.browsing.value.length && ((v = t.selectedPaths.value[0]) != null && v.length) && t.expandPath(t.selectedPaths.value[0]), await j(), !z.value || i !== C) ? !1 : (e && (n.filterable ? (y = ge.value) == null || y.focus() : await O(0)), !0);
279
282
  }
280
283
  function q(e = !1) {
281
- n.inline || p.close(e);
284
+ n.inline || m.close(e);
282
285
  }
283
286
  function Ge(e) {
284
287
  var l;
285
- (l = e.target) != null && l.closest("button") || (A.value ? q() : T());
288
+ (l = e.target) != null && l.closest("button") || (H.value ? q() : S());
286
289
  }
287
290
  function ze(e) {
288
291
  if (!(e.isComposing || e.keyCode === 229 || e.target !== b.value)) {
289
292
  if (["ArrowDown", "ArrowUp", "Enter", " "].includes(e.key))
290
- e.preventDefault(), T();
291
- else if (e.key === "Backspace" && B.value && !R.value) {
293
+ e.preventDefault(), S();
294
+ else if (e.key === "Backspace" && T.value && !W.value) {
292
295
  const l = [...k.value].reverse().find((i) => !i.disabled);
293
296
  l && (e.preventDefault(), t.removeTag(l.path));
294
297
  }
@@ -299,36 +302,36 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
299
302
  return e && !n.inline && q(!0), e;
300
303
  }
301
304
  function he(e) {
302
- X || (X = !0, L("focus", e)), e.target === b.value && n.showOnFocus && !p.restoringFocus.value && !n.inline && T(!1);
305
+ X || (X = !0, D("focus", e)), e.target === b.value && n.showOnFocus && !m.restoringFocus.value && !n.inline && S(!1);
303
306
  }
304
307
  async function ve(e) {
305
308
  var i, s;
306
309
  if (await j(), !F.value) return;
307
310
  const l = document.activeElement;
308
- (i = b.value) != null && i.contains(l) || (s = le.value) != null && s.contains(l) || X && (X = !1, L("blur", e), n.validateEvent && g.validate("blur"));
311
+ (i = b.value) != null && i.contains(l) || (s = le.value) != null && s.contains(l) || X && (X = !1, D("blur", e), n.validateEvent && g.validate("blur"));
309
312
  }
310
313
  async function Qe(e) {
311
- await T(!1) && await t.expandPath(e) && await N(e.length - 1, J(e));
314
+ await S(!1) && await t.expandPath(e) && await O(e.length - 1, J(e));
312
315
  }
313
316
  async function Ye(e) {
314
- return await T(!1) ? t.expandPath(e) : !1;
317
+ return await S(!1) ? t.expandPath(e) : !1;
315
318
  }
316
319
  U(
317
320
  () => n.open,
318
321
  (e) => {
319
322
  if (!(!F.value || n.inline))
320
- if (e) T(!1, !0);
323
+ if (e) S(!1, !0);
321
324
  else {
322
325
  const l = re;
323
- re = !1, p.close(l, !0);
326
+ re = !1, m.close(l, !0);
324
327
  }
325
328
  }
326
- ), U(A, (e) => {
327
- L("visible-change", e), e || (C++, W(), n.retainSearch || t.filter(""));
329
+ ), U(H, (e) => {
330
+ D("visible-change", e), e || (C++, N(), n.retainSearch || t.filter(""));
328
331
  }), U(
329
332
  [d.disabled, () => n.readonly],
330
333
  ([e, l]) => {
331
- (e || l) && (W(), p.close(!1, !0), n.open && L("update:open", !1));
334
+ (e || l) && (N(), m.close(!1, !0), n.open && D("update:open", !1));
332
335
  },
333
336
  { flush: "sync" }
334
337
  ), U(
@@ -341,19 +344,19 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
341
344
  () => n.popupMatchWidth
342
345
  ],
343
346
  () => {
344
- j().then(() => p.update());
347
+ j().then(() => m.update());
345
348
  }
346
- ), U(t.browsing, W), U(t.rootPending, (e) => {
349
+ ), U(t.browsing, N), U(t.rootPending, (e) => {
347
350
  var l;
348
- !e && z.value && !R.value && !t.rootError.value && !t.browsing.value.length && ((l = t.selectedPaths.value[0]) != null && l.length) && t.expandPath(t.selectedPaths.value[0]);
351
+ !e && z.value && !W.value && !t.rootError.value && !t.browsing.value.length && ((l = t.selectedPaths.value[0]) != null && l.length) && t.expandPath(t.selectedPaths.value[0]);
349
352
  }), la(() => {
350
353
  var e, l;
351
- Te(), n.inline && ((e = t.selectedPaths.value[0]) != null && e.length) ? t.expandPath(t.selectedPaths.value[0]) : (n.open ?? n.defaultOpen) && T(!1, !0), n.autofocus && !d.disabled.value && ((l = b.value) == null || l.focus());
352
- }), ta(Te), ia(() => {
353
- F.value = !0, n.open && !n.inline && T(!1, !0);
354
+ Se(), n.inline && ((e = t.selectedPaths.value[0]) != null && e.length) ? t.expandPath(t.selectedPaths.value[0]) : (n.open ?? n.defaultOpen) && S(!1, !0), n.autofocus && !d.disabled.value && ((l = b.value) == null || l.focus());
355
+ }), ta(Se), ia(() => {
356
+ F.value = !0, n.open && !n.inline && S(!1, !0);
354
357
  });
355
358
  function $e() {
356
- F.value = !1, C++, X = !1, W(), p.close(!1, !0);
359
+ F.value = !1, C++, X = !1, N(), m.close(!1, !0);
357
360
  }
358
361
  return oa($e), na($e), We({
359
362
  element: b,
@@ -366,7 +369,7 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
366
369
  var e, l, i;
367
370
  q(), ((e = b.value) != null && e.contains(document.activeElement) || (l = le.value) != null && l.contains(document.activeElement)) && ((i = document.activeElement) == null || i.blur());
368
371
  },
369
- show: () => T(),
372
+ show: () => S(),
370
373
  hide: q,
371
374
  clear: Z,
372
375
  clearCheckedNodes: Z,
@@ -380,7 +383,7 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
380
383
  reloadNode: t.reloadNode,
381
384
  reloadRoot: t.reloadRoot,
382
385
  scrollTo: Qe
383
- }), (e, l) => (r(), u("div", ee({ ref: Ue }, a(ge), {
386
+ }), (e, l) => (r(), u("div", ee({ ref: Ue }, a(pe), {
384
387
  class: ["hys-ui-cascader-wrap", [
385
388
  e.$attrs.class,
386
389
  "hys-ui-cascader-" + a(d).size.value,
@@ -399,7 +402,7 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
399
402
  onFocusin: l[7] || (l[7] = (i) => o.inline && he(i)),
400
403
  onFocusout: l[8] || (l[8] = (i) => o.inline && ve(i))
401
404
  }), [
402
- O("button", {
405
+ V("button", {
403
406
  hidden: "",
404
407
  type: "button",
405
408
  tabindex: "-1",
@@ -407,10 +410,10 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
407
410
  disabled: a(d).disabled.value,
408
411
  onClick: l[0] || (l[0] = ae((i) => {
409
412
  var s;
410
- (s = b.value) == null || s.focus(), T();
413
+ (s = b.value) == null || s.focus(), S();
411
414
  }, ["prevent"]))
412
- }, null, 8, xa),
413
- o.inline ? m("", !0) : (r(), u("div", ee({
415
+ }, null, 8, Ca),
416
+ o.inline ? p("", !0) : (r(), u("div", ee({
414
417
  key: 0,
415
418
  ref_key: "trigger",
416
419
  ref: b
@@ -419,8 +422,8 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
419
422
  "data-hys-ui-field-managed": "",
420
423
  role: "combobox",
421
424
  "aria-haspopup": "dialog",
422
- "aria-controls": a(A) ? a(te) + "-panel" : void 0,
423
- "aria-expanded": a(A),
425
+ "aria-controls": a(H) ? a(te) + "-panel" : void 0,
426
+ "aria-expanded": a(H),
424
427
  "aria-label": o.ariaLabel || a(g).label.value || ne.value || o.placeholder || a(c).panel,
425
428
  "aria-disabled": a(d).disabled.value || void 0,
426
429
  "aria-readonly": o.readonly || void 0,
@@ -442,42 +445,42 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
442
445
  }), [
443
446
  e.$slots.prefix ? (r(), u("span", Ba, [
444
447
  f(e.$slots, "prefix", {}, void 0, !0)
445
- ])) : m("", !0),
446
- a(k).length ? a(B) ? (r(), u("div", Ta, [
447
- (r(!0), u(H, null, fe(qe.value, (i) => f(e.$slots, "tag", {
448
+ ])) : p("", !0),
449
+ a(k).length ? a(T) ? (r(), u("div", Pa, [
450
+ (r(!0), u(M, null, fe(qe.value, (i) => f(e.$slots, "tag", {
448
451
  item: i,
449
452
  remove: () => a(t).removeTag(i.path)
450
453
  }, () => [
451
- O("span", {
452
- class: Ae(["hys-ui-cascader-tag", { "hys-ui-cascader-tag-disabled": i.disabled }])
454
+ V("span", {
455
+ class: De(["hys-ui-cascader-tag", { "hys-ui-cascader-tag-disabled": i.disabled }])
453
456
  }, [
454
- O("span", Pa, [
455
- Se(i) !== void 0 ? (r(), u(H, { key: 0 }, [
456
- P(w(Se(i)), 1)
457
- ], 64)) : (r(), E(De(() => Be(i)), { key: 1 }))
457
+ V("span", Ea, [
458
+ Be(i) !== void 0 ? (r(), u(M, { key: 0 }, [
459
+ P(w(Be(i)), 1)
460
+ ], 64)) : (r(), E(He(() => Te(i)), { key: 1 }))
458
461
  ]),
459
462
  o.removable ? (r(), u("button", {
460
463
  key: 0,
461
464
  type: "button",
462
465
  class: "hys-ui-cascader-tag-remove",
463
- disabled: a(R) || i.disabled,
466
+ disabled: a(W) || i.disabled,
464
467
  "aria-label": ce(a(c).remove, i.label),
465
468
  onMousedown: l[1] || (l[1] = ae(() => {
466
469
  }, ["prevent"])),
467
470
  onClick: ae((s) => a(t).removeTag(i.path), ["stop"])
468
471
  }, [
469
472
  f(e.$slots, "remove-icon", {}, () => [
470
- V(a(Me), { size: 12 })
473
+ R(a(Me), { size: 12 })
471
474
  ], !0)
472
- ], 40, Ea)) : m("", !0)
475
+ ], 40, za)) : p("", !0)
473
476
  ], 2)
474
477
  ], !0, a(J)(i.path))), 128)),
475
- K.value.length ? (r(), E(fa, {
478
+ K.value.length ? (r(), E(ya, {
476
479
  key: 0,
477
480
  text: K.value.slice(0, 20).map((i) => i.label).join("、")
478
481
  }, {
479
- default: M(() => [
480
- O("span", {
482
+ default: L(() => [
483
+ V("span", {
481
484
  class: "hys-ui-cascader-tag hys-ui-cascader-more",
482
485
  "aria-label": a(c).more.replace("{count}", String(K.value.length))
483
486
  }, [
@@ -487,23 +490,23 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
487
490
  }, () => [
488
491
  P("+" + w(K.value.length), 1)
489
492
  ], !0)
490
- ], 8, za)
493
+ ], 8, $a)
491
494
  ]),
492
495
  _: 3
493
- }, 8, ["text"])) : m("", !0)
494
- ])) : (r(), u("span", $a, [
496
+ }, 8, ["text"])) : p("", !0)
497
+ ])) : (r(), u("span", La, [
495
498
  f(e.$slots, "display", {
496
499
  item: a(k)[0]
497
500
  }, () => [
498
- (r(), E(De(() => Be(a(k)[0]))))
501
+ (r(), E(He(() => Te(a(k)[0]))))
499
502
  ], !0)
500
503
  ])) : (r(), u("span", Sa, w(o.placeholder), 1)),
501
- O("span", La, [
504
+ V("span", Da, [
502
505
  o.loading || a(t).checking.value ? (r(), E(a(ye), {
503
506
  key: 0,
504
507
  size: 15,
505
508
  class: "hys-ui-icon-spin"
506
- })) : m("", !0),
509
+ })) : p("", !0),
507
510
  Ie.value ? (r(), u("button", {
508
511
  key: 1,
509
512
  type: "button",
@@ -514,249 +517,259 @@ const wa = ["id", "role", "data-hys-ui-field-managed", "aria-label", "aria-inval
514
517
  onClick: ae(Z, ["stop"])
515
518
  }, [
516
519
  f(e.$slots, "clear-icon", {}, () => [
517
- V(a(Me), { size: 14 })
520
+ R(a(Me), { size: 14 })
518
521
  ], !0)
519
- ], 40, Aa)) : m("", !0),
522
+ ], 40, Ha)) : p("", !0),
520
523
  f(e.$slots, "suffix", {}, () => [
521
- V(a(ca), {
524
+ R(a(ha), {
522
525
  size: 16,
523
- class: Ae(["hys-ui-cascader-chevron", { "hys-ui-cascader-chevron-open": a(A) }])
526
+ class: De(["hys-ui-cascader-chevron", { "hys-ui-cascader-chevron-open": a(H) }])
524
527
  }, null, 8, ["class"])
525
528
  ], !0)
526
529
  ])
527
- ], 16, Ca)),
528
- o.name ? (r(!0), u(H, { key: 1 }, fe(a(k), (i) => (r(), u("input", {
530
+ ], 16, Ta)),
531
+ o.name ? (r(!0), u(M, { key: 1 }, fe(a(k), (i) => (r(), u("input", {
529
532
  key: a(J)(i.path),
530
533
  type: "hidden",
531
534
  name: o.name,
532
535
  form: o.form,
533
536
  value: o.emitPath ? JSON.stringify(i.path) : i.value,
534
537
  disabled: a(d).disabled.value
535
- }, null, 8, Da))), 128)) : m("", !0),
538
+ }, null, 8, Aa))), 128)) : p("", !0),
536
539
  (r(), E(sa, {
537
540
  to: o.appendTo === !1 || o.inline ? "body" : o.appendTo,
538
541
  disabled: o.appendTo === !1 || o.inline
539
542
  }, [
540
- Ve.value ? (r(), u("div", ee({
541
- key: 0,
542
- id: a(te) + "-panel",
543
- ref_key: "panel",
544
- ref: le
545
- }, a(ge), {
546
- class: ["hys-ui-cascader-menu", [
547
- o.popupClass,
548
- "hys-ui-cascader-" + a(d).size.value,
549
- {
550
- "hys-ui-cascader-inline": o.inline,
551
- "hys-ui-cascader-menu-disabled": a(d).disabled.value
552
- }
553
- ]],
554
- style: Fe.value,
555
- role: o.inline ? "group" : "dialog",
556
- "aria-label": a(c).panel,
557
- "aria-busy": o.loading || a(t).rootPending.value || a(t).checking.value || void 0,
558
- onFocusin: he,
559
- onFocusout: ve
560
- }), [
561
- e.$slots.header ? (r(), u("header", Ma, [
562
- f(e.$slots, "header", {}, void 0, !0)
563
- ])) : m("", !0),
564
- o.filterable ? (r(), E(va, {
565
- key: 1,
566
- ref_key: "search",
567
- ref: be,
568
- "model-value": a(G),
569
- class: "hys-ui-cascader-search",
570
- "aria-label": a(c).search,
571
- placeholder: a(c).search,
572
- disabled: a(R),
573
- size: a(d).size.value,
574
- clearable: "",
575
- "onUpdate:modelValue": a(t).filter,
576
- onKeydown: Xe
577
- }, {
578
- prefix: M(() => [
579
- V(a(ha), { size: 14 })
580
- ]),
581
- _: 1
582
- }, 8, ["model-value", "aria-label", "placeholder", "disabled", "size", "onUpdate:modelValue"])) : m("", !0),
583
- o.loading || a(t).rootPending.value || S.value && a(t).filterPending.value ? (r(), u("div", Ra, [
584
- f(e.$slots, "loading", { level: 0 }, () => [
585
- V(a(ye), {
586
- size: 17,
587
- class: "hys-ui-icon-spin"
588
- }),
589
- P(w(a(c).loading), 1)
590
- ], !0)
591
- ])) : a(t).rootError.value || S.value && a(t).filterError.value ? (r(), u("div", Wa, [
592
- O("span", null, w(a(c).loadError), 1),
593
- V(me, {
594
- size: "sm",
595
- variant: "ghost",
596
- onClick: l[3] || (l[3] = (i) => a(t).rootError.value ? a(t).reloadRoot() : a(t).retrySearch())
597
- }, {
598
- default: M(() => [
599
- P(w(a(c).retry), 1)
600
- ]),
601
- _: 1
602
- })
603
- ])) : S.value ? (r(), u(H, { key: 4 }, [
604
- a(t).searchResults.value.length ? (r(), E(Re, {
543
+ R(a(ca), {
544
+ disabled: o.inline,
545
+ "popup-transition": n.popupTransition,
546
+ "popup-transition-duration": n.popupTransitionDuration,
547
+ placement: a(m).placement.value
548
+ }, {
549
+ default: L(() => [
550
+ Ve.value ? (r(), u("div", ee({
605
551
  key: 0,
606
- ref: (i) => we(-1, i),
607
- rows: a(t).searchResults.value,
608
- level: -1,
609
- label: a(c).search,
610
- multiple: a(B),
611
- strict: o.checkStrictly,
612
- "show-prefix": o.showPrefix,
613
- disabled: D.value,
614
- search: !0,
615
- size: a(d).size.value,
616
- virtual: o.virtual,
617
- "list-height": o.listHeight,
618
- "item-height": xe.value,
619
- overscan: o.overscan,
620
- context: de,
621
- "has-children": $,
622
- error: Ce,
623
- "retry-text": a(c).retry,
624
- "expand-label": (i) => ce(a(c).expand, i.label),
625
- onChoose: oe,
626
- onKeyboard: Ee,
627
- onRetry: Pe,
628
- onScroll: l[4] || (l[4] = (i) => L("scroll", { level: -1, event: i }))
629
- }, He({ _: 2 }, [
630
- e.$slots.suggestion ? {
631
- name: "suggestion",
632
- fn: M((i) => [
633
- f(e.$slots, "suggestion", ra(ua(i)), void 0, !0)
634
- ]),
635
- key: "0"
636
- } : void 0
637
- ]), 1032, ["rows", "label", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "retry-text", "expand-label"])) : (r(), u("div", Na, [
638
- f(e.$slots, "empty", {
639
- query: a(G),
640
- level: 0
641
- }, () => [
642
- P(w(a(c).noMatch), 1)
643
- ], !0)
644
- ]))
645
- ], 64)) : (r(), u("div", {
646
- key: 5,
647
- ref_key: "columnsElement",
648
- ref: pe,
649
- class: "hys-ui-cascader-columns"
650
- }, [
651
- (r(!0), u(H, null, fe(a(t).columns.value, (i, s) => (r(), u(H, {
652
- key: ue(s)
653
- }, [
654
- i.length ? (r(), E(Re, {
655
- key: 0,
656
- ref_for: !0,
657
- ref: (h) => we(s, h),
658
- rows: i,
659
- level: s,
660
- label: a(c).level.replace("{level}", String(s + 1)),
661
- "active-key": a(t).browsing.value[s] === void 0 ? void 0 : a(J)(a(t).browsing.value.slice(0, s + 1)),
662
- multiple: a(B),
663
- strict: o.checkStrictly,
664
- "show-prefix": o.showPrefix,
665
- disabled: D.value,
552
+ id: a(te) + "-panel",
553
+ ref_key: "panel",
554
+ ref: le
555
+ }, a(pe), {
556
+ class: ["hys-ui-cascader-menu", [
557
+ o.popupClass,
558
+ "hys-ui-cascader-" + a(d).size.value,
559
+ {
560
+ "hys-ui-cascader-inline": o.inline,
561
+ "hys-ui-cascader-menu-disabled": a(d).disabled.value
562
+ }
563
+ ]],
564
+ style: Fe.value,
565
+ role: o.inline ? "group" : "dialog",
566
+ "aria-label": a(c).panel,
567
+ "aria-busy": o.loading || a(t).rootPending.value || a(t).checking.value || void 0,
568
+ onFocusin: he,
569
+ onFocusout: ve
570
+ }), [
571
+ e.$slots.header ? (r(), u("header", Ra, [
572
+ f(e.$slots, "header", {}, void 0, !0)
573
+ ])) : p("", !0),
574
+ o.filterable ? (r(), E(fa, {
575
+ key: 1,
576
+ ref_key: "search",
577
+ ref: ge,
578
+ "model-value": a(G),
579
+ class: "hys-ui-cascader-search",
580
+ "aria-label": a(c).search,
581
+ placeholder: a(c).search,
582
+ disabled: a(W),
666
583
  size: a(d).size.value,
667
- virtual: o.virtual,
668
- "list-height": o.listHeight,
669
- "item-height": xe.value,
670
- overscan: o.overscan,
671
- "column-width": o.columnWidth,
672
- context: de,
673
- "has-children": $,
674
- error: Ce,
675
- "retry-text": a(c).retry,
676
- "expand-label": (h) => ce(a(c).expand, h.label),
677
- onChoose: oe,
678
- onExpand: Y,
679
- onHover: Je,
680
- onKeyboard: Ee,
681
- onRetry: Pe,
682
- onScroll: (h) => L("scroll", { level: s, event: h })
683
- }, He({ _: 2 }, [
684
- e.$slots.option ? {
685
- name: "option",
686
- fn: M((h) => [
687
- f(e.$slots, "option", ee({ ref_for: !0 }, h), void 0, !0)
688
- ]),
689
- key: "0"
690
- } : void 0,
691
- e.$slots["expand-icon"] ? {
692
- name: "expand-icon",
693
- fn: M((h) => [
694
- f(e.$slots, "expand-icon", ee({ ref_for: !0 }, h), void 0, !0)
584
+ clearable: "",
585
+ "onUpdate:modelValue": a(t).filter,
586
+ onKeydown: Xe
587
+ }, {
588
+ prefix: L(() => [
589
+ R(a(va), { size: 14 })
590
+ ]),
591
+ _: 1
592
+ }, 8, ["model-value", "aria-label", "placeholder", "disabled", "size", "onUpdate:modelValue"])) : p("", !0),
593
+ o.loading || a(t).rootPending.value || B.value && a(t).filterPending.value ? (r(), u("div", Wa, [
594
+ f(e.$slots, "loading", { level: 0 }, () => [
595
+ R(a(ye), {
596
+ size: 17,
597
+ class: "hys-ui-icon-spin"
598
+ }),
599
+ P(w(a(c).loading), 1)
600
+ ], !0)
601
+ ])) : a(t).rootError.value || B.value && a(t).filterError.value ? (r(), u("div", Na, [
602
+ V("span", null, w(a(c).loadError), 1),
603
+ R(me, {
604
+ size: "sm",
605
+ variant: "ghost",
606
+ onClick: l[3] || (l[3] = (i) => a(t).rootError.value ? a(t).reloadRoot() : a(t).retrySearch())
607
+ }, {
608
+ default: L(() => [
609
+ P(w(a(c).retry), 1)
695
610
  ]),
696
- key: "1"
697
- } : void 0
698
- ]), 1032, ["rows", "level", "label", "active-key", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "column-width", "retry-text", "expand-label", "onScroll"])) : (r(), u("div", {
699
- key: 1,
700
- class: "hys-ui-cascader-empty-column",
701
- style: da({
702
- minWidth: typeof o.columnWidth == "number" ? o.columnWidth + "px" : o.columnWidth
611
+ _: 1
703
612
  })
704
- }, [
705
- O("div", Oa, [
706
- s && a(t).engine.tree.loadingKeys.value.has(ue(s)) ? (r(), u(H, { key: 0 }, [
707
- V(a(ye), {
708
- size: 16,
709
- class: "hys-ui-icon-spin"
710
- }),
711
- P(w(a(c).loading), 1)
712
- ], 64)) : s && a(t).engine.tree.failures.value.has(ue(s)) ? (r(), u(H, { key: 1 }, [
713
- P(w(a(c).loadError), 1)
714
- ], 64)) : f(e.$slots, "empty", {
613
+ ])) : B.value ? (r(), u(M, { key: 4 }, [
614
+ a(t).searchResults.value.length ? (r(), E(Re, {
615
+ key: 0,
616
+ ref: (i) => we(-1, i),
617
+ rows: a(t).searchResults.value,
618
+ level: -1,
619
+ label: a(c).search,
620
+ multiple: a(T),
621
+ strict: o.checkStrictly,
622
+ "show-prefix": o.showPrefix,
623
+ disabled: A.value,
624
+ search: !0,
625
+ size: a(d).size.value,
626
+ virtual: o.virtual,
627
+ "list-height": o.listHeight,
628
+ "item-height": xe.value,
629
+ overscan: o.overscan,
630
+ context: de,
631
+ "has-children": $,
632
+ error: Ce,
633
+ "retry-text": a(c).retry,
634
+ "expand-label": (i) => ce(a(c).expand, i.label),
635
+ onChoose: oe,
636
+ onKeyboard: Ee,
637
+ onRetry: Pe,
638
+ onScroll: l[4] || (l[4] = (i) => D("scroll", { level: -1, event: i }))
639
+ }, Ae({ _: 2 }, [
640
+ e.$slots.suggestion ? {
641
+ name: "suggestion",
642
+ fn: L((i) => [
643
+ f(e.$slots, "suggestion", ra(ua(i)), void 0, !0)
644
+ ]),
645
+ key: "0"
646
+ } : void 0
647
+ ]), 1032, ["rows", "label", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "retry-text", "expand-label"])) : (r(), u("div", Oa, [
648
+ f(e.$slots, "empty", {
715
649
  query: a(G),
716
- level: s
650
+ level: 0
717
651
  }, () => [
718
- P(w(a(c).empty), 1)
719
- ], !0, 2)
720
- ])
721
- ], 4))
722
- ], 64))), 128))
723
- ], 512)),
724
- e.$slots.footer || o.showFooter && (!o.inline || o.clearable) ? (r(), u("footer", Va, [
725
- f(e.$slots, "footer", {
726
- items: a(k),
727
- clear: Z,
728
- close: () => q(!0)
729
- }, () => [
730
- o.clearable ? (r(), E(me, {
731
- key: 0,
732
- size: "sm",
733
- variant: "ghost",
734
- disabled: a(R) || !a(k).some((i) => !i.disabled),
735
- onClick: Z
736
- }, {
737
- default: M(() => [
738
- P(w(a(c).clear), 1)
739
- ]),
740
- _: 1
741
- }, 8, ["disabled"])) : m("", !0),
742
- o.inline ? m("", !0) : (r(), E(me, {
743
- key: 1,
744
- size: "sm",
745
- variant: "secondary",
746
- onClick: l[5] || (l[5] = (i) => q(!0))
747
- }, {
748
- default: M(() => [
749
- P(w(a(c).close), 1)
750
- ]),
751
- _: 1
752
- }))
753
- ], !0)
754
- ])) : m("", !0)
755
- ], 16, Ha)) : m("", !0)
652
+ P(w(a(c).noMatch), 1)
653
+ ], !0)
654
+ ]))
655
+ ], 64)) : (r(), u("div", {
656
+ key: 5,
657
+ ref_key: "columnsElement",
658
+ ref: be,
659
+ class: "hys-ui-cascader-columns"
660
+ }, [
661
+ (r(!0), u(M, null, fe(a(t).columns.value, (i, s) => (r(), u(M, {
662
+ key: ue(s)
663
+ }, [
664
+ i.length ? (r(), E(Re, {
665
+ key: 0,
666
+ ref_for: !0,
667
+ ref: (h) => we(s, h),
668
+ rows: i,
669
+ level: s,
670
+ label: a(c).level.replace("{level}", String(s + 1)),
671
+ "active-key": a(t).browsing.value[s] === void 0 ? void 0 : a(J)(a(t).browsing.value.slice(0, s + 1)),
672
+ multiple: a(T),
673
+ strict: o.checkStrictly,
674
+ "show-prefix": o.showPrefix,
675
+ disabled: A.value,
676
+ size: a(d).size.value,
677
+ virtual: o.virtual,
678
+ "list-height": o.listHeight,
679
+ "item-height": xe.value,
680
+ overscan: o.overscan,
681
+ "column-width": o.columnWidth,
682
+ context: de,
683
+ "has-children": $,
684
+ error: Ce,
685
+ "retry-text": a(c).retry,
686
+ "expand-label": (h) => ce(a(c).expand, h.label),
687
+ onChoose: oe,
688
+ onExpand: Y,
689
+ onHover: Je,
690
+ onKeyboard: Ee,
691
+ onRetry: Pe,
692
+ onScroll: (h) => D("scroll", { level: s, event: h })
693
+ }, Ae({ _: 2 }, [
694
+ e.$slots.option ? {
695
+ name: "option",
696
+ fn: L((h) => [
697
+ f(e.$slots, "option", ee({ ref_for: !0 }, h), void 0, !0)
698
+ ]),
699
+ key: "0"
700
+ } : void 0,
701
+ e.$slots["expand-icon"] ? {
702
+ name: "expand-icon",
703
+ fn: L((h) => [
704
+ f(e.$slots, "expand-icon", ee({ ref_for: !0 }, h), void 0, !0)
705
+ ]),
706
+ key: "1"
707
+ } : void 0
708
+ ]), 1032, ["rows", "level", "label", "active-key", "multiple", "strict", "show-prefix", "disabled", "size", "virtual", "list-height", "item-height", "overscan", "column-width", "retry-text", "expand-label", "onScroll"])) : (r(), u("div", {
709
+ key: 1,
710
+ class: "hys-ui-cascader-empty-column",
711
+ style: da({
712
+ minWidth: typeof o.columnWidth == "number" ? o.columnWidth + "px" : o.columnWidth
713
+ })
714
+ }, [
715
+ V("div", Va, [
716
+ s && a(t).engine.tree.loadingKeys.value.has(ue(s)) ? (r(), u(M, { key: 0 }, [
717
+ R(a(ye), {
718
+ size: 16,
719
+ class: "hys-ui-icon-spin"
720
+ }),
721
+ P(w(a(c).loading), 1)
722
+ ], 64)) : s && a(t).engine.tree.failures.value.has(ue(s)) ? (r(), u(M, { key: 1 }, [
723
+ P(w(a(c).loadError), 1)
724
+ ], 64)) : f(e.$slots, "empty", {
725
+ query: a(G),
726
+ level: s
727
+ }, () => [
728
+ P(w(a(c).empty), 1)
729
+ ], !0, 2)
730
+ ])
731
+ ], 4))
732
+ ], 64))), 128))
733
+ ], 512)),
734
+ e.$slots.footer || o.showFooter && (!o.inline || o.clearable) ? (r(), u("footer", Fa, [
735
+ f(e.$slots, "footer", {
736
+ items: a(k),
737
+ clear: Z,
738
+ close: () => q(!0)
739
+ }, () => [
740
+ o.clearable ? (r(), E(me, {
741
+ key: 0,
742
+ size: "sm",
743
+ variant: "ghost",
744
+ disabled: a(W) || !a(k).some((i) => !i.disabled),
745
+ onClick: Z
746
+ }, {
747
+ default: L(() => [
748
+ P(w(a(c).clear), 1)
749
+ ]),
750
+ _: 1
751
+ }, 8, ["disabled"])) : p("", !0),
752
+ o.inline ? p("", !0) : (r(), E(me, {
753
+ key: 1,
754
+ size: "sm",
755
+ variant: "secondary",
756
+ onClick: l[5] || (l[5] = (i) => q(!0))
757
+ }, {
758
+ default: L(() => [
759
+ P(w(a(c).close), 1)
760
+ ]),
761
+ _: 1
762
+ }))
763
+ ], !0)
764
+ ])) : p("", !0)
765
+ ], 16, Ma)) : p("", !0)
766
+ ]),
767
+ _: 3
768
+ }, 8, ["disabled", "popup-transition", "popup-transition-duration", "placement"])
756
769
  ], 8, ["to", "disabled"]))
757
- ], 16, wa));
770
+ ], 16, xa));
758
771
  }
759
772
  });
760
773
  export {
761
- Za as default
774
+ el as default
762
775
  };