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,36 +1,39 @@
1
- import { defineComponent as vt, useAttrs as ft, inject as je, ref as x, useId as pt, shallowRef as Ge, computed as c, watch as M, nextTick as $, onUpdated as yt, onMounted as ht, onActivated as mt, onDeactivated as gt, onBeforeUnmount as bt, openBlock as f, createElementBlock as k, Fragment as be, createElementVNode as le, mergeProps as Me, unref as h, renderSlot as p, createVNode as Fe, createSlots as kt, withCtx as oe, createBlock as Ye, createCommentVNode as ie, Teleport as St, normalizeStyle as At, createTextVNode as ke, toDisplayString as ue, renderList as xt, withModifiers as Bt, normalizeClass as Ct } from "vue";
2
- import { LoaderCircle as Je, RotateCw as Tt } from "lucide-vue-next";
1
+ import { defineComponent as vt, useAttrs as ft, inject as je, ref as T, useId as pt, shallowRef as Ge, computed as c, watch as O, nextTick as P, onUpdated as yt, onMounted as ht, onActivated as mt, onDeactivated as gt, onBeforeUnmount as bt, openBlock as p, createElementBlock as k, Fragment as be, createElementVNode as le, mergeProps as De, unref as v, renderSlot as y, createVNode as ke, createSlots as kt, withCtx as Q, createBlock as Ye, createCommentVNode as ie, Teleport as St, normalizeStyle as At, createTextVNode as Se, toDisplayString as ue, renderList as Tt, withModifiers as xt, normalizeClass as Bt } from "vue";
2
+ import Ct from "../../motion/PopupMotion.js";
3
+ import { LoaderCircle as Je, RotateCw as Pt } from "lucide-vue-next";
3
4
  import $t from "../HysInput/HysInput.vue.js";
4
- import { useHysRootAttrs as Pt } from "../../config.js";
5
- import { fieldKey as Kt, formKey as Ot, useHysControlState as Mt } from "../../composables/formContext.js";
5
+ import { useHysRootAttrs as Kt } from "../../config.js";
6
+ import { fieldKey as Mt, formKey as Ot, useHysControlState as Dt } from "../../composables/formContext.js";
6
7
  import { useFloating as Ft } from "../../composables/useFloating.js";
7
8
  import { normalizeAutocomplete as Lt, autocompleteValue as Xe } from "../../composables/autocomplete.js";
8
9
  const Vt = ["id"], Et = {
9
10
  key: 0,
10
11
  class: "hys-ui-autocomplete-header"
11
- }, Dt = ["id", "aria-label", "aria-busy"], qt = {
12
+ }, qt = ["id", "aria-label", "aria-busy"], It = {
12
13
  key: 0,
13
14
  class: "hys-ui-autocomplete-state",
14
15
  role: "status"
15
- }, It = {
16
+ }, wt = {
16
17
  key: 1,
17
18
  class: "hys-ui-autocomplete-state hys-ui-autocomplete-error",
18
19
  role: "status"
19
- }, wt = {
20
+ }, Ht = {
20
21
  key: 0,
21
22
  role: "presentation",
22
23
  class: "hys-ui-autocomplete-group"
23
- }, Ht = ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"], Nt = ["title"], Rt = {
24
+ }, Nt = ["id", "aria-disabled", "aria-selected", "onMouseenter", "onClick"], Rt = ["title"], zt = {
24
25
  key: 0,
25
26
  class: "hys-ui-autocomplete-state",
26
27
  role: "status"
27
- }, zt = {
28
+ }, Wt = {
28
29
  key: 1,
29
30
  class: "hys-ui-autocomplete-footer"
30
- }, Ze = 'a[href],button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),[tabindex]:not([tabindex="-1"])', Xt = /* @__PURE__ */ vt({
31
+ }, Ze = 'a[href],button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),[tabindex]:not([tabindex="-1"])', _t = /* @__PURE__ */ vt({
31
32
  inheritAttrs: !1,
32
33
  __name: "HysAutocomplete",
33
34
  props: {
35
+ popupTransition: {},
36
+ popupTransitionDuration: {},
34
37
  modelValue: {},
35
38
  defaultValue: { default: "" },
36
39
  options: { default: () => [] },
@@ -82,11 +85,11 @@ const Vt = ["id"], Et = {
82
85
  },
83
86
  emits: ["update:modelValue", "update:open", "input", "change", "search", "select", "clear", "focus", "blur", "pressEnter", "visibleChange", "searchError"],
84
87
  setup(S, { expose: _e, emit: et }) {
85
- const t = S, m = et, R = ft(), Le = Pt(), Se = je(Kt, void 0), Ae = je(Ot, void 0), { disabled: ne, size: se, label: Ve } = Mt(t), z = x(), F = x(), L = x(), E = x(), W = pt(), Ee = x(t.defaultValue ?? ""), g = x(), B = x(), Q = x(!1), v = x(), j = x(!1), xe = Ge(), re = x(!1), de = Ge([]), i = c(
88
+ const t = S, m = et, R = ft(), Fe = Kt(), Ae = je(Mt, void 0), Te = je(Ot, void 0), { disabled: ne, size: se, label: Le } = Dt(t), z = T(), D = T(), F = T(), E = T(), W = pt(), Ve = T(t.defaultValue ?? ""), g = T(), x = T(), j = T(!1), f = T(), G = T(!1), xe = Ge(), re = T(!1), de = Ge([]), i = c(
86
89
  () => String(
87
- t.modelValue === void 0 ? Ee.value : t.modelValue ?? ""
90
+ t.modelValue === void 0 ? Ve.value : t.modelValue ?? ""
88
91
  )
89
- ), De = c(() => B.value ?? g.value ?? i.value), D = c(() => !ne.value && !t.readonly), ce = c(() => typeof t.fetchSuggestions == "function"), r = c(() => !!t.loading || j.value), tt = c(
92
+ ), Ee = c(() => x.value ?? g.value ?? i.value), q = c(() => !ne.value && !t.readonly), ce = c(() => typeof t.fetchSuggestions == "function"), r = c(() => !!t.loading || G.value), tt = c(
90
93
  () => ce.value ? de.value : Array.isArray(t.options) && t.options.length ? t.options : Array.isArray(t.fetchSuggestions) ? t.fetchSuggestions : []
91
94
  ), ve = c(
92
95
  () => Lt(tt.value, i.value, {
@@ -95,15 +98,15 @@ const Vt = ["id"], Et = {
95
98
  filter: t.filterOption ?? !ce.value,
96
99
  caseSensitive: t.caseSensitive
97
100
  })
98
- ), G = c(() => ve.value.filter((e) => e.kind === "option")), Be = c(() => G.value.map((e) => e.item)), Y = c(() => G.value.filter((e) => !e.disabled)), q = c(
101
+ ), Y = c(() => ve.value.filter((e) => e.kind === "option")), Be = c(() => Y.value.map((e) => e.item)), J = c(() => Y.value.filter((e) => !e.disabled)), I = c(
99
102
  () => ve.value.find(
100
- (e) => e.key === v.value && e.kind === "option" && !e.disabled
103
+ (e) => e.key === f.value && e.kind === "option" && !e.disabled
101
104
  )
102
105
  ), at = c(
103
- () => G.value.findIndex((e) => e.key === v.value)
106
+ () => Y.value.findIndex((e) => e.key === f.value)
104
107
  );
105
- let C = !0, Ce = 0, V = 0, qe = -1, Te = !1, fe = 0, P, J = !1, I = !1, K, X, pe, A;
106
- const w = Ft(z, F, {
108
+ let B = !0, Ce = 0, L = 0, qe = -1, Pe = !1, fe = 0, $, X = !1, w = !1, K, Z, pe, A;
109
+ const V = Ft(z, D, {
107
110
  closeOnTab: !1,
108
111
  get placement() {
109
112
  return t.placement;
@@ -111,130 +114,130 @@ const Vt = ["id"], Et = {
111
114
  matchWidth: () => t.popupMatchWidth ? !0 : "min",
112
115
  width: () => t.popupWidth,
113
116
  requestOpen: (e) => (m("update:open", e), t.open === void 0 ? void 0 : !1)
114
- }), n = w.open, lt = c(() => ({
117
+ }), n = V.open, ot = c(() => ({
115
118
  ...t.popupStyle,
116
- ...w.style.value,
119
+ ...V.style.value,
117
120
  overflowY: "hidden"
118
- })), ot = c(
121
+ })), lt = c(
119
122
  () => Math.max(0, Math.floor(Number(t.minQueryLength) || 0))
120
123
  ), $e = c(
121
124
  () => Math.max(64, Math.min(1200, Number(t.listHeight) || 256))
122
125
  );
123
126
  function H(e = i.value) {
124
127
  var a;
125
- if (!C || !D.value || e.length < ot.value) return !1;
128
+ if (!B || !q.value || e.length < lt.value) return !1;
126
129
  try {
127
130
  return ((a = t.getShow) == null ? void 0 : a.call(t, e)) !== !1;
128
131
  } catch {
129
132
  return !1;
130
133
  }
131
134
  }
132
- function Z() {
135
+ function _() {
133
136
  var a;
134
137
  const e = (a = z.value) == null ? void 0 : a.querySelector('input:not([type="hidden"]),textarea');
135
138
  E.value !== e && (E.value = e ?? void 0);
136
139
  }
137
- function O() {
138
- Ce++, X == null || X.abort(), X = void 0, clearTimeout(pe), pe = void 0, j.value = !1;
140
+ function M() {
141
+ Ce++, Z == null || Z.abort(), Z = void 0, clearTimeout(pe), pe = void 0, G.value = !1;
139
142
  }
140
143
  function s(e = !1) {
141
- g.value = void 0, K = void 0, w.close(!1, e);
144
+ g.value = void 0, K = void 0, V.close(!1, e);
142
145
  }
143
- function Pe(e) {
146
+ function Ke(e) {
144
147
  var a;
145
- ne.value || (Z(), (a = E.value) == null || a.focus(e));
148
+ ne.value || (_(), (a = E.value) == null || a.focus(e));
146
149
  }
147
150
  function Ie() {
148
151
  var e;
149
- Z(), (e = E.value) == null || e.blur(), s();
152
+ _(), (e = E.value) == null || e.blur(), s();
150
153
  }
151
154
  function U() {
152
- n.value && w.update();
155
+ n.value && V.update();
153
156
  }
154
157
  async function it() {
155
158
  var u;
156
- await $();
157
- const e = (u = L.value) == null ? void 0 : u.querySelector(
158
- '[id="' + W + "-option-" + v.value + '"]'
159
+ await P();
160
+ const e = (u = F.value) == null ? void 0 : u.querySelector(
161
+ '[id="' + W + "-option-" + f.value + '"]'
159
162
  );
160
- if (!e || !L.value) return;
161
- const a = e.offsetTop, l = a + e.offsetHeight, o = L.value.clientHeight || $e.value;
162
- a < L.value.scrollTop ? L.value.scrollTop = a : l > L.value.scrollTop + o && (L.value.scrollTop = l - o);
163
+ if (!e || !F.value) return;
164
+ const a = e.offsetTop, o = a + e.offsetHeight, l = F.value.clientHeight || $e.value;
165
+ a < F.value.scrollTop ? F.value.scrollTop = a : o > F.value.scrollTop + l && (F.value.scrollTop = o - l);
163
166
  }
164
- function _(e, a = !1) {
165
- v.value = e == null ? void 0 : e.key, a && t.backfill && e ? g.value = (t.append ? i.value : "") + e.value : g.value = void 0, a && it();
167
+ function ee(e, a = !1) {
168
+ f.value = e == null ? void 0 : e.key, a && t.backfill && e ? g.value = (t.append ? i.value : "") + e.value : g.value = void 0, a && it();
166
169
  }
167
- function Ke() {
168
- const e = K === "last" ? Y.value.at(-1) : K === "first" || t.highlightFirst ? Y.value[0] : void 0;
169
- _(e, !!K), K = void 0;
170
+ function Me() {
171
+ const e = K === "last" ? J.value.at(-1) : K === "first" || t.highlightFirst ? J.value[0] : void 0;
172
+ ee(e, !!K), K = void 0;
170
173
  }
171
- function ee(e = i.value, a = !1) {
172
- if (O(), xe.value = void 0, re.value = !1, !n.value || !H(e)) return;
174
+ function te(e = i.value, a = !1) {
175
+ if (M(), xe.value = void 0, re.value = !1, !n.value || !H(e)) return;
173
176
  if (!ce.value) {
174
- Ke(), $(U);
177
+ Me(), P(U);
175
178
  return;
176
179
  }
177
- const l = Ce, o = new AbortController();
178
- X = o, de.value = [], j.value = !0, v.value = void 0, g.value = void 0;
180
+ const o = Ce, l = new AbortController();
181
+ Z = l, de.value = [], G.value = !0, f.value = void 0, g.value = void 0;
179
182
  let u = !1;
180
- const b = () => C && Ce === l && !o.signal.aborted && n.value && D.value, d = (y) => {
181
- u || !b() || (u = !0, de.value = Array.isArray(y) ? y : [], j.value = !1, Ke(), $(U));
182
- }, T = (y) => {
183
- u || !b() || (u = !0, j.value = !1, xe.value = y, re.value = !0, m("searchError", y, e), $(U));
184
- }, te = () => {
183
+ const b = () => B && Ce === o && !l.signal.aborted && n.value && q.value, d = (h) => {
184
+ u || !b() || (u = !0, de.value = Array.isArray(h) ? h : [], G.value = !1, Me(), P(U));
185
+ }, C = (h) => {
186
+ u || !b() || (u = !0, G.value = !1, xe.value = h, re.value = !0, m("searchError", h, e), P(U));
187
+ }, ae = () => {
185
188
  if (pe = void 0, !!b())
186
189
  try {
187
- const y = t.fetchSuggestions(e, d, { signal: o.signal });
188
- y && typeof y.then == "function" ? Promise.resolve(y).then((Qe) => {
190
+ const h = t.fetchSuggestions(e, d, { signal: l.signal });
191
+ h && typeof h.then == "function" ? Promise.resolve(h).then((Qe) => {
189
192
  Array.isArray(Qe) && d(Qe);
190
- }).catch(T) : Array.isArray(y) && d(y);
191
- } catch (y) {
192
- T(y);
193
+ }).catch(C) : Array.isArray(h) && d(h);
194
+ } catch (h) {
195
+ C(h);
193
196
  }
194
- }, ae = Math.max(0, Math.min(6e4, Number(t.debounce) || 0));
195
- a || !ae ? te() : pe = setTimeout(te, ae);
197
+ }, oe = Math.max(0, Math.min(6e4, Number(t.debounce) || 0));
198
+ a || !oe ? ae() : pe = setTimeout(ae, oe);
196
199
  }
197
200
  async function N() {
198
- H() && await w.show(t.open === !0);
201
+ H() && await V.show(t.open === !0);
199
202
  }
200
203
  async function ye() {
201
204
  if (!H()) return;
202
205
  const e = n.value;
203
- Te = !e, await N(), Te = !1, e && n.value && ee(i.value, !0);
206
+ Pe = !e, await N(), Pe = !1, e && n.value && te(i.value, !0);
204
207
  }
205
208
  function he(e, a = !0) {
206
- if (!C || !D.value || (B.value = void 0, g.value = void 0, e === P || e === i.value && P === void 0))
209
+ if (!B || !q.value || (x.value = void 0, g.value = void 0, e === $ || e === i.value && $ === void 0))
207
210
  return;
208
- const l = i.value, o = ++V;
209
- P = e, t.modelValue === void 0 && (Ee.value = e), m("update:modelValue", e), m("input", e), $(async () => {
210
- if (!(!C || o !== V) && (P = void 0, i.value === e && (l !== e && m("change", e), a && o !== qe))) {
211
+ const o = i.value, l = ++L;
212
+ $ = e, t.modelValue === void 0 && (Ve.value = e), m("update:modelValue", e), m("input", e), P(async () => {
213
+ if (!(!B || l !== L) && ($ = void 0, i.value === e && (o !== e && m("change", e), a && l !== qe))) {
211
214
  if (m("search", e), K = void 0, !H(e)) {
212
- O(), s();
215
+ M(), s();
213
216
  return;
214
217
  }
215
- n.value ? ee(e) : await N();
218
+ n.value ? te(e) : await N();
216
219
  }
217
220
  });
218
221
  }
219
222
  function we(e) {
220
223
  const a = String(e ?? "");
221
- if (Q.value) {
222
- B.value = a;
224
+ if (j.value) {
225
+ x.value = a;
223
226
  return;
224
227
  }
225
228
  he(a);
226
229
  }
227
230
  function me() {
228
- D.value && (I = !0, O(), B.value = void 0, g.value = void 0, he("", !1), qe = V, s(), m("clear"), $(() => {
229
- I = !1;
231
+ q.value && (w = !0, M(), x.value = void 0, g.value = void 0, he("", !1), qe = L, s(), m("clear"), P(() => {
232
+ w = !1;
230
233
  }));
231
234
  }
232
235
  async function ge(e, a = !0) {
233
- if (!e || e.disabled || !D.value || r.value || !C) return;
234
- const l = (t.append ? i.value : "") + e.value, o = t.clearAfterSelect ? "" : l;
235
- he(o, !1);
236
- const u = V;
237
- await $(), !(!C || u !== V || i.value !== o || !D.value) && (m("select", e.item, l), s(), t.blurAfterSelect ? Ie() : a && (I = !0, Pe({ preventScroll: !0 }), I = !1));
236
+ if (!e || e.disabled || !q.value || r.value || !B) return;
237
+ const o = (t.append ? i.value : "") + e.value, l = t.clearAfterSelect ? "" : o;
238
+ he(l, !1);
239
+ const u = L;
240
+ await P(), !(!B || u !== L || i.value !== l || !q.value) && (m("select", e.item, o), s(), t.blurAfterSelect ? Ie() : a && (w = !0, Ke({ preventScroll: !0 }), w = !1));
238
241
  }
239
242
  async function He(e) {
240
243
  await ge({
@@ -247,59 +250,59 @@ const Vt = ["id"], Et = {
247
250
  });
248
251
  }
249
252
  function ut(e) {
250
- const a = G.value[Math.floor(e)];
251
- _(a && !a.disabled ? a : void 0, !0);
253
+ const a = Y.value[Math.floor(e)];
254
+ ee(a && !a.disabled ? a : void 0, !0);
252
255
  }
253
256
  async function nt(e) {
254
- if (!D.value || e.isComposing || Q.value || e.keyCode === 229)
257
+ if (!q.value || e.isComposing || j.value || e.keyCode === 229)
255
258
  return;
256
259
  const a = e.target;
257
260
  if (a.matches("input,textarea")) {
258
261
  if (["ArrowDown", "ArrowUp", "PageDown", "PageUp"].includes(e.key)) {
259
262
  e.preventDefault(), e.stopPropagation();
260
- const l = e.key === "ArrowDown" || e.key === "PageDown";
263
+ const o = e.key === "ArrowDown" || e.key === "PageDown";
261
264
  if (!n.value) {
262
- K = l ? "first" : "last", await N();
265
+ K = o ? "first" : "last", await N();
263
266
  return;
264
267
  }
265
- const o = Y.value;
266
- if (!o.length) {
267
- K = l ? "first" : "last";
268
+ const l = J.value;
269
+ if (!l.length) {
270
+ K = o ? "first" : "last";
268
271
  return;
269
272
  }
270
- let u = o.findIndex((T) => T.key === v.value);
271
- u < 0 && (u = l ? -1 : o.length);
273
+ let u = l.findIndex((C) => C.key === f.value);
274
+ u < 0 && (u = o ? -1 : l.length);
272
275
  const b = e.key.startsWith("Page") ? Math.max(
273
276
  1,
274
277
  Math.floor(
275
278
  $e.value / (se.value === "sm" ? 30 : se.value === "lg" ? 44 : 36)
276
279
  )
277
280
  ) : 1;
278
- let d = u + (l ? b : -b);
279
- d = t.loopNavigation ? (d % o.length + o.length) % o.length : Math.max(0, Math.min(o.length - 1, d)), _(o[d], !0);
281
+ let d = u + (o ? b : -b);
282
+ d = t.loopNavigation ? (d % l.length + l.length) % l.length : Math.max(0, Math.min(l.length - 1, d)), ee(l[d], !0);
280
283
  } else if ((e.key === "Home" || e.key === "End") && n.value)
281
- e.preventDefault(), _(
282
- e.key === "Home" ? Y.value[0] : Y.value.at(-1),
284
+ e.preventDefault(), ee(
285
+ e.key === "Home" ? J.value[0] : J.value.at(-1),
283
286
  !0
284
287
  );
285
288
  else if (e.key === "Enter") {
286
289
  if (e.shiftKey && a.matches("textarea")) return;
287
- m("pressEnter", e), n.value && q.value && !r.value ? (e.preventDefault(), e.stopPropagation(), await ge(q.value)) : t.selectWhenUnmatched ? (e.preventDefault(), e.stopPropagation(), await He({ [t.valueKey]: i.value })) : s();
290
+ m("pressEnter", e), n.value && I.value && !r.value ? (e.preventDefault(), e.stopPropagation(), await ge(I.value)) : t.selectWhenUnmatched ? (e.preventDefault(), e.stopPropagation(), await He({ [t.valueKey]: i.value })) : s();
288
291
  } else if (e.key === "Escape")
289
292
  g.value = void 0, s();
290
293
  else if (e.key === "Tab")
291
- if (!e.shiftKey && t.selectOnTab && q.value && !r.value)
292
- await ge(q.value, !1);
294
+ if (!e.shiftKey && t.selectOnTab && I.value && !r.value)
295
+ await ge(I.value, !1);
293
296
  else {
294
- const l = !e.shiftKey && n.value ? Ne()[0] : void 0;
295
- l ? (e.preventDefault(), l.focus()) : s();
297
+ const o = !e.shiftKey && n.value ? Ne()[0] : void 0;
298
+ o ? (e.preventDefault(), o.focus()) : s();
296
299
  }
297
300
  }
298
301
  }
299
302
  function Ne() {
300
303
  var e;
301
304
  return Array.from(
302
- ((e = F.value) == null ? void 0 : e.querySelectorAll(Ze)) ?? []
305
+ ((e = D.value) == null ? void 0 : e.querySelectorAll(Ze)) ?? []
303
306
  ).filter(
304
307
  (a) => a.tabIndex >= 0 && a.getClientRects().length && !a.closest("[inert]")
305
308
  );
@@ -310,18 +313,18 @@ const Vt = ["id"], Et = {
310
313
  const a = Ne();
311
314
  if (document.activeElement !== (e.shiftKey ? a[0] : a.at(-1))) return;
312
315
  e.preventDefault();
313
- const o = Array.from(
316
+ const l = Array.from(
314
317
  document.querySelectorAll(Ze)
315
318
  ).filter(
316
319
  (d) => {
317
- var T;
318
- return !((T = F.value) != null && T.contains(d)) && d.tabIndex >= 0 && d.getClientRects().length && !d.closest("[inert]");
320
+ var C;
321
+ return !((C = D.value) != null && C.contains(d)) && d.tabIndex >= 0 && d.getClientRects().length && !d.closest("[inert]");
319
322
  }
320
- ), u = o.indexOf(E.value);
321
- s(), I = !0, (b = e.shiftKey ? E.value : o[u + 1]) == null || b.focus(), I = !1;
323
+ ), u = l.indexOf(E.value);
324
+ s(), w = !0, (b = e.shiftKey ? E.value : l[u + 1]) == null || b.focus(), w = !1;
322
325
  }
323
326
  function Re(e) {
324
- fe++, J || (J = !0, m("focus", e)), e.target.matches("input,textarea") && t.triggerOnFocus && !I && !w.restoringFocus.value && N();
327
+ fe++, X || (X = !0, m("focus", e)), e.target.matches("input,textarea") && t.triggerOnFocus && !w && !V.restoringFocus.value && N();
325
328
  }
326
329
  function rt(e) {
327
330
  t.triggerOnFocus && e.target.matches("input,textarea") && !n.value && N();
@@ -329,88 +332,88 @@ const Vt = ["id"], Et = {
329
332
  function ze(e) {
330
333
  const a = fe;
331
334
  queueMicrotask(() => {
332
- var o, u;
333
- if (!C || a !== fe) return;
334
- const l = document.activeElement;
335
- (o = z.value) != null && o.contains(l) || (u = F.value) != null && u.contains(l) || (J && (J = !1, m("blur", e)), s());
335
+ var l, u;
336
+ if (!B || a !== fe) return;
337
+ const o = document.activeElement;
338
+ (l = z.value) != null && l.contains(o) || (u = D.value) != null && u.contains(o) || (X && (X = !1, m("blur", e)), s());
336
339
  });
337
340
  }
338
341
  function dt() {
339
- Q.value = !0, B.value = void 0, O(), s();
342
+ j.value = !0, x.value = void 0, M(), s();
340
343
  }
341
344
  function ct() {
342
- Q.value = !1;
343
- const e = B.value;
344
- B.value = void 0, e !== void 0 && he(e);
345
+ j.value = !1;
346
+ const e = x.value;
347
+ x.value = void 0, e !== void 0 && he(e);
345
348
  }
346
349
  const We = c(() => {
347
- var e, a, l, o, u, b, d, T, te;
350
+ var e, a, o, l, u, b, d, C, ae;
348
351
  return {
349
352
  ...t.inputProps,
350
353
  ...Object.fromEntries(
351
- Object.entries(R).filter(([ae]) => ae !== "class" && ae !== "style")
354
+ Object.entries(R).filter(([oe]) => oe !== "class" && oe !== "style")
352
355
  ),
353
356
  disabled: ne.value,
354
357
  readonly: t.readonly,
355
358
  size: se.value,
356
359
  clearable: t.clearable || ((e = t.inputProps) == null ? void 0 : e.clearable),
357
360
  clearIcon: t.clearIcon ?? ((a = t.inputProps) == null ? void 0 : a.clearIcon),
358
- placeholder: t.placeholder ?? ((l = t.inputProps) == null ? void 0 : l.placeholder),
359
- label: t.label ?? ((o = t.inputProps) == null ? void 0 : o.label),
361
+ placeholder: t.placeholder ?? ((o = t.inputProps) == null ? void 0 : o.placeholder),
362
+ label: t.label ?? ((l = t.inputProps) == null ? void 0 : l.label),
360
363
  name: t.name ?? ((u = t.inputProps) == null ? void 0 : u.name),
361
364
  status: t.status ?? ((b = t.inputProps) == null ? void 0 : b.status),
362
365
  error: t.error ?? ((d = t.inputProps) == null ? void 0 : d.error),
363
366
  bordered: t.bordered,
364
- id: R.id || (Se == null ? void 0 : Se.id.value) || void 0,
367
+ id: R.id || (Ae == null ? void 0 : Ae.id.value) || void 0,
365
368
  role: "combobox",
366
- autocomplete: ((T = t.inputProps) == null ? void 0 : T.autocomplete) ?? R.autocomplete ?? "off",
367
- ariaLabel: t.ariaLabel || R["aria-label"] || ((te = t.inputProps) == null ? void 0 : te.ariaLabel) || t.label || Ve.value || "自动补全",
369
+ autocomplete: ((C = t.inputProps) == null ? void 0 : C.autocomplete) ?? R.autocomplete ?? "off",
370
+ ariaLabel: t.ariaLabel || R["aria-label"] || ((ae = t.inputProps) == null ? void 0 : ae.ariaLabel) || t.label || Le.value || "自动补全",
368
371
  "aria-autocomplete": t.backfill ? "both" : "list",
369
372
  "aria-expanded": n.value,
370
373
  "aria-controls": n.value ? W : void 0,
371
- "aria-activedescendant": n.value && q.value ? W + "-option-" + q.value.key : void 0,
374
+ "aria-activedescendant": n.value && I.value ? W + "-option-" + I.value.key : void 0,
372
375
  "aria-busy": r.value || void 0
373
376
  };
374
377
  });
375
378
  function Ue() {
376
- C = !1, V++, fe++, P = void 0, B.value = void 0, g.value = void 0, J = !1, Q.value = !1, O(), s(!0), A == null || A.disconnect(), A = void 0;
379
+ B = !1, L++, fe++, $ = void 0, x.value = void 0, g.value = void 0, X = !1, j.value = !1, M(), s(!0), A == null || A.disconnect(), A = void 0;
377
380
  }
378
- M(n, (e) => {
379
- e ? ee(i.value, Te) : (O(), g.value = void 0, v.value = void 0), m("visibleChange", e);
380
- }), M(
381
+ O(n, (e) => {
382
+ e ? te(i.value, Pe) : (M(), g.value = void 0, f.value = void 0), m("visibleChange", e);
383
+ }), O(
381
384
  () => t.open,
382
385
  (e) => {
383
- e !== void 0 && (e && H() ? w.show(!0) : s(!0));
386
+ e !== void 0 && (e && H() ? V.show(!0) : s(!0));
384
387
  }
385
- ), M(
388
+ ), O(
386
389
  () => t.modelValue,
387
390
  () => {
388
- P !== void 0 && i.value === P || (V++, P = void 0, B.value = void 0, g.value = void 0, O(), n.value && H() ? ee() : s());
391
+ $ !== void 0 && i.value === $ || (L++, $ = void 0, x.value = void 0, g.value = void 0, M(), n.value && H() ? te() : s());
389
392
  }
390
- ), M(
393
+ ), O(
391
394
  () => [ne.value, t.readonly, t.getShow, t.minQueryLength],
392
395
  () => {
393
- H() || (O(), s(!0));
396
+ H() || (M(), s(!0));
394
397
  }
395
- ), M(ce, () => {
396
- de.value = [], n.value && ee();
397
- }), M(ve, () => {
398
- v.value && !q.value && (v.value = void 0), n.value && !r.value && !v.value && (t.highlightFirst || K) && Ke(), $(U);
399
- }), M(
400
- () => Ae == null ? void 0 : Ae.resetting.value,
398
+ ), O(ce, () => {
399
+ de.value = [], n.value && te();
400
+ }), O(ve, () => {
401
+ f.value && !I.value && (f.value = void 0), n.value && !r.value && !f.value && (t.highlightFirst || K) && Me(), P(U);
402
+ }), O(
403
+ () => Te == null ? void 0 : Te.resetting.value,
401
404
  (e) => {
402
- e && (V++, P = void 0, B.value = void 0, g.value = void 0, O(), s(!0));
405
+ e && (L++, $ = void 0, x.value = void 0, g.value = void 0, M(), s(!0));
403
406
  },
404
407
  { flush: "sync" }
405
- ), yt(Z);
408
+ ), yt(_);
406
409
  function Oe() {
407
- A == null || A.disconnect(), A = void 0, C && typeof ResizeObserver < "u" && z.value && (A = new ResizeObserver(U), A.observe(z.value), F.value && A.observe(F.value));
410
+ A == null || A.disconnect(), A = void 0, B && typeof ResizeObserver < "u" && z.value && (A = new ResizeObserver(U), A.observe(z.value), D.value && A.observe(D.value));
408
411
  }
409
- return M(F, Oe, { flush: "post" }), M([r, re], () => void $(U)), ht(() => {
410
- Z(), Oe(), t.autofocus && Pe(), (t.open ?? t.defaultOpen) && N();
412
+ return O(D, Oe, { flush: "post" }), O([r, re], () => void P(U)), ht(() => {
413
+ _(), Oe(), t.autofocus && Ke(), (t.open ?? t.defaultOpen) && N();
411
414
  }), mt(() => {
412
- C = !0, $(() => {
413
- Z(), Oe();
415
+ B = !0, P(() => {
416
+ _(), Oe();
414
417
  });
415
418
  }), gt(Ue), bt(Ue), _e({
416
419
  input: E,
@@ -418,7 +421,7 @@ const Vt = ["id"], Et = {
418
421
  loading: r,
419
422
  highlightedIndex: at,
420
423
  suggestions: Be,
421
- focus: Pe,
424
+ focus: Ke,
422
425
  blur: Ie,
423
426
  open: N,
424
427
  close: () => s(),
@@ -427,13 +430,13 @@ const Vt = ["id"], Et = {
427
430
  retry: ye,
428
431
  highlight: ut,
429
432
  select: He
430
- }), (e, a) => (f(), k(be, null, [
431
- le("div", Me({
433
+ }), (e, a) => (p(), k(be, null, [
434
+ le("div", De({
432
435
  ref_key: "root",
433
436
  ref: z
434
- }, h(Le), {
435
- class: ["hys-ui-autocomplete", h(R).class],
436
- style: h(R).style,
437
+ }, v(Fe), {
438
+ class: ["hys-ui-autocomplete", v(R).class],
439
+ style: v(R).style,
437
440
  onKeydownCapture: nt,
438
441
  onFocusin: Re,
439
442
  onFocusout: ze,
@@ -441,30 +444,30 @@ const Vt = ["id"], Et = {
441
444
  onCompositionstart: dt,
442
445
  onCompositionend: ct
443
446
  }), [
444
- p(e.$slots, "input", {
445
- value: De.value,
447
+ y(e.$slots, "input", {
448
+ value: Ee.value,
446
449
  setValue: we,
447
450
  inputProps: We.value,
448
451
  loading: r.value,
449
452
  clear: me
450
453
  }, () => [
451
- Fe($t, Me(We.value, {
452
- "model-value": De.value,
454
+ ke($t, De(We.value, {
455
+ "model-value": Ee.value,
453
456
  "onUpdate:modelValue": we,
454
457
  onClear: me
455
458
  }), kt({ _: 2 }, [
456
459
  e.$slots.prefix ? {
457
460
  name: "prefix",
458
- fn: oe(() => [
459
- p(e.$slots, "prefix", {}, void 0, !0)
461
+ fn: Q(() => [
462
+ y(e.$slots, "prefix", {}, void 0, !0)
460
463
  ]),
461
464
  key: "0"
462
465
  } : void 0,
463
466
  e.$slots.suffix || r.value && !S.hideLoading ? {
464
467
  name: "suffix",
465
- fn: oe(() => [
466
- p(e.$slots, "suffix", { loading: r.value }, () => [
467
- r.value && !S.hideLoading ? (f(), Ye(h(Je), {
468
+ fn: Q(() => [
469
+ y(e.$slots, "suffix", { loading: r.value }, () => [
470
+ r.value && !S.hideLoading ? (p(), Ye(v(Je), {
468
471
  key: 0,
469
472
  size: 15,
470
473
  class: "hys-ui-icon-spin"
@@ -475,153 +478,162 @@ const Vt = ["id"], Et = {
475
478
  } : void 0,
476
479
  e.$slots.prepend ? {
477
480
  name: "prepend",
478
- fn: oe(() => [
479
- p(e.$slots, "prepend", {}, void 0, !0)
481
+ fn: Q(() => [
482
+ y(e.$slots, "prepend", {}, void 0, !0)
480
483
  ]),
481
484
  key: "2"
482
485
  } : void 0,
483
486
  e.$slots.append ? {
484
487
  name: "append",
485
- fn: oe(() => [
486
- p(e.$slots, "append", {}, void 0, !0)
488
+ fn: Q(() => [
489
+ y(e.$slots, "append", {}, void 0, !0)
487
490
  ]),
488
491
  key: "3"
489
492
  } : void 0,
490
493
  e.$slots["clear-icon"] ? {
491
494
  name: "clear-icon",
492
- fn: oe(() => [
493
- p(e.$slots, "clear-icon", {}, void 0, !0)
495
+ fn: Q(() => [
496
+ y(e.$slots, "clear-icon", {}, void 0, !0)
494
497
  ]),
495
498
  key: "4"
496
499
  } : void 0
497
500
  ]), 1040, ["model-value"])
498
501
  ], !0)
499
502
  ], 16),
500
- (f(), Ye(St, {
503
+ (p(), Ye(St, {
501
504
  to: S.appendTo || "body",
502
505
  disabled: S.appendTo === !1
503
506
  }, [
504
- h(n) ? (f(), k("div", Me({
505
- key: 0,
506
- id: h(W) + "-panel",
507
- ref_key: "panel",
508
- ref: F
509
- }, h(Le), {
510
- class: ["hys-ui-autocomplete-popup", ["hys-ui-autocomplete-" + h(se), S.popupClass]],
511
- style: lt.value,
512
- onFocusin: Re,
513
- onFocusout: ze,
514
- onKeydown: st
515
- }), [
516
- e.$slots.header ? (f(), k("div", Et, [
517
- p(e.$slots, "header", {
518
- query: i.value,
519
- loading: r.value,
520
- options: Be.value,
521
- close: () => s()
522
- }, void 0, !0)
523
- ])) : ie("", !0),
524
- le("div", {
525
- id: h(W),
526
- ref_key: "list",
527
- ref: L,
528
- role: "listbox",
529
- class: "hys-ui-autocomplete-list",
530
- style: At({ maxHeight: $e.value + "px" }),
531
- "aria-label": S.ariaLabel || h(Ve) || "输入建议",
532
- "aria-busy": r.value || void 0
533
- }, [
534
- r.value && !S.hideLoading ? (f(), k("div", qt, [
535
- p(e.$slots, "loading", { query: i.value }, () => [
536
- Fe(h(Je), {
537
- size: 17,
538
- class: "hys-ui-icon-spin"
539
- }),
540
- ke(ue(S.loadingText), 1)
541
- ], !0)
542
- ])) : re.value ? (f(), k("div", It, [
543
- p(e.$slots, "error", {
544
- error: xe.value,
545
- query: i.value,
546
- retry: ye
547
- }, () => [
548
- le("span", null, ue(S.errorText), 1),
549
- le("button", {
550
- type: "button",
551
- "aria-label": "重试加载建议",
552
- onClick: ye
553
- }, [
554
- Fe(h(Tt), { size: 14 }),
555
- a[1] || (a[1] = ke("重试 ", -1))
556
- ])
557
- ], !0)
558
- ])) : (f(), k(be, { key: 2 }, [
559
- (f(!0), k(be, null, xt(ve.value, (l) => (f(), k(be, {
560
- key: l.key
507
+ ke(v(Ct), {
508
+ "popup-transition": t.popupTransition,
509
+ "popup-transition-duration": t.popupTransitionDuration,
510
+ placement: v(V).placement.value
511
+ }, {
512
+ default: Q(() => [
513
+ v(n) ? (p(), k("div", De({
514
+ key: 0,
515
+ id: v(W) + "-panel",
516
+ ref_key: "panel",
517
+ ref: D
518
+ }, v(Fe), {
519
+ class: ["hys-ui-autocomplete-popup", ["hys-ui-autocomplete-" + v(se), S.popupClass]],
520
+ style: ot.value,
521
+ onFocusin: Re,
522
+ onFocusout: ze,
523
+ onKeydown: st
524
+ }), [
525
+ e.$slots.header ? (p(), k("div", Et, [
526
+ y(e.$slots, "header", {
527
+ query: i.value,
528
+ loading: r.value,
529
+ options: Be.value,
530
+ close: () => s()
531
+ }, void 0, !0)
532
+ ])) : ie("", !0),
533
+ le("div", {
534
+ id: v(W),
535
+ ref_key: "list",
536
+ ref: F,
537
+ role: "listbox",
538
+ class: "hys-ui-autocomplete-list",
539
+ style: At({ maxHeight: $e.value + "px" }),
540
+ "aria-label": S.ariaLabel || v(Le) || "输入建议",
541
+ "aria-busy": r.value || void 0
561
542
  }, [
562
- l.kind === "group" ? (f(), k("div", wt, [
563
- p(e.$slots, "group", {
564
- label: l.label,
565
- group: l.group
566
- }, () => [
567
- ke(ue(l.label), 1)
543
+ r.value && !S.hideLoading ? (p(), k("div", It, [
544
+ y(e.$slots, "loading", { query: i.value }, () => [
545
+ ke(v(Je), {
546
+ size: 17,
547
+ class: "hys-ui-icon-spin"
548
+ }),
549
+ Se(ue(S.loadingText), 1)
568
550
  ], !0)
569
- ])) : (f(), k("div", {
570
- key: 1,
571
- id: h(W) + "-option-" + l.key,
572
- role: "option",
573
- "aria-disabled": l.disabled || void 0,
574
- "aria-selected": v.value === l.key,
575
- class: Ct(["hys-ui-autocomplete-option", {
576
- "hys-ui-autocomplete-active": v.value === l.key,
577
- "hys-ui-autocomplete-disabled": l.disabled
578
- }]),
579
- onMousedown: a[0] || (a[0] = Bt(() => {
580
- }, ["prevent"])),
581
- onMouseenter: (o) => !l.disabled && _(l),
582
- onClick: (o) => ge(l)
583
- }, [
584
- p(e.$slots, "option", {
585
- item: l.item,
586
- option: l,
551
+ ])) : re.value ? (p(), k("div", wt, [
552
+ y(e.$slots, "error", {
553
+ error: xe.value,
587
554
  query: i.value,
588
- active: v.value === l.key
555
+ retry: ye
589
556
  }, () => [
590
- p(e.$slots, "default", {
591
- item: l.item,
592
- option: l,
593
- query: i.value,
594
- active: v.value === l.key
595
- }, () => [
596
- le("span", {
597
- class: "hys-ui-autocomplete-label",
598
- title: l.label
599
- }, ue(l.label), 9, Nt)
600
- ], !0)
557
+ le("span", null, ue(S.errorText), 1),
558
+ le("button", {
559
+ type: "button",
560
+ "aria-label": "重试加载建议",
561
+ onClick: ye
562
+ }, [
563
+ ke(v(Pt), { size: 14 }),
564
+ a[1] || (a[1] = Se("重试 ", -1))
565
+ ])
601
566
  ], !0)
602
- ], 42, Ht))
603
- ], 64))), 128)),
604
- !G.value.length && !r.value ? (f(), k("div", Rt, [
605
- p(e.$slots, "empty", { query: i.value }, () => [
606
- ke(ue(S.emptyText), 1)
607
- ], !0)
567
+ ])) : (p(), k(be, { key: 2 }, [
568
+ (p(!0), k(be, null, Tt(ve.value, (o) => (p(), k(be, {
569
+ key: o.key
570
+ }, [
571
+ o.kind === "group" ? (p(), k("div", Ht, [
572
+ y(e.$slots, "group", {
573
+ label: o.label,
574
+ group: o.group
575
+ }, () => [
576
+ Se(ue(o.label), 1)
577
+ ], !0)
578
+ ])) : (p(), k("div", {
579
+ key: 1,
580
+ id: v(W) + "-option-" + o.key,
581
+ role: "option",
582
+ "aria-disabled": o.disabled || void 0,
583
+ "aria-selected": f.value === o.key,
584
+ class: Bt(["hys-ui-autocomplete-option", {
585
+ "hys-ui-autocomplete-active": f.value === o.key,
586
+ "hys-ui-autocomplete-disabled": o.disabled
587
+ }]),
588
+ onMousedown: a[0] || (a[0] = xt(() => {
589
+ }, ["prevent"])),
590
+ onMouseenter: (l) => !o.disabled && ee(o),
591
+ onClick: (l) => ge(o)
592
+ }, [
593
+ y(e.$slots, "option", {
594
+ item: o.item,
595
+ option: o,
596
+ query: i.value,
597
+ active: f.value === o.key
598
+ }, () => [
599
+ y(e.$slots, "default", {
600
+ item: o.item,
601
+ option: o,
602
+ query: i.value,
603
+ active: f.value === o.key
604
+ }, () => [
605
+ le("span", {
606
+ class: "hys-ui-autocomplete-label",
607
+ title: o.label
608
+ }, ue(o.label), 9, Rt)
609
+ ], !0)
610
+ ], !0)
611
+ ], 42, Nt))
612
+ ], 64))), 128)),
613
+ !Y.value.length && !r.value ? (p(), k("div", zt, [
614
+ y(e.$slots, "empty", { query: i.value }, () => [
615
+ Se(ue(S.emptyText), 1)
616
+ ], !0)
617
+ ])) : ie("", !0)
618
+ ], 64))
619
+ ], 12, qt),
620
+ e.$slots.footer ? (p(), k("div", Wt, [
621
+ y(e.$slots, "footer", {
622
+ query: i.value,
623
+ loading: r.value,
624
+ options: Be.value,
625
+ close: () => s(),
626
+ clear: me
627
+ }, void 0, !0)
608
628
  ])) : ie("", !0)
609
- ], 64))
610
- ], 12, Dt),
611
- e.$slots.footer ? (f(), k("div", zt, [
612
- p(e.$slots, "footer", {
613
- query: i.value,
614
- loading: r.value,
615
- options: Be.value,
616
- close: () => s(),
617
- clear: me
618
- }, void 0, !0)
619
- ])) : ie("", !0)
620
- ], 16, Vt)) : ie("", !0)
629
+ ], 16, Vt)) : ie("", !0)
630
+ ]),
631
+ _: 3
632
+ }, 8, ["popup-transition", "popup-transition-duration", "placement"])
621
633
  ], 8, ["to", "disabled"]))
622
634
  ], 64));
623
635
  }
624
636
  });
625
637
  export {
626
- Xt as default
638
+ _t as default
627
639
  };