hys-ui 0.2.0 → 0.3.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 (201) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +15 -1
  3. package/dist/components/HysAlert/HysAlert.vue.js +5 -54
  4. package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
  5. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +2 -2
  6. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +285 -273
  7. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +1 -1
  8. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +102 -98
  9. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +1 -1
  10. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +273 -59
  11. package/dist/components/HysCalendar/HysCalendar.vue.js +3 -3
  12. package/dist/components/HysCalendar/HysCalendar2.vue.js +237 -225
  13. package/dist/components/HysCascader/HysCascader.vue.js +2 -2
  14. package/dist/components/HysCascader/HysCascader2.vue.js +337 -324
  15. package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
  16. package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
  17. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  18. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -217
  19. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
  20. package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
  21. package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
  22. package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
  23. package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
  24. package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
  25. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  26. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1008 -559
  27. package/dist/components/HysDatePicker/HysDatePicker.vue.js +2 -0
  28. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +2 -2
  29. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +539 -526
  30. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +5 -3
  31. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  32. package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
  33. package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
  34. package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
  35. package/dist/components/HysFormItem/HysFormItem.vue.js +2 -2
  36. package/dist/components/HysFormItem/HysFormItem2.vue.js +171 -164
  37. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  38. package/dist/components/HysGantt/HysGantt2.vue.js +810 -795
  39. package/dist/components/HysMention/HysMention.vue.js +1 -1
  40. package/dist/components/HysMention/HysMention2.vue.js +112 -100
  41. package/dist/components/HysModal/HysModal.vue.js +2 -2
  42. package/dist/components/HysModal/HysModal2.vue.js +490 -85
  43. package/dist/components/HysPopover/HysPopover.vue.js +5 -91
  44. package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
  45. package/dist/components/HysProgress/HysProgress.vue.js +2 -2
  46. package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
  47. package/dist/components/HysSelect/HysSelect.vue.js +2 -2
  48. package/dist/components/HysSelect/HysSelect2.vue.js +730 -594
  49. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  50. package/dist/components/HysSlider/HysSlider2.vue.js +192 -188
  51. package/dist/components/HysSlider/SliderTooltip.vue.js +2 -2
  52. package/dist/components/HysSlider/SliderTooltip2.vue.js +103 -89
  53. package/dist/components/HysTable/HysTable.vue.js +2 -2
  54. package/dist/components/HysTable/HysTable2.vue.js +389 -368
  55. package/dist/components/HysTagInput/HysTagInput.vue.js +5 -82
  56. package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
  57. package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
  58. package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
  59. package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
  60. package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
  61. package/dist/components/HysTour/HysTour.vue.js +46 -42
  62. package/dist/components/HysTransfer/HysTransfer.vue.js +2 -2
  63. package/dist/components/HysTransfer/HysTransfer2.vue.js +237 -207
  64. package/dist/components/HysTransfer/HysTransferPanel.vue.js +1 -1
  65. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +320 -271
  66. package/dist/components/HysTree/HysTree.vue.js +2 -2
  67. package/dist/components/HysTree/HysTree2.vue.js +195 -184
  68. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +4 -4
  69. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +389 -377
  70. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  71. package/dist/components/HysUpload/HysUpload2.vue.js +459 -125
  72. package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
  73. package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
  74. package/dist/composables/color.js +97 -0
  75. package/dist/composables/dataGrid.js +68 -0
  76. package/dist/composables/drawer.js +17 -0
  77. package/dist/composables/feedback.js +14 -0
  78. package/dist/composables/menu.js +96 -0
  79. package/dist/composables/modal.js +14 -0
  80. package/dist/composables/overlayManager.js +48 -18
  81. package/dist/composables/progress.js +94 -0
  82. package/dist/composables/tagInput.js +16 -0
  83. package/dist/composables/timeline.js +19 -0
  84. package/dist/composables/transfer.js +19 -17
  85. package/dist/composables/upload.js +55 -0
  86. package/dist/composables/uploadRequest.js +58 -0
  87. package/dist/composables/useAlert.js +124 -0
  88. package/dist/composables/useColorPicker.js +402 -0
  89. package/dist/composables/useContextMenu.js +514 -0
  90. package/dist/composables/useDataGridRemote.js +67 -0
  91. package/dist/composables/useDialog.js +86 -43
  92. package/dist/composables/useDrawerPush.js +33 -0
  93. package/dist/composables/useDrawerResize.js +221 -0
  94. package/dist/composables/useFloating.js +110 -76
  95. package/dist/composables/useHysModal.js +185 -0
  96. package/dist/composables/useModal.js +295 -0
  97. package/dist/composables/useModalInteraction.js +394 -0
  98. package/dist/composables/usePopupSurface.js +458 -0
  99. package/dist/composables/useTagInput.js +313 -0
  100. package/dist/composables/useTransferMotion.js +185 -0
  101. package/dist/composables/useUpload.js +472 -0
  102. package/dist/composables/useUploadModel.js +65 -0
  103. package/dist/composables/useUploadRequests.js +266 -0
  104. package/dist/composables/useVirtualTableLayout.js +277 -0
  105. package/dist/composables/virtualTable.js +43 -0
  106. package/dist/index.js +27 -24
  107. package/dist/internal/PopupReference.js +39 -0
  108. package/dist/internal/PopupSurfacePanel.vue.js +7 -0
  109. package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
  110. package/dist/motion/PopupMotion.js +105 -0
  111. package/dist/motion/popup.js +10 -0
  112. package/dist/style.css +1 -1
  113. package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
  114. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +7 -7
  115. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +6 -1
  116. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +3 -3
  117. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +54 -31
  118. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +3 -2
  119. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +7 -7
  120. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +2 -2
  121. package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
  122. package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
  123. package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
  124. package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
  125. package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
  126. package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
  127. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
  128. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +1 -1
  129. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
  130. package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
  131. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
  132. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +2 -1
  133. package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -1
  134. package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
  135. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
  136. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
  137. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
  138. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +13 -4
  139. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +5 -4
  140. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +3 -1
  141. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +2 -2
  142. package/dist/types/components/HysTable/HysTable.vue.d.ts +4 -4
  143. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +2 -2
  144. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +47 -25
  145. package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
  146. package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
  147. package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -1
  148. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +2 -2
  149. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +5 -3
  150. package/dist/types/components/HysTree/HysTree.vue.d.ts +2 -2
  151. package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
  152. package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
  153. package/dist/types/composables/autocomplete.d.ts +3 -0
  154. package/dist/types/composables/avatar.d.ts +3 -0
  155. package/dist/types/composables/cascader.d.ts +3 -0
  156. package/dist/types/composables/color.d.ts +97 -0
  157. package/dist/types/composables/dataGrid.d.ts +100 -0
  158. package/dist/types/composables/datePicker.d.ts +3 -0
  159. package/dist/types/composables/drawer.d.ts +102 -0
  160. package/dist/types/composables/feedback.d.ts +98 -0
  161. package/dist/types/composables/formContext.d.ts +2 -0
  162. package/dist/types/composables/menu.d.ts +183 -0
  163. package/dist/types/composables/modal.d.ts +183 -0
  164. package/dist/types/composables/overlayManager.d.ts +7 -3
  165. package/dist/types/composables/popupSurface.d.ts +83 -0
  166. package/dist/types/composables/progress.d.ts +92 -0
  167. package/dist/types/composables/selectOptions.d.ts +2 -0
  168. package/dist/types/composables/table.d.ts +3 -0
  169. package/dist/types/composables/tagInput.d.ts +96 -0
  170. package/dist/types/composables/timeline.d.ts +82 -0
  171. package/dist/types/composables/transfer.d.ts +7 -0
  172. package/dist/types/composables/tree.d.ts +3 -0
  173. package/dist/types/composables/treeSelect.d.ts +3 -0
  174. package/dist/types/composables/upload.d.ts +202 -0
  175. package/dist/types/composables/uploadRequest.d.ts +3 -0
  176. package/dist/types/composables/useAlert.d.ts +21 -0
  177. package/dist/types/composables/useCascader.d.ts +1 -1
  178. package/dist/types/composables/useColorPicker.d.ts +101 -0
  179. package/dist/types/composables/useContextMenu.d.ts +81 -0
  180. package/dist/types/composables/useDataGridRemote.d.ts +15 -0
  181. package/dist/types/composables/useDialog.d.ts +16 -3
  182. package/dist/types/composables/useDrawerPush.d.ts +6 -0
  183. package/dist/types/composables/useDrawerResize.d.ts +27 -0
  184. package/dist/types/composables/useFloating.d.ts +21 -2
  185. package/dist/types/composables/useHysModal.d.ts +44 -0
  186. package/dist/types/composables/useModal.d.ts +62 -0
  187. package/dist/types/composables/useModalInteraction.d.ts +27 -0
  188. package/dist/types/composables/usePopupSurface.d.ts +3341 -0
  189. package/dist/types/composables/useTagInput.d.ts +66 -0
  190. package/dist/types/composables/useTransferMotion.d.ts +36 -0
  191. package/dist/types/composables/useUpload.d.ts +94 -0
  192. package/dist/types/composables/useUploadModel.d.ts +14 -0
  193. package/dist/types/composables/useUploadRequests.d.ts +38 -0
  194. package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
  195. package/dist/types/composables/virtualTable.d.ts +126 -0
  196. package/dist/types/index.d.ts +17 -2
  197. package/dist/types/internal/PopupReference.d.ts +18 -0
  198. package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
  199. package/dist/types/motion/PopupMotion.d.ts +59 -0
  200. package/dist/types/motion/popup.d.ts +12 -0
  201. package/package.json +1 -1
@@ -1,43 +1,46 @@
1
- import { defineComponent as Me, useAttrs as Ae, ref as V, useId as Fe, provide as Oe, computed as B, watch as O, nextTick as I, onMounted as Ie, onUpdated as De, onActivated as We, onDeactivated as qe, onBeforeUnmount as Pe, openBlock as r, createElementBlock as u, mergeProps as Q, unref as a, createElementVNode as S, withModifiers as Z, renderSlot as v, createCommentVNode as f, toDisplayString as z, Fragment as _, renderList as fe, normalizeClass as ye, createTextVNode as D, createBlock as E, resolveDynamicComponent as pe, createVNode as C, withCtx as $, Teleport as Ue, createSlots as je, normalizeProps as W, guardReactiveProps as q } from "vue";
2
- import { X as me, LoaderCircle as ge, ChevronDown as Re, Search as Xe } from "lucide-vue-next";
3
- import Ye from "../HysInput/HysInput.vue.js";
4
- import Ge from "../HysButton/HysButton.vue.js";
5
- import Je from "../HysTooltip/HysTooltip.vue.js";
6
- import Qe from "./HysTreeSelectPanel.vue.js";
7
- import { useFloating as Ze } from "../../composables/useFloating.js";
8
- import { useHysRootAttrs as _e } from "../../config.js";
9
- import { useHysControlState as ea, useHysFormItemContext as aa, fieldKey as ta } from "../../composables/formContext.js";
10
- import { useTreeSelect as la } from "../../composables/useTreeSelect.js";
11
- const oa = ["disabled"], sa = ["id", "aria-expanded", "aria-controls", "aria-label", "aria-disabled", "aria-readonly", "aria-invalid", "aria-describedby", "aria-required", "aria-busy", "tabindex"], ia = {
1
+ import { defineComponent as Ve, useAttrs as Ae, ref as H, useId as Fe, provide as Oe, computed as T, watch as D, nextTick as I, onMounted as De, onUpdated as Ie, onActivated as Pe, onDeactivated as We, onBeforeUnmount as qe, openBlock as n, createElementBlock as d, mergeProps as Q, unref as a, createElementVNode as $, withModifiers as Z, renderSlot as h, createCommentVNode as v, toDisplayString as z, Fragment as _, renderList as pe, normalizeClass as fe, createTextVNode as P, createBlock as E, resolveDynamicComponent as ye, createVNode as B, withCtx as S, Teleport as Ue, createSlots as je, normalizeProps as W, guardReactiveProps as q } from "vue";
2
+ import Re from "../../motion/PopupMotion.js";
3
+ import { X as me, LoaderCircle as ge, ChevronDown as Xe, Search as Ye } from "lucide-vue-next";
4
+ import Ge from "../HysInput/HysInput.vue.js";
5
+ import Je from "../HysButton/HysButton.vue.js";
6
+ import Qe from "../HysTooltip/HysTooltip.vue.js";
7
+ import Ze from "./HysTreeSelectPanel.vue.js";
8
+ import { useFloating as _e } from "../../composables/useFloating.js";
9
+ import { useHysRootAttrs as ea } from "../../config.js";
10
+ import { useHysControlState as aa, useHysFormItemContext as ta, fieldKey as la } from "../../composables/formContext.js";
11
+ import { useTreeSelect as oa } from "../../composables/useTreeSelect.js";
12
+ const sa = ["disabled"], ia = ["id", "aria-expanded", "aria-controls", "aria-label", "aria-disabled", "aria-readonly", "aria-invalid", "aria-describedby", "aria-required", "aria-busy", "tabindex"], ra = {
12
13
  key: 0,
13
14
  class: "hys-ui-tree-select-prefix"
14
- }, ra = {
15
+ }, na = {
15
16
  key: 1,
16
17
  class: "hys-ui-tree-select-placeholder"
17
- }, na = {
18
+ }, ua = {
18
19
  key: 2,
19
20
  class: "hys-ui-tree-select-tags"
20
- }, da = { class: "hys-ui-tree-select-tag-label" }, ua = ["disabled", "aria-label", "onClick"], ca = ["aria-label"], ha = {
21
+ }, da = { class: "hys-ui-tree-select-tag-label" }, ca = ["disabled", "aria-label", "onClick"], ha = ["aria-label"], va = {
21
22
  key: 3,
22
23
  class: "hys-ui-tree-select-value"
23
- }, va = { class: "hys-ui-tree-select-indicators" }, fa = ["name", "value", "disabled"], ya = {
24
+ }, pa = { class: "hys-ui-tree-select-indicators" }, fa = ["name", "value", "disabled"], ya = {
24
25
  key: 0,
25
26
  class: "hys-ui-tree-select-header"
26
- }, pa = {
27
+ }, ma = {
27
28
  key: 2,
28
29
  class: "hys-ui-tree-select-loading",
29
30
  role: "status"
30
- }, ma = {
31
+ }, ga = {
31
32
  key: 3,
32
33
  class: "hys-ui-tree-select-error",
33
34
  role: "alert"
34
- }, ga = {
35
+ }, ba = {
35
36
  key: 4,
36
37
  class: "hys-ui-tree-select-footer"
37
- }, Ka = /* @__PURE__ */ Me({
38
+ }, La = /* @__PURE__ */ Ve({
38
39
  inheritAttrs: !1,
39
40
  __name: "HysTreeSelect",
40
41
  props: {
42
+ popupTransition: {},
43
+ popupTransitionDuration: {},
41
44
  modelValue: {},
42
45
  defaultValue: {},
43
46
  nodes: {},
@@ -110,25 +113,25 @@ const oa = ["disabled"], sa = ["id", "aria-expanded", "aria-controls", "aria-lab
110
113
  },
111
114
  emits: ["update:modelValue", "change", "value-change", "select", "deselect", "check", "clear", "remove-tag", "limit", "update:searchValue", "search", "search-error", "search-complete", "update:open", "visible-change", "update:expandedKeys", "update:loadedKeys", "node-expand", "node-collapse", "load-error", "children-loaded", "load", "scroll", "focus", "blur"],
112
115
  setup(i, { expose: be, emit: ke }) {
113
- const o = i, T = ke, we = Ae(), ee = _e(), n = ea(o), g = aa(), y = V(), H = V(), P = V(), b = V(), M = Fe(), ae = V("");
114
- Oe(ta, void 0);
115
- let k = !0, K = !1, U = !1, N = 0;
116
- const j = Ze(y, H, {
116
+ const t = i, C = ke, we = Ae(), ee = ea(), u = aa(t), g = ta(), p = H(), M = H(), U = H(), b = H(), V = Fe(), ae = H("");
117
+ Oe(la, void 0);
118
+ let k = !0, K = !1, j = !1, N = 0;
119
+ const A = _e(p, M, {
117
120
  get placement() {
118
- return o.placement;
121
+ return t.placement;
119
122
  },
120
- matchWidth: () => o.popupMatchWidth ? !0 : "min",
123
+ matchWidth: () => t.popupMatchWidth ? !0 : "min",
121
124
  width: () => {
122
125
  var e;
123
- return o.popupWidth ?? (o.virtual && !o.popupMatchWidth ? Math.max(((e = y.value) == null ? void 0 : e.getBoundingClientRect().width) ?? 0, 240) : void 0);
126
+ return t.popupWidth ?? (t.virtual && !t.popupMatchWidth ? Math.max(((e = p.value) == null ? void 0 : e.getBoundingClientRect().width) ?? 0, 240) : void 0);
124
127
  },
125
- requestOpen: (e, l) => (e || (U = !!l), T("update:open", e), o.open === void 0 ? void 0 : !1)
126
- }), { open: c, style: xe, show: Be, close: p } = j, Te = B(() => c.value && k), s = la(
127
- o,
128
- n.disabled,
129
- Te,
128
+ requestOpen: (e, l) => (e || (j = !!l), C("update:open", e), t.open === void 0 ? void 0 : !1)
129
+ }), { open: c, style: xe, show: Te, close: f } = A, Be = T(() => c.value && k), o = oa(
130
+ t,
131
+ u.disabled,
132
+ Be,
130
133
  (e, ...l) => {
131
- T(e, ...l), e === "value-change" && o.clearSearchAfterSelect && !o.retainSearch && s.filter("");
134
+ C(e, ...l), e === "value-change" && t.clearSearchAfterSelect && !t.retainSearch && o.filter("");
132
135
  },
133
136
  () => {
134
137
  g.validate("change");
@@ -136,425 +139,434 @@ const oa = ["disabled"], sa = ["id", "aria-expanded", "aria-controls", "aria-lab
136
139
  ), {
137
140
  items: w,
138
141
  multiple: R,
139
- busy: ba,
142
+ busy: ka,
140
143
  blocked: X,
141
144
  query: te,
142
145
  words: L,
143
146
  remoteError: le,
144
147
  remotePending: Y
145
- } = s, Se = B(() => ({
146
- "--hys-ui-tree-select-control-height": (n.size.value === "sm" ? 30 : n.size.value === "lg" ? 44 : 38) + "px"
147
- })), Ce = B(() => ({
148
- ...o.popupStyle,
148
+ } = o, Se = T(() => ({
149
+ "--hys-ui-tree-select-control-height": (u.size.value === "sm" ? 30 : u.size.value === "lg" ? 44 : 38) + "px"
150
+ })), Ce = T(() => ({
151
+ ...t.popupStyle,
149
152
  ...xe.value,
150
153
  maxHeight: "min(60dvh, calc(100dvh - 20px))",
151
154
  overflowY: "hidden"
152
- })), $e = B(
153
- () => o.itemHeight ?? (n.size.value === "sm" ? 30 : n.size.value === "lg" ? 42 : 36)
154
- ), oe = B(
155
- () => Number.isFinite(o.maxTagCount) ? Math.max(0, Math.floor(o.maxTagCount)) : 1 / 0
156
- ), ze = B(() => w.value.slice(0, oe.value)), x = B(() => w.value.slice(oe.value)), A = (e) => typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : String(e.value), se = (e) => Number.isFinite(o.maxTagTextLength) && o.maxTagTextLength >= 0 ? A(e).slice(0, o.maxTagTextLength) + (A(e).length > o.maxTagTextLength ? "…" : "") : void 0, Ee = B(
157
- () => o.clearable && !X.value && s.values.value.some((e) => !s.item(e).disabled)
155
+ })), $e = T(
156
+ () => t.itemHeight ?? (u.size.value === "sm" ? 30 : u.size.value === "lg" ? 42 : 36)
157
+ ), oe = T(
158
+ () => Number.isFinite(t.maxTagCount) ? Math.max(0, Math.floor(t.maxTagCount)) : 1 / 0
159
+ ), ze = T(() => w.value.slice(0, oe.value)), x = T(() => w.value.slice(oe.value)), F = (e) => typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : String(e.value), se = (e) => Number.isFinite(t.maxTagTextLength) && t.maxTagTextLength >= 0 ? F(e).slice(0, t.maxTagTextLength) + (F(e).length > t.maxTagTextLength ? "…" : "") : void 0, Ee = T(
160
+ () => t.clearable && !X.value && o.values.value.some((e) => !o.item(e).disabled)
158
161
  ), Ke = () => Object.fromEntries(
159
162
  Object.entries(we).filter(([e]) => !["class", "style"].includes(e))
160
163
  );
161
164
  function ie() {
162
- var d;
163
- const e = (d = y.value) == null ? void 0 : d.closest("label");
165
+ var s;
166
+ const e = (s = p.value) == null ? void 0 : s.closest("label");
164
167
  if (!e) return;
165
168
  const l = e.cloneNode(!0);
166
- l.querySelectorAll(".hys-ui-tree-select-wrap").forEach((t) => t.remove()), ae.value = (l.textContent ?? "").replace(/\s+/g, " ").trim();
169
+ l.querySelectorAll(".hys-ui-tree-select-wrap").forEach((r) => r.remove()), ae.value = (l.textContent ?? "").replace(/\s+/g, " ").trim();
167
170
  }
168
- async function m(e = !0, l = !1) {
169
- var ue, ce, he, ve;
170
- if (!k || n.disabled.value || o.readonly) return !1;
171
- const d = c.value, t = N;
172
- if (await Be(l), await I(), !k || !c.value || t !== N) return !1;
173
- if (!d && !o.retainSearch && s.filter(""), o.expandSelected && s.values.value.length) {
174
- const J = s.values.value.flatMap(
175
- (F) => s.tree.ancestors(F)
171
+ async function y(e = !0, l = !1) {
172
+ var de, ce, he, ve;
173
+ if (!k || u.disabled.value || t.readonly) return !1;
174
+ const s = c.value, r = N;
175
+ if (await Te(l), await I(), !k || !c.value || r !== N) return !1;
176
+ if (!s && !t.retainSearch && o.filter(""), t.expandSelected && o.values.value.length) {
177
+ const J = o.values.value.flatMap(
178
+ (O) => o.tree.ancestors(O)
176
179
  );
177
- await s.tree.setExpandedKeys([
178
- .../* @__PURE__ */ new Set([...s.tree.rawExpanded.value, ...J])
180
+ await o.tree.setExpandedKeys([
181
+ .../* @__PURE__ */ new Set([...o.tree.rawExpanded.value, ...J])
179
182
  ]);
180
183
  }
181
- if (await I(), !k || !c.value || t !== N) return !1;
182
- const h = s.values.value.find(
183
- (J) => s.tree.visible.value.some((F) => F.key === J && !F.disabled)
184
+ if (await I(), !k || !c.value || r !== N) return !1;
185
+ const m = o.values.value.find(
186
+ (J) => o.tree.visible.value.some((O) => O.key === J && !O.disabled)
184
187
  );
185
- return h !== void 0 && ((ue = b.value) == null || ue.setActive(h), await ((ce = b.value) == null ? void 0 : ce.scrollTo({ key: h }))), e && (o.searchable ? (he = P.value) == null || he.focus() : await ((ve = b.value) == null ? void 0 : ve.focus(h))), !0;
188
+ return m !== void 0 && ((de = b.value) == null || de.setActive(m), await ((ce = b.value) == null ? void 0 : ce.scrollTo({ key: m }))), e && (t.searchable ? (he = U.value) == null || he.focus() : await ((ve = b.value) == null ? void 0 : ve.focus(m))), !0;
186
189
  }
187
190
  async function G() {
188
- const e = await s.clear();
189
- return e && p(!0), e;
191
+ const e = await o.clear();
192
+ return e && f(!0), e;
190
193
  }
191
194
  function Ne(e) {
192
- (e == null ? void 0 : e.target) instanceof Element && e.target.closest("button") || (c.value ? p() : m());
195
+ (e == null ? void 0 : e.target) instanceof Element && e.target.closest("button") || (c.value ? f() : y());
193
196
  }
194
197
  function Le(e) {
195
- !R.value && s.values.value.includes(e) && p(!0);
198
+ !R.value && o.values.value.includes(e) && f(!0);
196
199
  }
197
- function Ve(e) {
198
- var l, d;
199
- if (!(e.isComposing || e.keyCode === 229 || e.target !== y.value)) {
200
+ function He(e) {
201
+ var l, s;
202
+ if (!(e.isComposing || e.keyCode === 229 || e.target !== p.value)) {
200
203
  if (["ArrowDown", "ArrowUp", "Enter", " "].includes(e.key))
201
- e.preventDefault(), c.value ? o.searchable ? (l = P.value) == null || l.focus() : (d = b.value) == null || d.focus() : m();
204
+ e.preventDefault(), c.value ? t.searchable ? (l = U.value) == null || l.focus() : (s = b.value) == null || s.focus() : y();
202
205
  else if (e.key === "Escape" && c.value)
203
- e.preventDefault(), p(!0);
206
+ e.preventDefault(), f(!0);
204
207
  else if (e.key === "Backspace" && R.value && !X.value) {
205
- const t = [...w.value].reverse().find((h) => !h.disabled);
206
- t && (e.preventDefault(), s.removeTag(t.value));
208
+ const r = [...w.value].reverse().find((m) => !m.disabled);
209
+ r && (e.preventDefault(), o.removeTag(r.value));
207
210
  }
208
211
  }
209
212
  }
210
213
  function re(e) {
211
- K || (K = !0, T("focus", e)), e.target === y.value && o.showOnFocus && !j.restoringFocus.value && m(!1);
214
+ K || (K = !0, C("focus", e)), e.target === p.value && t.showOnFocus && !A.restoringFocus.value && y(!1);
212
215
  }
213
216
  async function ne(e) {
214
- var d, t;
217
+ var s, r;
215
218
  if (await I(), !k) return;
216
219
  const l = e.relatedTarget instanceof Node ? e.relatedTarget : document.activeElement;
217
- (d = y.value) != null && d.contains(l) || (t = H.value) != null && t.contains(l) || K && (K = !1, T("blur", e), o.validateEvent && g.validate("blur"));
220
+ (s = p.value) != null && s.contains(l) || (r = M.value) != null && r.contains(l) || K && (K = !1, C("blur", e), t.validateEvent && g.validate("blur"));
218
221
  }
219
- async function He(e) {
222
+ async function Me(e) {
220
223
  var l;
221
- await m(!1) && await ((l = b.value) == null ? void 0 : l.scrollTo(e));
224
+ await y(!1) && await ((l = b.value) == null ? void 0 : l.scrollTo(e));
222
225
  }
223
- O(
224
- () => o.open,
226
+ D(
227
+ () => t.open,
225
228
  (e) => {
226
229
  if (k)
227
- if (e) m(!1, !0);
230
+ if (e) y(!1, !0);
228
231
  else {
229
- const l = U;
230
- U = !1, p(l, !0);
232
+ const l = j;
233
+ j = !1, f(l, !0);
231
234
  }
232
235
  }
233
- ), O(c, (e) => {
234
- e || N++, T("visible-change", e), !e && !o.retainSearch && s.filter("");
235
- }), O(
236
- [() => o.readonly, n.disabled],
236
+ ), D(c, (e) => {
237
+ e || N++, C("visible-change", e), !e && !t.retainSearch && o.filter("");
238
+ }), D(
239
+ [() => t.readonly, u.disabled],
237
240
  ([e, l]) => {
238
- (e || l) && (p(!1, !0), o.open && T("update:open", !1));
241
+ (e || l) && (f(!1, !0), t.open && C("update:open", !1));
239
242
  },
240
243
  { flush: "sync" }
241
- ), O(
244
+ ), D(
242
245
  [
243
246
  te,
244
247
  w,
245
- () => o.popupWidth,
246
- () => o.popupMatchWidth,
247
- () => n.size.value
248
+ () => t.popupWidth,
249
+ () => t.popupMatchWidth,
250
+ () => u.size.value
248
251
  ],
249
252
  () => {
250
- I().then(() => j.update());
253
+ I().then(() => A.update());
251
254
  }
252
- ), Ie(() => {
253
- ie(), (o.open ?? o.defaultOpen) && m(!1, !0);
254
- }), De(ie), We(() => {
255
- k = !0, o.open && m(!1, !0);
255
+ ), De(() => {
256
+ ie(), (t.open ?? t.defaultOpen) && y(!1, !0);
257
+ }), Ie(ie), Pe(() => {
258
+ k = !0, t.open && y(!1, !0);
256
259
  });
257
- function de() {
258
- k = !1, K = !1, N++, p(!1, !0);
260
+ function ue() {
261
+ k = !1, K = !1, N++, f(!1, !0);
259
262
  }
260
- return qe(de), Pe(de), be({
261
- element: y,
263
+ return We(ue), qe(ue), be({
264
+ element: p,
262
265
  open: c,
263
266
  focus: () => {
264
267
  var e;
265
- n.disabled.value || (e = y.value) == null || e.focus();
268
+ u.disabled.value || (e = p.value) == null || e.focus();
266
269
  },
267
270
  blur: () => {
268
- var e, l, d;
269
- p(), ((e = y.value) != null && e.contains(document.activeElement) || (l = H.value) != null && l.contains(document.activeElement)) && ((d = document.activeElement) == null || d.blur());
271
+ var e, l, s;
272
+ f(), ((e = p.value) != null && e.contains(document.activeElement) || (l = M.value) != null && l.contains(document.activeElement)) && ((s = document.activeElement) == null || s.blur());
270
273
  },
271
- show: () => m(),
272
- hide: (e = !1) => p(e),
274
+ show: () => y(),
275
+ hide: (e = !1) => f(e),
273
276
  clear: G,
274
- removeTag: s.removeTag,
275
- setValue: s.setValue,
276
- filter: s.filter,
277
- getSelectedKeys: () => [...s.values.value],
277
+ removeTag: o.removeTag,
278
+ setValue: o.setValue,
279
+ filter: o.filter,
280
+ getSelectedKeys: () => [...o.values.value],
278
281
  getSelectedItems: () => [...w.value],
279
- getCheckedKeys: s.tree.getCheckedKeys,
280
- getHalfCheckedKeys: s.tree.getHalfCheckedKeys,
282
+ getCheckedKeys: o.tree.getCheckedKeys,
283
+ getHalfCheckedKeys: o.tree.getHalfCheckedKeys,
281
284
  getNode: (e) => {
282
- const l = s.tree.getNode(e);
283
- return l ? s.rawNode(l) : void 0;
285
+ const l = o.tree.getNode(e);
286
+ return l ? o.rawNode(l) : void 0;
284
287
  },
285
- getExpandedKeys: () => [...s.tree.expanded.value],
286
- setExpandedKeys: s.tree.setExpandedKeys,
287
- expandNode: s.tree.expandNode,
288
- reloadNode: s.tree.reloadNode,
289
- scrollTo: He
290
- }), (e, l) => {
291
- var d;
292
- return r(), u("div", Q(a(ee), {
293
- class: ["hys-ui-tree-select-wrap", [e.$attrs.class, "hys-ui-tree-select-" + a(n).size.value]],
294
- style: [e.$attrs.style, Se.value]
288
+ getExpandedKeys: () => [...o.tree.expanded.value],
289
+ setExpandedKeys: o.tree.setExpandedKeys,
290
+ expandNode: o.tree.expandNode,
291
+ reloadNode: o.tree.reloadNode,
292
+ scrollTo: Me
293
+ }), (e, l) => (n(), d("div", Q(a(ee), {
294
+ class: ["hys-ui-tree-select-wrap", [e.$attrs.class, "hys-ui-tree-select-" + a(u).size.value]],
295
+ style: [e.$attrs.style, Se.value]
296
+ }), [
297
+ $("button", {
298
+ hidden: "",
299
+ type: "button",
300
+ tabindex: "-1",
301
+ "aria-hidden": "true",
302
+ disabled: a(u).disabled.value,
303
+ onClick: l[0] || (l[0] = Z((s) => {
304
+ var r;
305
+ (r = p.value) == null || r.focus(), y();
306
+ }, ["prevent"]))
307
+ }, null, 8, sa),
308
+ $("div", Q({
309
+ ref_key: "trigger",
310
+ ref: p
311
+ }, Ke(), {
312
+ id: e.$attrs.id || a(g).id.value || a(V),
313
+ "data-hys-ui-field-managed": "",
314
+ role: "combobox",
315
+ "aria-haspopup": "tree",
316
+ "aria-expanded": a(c),
317
+ "aria-controls": a(c) ? a(V) + "-tree" : void 0,
318
+ "aria-label": i.ariaLabel || a(g).label.value || ae.value || i.placeholder || "选择节点",
319
+ "aria-disabled": a(u).disabled.value || void 0,
320
+ "aria-readonly": i.readonly || void 0,
321
+ "aria-invalid": i.status === "error" || a(g).invalid.value || void 0,
322
+ "aria-describedby": a(g).describedBy.value,
323
+ "aria-required": a(g).required.value || void 0,
324
+ "aria-busy": i.loading || a(Y) || void 0,
325
+ tabindex: a(u).disabled.value ? -1 : 0,
326
+ class: ["hys-ui-tree-select-control", {
327
+ "hys-ui-tree-select-control-disabled": a(u).disabled.value,
328
+ "hys-ui-tree-select-control-error": i.status === "error" || a(g).invalid.value,
329
+ "hys-ui-tree-select-control-warning": i.status === "warning",
330
+ "hys-ui-tree-select-control-success": i.status === "success"
331
+ }],
332
+ onClick: Ne,
333
+ onKeydown: He,
334
+ onFocusin: re,
335
+ onFocusout: ne
295
336
  }), [
296
- S("button", {
297
- hidden: "",
298
- type: "button",
299
- tabindex: "-1",
300
- "aria-hidden": "true",
301
- disabled: a(n).disabled.value,
302
- onClick: l[0] || (l[0] = Z((t) => {
303
- var h;
304
- (h = y.value) == null || h.focus(), m();
305
- }, ["prevent"]))
306
- }, null, 8, oa),
307
- S("div", Q({
308
- ref_key: "trigger",
309
- ref: y
310
- }, Ke(), {
311
- id: e.$attrs.id || a(g).id.value || a(M),
312
- "data-hys-ui-field-managed": "",
313
- role: "combobox",
314
- "aria-haspopup": "tree",
315
- "aria-expanded": a(c),
316
- "aria-controls": a(c) ? a(M) + "-tree" : void 0,
317
- "aria-label": i.ariaLabel || a(g).label.value || ae.value || i.placeholder || "选择节点",
318
- "aria-disabled": a(n).disabled.value || void 0,
319
- "aria-readonly": i.readonly || void 0,
320
- "aria-invalid": i.status === "error" || a(g).invalid.value || void 0,
321
- "aria-describedby": a(g).describedBy.value,
322
- "aria-required": a(g).required.value || void 0,
323
- "aria-busy": i.loading || a(Y) || void 0,
324
- tabindex: a(n).disabled.value ? -1 : 0,
325
- class: ["hys-ui-tree-select-control", {
326
- "hys-ui-tree-select-control-disabled": a(n).disabled.value,
327
- "hys-ui-tree-select-control-error": i.status === "error" || a(g).invalid.value,
328
- "hys-ui-tree-select-control-warning": i.status === "warning",
329
- "hys-ui-tree-select-control-success": i.status === "success"
330
- }],
331
- onClick: Ne,
332
- onKeydown: Ve,
333
- onFocusin: re,
334
- onFocusout: ne
335
- }), [
336
- e.$slots.prefix ? (r(), u("span", ia, [
337
- v(e.$slots, "prefix", {}, void 0, !0)
338
- ])) : f("", !0),
339
- a(w).length ? a(R) ? (r(), u("div", na, [
340
- (r(!0), u(_, null, fe(ze.value, (t) => v(e.$slots, "tag", {
341
- item: t,
342
- remove: () => a(s).removeTag(t.value)
343
- }, () => [
344
- S("span", {
345
- class: ye(["hys-ui-tree-select-tag", { "hys-ui-tree-select-tag-disabled": t.disabled }])
346
- }, [
347
- S("span", da, [
348
- se(t) !== void 0 ? (r(), u(_, { key: 0 }, [
349
- D(z(se(t)), 1)
350
- ], 64)) : (r(), E(pe(() => t.label), { key: 1 }))
351
- ]),
352
- i.removable ? (r(), u("button", {
353
- key: 0,
354
- type: "button",
355
- class: "hys-ui-tree-select-tag-remove",
356
- disabled: a(X) || t.disabled,
357
- "aria-label": "移除 " + A(t),
358
- onClick: Z((h) => a(s).removeTag(t.value), ["stop"])
359
- }, [
360
- C(a(me), {
361
- size: 12,
362
- "aria-hidden": "true"
363
- })
364
- ], 8, ua)) : f("", !0)
365
- ], 2)
366
- ], !0, typeof t.value + ":" + t.value)), 128)),
367
- x.value.length ? (r(), E(Je, {
368
- key: 0,
369
- text: x.value.slice(0, 20).map(A).join("、") + (x.value.length > 20 ? " 等 " + x.value.length + " 项" : "")
370
- }, {
371
- default: $(() => [
372
- S("span", {
373
- class: "hys-ui-tree-select-tag hys-ui-tree-select-more",
374
- "aria-label": "另外 " + x.value.length + " 项"
375
- }, [
376
- v(e.$slots, "max-tag-placeholder", {
377
- items: x.value,
378
- count: x.value.length
379
- }, () => [
380
- D("+" + z(x.value.length), 1)
381
- ], !0)
382
- ], 8, ca)
383
- ]),
384
- _: 3
385
- }, 8, ["text"])) : f("", !0)
386
- ])) : (r(), u("span", ha, [
387
- (r(), E(pe(() => a(w)[0].label)))
388
- ])) : (r(), u("span", ra, z(i.placeholder || "选择节点"), 1)),
389
- S("span", va, [
390
- i.loading || a(Y) ? (r(), E(a(ge), {
391
- key: 0,
392
- size: 15,
393
- class: "hys-ui-icon-spin",
394
- "aria-hidden": "true"
395
- })) : f("", !0),
396
- Ee.value ? (r(), u("button", {
397
- key: 1,
398
- type: "button",
399
- class: "hys-ui-tree-select-clear",
400
- "aria-label": "清空选择",
401
- onClick: Z(G, ["stop"])
337
+ e.$slots.prefix ? (n(), d("span", ra, [
338
+ h(e.$slots, "prefix", {}, void 0, !0)
339
+ ])) : v("", !0),
340
+ a(w).length ? a(R) ? (n(), d("div", ua, [
341
+ (n(!0), d(_, null, pe(ze.value, (s) => h(e.$slots, "tag", {
342
+ item: s,
343
+ remove: () => a(o).removeTag(s.value)
344
+ }, () => [
345
+ $("span", {
346
+ class: fe(["hys-ui-tree-select-tag", { "hys-ui-tree-select-tag-disabled": s.disabled }])
402
347
  }, [
403
- C(a(me), {
404
- size: 14,
405
- "aria-hidden": "true"
406
- })
407
- ])) : f("", !0),
408
- v(e.$slots, "suffix", {}, () => [
409
- C(a(Re), {
410
- size: 16,
411
- class: ye(["hys-ui-tree-select-chevron", { "hys-ui-tree-select-chevron-open": a(c) }]),
412
- "aria-hidden": "true"
413
- }, null, 8, ["class"])
414
- ], !0)
415
- ])
416
- ], 16, sa),
417
- i.name ? (r(!0), u(_, { key: 0 }, fe(a(s).values.value, (t) => (r(), u("input", {
418
- key: typeof t + ":" + t,
419
- type: "hidden",
420
- name: i.name,
421
- value: t,
422
- disabled: a(n).disabled.value
423
- }, null, 8, fa))), 128)) : f("", !0),
424
- (r(), E(Ue, {
425
- to: i.appendTo === !1 ? "body" : i.appendTo,
426
- disabled: i.appendTo === !1
427
- }, [
428
- a(c) ? (r(), u("div", Q({
429
- key: 0,
430
- ref_key: "panel",
431
- ref: H
432
- }, a(ee), {
433
- class: ["hys-ui-tree-select-menu hys-ui-pf-tree-select-menu", [i.popupClass, "hys-ui-tree-select-" + a(n).size.value]],
434
- style: Ce.value,
435
- onFocusin: re,
436
- onFocusout: ne
437
- }), [
438
- e.$slots.header ? (r(), u("header", ya, [
439
- v(e.$slots, "header", {}, void 0, !0)
440
- ])) : f("", !0),
441
- i.searchable ? (r(), E(Ye, {
442
- key: 1,
443
- ref_key: "search",
444
- ref: P,
445
- class: "hys-ui-tree-select-search",
446
- "model-value": a(te),
447
- placeholder: a(L).search,
448
- "aria-label": a(L).search,
449
- "aria-controls": a(M) + "-tree",
450
- "aria-activedescendant": (d = b.value) == null ? void 0 : d.activeId,
451
- disabled: a(n).disabled.value || i.readonly || i.loading,
452
- size: a(n).size.value,
453
- clearable: "",
454
- "onUpdate:modelValue": a(s).filter,
455
- onKeydown: l[1] || (l[1] = (t) => {
456
- var h;
457
- return (h = b.value) == null ? void 0 : h.searchKeys(t);
458
- })
459
- }, {
460
- prefix: $(() => [
461
- C(a(Xe), {
462
- size: 14,
463
- "aria-hidden": "true"
464
- })
348
+ $("span", da, [
349
+ se(s) !== void 0 ? (n(), d(_, { key: 0 }, [
350
+ P(z(se(s)), 1)
351
+ ], 64)) : (n(), E(ye(() => s.label), { key: 1 }))
465
352
  ]),
466
- _: 1
467
- }, 8, ["model-value", "placeholder", "aria-label", "aria-controls", "aria-activedescendant", "disabled", "size", "onUpdate:modelValue"])) : f("", !0),
468
- i.loading || a(Y) ? (r(), u("div", pa, [
469
- v(e.$slots, "loading", {}, () => [
470
- C(a(ge), {
471
- size: 16,
472
- class: "hys-ui-icon-spin",
353
+ i.removable ? (n(), d("button", {
354
+ key: 0,
355
+ type: "button",
356
+ class: "hys-ui-tree-select-tag-remove",
357
+ disabled: a(X) || s.disabled,
358
+ "aria-label": "移除 " + F(s),
359
+ onClick: Z((r) => a(o).removeTag(s.value), ["stop"])
360
+ }, [
361
+ B(a(me), {
362
+ size: 12,
473
363
  "aria-hidden": "true"
474
- }),
475
- D(z(a(L).loading), 1)
476
- ], !0)
477
- ])) : f("", !0),
478
- a(le) ? (r(), u("div", ma, [
479
- v(e.$slots, "error", {
480
- error: a(le),
481
- retry: a(s).retrySearch
482
- }, () => [
483
- S("span", null, z(a(L).loadError), 1),
484
- C(Ge, {
485
- size: "sm",
486
- variant: "ghost",
487
- onClick: l[2] || (l[2] = (t) => a(s).retrySearch())
364
+ })
365
+ ], 8, ca)) : v("", !0)
366
+ ], 2)
367
+ ], !0, typeof s.value + ":" + s.value)), 128)),
368
+ x.value.length ? (n(), E(Qe, {
369
+ key: 0,
370
+ text: x.value.slice(0, 20).map(F).join("、") + (x.value.length > 20 ? " 等 " + x.value.length + " 项" : "")
371
+ }, {
372
+ default: S(() => [
373
+ $("span", {
374
+ class: "hys-ui-tree-select-tag hys-ui-tree-select-more",
375
+ "aria-label": "另外 " + x.value.length + " 项"
376
+ }, [
377
+ h(e.$slots, "max-tag-placeholder", {
378
+ items: x.value,
379
+ count: x.value.length
380
+ }, () => [
381
+ P("+" + z(x.value.length), 1)
382
+ ], !0)
383
+ ], 8, ha)
384
+ ]),
385
+ _: 3
386
+ }, 8, ["text"])) : v("", !0)
387
+ ])) : (n(), d("span", va, [
388
+ (n(), E(ye(() => a(w)[0].label)))
389
+ ])) : (n(), d("span", na, z(i.placeholder || "选择节点"), 1)),
390
+ $("span", pa, [
391
+ i.loading || a(Y) ? (n(), E(a(ge), {
392
+ key: 0,
393
+ size: 15,
394
+ class: "hys-ui-icon-spin",
395
+ "aria-hidden": "true"
396
+ })) : v("", !0),
397
+ Ee.value ? (n(), d("button", {
398
+ key: 1,
399
+ type: "button",
400
+ class: "hys-ui-tree-select-clear",
401
+ "aria-label": "清空选择",
402
+ onClick: Z(G, ["stop"])
403
+ }, [
404
+ B(a(me), {
405
+ size: 14,
406
+ "aria-hidden": "true"
407
+ })
408
+ ])) : v("", !0),
409
+ h(e.$slots, "suffix", {}, () => [
410
+ B(a(Xe), {
411
+ size: 16,
412
+ class: fe(["hys-ui-tree-select-chevron", { "hys-ui-tree-select-chevron-open": a(c) }]),
413
+ "aria-hidden": "true"
414
+ }, null, 8, ["class"])
415
+ ], !0)
416
+ ])
417
+ ], 16, ia),
418
+ i.name ? (n(!0), d(_, { key: 0 }, pe(a(o).values.value, (s) => (n(), d("input", {
419
+ key: typeof s + ":" + s,
420
+ type: "hidden",
421
+ name: i.name,
422
+ value: s,
423
+ disabled: a(u).disabled.value
424
+ }, null, 8, fa))), 128)) : v("", !0),
425
+ (n(), E(Ue, {
426
+ to: i.appendTo === !1 ? "body" : i.appendTo,
427
+ disabled: i.appendTo === !1
428
+ }, [
429
+ B(a(Re), {
430
+ "popup-transition": t.popupTransition,
431
+ "popup-transition-duration": t.popupTransitionDuration,
432
+ placement: a(A).placement.value
433
+ }, {
434
+ default: S(() => {
435
+ var s;
436
+ return [
437
+ a(c) ? (n(), d("div", Q({
438
+ key: 0,
439
+ ref_key: "panel",
440
+ ref: M
441
+ }, a(ee), {
442
+ class: ["hys-ui-tree-select-menu hys-ui-pf-tree-select-menu", [i.popupClass, "hys-ui-tree-select-" + a(u).size.value]],
443
+ style: Ce.value,
444
+ onFocusin: re,
445
+ onFocusout: ne
446
+ }), [
447
+ e.$slots.header ? (n(), d("header", ya, [
448
+ h(e.$slots, "header", {}, void 0, !0)
449
+ ])) : v("", !0),
450
+ i.searchable ? (n(), E(Ge, {
451
+ key: 1,
452
+ ref_key: "search",
453
+ ref: U,
454
+ class: "hys-ui-tree-select-search",
455
+ "model-value": a(te),
456
+ placeholder: a(L).search,
457
+ "aria-label": a(L).search,
458
+ "aria-controls": a(V) + "-tree",
459
+ "aria-activedescendant": (s = b.value) == null ? void 0 : s.activeId,
460
+ disabled: a(u).disabled.value || i.readonly || i.loading,
461
+ size: a(u).size.value,
462
+ clearable: "",
463
+ "onUpdate:modelValue": a(o).filter,
464
+ onKeydown: l[1] || (l[1] = (r) => {
465
+ var m;
466
+ return (m = b.value) == null ? void 0 : m.searchKeys(r);
467
+ })
488
468
  }, {
489
- default: $(() => [
490
- D(z(a(L).retry), 1)
469
+ prefix: S(() => [
470
+ B(a(Ye), {
471
+ size: 14,
472
+ "aria-hidden": "true"
473
+ })
491
474
  ]),
492
475
  _: 1
493
- })
494
- ], !0)
495
- ])) : f("", !0),
496
- C(Qe, {
497
- ref_key: "view",
498
- ref: b,
499
- store: a(s),
500
- size: a(n).size.value,
501
- "tree-id": a(M) + "-tree",
502
- checkable: i.checkable,
503
- "check-strictly": i.checkStrictly,
504
- "leaf-only": i.leafOnly,
505
- "expand-on-click-node": i.expandOnClickNode,
506
- "show-line": i.showLine,
507
- "show-icon": i.showIcon,
508
- indent: i.indent,
509
- "list-height": i.listHeight,
510
- virtual: i.virtual,
511
- "item-height": $e.value,
512
- overscan: i.overscan,
513
- onChoose: Le,
514
- onScroll: l[3] || (l[3] = (t) => T("scroll", t))
515
- }, je({ _: 2 }, [
516
- e.$slots.option ? {
517
- name: "option",
518
- fn: $((t) => [
519
- v(e.$slots, "option", W(q(t)), void 0, !0)
520
- ]),
521
- key: "0"
522
- } : void 0,
523
- e.$slots.icon ? {
524
- name: "icon",
525
- fn: $((t) => [
526
- v(e.$slots, "icon", W(q(t)), void 0, !0)
527
- ]),
528
- key: "1"
529
- } : void 0,
530
- e.$slots.switcher ? {
531
- name: "switcher",
532
- fn: $((t) => [
533
- v(e.$slots, "switcher", W(q(t)), void 0, !0)
534
- ]),
535
- key: "2"
536
- } : void 0,
537
- e.$slots.empty ? {
538
- name: "empty",
539
- fn: $((t) => [
540
- v(e.$slots, "empty", W(q(t)), void 0, !0)
541
- ]),
542
- key: "3"
543
- } : void 0
544
- ]), 1032, ["store", "size", "tree-id", "checkable", "check-strictly", "leaf-only", "expand-on-click-node", "show-line", "show-icon", "indent", "list-height", "virtual", "item-height", "overscan"]),
545
- e.$slots.footer ? (r(), u("footer", ga, [
546
- v(e.$slots, "footer", {
547
- items: a(w),
548
- clear: G,
549
- close: () => a(p)(!0)
550
- }, void 0, !0)
551
- ])) : f("", !0)
552
- ], 16)) : f("", !0)
553
- ], 8, ["to", "disabled"]))
554
- ], 16);
555
- };
476
+ }, 8, ["model-value", "placeholder", "aria-label", "aria-controls", "aria-activedescendant", "disabled", "size", "onUpdate:modelValue"])) : v("", !0),
477
+ i.loading || a(Y) ? (n(), d("div", ma, [
478
+ h(e.$slots, "loading", {}, () => [
479
+ B(a(ge), {
480
+ size: 16,
481
+ class: "hys-ui-icon-spin",
482
+ "aria-hidden": "true"
483
+ }),
484
+ P(z(a(L).loading), 1)
485
+ ], !0)
486
+ ])) : v("", !0),
487
+ a(le) ? (n(), d("div", ga, [
488
+ h(e.$slots, "error", {
489
+ error: a(le),
490
+ retry: a(o).retrySearch
491
+ }, () => [
492
+ $("span", null, z(a(L).loadError), 1),
493
+ B(Je, {
494
+ size: "sm",
495
+ variant: "ghost",
496
+ onClick: l[2] || (l[2] = (r) => a(o).retrySearch())
497
+ }, {
498
+ default: S(() => [
499
+ P(z(a(L).retry), 1)
500
+ ]),
501
+ _: 1
502
+ })
503
+ ], !0)
504
+ ])) : v("", !0),
505
+ B(Ze, {
506
+ ref_key: "view",
507
+ ref: b,
508
+ store: a(o),
509
+ size: a(u).size.value,
510
+ "tree-id": a(V) + "-tree",
511
+ checkable: i.checkable,
512
+ "check-strictly": i.checkStrictly,
513
+ "leaf-only": i.leafOnly,
514
+ "expand-on-click-node": i.expandOnClickNode,
515
+ "show-line": i.showLine,
516
+ "show-icon": i.showIcon,
517
+ indent: i.indent,
518
+ "list-height": i.listHeight,
519
+ virtual: i.virtual,
520
+ "item-height": $e.value,
521
+ overscan: i.overscan,
522
+ onChoose: Le,
523
+ onScroll: l[3] || (l[3] = (r) => C("scroll", r))
524
+ }, je({ _: 2 }, [
525
+ e.$slots.option ? {
526
+ name: "option",
527
+ fn: S((r) => [
528
+ h(e.$slots, "option", W(q(r)), void 0, !0)
529
+ ]),
530
+ key: "0"
531
+ } : void 0,
532
+ e.$slots.icon ? {
533
+ name: "icon",
534
+ fn: S((r) => [
535
+ h(e.$slots, "icon", W(q(r)), void 0, !0)
536
+ ]),
537
+ key: "1"
538
+ } : void 0,
539
+ e.$slots.switcher ? {
540
+ name: "switcher",
541
+ fn: S((r) => [
542
+ h(e.$slots, "switcher", W(q(r)), void 0, !0)
543
+ ]),
544
+ key: "2"
545
+ } : void 0,
546
+ e.$slots.empty ? {
547
+ name: "empty",
548
+ fn: S((r) => [
549
+ h(e.$slots, "empty", W(q(r)), void 0, !0)
550
+ ]),
551
+ key: "3"
552
+ } : void 0
553
+ ]), 1032, ["store", "size", "tree-id", "checkable", "check-strictly", "leaf-only", "expand-on-click-node", "show-line", "show-icon", "indent", "list-height", "virtual", "item-height", "overscan"]),
554
+ e.$slots.footer ? (n(), d("footer", ba, [
555
+ h(e.$slots, "footer", {
556
+ items: a(w),
557
+ clear: G,
558
+ close: () => a(f)(!0)
559
+ }, void 0, !0)
560
+ ])) : v("", !0)
561
+ ], 16)) : v("", !0)
562
+ ];
563
+ }),
564
+ _: 3
565
+ }, 8, ["popup-transition", "popup-transition-duration", "placement"])
566
+ ], 8, ["to", "disabled"]))
567
+ ], 16));
556
568
  }
557
569
  });
558
570
  export {
559
- Ka as default
571
+ La as default
560
572
  };