hys-ui 0.1.1 → 0.2.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 (225) hide show
  1. package/CHANGELOG.md +111 -0
  2. package/README.md +3 -1
  3. package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
  4. package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
  5. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
  6. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -0
  7. package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
  8. package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
  9. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
  10. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +252 -0
  11. package/dist/components/HysBadge/HysBadge.vue.js +2 -2
  12. package/dist/components/HysBadge/HysBadge2.vue.js +154 -27
  13. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
  14. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -2
  15. package/dist/components/HysButton/HysButton.vue.js +2 -2
  16. package/dist/components/HysButton/HysButton2.vue.js +29 -28
  17. package/dist/components/HysCalendar/HysCalendar.vue.js +5 -92
  18. package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
  19. package/dist/components/HysCard/HysCard.vue.js +2 -2
  20. package/dist/components/HysCard/HysCard2.vue.js +175 -42
  21. package/dist/components/HysCascader/HysCascader.vue.js +5 -194
  22. package/dist/components/HysCascader/HysCascader2.vue.js +760 -2
  23. package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
  24. package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
  25. package/dist/components/HysCheckbox/HysCheckbox.vue.js +3 -3
  26. package/dist/components/HysCheckbox/HysCheckbox2.vue.js +180 -65
  27. package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
  28. package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
  29. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  30. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
  31. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  32. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +399 -392
  33. package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
  34. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
  35. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -0
  36. package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
  37. package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
  38. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +268 -158
  39. package/dist/components/HysDivider/HysDivider.vue.js +2 -2
  40. package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
  41. package/dist/components/HysFileManager/HysFileManager.vue.js +3 -3
  42. package/dist/components/HysFileManager/HysFileManager2.vue.js +43 -42
  43. package/dist/components/HysForm/HysForm.vue.js +3 -3
  44. package/dist/components/HysForm/HysForm2.vue.js +578 -92
  45. package/dist/components/HysFormItem/HysFormItem.vue.js +5 -85
  46. package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
  47. package/dist/components/HysGantt/HysGantt.vue.js +1 -1
  48. package/dist/components/HysGantt/HysGantt2.vue.js +1369 -272
  49. package/dist/components/HysInput/HysInput.vue.js +2 -2
  50. package/dist/components/HysInput/HysInput2.vue.js +467 -120
  51. package/dist/components/HysMention/HysMention.vue.js +2 -2
  52. package/dist/components/HysMention/HysMention2.vue.js +89 -88
  53. package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
  54. package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -79
  55. package/dist/components/HysOrgTree/HysOrgTree.vue.js +29 -26
  56. package/dist/components/HysPagination/HysPagination.vue.js +1 -1
  57. package/dist/components/HysPagination/HysPagination2.vue.js +2 -0
  58. package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +2 -2
  59. package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +52 -51
  60. package/dist/components/HysRadio/HysRadio.vue.js +7 -0
  61. package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
  62. package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +2 -2
  63. package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +190 -65
  64. package/dist/components/HysRating/HysRating.vue.js +1 -1
  65. package/dist/components/HysRating/HysRating2.vue.js +288 -68
  66. package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +1 -1
  67. package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +70 -69
  68. package/dist/components/HysSearch/HysSearch.vue.js +37 -36
  69. package/dist/components/HysSegmented/HysSegmented.vue.js +5 -63
  70. package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
  71. package/dist/components/HysSelect/HysSelect.vue.js +3 -2
  72. package/dist/components/HysSelect/HysSelect2.vue.js +859 -185
  73. package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
  74. package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
  75. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  76. package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
  77. package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
  78. package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
  79. package/dist/components/HysSteps/HysSteps.vue.js +1 -1
  80. package/dist/components/HysSteps/HysSteps2.vue.js +110 -36
  81. package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
  82. package/dist/components/HysSwitch/HysSwitch2.vue.js +232 -50
  83. package/dist/components/HysTable/HysTable.vue.js +2 -2
  84. package/dist/components/HysTable/HysTable2.vue.js +1473 -88
  85. package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
  86. package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
  87. package/dist/components/HysTabs/HysTabs.vue.js +2 -2
  88. package/dist/components/HysTabs/HysTabs2.vue.js +262 -68
  89. package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
  90. package/dist/components/HysTextarea/HysTextarea.vue.js +138 -77
  91. package/dist/components/HysTransfer/HysTransfer.vue.js +5 -223
  92. package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
  93. package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
  94. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
  95. package/dist/components/HysTree/HysTree.vue.js +2 -3
  96. package/dist/components/HysTree/HysTree2.vue.js +641 -302
  97. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -136
  98. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -2
  99. package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
  100. package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
  101. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  102. package/dist/components/HysUpload/HysUpload2.vue.js +77 -76
  103. package/dist/composables/autocomplete.js +50 -0
  104. package/dist/composables/avatar.js +57 -0
  105. package/dist/composables/calendar.js +96 -0
  106. package/dist/composables/cascader.js +79 -0
  107. package/dist/composables/choice.js +38 -0
  108. package/dist/composables/choiceModel.js +67 -0
  109. package/dist/composables/datePicker.js +227 -0
  110. package/dist/composables/formContext.js +92 -7
  111. package/dist/composables/formLayout.js +57 -0
  112. package/dist/composables/formValidation.js +240 -0
  113. package/dist/composables/ganttConflicts.js +143 -0
  114. package/dist/composables/numberInput.js +91 -0
  115. package/dist/composables/rating.js +16 -0
  116. package/dist/composables/selectOptions.js +54 -0
  117. package/dist/composables/table.js +150 -0
  118. package/dist/composables/textInput.js +34 -0
  119. package/dist/composables/transfer.js +63 -0
  120. package/dist/composables/tree.js +118 -0
  121. package/dist/composables/treeSelect.js +71 -0
  122. package/dist/composables/useCascader.js +438 -0
  123. package/dist/composables/useDatePicker.js +425 -0
  124. package/dist/composables/useFloating.js +97 -51
  125. package/dist/composables/useGanttDependencies.js +306 -0
  126. package/dist/composables/useGanttHistory.js +157 -0
  127. package/dist/composables/useGanttLabelResize.js +100 -0
  128. package/dist/composables/useTable.js +474 -0
  129. package/dist/composables/useTextareaSize.js +72 -0
  130. package/dist/composables/useTransfer.js +257 -0
  131. package/dist/composables/useTree.js +439 -0
  132. package/dist/composables/useTreeSelect.js +361 -0
  133. package/dist/index.js +149 -139
  134. package/dist/style.css +1 -1
  135. package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
  136. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
  137. package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
  138. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +99 -0
  139. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
  140. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
  141. package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
  142. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -31
  143. package/dist/types/components/HysCard/HysCard.vue.d.ts +55 -7
  144. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
  145. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
  146. package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +50 -39
  147. package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
  148. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
  149. package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
  150. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
  151. package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
  152. package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
  153. package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
  154. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +2 -2
  155. package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
  156. package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
  157. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +82 -4
  158. package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
  159. package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
  160. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -35
  161. package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +1 -0
  162. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
  163. package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +2 -2
  164. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
  165. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
  166. package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
  167. package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +34 -12
  168. package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
  169. package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
  170. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
  171. package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
  172. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +120 -20
  173. package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
  174. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
  175. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
  176. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +1 -1
  177. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +64 -9
  178. package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
  179. package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
  180. package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
  181. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
  182. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +5 -5
  183. package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
  184. package/dist/types/components/HysToast/HysToast.vue.d.ts +3 -3
  185. package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -2
  186. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -40
  187. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -0
  188. package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
  189. package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
  190. package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
  191. package/dist/types/composables/autocomplete.d.ts +106 -0
  192. package/dist/types/composables/avatar.d.ts +70 -0
  193. package/dist/types/composables/calendar.d.ts +66 -0
  194. package/dist/types/composables/cascader.d.ts +192 -0
  195. package/dist/types/composables/choice.d.ts +110 -0
  196. package/dist/types/composables/choiceModel.d.ts +11 -0
  197. package/dist/types/composables/datePicker.d.ts +247 -0
  198. package/dist/types/composables/formContext.d.ts +133 -8
  199. package/dist/types/composables/formLayout.d.ts +11 -0
  200. package/dist/types/composables/formValidation.d.ts +13 -0
  201. package/dist/types/composables/gantt.d.ts +68 -0
  202. package/dist/types/composables/ganttConflicts.d.ts +30 -0
  203. package/dist/types/composables/numberInput.d.ts +45 -0
  204. package/dist/types/composables/rating.d.ts +18 -0
  205. package/dist/types/composables/segmented.d.ts +15 -0
  206. package/dist/types/composables/selectOptions.d.ts +44 -0
  207. package/dist/types/composables/slider.d.ts +21 -0
  208. package/dist/types/composables/table.d.ts +309 -0
  209. package/dist/types/composables/textInput.d.ts +76 -0
  210. package/dist/types/composables/transfer.d.ts +180 -0
  211. package/dist/types/composables/tree.d.ts +237 -0
  212. package/dist/types/composables/treeSelect.d.ts +167 -0
  213. package/dist/types/composables/useCascader.d.ts +162 -0
  214. package/dist/types/composables/useDatePicker.d.ts +79 -0
  215. package/dist/types/composables/useFloating.d.ts +8 -5
  216. package/dist/types/composables/useGanttDependencies.d.ts +83 -0
  217. package/dist/types/composables/useGanttHistory.d.ts +42 -0
  218. package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
  219. package/dist/types/composables/useTable.d.ts +60 -0
  220. package/dist/types/composables/useTextareaSize.d.ts +3 -0
  221. package/dist/types/composables/useTransfer.d.ts +58 -0
  222. package/dist/types/composables/useTree.d.ts +77 -0
  223. package/dist/types/composables/useTreeSelect.d.ts +117 -0
  224. package/dist/types/index.d.ts +33 -7
  225. package/package.json +2 -1
@@ -0,0 +1,7 @@
1
+ import o from "./HysTableFilterOptions2.vue.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-82145e83"]]);
5
+ export {
6
+ s as default
7
+ };
@@ -0,0 +1,133 @@
1
+ import { defineComponent as C, ref as T, computed as c, openBlock as d, createElementBlock as n, createBlock as v, withKeys as H, withModifiers as K, createCommentVNode as x, Fragment as V, renderList as O, withCtx as w, createTextVNode as p, toDisplayString as b } from "vue";
2
+ import z from "../HysInput/HysInput.vue.js";
3
+ import F from "../HysCheckbox/HysCheckbox.vue.js";
4
+ import M from "../HysRadio/HysRadio.vue.js";
5
+ import j from "../HysTree/HysTree.vue.js";
6
+ import { tableFilterOptions as S } from "../../composables/table.js";
7
+ const q = { class: "hys-ui-table-filter-choice" }, A = {
8
+ key: 2,
9
+ class: "hys-ui-table-filter-options"
10
+ }, N = {
11
+ key: 0,
12
+ role: "status"
13
+ }, J = /* @__PURE__ */ C({
14
+ __name: "HysTableFilterOptions",
15
+ props: {
16
+ options: {},
17
+ values: {},
18
+ multiple: { type: Boolean },
19
+ mode: {},
20
+ search: { type: [Boolean, Function] },
21
+ disabled: { type: Boolean },
22
+ searchLabel: {},
23
+ emptyText: {}
24
+ },
25
+ emits: ["update:values"],
26
+ setup(l, { emit: B }) {
27
+ const s = l, f = B, u = T(""), i = (a) => typeof a + ":" + String(a), o = c(() => S(s.options)), L = c(
28
+ () => new Map(o.value.map((a) => [i(a.value), a]))
29
+ ), y = (a) => !u.value.trim() || (typeof s.search == "function" ? s.search(u.value.trim(), a) : a.label.toLocaleLowerCase().includes(u.value.trim().toLocaleLowerCase())), h = c(() => o.value.filter(y)), U = c(() => {
30
+ var t;
31
+ const a = new Map(
32
+ o.value.map((e) => [
33
+ e,
34
+ {
35
+ id: i(e.value),
36
+ label: e.label,
37
+ disabled: e.disabled,
38
+ option: e
39
+ }
40
+ ])
41
+ );
42
+ for (const e of o.value)
43
+ a.get(e).children = (t = e.children) == null ? void 0 : t.map((r) => a.get(r)).filter(Boolean);
44
+ return s.options.map((e) => a.get(e)).filter(Boolean);
45
+ });
46
+ function k(a) {
47
+ f(
48
+ "update:values",
49
+ a.flatMap((t) => {
50
+ const e = L.value.get(String(t));
51
+ return e ? [e.value] : [];
52
+ })
53
+ );
54
+ }
55
+ function g(a, t) {
56
+ s.disabled || a.disabled || f(
57
+ "update:values",
58
+ s.multiple ? t ? [
59
+ ...s.values.filter((e) => !Object.is(e, a.value)),
60
+ a.value
61
+ ] : s.values.filter((e) => !Object.is(e, a.value)) : t ? [a.value] : []
62
+ );
63
+ }
64
+ return (a, t) => (d(), n("div", q, [
65
+ l.search ? (d(), v(z, {
66
+ key: 0,
67
+ modelValue: u.value,
68
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => u.value = e),
69
+ clearable: "",
70
+ size: "sm",
71
+ "aria-label": l.searchLabel,
72
+ placeholder: l.searchLabel,
73
+ disabled: l.disabled,
74
+ onKeydown: t[1] || (t[1] = H(K(() => {
75
+ }, ["prevent"]), ["enter"]))
76
+ }, null, 8, ["modelValue", "aria-label", "placeholder", "disabled"])) : x("", !0),
77
+ l.mode === "tree" ? (d(), v(j, {
78
+ key: 1,
79
+ searchable: !1,
80
+ nodes: U.value,
81
+ "checked-keys": l.values.map(i),
82
+ "model-value": l.multiple ? null : l.values.length ? i(l.values[0]) : null,
83
+ checkable: l.multiple,
84
+ selectable: !l.multiple,
85
+ "allow-deselect": !1,
86
+ "search-value": u.value,
87
+ "filter-node": (e, r) => y(r.option),
88
+ "check-on-click-node": l.multiple,
89
+ "inherit-disabled": !0,
90
+ disabled: l.disabled,
91
+ "default-expand-all": !0,
92
+ "empty-text": l.emptyText,
93
+ "validate-event": !1,
94
+ size: "sm",
95
+ "onUpdate:checkedKeys": k,
96
+ "onUpdate:modelValue": t[2] || (t[2] = (e) => !l.multiple && k(e === null ? [] : Array.isArray(e) ? e : [e]))
97
+ }, null, 8, ["nodes", "checked-keys", "model-value", "checkable", "selectable", "search-value", "filter-node", "check-on-click-node", "disabled", "empty-text"])) : (d(), n("div", A, [
98
+ (d(!0), n(V, null, O(h.value, (e, r) => (d(), n(V, {
99
+ key: i(e.value)
100
+ }, [
101
+ l.multiple ? (d(), v(F, {
102
+ key: 0,
103
+ "model-value": l.values.some((m) => Object.is(m, e.value)),
104
+ disabled: l.disabled || e.disabled,
105
+ size: "sm",
106
+ "onUpdate:modelValue": (m) => g(e, m === !0)
107
+ }, {
108
+ default: w(() => [
109
+ p(b(e.label), 1)
110
+ ]),
111
+ _: 2
112
+ }, 1032, ["model-value", "disabled", "onUpdate:modelValue"])) : (d(), v(M, {
113
+ key: 1,
114
+ "model-value": l.values[0] ?? null,
115
+ value: e.value,
116
+ disabled: l.disabled || e.disabled,
117
+ size: "sm",
118
+ "onUpdate:modelValue": (m) => g(e, !0)
119
+ }, {
120
+ default: w(() => [
121
+ p(b(e.label), 1)
122
+ ]),
123
+ _: 2
124
+ }, 1032, ["model-value", "value", "disabled", "onUpdate:modelValue"]))
125
+ ], 64))), 128)),
126
+ h.value.length ? x("", !0) : (d(), n("p", N, b(l.emptyText), 1))
127
+ ]))
128
+ ]));
129
+ }
130
+ });
131
+ export {
132
+ J as default
133
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./HysTabs2.vue.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7fbe08d4"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4a2ce4c1"]]);
5
5
  export {
6
- f as default
6
+ c as default
7
7
  };
@@ -1,83 +1,277 @@
1
- import { defineComponent as C, ref as w, computed as x, openBlock as u, createElementBlock as d, Fragment as m, createElementVNode as f, mergeProps as B, unref as h, renderList as E, normalizeClass as H, renderSlot as k, createTextVNode as L, toDisplayString as N, createVNode as $, createCommentVNode as z } from "vue";
2
- import { X as D } from "lucide-vue-next";
3
- import { useHysRootAttrs as R } from "../../config.js";
4
- const S = ["aria-label", "aria-orientation"], T = ["data-tab-value", "aria-selected", "disabled", "tabindex", "onClick"], q = ["aria-label", "disabled", "onClick"], P = /* @__PURE__ */ C({
1
+ import { defineComponent as he, useId as ke, ref as y, computed as M, watch as A, nextTick as T, onMounted as ge, onActivated as me, onDeactivated as pe, onBeforeUnmount as we, openBlock as i, createElementBlock as v, mergeProps as Ce, unref as h, createElementVNode as U, normalizeClass as R, renderSlot as B, createCommentVNode as k, createBlock as ae, resolveDynamicComponent as le, Fragment as W, renderList as te, createTextVNode as oe, toDisplayString as se, createVNode as ue, withDirectives as Be, vShow as $e } from "vue";
2
+ import { ChevronUp as ze, ChevronLeft as Se, X as Te, ChevronDown as Le, ChevronRight as Ve, Plus as Ae } from "lucide-vue-next";
3
+ import { useHysRootAttrs as Re } from "../../config.js";
4
+ import { useMotion as He } from "../../motion/useMotion.js";
5
+ const De = {
6
+ key: 0,
7
+ class: "hys-ui-tabs-extra"
8
+ }, Ee = ["aria-label"], xe = ["aria-label", "aria-busy", "aria-orientation"], Ie = ["id", "data-tab-key", "aria-selected", "aria-controls", "disabled", "tabindex", "onFocus", "onClick", "onMouseenter"], Me = ["aria-label", "aria-busy", "disabled", "onClick"], Ne = ["aria-label"], Oe = ["disabled"], qe = {
9
+ key: 4,
10
+ class: "hys-ui-tabs-extra"
11
+ }, Fe = ["id", "data-active", "aria-labelledby"], Ke = ["id", "aria-labelledby"], je = /* @__PURE__ */ he({
5
12
  __name: "HysTabs",
6
13
  props: {
7
14
  modelValue: {},
15
+ defaultValue: {},
8
16
  items: {},
9
17
  disabled: { type: Boolean },
10
- type: {},
18
+ type: { default: "line" },
11
19
  vertical: { type: Boolean },
20
+ placement: {},
21
+ size: { default: "md" },
22
+ stretch: { type: Boolean },
23
+ centered: { type: Boolean },
12
24
  closable: { type: Boolean },
13
- ariaLabel: {}
25
+ addable: { type: Boolean },
26
+ editable: { type: Boolean },
27
+ trigger: { default: "click" },
28
+ activation: { default: "auto" },
29
+ lazy: { type: Boolean, default: !0 },
30
+ destroyOnHide: { type: Boolean, default: !1 },
31
+ animated: { type: Boolean, default: !0 },
32
+ showScrollButtons: { type: Boolean, default: !0 },
33
+ ariaLabel: {},
34
+ beforeLeave: {},
35
+ beforeClose: {}
14
36
  },
15
- emits: ["update:modelValue", "change", "close"],
16
- setup(l, { emit: V }) {
17
- const r = l, i = V, b = w(), g = R(), t = x(() => r.items.filter((a) => !r.disabled && !a.disabled));
18
- function v(a) {
19
- if (!t.value.some((e) => e.value === a)) return;
20
- const n = a !== r.modelValue;
21
- i("update:modelValue", a), n && i("change", a);
37
+ emits: ["update:modelValue", "change", "tabClick", "close", "add", "edit", "guardError"],
38
+ setup(s, { expose: ie, emit: ne }) {
39
+ const t = s, c = ne, re = Re(), { effectiveMotion: X } = He(), j = ke(), g = y(), N = y(t.defaultValue), u = M(() => {
40
+ var e;
41
+ return t.modelValue ?? (t.items.some((l) => l.value === N.value) ? N.value : ((e = t.items.find((l) => !l.disabled)) == null ? void 0 : e.value) ?? "");
42
+ }), H = M(() => t.placement ?? (t.vertical ? "left" : "top")), n = M(() => H.value === "left" || H.value === "right"), r = M(() => t.items.filter((e) => !t.disabled && !e.disabled)), m = y(), D = y(/* @__PURE__ */ new Set()), p = y(!1), $ = y(/* @__PURE__ */ new Set()), G = y(!1), J = y(!1);
43
+ let z = 0, w = 0, de = 0, b = !0, S;
44
+ const E = /* @__PURE__ */ new Map(), L = (e) => typeof e + ":" + e, O = (e) => j + "-tab-" + e, q = (e) => j + "-panel-" + e, F = (e) => e.closable ?? (t.closable || t.editable), Q = (e) => {
45
+ var l;
46
+ return Array.from(((l = g.value) == null ? void 0 : l.querySelectorAll('[role="tab"]')) || []).find((a) => a.dataset.tabKey === L(e));
47
+ }, ve = (e) => e.forceRender || !t.destroyOnHide && (!t.lazy || D.value.has(e.value)) || u.value === e.value;
48
+ function C() {
49
+ const e = g.value;
50
+ if (!e) return;
51
+ const l = n.value ? e.scrollTop : e.scrollLeft, a = n.value ? e.clientHeight : e.clientWidth, o = n.value ? e.scrollHeight : e.scrollWidth;
52
+ G.value = l > 1, J.value = l + a < o - 1;
22
53
  }
23
- function A(a) {
24
- var y;
25
- const n = r.vertical ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"];
26
- if (![...n, "Home", "End"].includes(a.key) || !t.value.length) return;
27
- a.preventDefault();
28
- const e = t.value.findIndex((c) => c.value === r.modelValue), s = a.key === "Home" ? 0 : a.key === "End" ? t.value.length - 1 : e < 0 ? a.key === n[0] ? t.value.length - 1 : 0 : (e + (a.key === n[0] ? -1 : 1) + t.value.length) % t.value.length;
29
- v(t.value[s].value);
30
- const o = Array.from(((y = b.value) == null ? void 0 : y.querySelectorAll('[role="tab"]')) || []).find((c) => c.dataset.tabValue === t.value[s].value);
31
- o == null || o.focus();
54
+ function V() {
55
+ const e = g.value, l = Q(u.value);
56
+ if (!e || !l) return;
57
+ const a = e.getBoundingClientRect(), o = l.getBoundingClientRect();
58
+ n.value ? o.top < a.top ? e.scrollTop -= a.top - o.top : o.bottom > a.bottom && (e.scrollTop += o.bottom - a.bottom) : o.left < a.left ? e.scrollLeft -= a.left - o.left : o.right > a.right && (e.scrollLeft += o.right - a.right), C();
32
59
  }
33
- return (a, n) => (u(), d(m, null, [
34
- f("div", B({
35
- ref_key: "root",
36
- ref: b
37
- }, h(g), {
38
- class: ["hys-ui-tabs", { "hys-ui-tabs-card": l.type === "card", "hys-ui-tabs-vertical": l.vertical }],
39
- role: "tablist",
40
- "aria-label": l.ariaLabel || "页签",
41
- "aria-orientation": l.vertical ? "vertical" : "horizontal",
42
- onKeydown: A
43
- }), [
44
- (u(!0), d(m, null, E(l.items, (e) => {
45
- var s;
46
- return u(), d("div", {
47
- key: e.value,
48
- class: "hys-ui-tab-item"
49
- }, [
50
- f("button", {
51
- type: "button",
52
- role: "tab",
53
- "data-tab-value": e.value,
54
- "aria-selected": l.modelValue === e.value,
55
- disabled: l.disabled || e.disabled,
56
- tabindex: l.modelValue === e.value || !t.value.some((o) => o.value === l.modelValue) && ((s = t.value[0]) == null ? void 0 : s.value) === e.value ? 0 : -1,
57
- class: H({ "hys-ui-active": l.modelValue === e.value }),
58
- onClick: (o) => v(e.value)
59
- }, [
60
- k(a.$slots, "label", { item: e }, () => [
61
- L(N(e.label), 1)
62
- ], !0)
63
- ], 10, T),
64
- l.closable || e.closable ? (u(), d("button", {
65
- key: 0,
66
- type: "button",
67
- class: "hys-ui-tab-close",
68
- "aria-label": "关闭" + e.label,
69
- disabled: l.disabled || e.disabled,
70
- onClick: (o) => i("close", e.value)
60
+ function Y(e) {
61
+ const l = g.value;
62
+ if (!l) return;
63
+ const a = (n.value ? l.clientHeight : l.clientWidth) * 0.8 * e;
64
+ l.scrollBy({ [n.value ? "top" : "left"]: a, behavior: X.value === "off" ? "auto" : "smooth" });
65
+ }
66
+ function Z(e) {
67
+ var l;
68
+ m.value = e, (l = Q(e)) == null || l.focus();
69
+ }
70
+ async function x(e) {
71
+ const l = ++z, a = u.value, o = w;
72
+ if (p.value = !1, !(!b || !r.value.some((d) => d.value === e) || e === a))
73
+ try {
74
+ if (t.beforeLeave && (p.value = !0, await t.beforeLeave(e, a) === !1) || !b || o !== w || l !== z || u.value !== a || !r.value.some((d) => d.value === e)) return;
75
+ p.value = !1, N.value = e, c("update:modelValue", e), c("change", e), await T(), V();
76
+ } catch (d) {
77
+ b && o === w && l === z && c("guardError", d);
78
+ } finally {
79
+ l === z && (p.value = !1);
80
+ }
81
+ }
82
+ function ce(e, l) {
83
+ t.disabled || e.disabled || (c("tabClick", e.value, l), x(e.value));
84
+ }
85
+ async function be(e) {
86
+ if (!b || t.disabled || e.disabled || !F(e) || $.value.has(e.value)) return;
87
+ const l = w, a = ++de;
88
+ E.set(e.value, a);
89
+ try {
90
+ if ($.value.add(e.value), t.beforeClose && await t.beforeClose(e.value) === !1) return;
91
+ const o = t.items.find((d) => d.value === e.value);
92
+ if (!b || l !== w || E.get(e.value) !== a || t.disabled || !o || o.disabled || !F(o)) return;
93
+ c("close", e.value), c("edit", e.value, "remove");
94
+ } catch (o) {
95
+ b && l === w && c("guardError", o);
96
+ } finally {
97
+ E.get(e.value) === a && $.value.delete(e.value);
98
+ }
99
+ }
100
+ function fe() {
101
+ t.disabled || (c("add"), c("edit", void 0, "add"));
102
+ }
103
+ function ye(e) {
104
+ var ee;
105
+ if (e.target.closest(".hys-ui-tab-close")) return;
106
+ const l = n.value ? ["ArrowUp", "ArrowDown"] : ["ArrowLeft", "ArrowRight"], a = e.target.closest('[role="tab"]'), o = ((ee = r.value.find((P) => L(P.value) === (a == null ? void 0 : a.dataset.tabKey))) == null ? void 0 : ee.value) ?? m.value ?? u.value;
107
+ if (["Enter", " "].includes(e.key) && t.activation === "manual" && a) {
108
+ e.preventDefault(), x(o);
109
+ return;
110
+ }
111
+ if (![...l, "Home", "End"].includes(e.key) || !r.value.length) return;
112
+ e.preventDefault();
113
+ const d = r.value.findIndex((P) => P.value === o), f = e.key === "Home" ? 0 : e.key === "End" ? r.value.length - 1 : d < 0 ? e.key === l[0] ? r.value.length - 1 : 0 : (d + (e.key === l[0] ? -1 : 1) + r.value.length) % r.value.length;
114
+ Z(r.value[f].value), t.activation === "auto" && x(r.value[f].value);
115
+ }
116
+ function I() {
117
+ z++, p.value = !1, w++, $.value.clear(), E.clear();
118
+ }
119
+ function K() {
120
+ S == null || S.disconnect(), S = void 0;
121
+ }
122
+ function _() {
123
+ K(), typeof ResizeObserver < "u" && g.value && (S = new ResizeObserver(C), S.observe(g.value)), T().then(C);
124
+ }
125
+ return A(u, (e) => {
126
+ D.value.add(e), z++, p.value = !1, T().then(V);
127
+ }, { immediate: !0 }), A(() => t.items.map((e) => [e.value, e.disabled, e.closable]), () => {
128
+ I(), D.value = new Set([...D.value].filter((e) => t.items.some((l) => l.value === e))), m.value !== void 0 && !r.value.some((e) => e.value === m.value) && (m.value = void 0), T().then(C);
129
+ }, { deep: !0 }), A(() => t.disabled, () => I()), A(() => [t.size, t.type, t.stretch, t.centered, ...t.items.map((e) => e.label)], () => void T().then(() => {
130
+ C(), V();
131
+ })), A(H, () => void T().then(() => {
132
+ C(), V();
133
+ })), ge(_), me(() => {
134
+ b = !0, _();
135
+ }), pe(() => {
136
+ b = !1, I(), K();
137
+ }), we(() => {
138
+ b = !1, I(), K();
139
+ }), ie({ scrollToActiveTab: V, focus: (e = u.value) => Z(e) }), (e, l) => (i(), v("div", Ce(h(re), {
140
+ class: ["hys-ui-tabs-root", ["hys-ui-tabs-placement-" + H.value, "hys-ui-tabs-size-" + s.size, { "hys-ui-tabs-bordered": s.type === "border-card" }]]
141
+ }), [
142
+ U("div", {
143
+ class: R(["hys-ui-tabs-header", { "hys-ui-tabs-header-vertical": n.value }])
144
+ }, [
145
+ e.$slots.prefix ? (i(), v("div", De, [
146
+ B(e.$slots, "prefix", {}, void 0, !0)
147
+ ])) : k("", !0),
148
+ s.showScrollButtons && G.value ? (i(), v("button", {
149
+ key: 1,
150
+ class: "hys-ui-tab-scroll",
151
+ type: "button",
152
+ "aria-label": n.value ? "向上滚动页签" : "向左滚动页签",
153
+ onClick: l[0] || (l[0] = (a) => Y(-1))
154
+ }, [
155
+ (i(), ae(le(n.value ? h(ze) : h(Se)), { size: 16 }))
156
+ ], 8, Ee)) : k("", !0),
157
+ U("div", {
158
+ ref_key: "nav",
159
+ ref: g,
160
+ class: R(["hys-ui-tabs", ["hys-ui-tabs-" + s.type, { "hys-ui-tabs-vertical": n.value, "hys-ui-tabs-stretch": s.stretch, "hys-ui-tabs-centered": s.centered }]]),
161
+ role: "tablist",
162
+ "aria-label": s.ariaLabel || "页签",
163
+ "aria-busy": p.value || void 0,
164
+ "aria-orientation": n.value ? "vertical" : "horizontal",
165
+ onKeydown: ye,
166
+ onScrollPassive: C
167
+ }, [
168
+ (i(!0), v(W, null, te(s.items, (a, o) => {
169
+ var d;
170
+ return i(), v("div", {
171
+ key: L(a.value),
172
+ class: R(["hys-ui-tab-item", { "hys-ui-tab-selected": u.value === a.value }])
71
173
  }, [
72
- $(h(D), { size: 12 })
73
- ], 8, q)) : z("", !0)
74
- ]);
75
- }), 128))
76
- ], 16, S),
77
- k(a.$slots, "default", { active: l.modelValue }, void 0, !0)
78
- ], 64));
174
+ U("button", {
175
+ id: O(o),
176
+ type: "button",
177
+ role: "tab",
178
+ "data-tab-key": L(a.value),
179
+ "aria-selected": u.value === a.value,
180
+ "aria-controls": e.$slots.panel || a.content !== void 0 || e.$slots.default && u.value === a.value ? q(o) : void 0,
181
+ disabled: s.disabled || a.disabled,
182
+ tabindex: (m.value ?? (r.value.some((f) => f.value === u.value) ? u.value : (d = r.value[0]) == null ? void 0 : d.value)) === a.value ? 0 : -1,
183
+ class: R({ "hys-ui-active": u.value === a.value }),
184
+ onFocus: (f) => m.value = a.value,
185
+ onClick: (f) => ce(a, f),
186
+ onMouseenter: (f) => s.trigger === "hover" && x(a.value)
187
+ }, [
188
+ B(e.$slots, "label", {
189
+ item: a,
190
+ active: u.value === a.value
191
+ }, () => [
192
+ oe(se(a.label), 1)
193
+ ], !0)
194
+ ], 42, Ie),
195
+ F(a) ? (i(), v("button", {
196
+ key: 0,
197
+ type: "button",
198
+ class: "hys-ui-tab-close",
199
+ "aria-label": "关闭" + a.label,
200
+ "aria-busy": $.value.has(a.value) || void 0,
201
+ disabled: s.disabled || a.disabled || $.value.has(a.value),
202
+ onClick: (f) => be(a)
203
+ }, [
204
+ B(e.$slots, "close-icon", { item: a }, () => [
205
+ ue(h(Te), { size: 13 })
206
+ ], !0)
207
+ ], 8, Me)) : k("", !0)
208
+ ], 2);
209
+ }), 128))
210
+ ], 42, xe),
211
+ s.showScrollButtons && J.value ? (i(), v("button", {
212
+ key: 2,
213
+ class: "hys-ui-tab-scroll",
214
+ type: "button",
215
+ "aria-label": n.value ? "向下滚动页签" : "向右滚动页签",
216
+ onClick: l[1] || (l[1] = (a) => Y(1))
217
+ }, [
218
+ (i(), ae(le(n.value ? h(Le) : h(Ve)), { size: 16 }))
219
+ ], 8, Ne)) : k("", !0),
220
+ s.addable || s.editable ? (i(), v("button", {
221
+ key: 3,
222
+ type: "button",
223
+ class: "hys-ui-tab-add",
224
+ "aria-label": "添加页签",
225
+ disabled: s.disabled,
226
+ onClick: fe
227
+ }, [
228
+ B(e.$slots, "add-icon", {}, () => [
229
+ ue(h(Ae), { size: 16 })
230
+ ], !0)
231
+ ], 8, Oe)) : k("", !0),
232
+ e.$slots.suffix ? (i(), v("div", qe, [
233
+ B(e.$slots, "suffix", {}, void 0, !0)
234
+ ])) : k("", !0)
235
+ ], 2),
236
+ e.$slots.panel || s.items.some((a) => a.content !== void 0) ? (i(), v("div", {
237
+ key: 0,
238
+ class: R(["hys-ui-tabs-content", { "hys-ui-tabs-animated": s.animated && h(X) !== "off" }])
239
+ }, [
240
+ (i(!0), v(W, null, te(s.items, (a, o) => (i(), v(W, {
241
+ key: L(a.value)
242
+ }, [
243
+ ve(a) ? Be((i(), v("div", {
244
+ key: 0,
245
+ id: q(o),
246
+ class: "hys-ui-tab-panel",
247
+ "data-active": u.value === a.value,
248
+ role: "tabpanel",
249
+ "aria-labelledby": O(o),
250
+ tabindex: "0"
251
+ }, [
252
+ B(e.$slots, "panel", {
253
+ item: a,
254
+ active: u.value === a.value
255
+ }, () => [
256
+ oe(se(a.content), 1)
257
+ ], !0)
258
+ ], 8, Fe)), [
259
+ [$e, u.value === a.value]
260
+ ]) : k("", !0)
261
+ ], 64))), 128))
262
+ ], 2)) : e.$slots.default ? (i(), v("div", {
263
+ key: 1,
264
+ id: q(s.items.findIndex((a) => a.value === u.value)),
265
+ class: "hys-ui-tabs-content",
266
+ role: "tabpanel",
267
+ "aria-labelledby": s.items.some((a) => a.value === u.value) ? O(s.items.findIndex((a) => a.value === u.value)) : void 0,
268
+ tabindex: "0"
269
+ }, [
270
+ B(e.$slots, "default", { active: u.value }, void 0, !0)
271
+ ], 8, Ke)) : k("", !0)
272
+ ], 16));
79
273
  }
80
274
  });
81
275
  export {
82
- P as default
276
+ je as default
83
277
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as V, ref as p, openBlock as u, createElementBlock as s, mergeProps as g, unref as c, Fragment as h, renderList as B, renderSlot as x, createTextVNode as k, toDisplayString as C, createVNode as A, createCommentVNode as N, withDirectives as w, createElementVNode as D, withKeys as b, vModelText as E } from "vue";
1
+ import { defineComponent as V, ref as g, openBlock as m, createElementBlock as f, mergeProps as h, unref as i, Fragment as B, renderList as x, renderSlot as k, createTextVNode as C, toDisplayString as A, createVNode as D, createCommentVNode as N, withDirectives as w, createElementVNode as E, withKeys as y, vModelText as H } from "vue";
2
+ import { useHysControlState as S } from "../../composables/formContext.js";
2
3
  import { useHysRootAttrs as T } from "../../config.js";
3
4
  import { X as j } from "lucide-vue-next";
4
- const H = ["aria-disabled"], K = ["disabled", "aria-label", "onClick"], O = ["placeholder", "disabled", "readonly"], z = /* @__PURE__ */ V({
5
+ const K = ["aria-disabled"], O = ["disabled", "aria-label", "onClick"], R = ["placeholder", "disabled", "readonly"], L = /* @__PURE__ */ V({
5
6
  __name: "HysTagInput",
6
7
  props: {
7
8
  modelValue: {},
@@ -14,70 +15,70 @@ const H = ["aria-disabled"], K = ["disabled", "aria-label", "onClick"], O = ["pl
14
15
  beforeAdd: {}
15
16
  },
16
17
  emits: ["update:modelValue", "change", "add", "remove", "reject"],
17
- setup(l, { emit: y }) {
18
- const v = T(), t = l, n = y, r = p("");
19
- function m() {
20
- if (t.disabled || t.readonly) return;
21
- const o = r.value.trim();
22
- if (!o) return;
23
- const a = t.separator ? o.split(t.separator) : [o], e = [...t.modelValue];
24
- for (const d of a.map((i) => i.trim()).filter(Boolean)) {
25
- if (e.includes(d) || e.length >= t.max || t.beforeAdd && t.beforeAdd(d) === !1) {
26
- n("reject", d);
18
+ setup(a, { emit: b }) {
19
+ const v = T(), l = a, d = b, r = g(""), { disabled: u } = S(l);
20
+ function c() {
21
+ if (u.value || l.readonly) return;
22
+ const n = r.value.trim();
23
+ if (!n) return;
24
+ const t = l.separator ? n.split(l.separator) : [n], e = [...l.modelValue];
25
+ for (const o of t.map((s) => s.trim()).filter(Boolean)) {
26
+ if (e.includes(o) || e.length >= l.max || l.beforeAdd && l.beforeAdd(o) === !1) {
27
+ d("reject", o);
27
28
  continue;
28
29
  }
29
- e.push(d), n("add", d);
30
+ e.push(o), d("add", o);
30
31
  }
31
- n("update:modelValue", e), n("change", e), r.value = "";
32
+ d("update:modelValue", e), d("change", e), r.value = "";
32
33
  }
33
- function f(o) {
34
- if (t.disabled || t.readonly) return;
35
- const a = t.modelValue[o], e = t.modelValue.filter((d, i) => i !== o);
36
- n("update:modelValue", e), n("change", e), n("remove", a);
34
+ function p(n) {
35
+ if (u.value || l.readonly) return;
36
+ const t = l.modelValue[n], e = l.modelValue.filter((o, s) => s !== n);
37
+ d("update:modelValue", e), d("change", e), d("remove", t);
37
38
  }
38
- return (o, a) => (u(), s("div", g(c(v), {
39
+ return (n, t) => (m(), f("div", h(i(v), {
39
40
  class: "hys-ui-ex-tags",
40
- "aria-disabled": l.disabled
41
+ "aria-disabled": i(u)
41
42
  }), [
42
- (u(!0), s(h, null, B(l.modelValue, (e, d) => (u(), s("span", {
43
+ (m(!0), f(B, null, x(a.modelValue, (e, o) => (m(), f("span", {
43
44
  key: e,
44
45
  class: "hys-ui-ex-tag"
45
46
  }, [
46
- x(o.$slots, "tag", {
47
+ k(n.$slots, "tag", {
47
48
  value: e,
48
- index: d
49
+ index: o
49
50
  }, () => [
50
- k(C(e), 1)
51
+ C(A(e), 1)
51
52
  ]),
52
- l.readonly ? N("", !0) : (u(), s("button", {
53
+ a.readonly ? N("", !0) : (m(), f("button", {
53
54
  key: 0,
54
55
  type: "button",
55
- disabled: l.disabled,
56
+ disabled: i(u),
56
57
  "aria-label": "移除 " + e,
57
- onClick: (i) => f(d)
58
+ onClick: (s) => p(o)
58
59
  }, [
59
- A(c(j), { size: 14 })
60
- ], 8, K))
60
+ D(i(j), { size: 14 })
61
+ ], 8, O))
61
62
  ]))), 128)),
62
- w(D("input", {
63
- "onUpdate:modelValue": a[0] || (a[0] = (e) => r.value = e),
64
- placeholder: l.placeholder,
63
+ w(E("input", {
64
+ "onUpdate:modelValue": t[0] || (t[0] = (e) => r.value = e),
65
+ placeholder: a.placeholder,
65
66
  "aria-label": "输入标签",
66
- disabled: l.disabled || l.modelValue.length >= l.max,
67
- readonly: l.readonly,
67
+ disabled: i(u) || a.modelValue.length >= a.max,
68
+ readonly: a.readonly,
68
69
  onKeydown: [
69
- a[1] || (a[1] = b((e) => {
70
- e.isComposing || (e.preventDefault(), m());
70
+ t[1] || (t[1] = y((e) => {
71
+ e.isComposing || (e.preventDefault(), c());
71
72
  }, ["enter"])),
72
- a[2] || (a[2] = b((e) => !r.value && l.modelValue.length && !e.isComposing && f(l.modelValue.length - 1), ["backspace"]))
73
+ t[2] || (t[2] = y((e) => !r.value && a.modelValue.length && !e.isComposing && p(a.modelValue.length - 1), ["backspace"]))
73
74
  ],
74
- onBlur: a[3] || (a[3] = (e) => l.addOnBlur && m())
75
- }, null, 40, O), [
76
- [E, r.value]
75
+ onBlur: t[3] || (t[3] = (e) => a.addOnBlur && c())
76
+ }, null, 40, R), [
77
+ [H, r.value]
77
78
  ])
78
- ], 16, H));
79
+ ], 16, K));
79
80
  }
80
81
  });
81
82
  export {
82
- z as default
83
+ L as default
83
84
  };