vft 0.0.429 → 0.0.430

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 (218) hide show
  1. package/attributes.json +1 -1
  2. package/es/components/alert/alert.vue2.js +38 -38
  3. package/es/components/autocomplete/autocomplete.vue2.js +82 -82
  4. package/es/components/avatar/avatar.vue2.js +23 -23
  5. package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
  6. package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
  7. package/es/components/button/button.vue2.js +37 -37
  8. package/es/components/card/card.vue2.js +19 -19
  9. package/es/components/carousel/carousel.vue2.js +75 -75
  10. package/es/components/carousel/use-carousel.js +1 -1
  11. package/es/components/cascader-panel/index.vue2.js +2 -2
  12. package/es/components/cascader-panel/menu.vue2.js +2 -2
  13. package/es/components/cascader-panel/node.vue2.js +3 -4
  14. package/es/components/checkbox/checkbox-button.vue2.js +52 -52
  15. package/es/components/checkbox/checkbox-group.vue2.js +26 -26
  16. package/es/components/checkbox/checkbox.vue2.js +57 -57
  17. package/es/components/clamp/clamp.vue2.js +14 -14
  18. package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
  19. package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
  20. package/es/components/col/col.vue2.js +20 -20
  21. package/es/components/color-picker/color-picker.vue2.js +126 -128
  22. package/es/components/color-picker/components/sv-panel.vue.js +2 -2
  23. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  24. package/es/components/context-menu/context-menu.vue2.js +18 -18
  25. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
  26. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
  27. package/es/components/date-picker/date-picker.d.ts +1 -1
  28. package/es/components/date-picker/index.d.ts +2 -2
  29. package/es/components/descriptions/description.vue2.js +44 -44
  30. package/es/components/descriptions/descriptions-row.vue2.js +12 -12
  31. package/es/components/dialog/dialog-content.vue2.js +31 -31
  32. package/es/components/dialog/dialog.vue2.js +46 -46
  33. package/es/components/divider/divider.vue2.js +19 -19
  34. package/es/components/drawer/drawer.vue2.js +41 -41
  35. package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
  36. package/es/components/dropdown/dropdown-item.vue2.js +28 -28
  37. package/es/components/dropdown/dropdown.vue2.js +124 -124
  38. package/es/components/form/form-item.vue2.js +71 -71
  39. package/es/components/header-layout/header-layout.vue2.js +25 -25
  40. package/es/components/icon/icon.vue2.js +15 -15
  41. package/es/components/icon-text/icon-text.vue2.js +28 -28
  42. package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
  43. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  44. package/es/components/image/image.vue2.js +63 -63
  45. package/es/components/image-viewer/image-viewer.vue2.js +88 -88
  46. package/es/components/infinite-scroll/index.d.ts +1 -1
  47. package/es/components/input/input.vue2.js +112 -112
  48. package/es/components/input-number/input-number.vue2.js +100 -100
  49. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  50. package/es/components/link/link.vue2.js +20 -20
  51. package/es/components/list-cell/list-cell.vue2.js +19 -19
  52. package/es/components/logo/logo.vue2.js +22 -22
  53. package/es/components/menu/menu-item-group.vue2.js +8 -8
  54. package/es/components/menu/menu-item.vue2.js +48 -48
  55. package/es/components/message/message.vue2.js +66 -66
  56. package/es/components/modal/modal-footer-action.vue2.js +25 -25
  57. package/es/components/modal/modal.vue2.js +40 -40
  58. package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
  59. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  60. package/es/components/pagination/components/jumper.vue2.js +18 -18
  61. package/es/components/pagination/components/next.vue2.js +11 -11
  62. package/es/components/pagination/components/pager.vue2.js +74 -74
  63. package/es/components/pagination/components/prev.vue2.js +9 -9
  64. package/es/components/pagination/components/sizes.vue2.js +18 -18
  65. package/es/components/pagination/components/total.vue2.js +8 -8
  66. package/es/components/popconfirm/popconfirm.vue2.js +47 -47
  67. package/es/components/popover/popover.vue2.js +28 -28
  68. package/es/components/popper/trigger.vue2.js +9 -9
  69. package/es/components/progress/progress.vue2.js +87 -87
  70. package/es/components/qrcode/qrcode.vue2.js +31 -31
  71. package/es/components/radio/radio-button.vue2.js +17 -17
  72. package/es/components/radio/radio-group.vue2.js +35 -35
  73. package/es/components/router-view-content/router-view-content.vue2.js +25 -25
  74. package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
  75. package/es/components/row/row.vue2.js +5 -5
  76. package/es/components/scrollbar/bar.vue2.js +16 -16
  77. package/es/components/scrollbar/scrollbar.vue2.js +48 -48
  78. package/es/components/scrollbar/thumb.vue2.js +27 -27
  79. package/es/components/search/search.vue2.js +29 -29
  80. package/es/components/select/index.d.ts +1 -1
  81. package/es/components/select/select.vue.d.ts +1 -1
  82. package/es/components/side-menu/index.d.ts +2 -8
  83. package/es/components/side-menu/side-menu.vue.d.ts +5 -59
  84. package/es/components/side-menu/types.d.ts +107 -0
  85. package/es/components/skeleton/skeleton-item.vue2.js +9 -9
  86. package/es/components/skeleton/skeleton.vue2.js +14 -14
  87. package/es/components/slider/button.vue2.js +54 -54
  88. package/es/components/slider/slider.vue2.js +106 -106
  89. package/es/components/steps/item.vue2.js +56 -56
  90. package/es/components/steps/steps.vue2.js +16 -16
  91. package/es/components/super-form/super-form-action.vue2.js +28 -28
  92. package/es/components/super-form/super-form-item.vue2.js +1 -1
  93. package/es/components/switch/switch.vue2.js +108 -108
  94. package/es/components/table/field.d.ts +4 -4
  95. package/es/components/teleport/teleport.vue2.js +6 -6
  96. package/es/components/time-picker/common/picker.vue.d.ts +1 -1
  97. package/es/components/time-picker/index.d.ts +2 -2
  98. package/es/components/time-picker/time-picker.d.ts +1 -1
  99. package/es/components/timeline/timeline-item.vue2.js +20 -20
  100. package/es/components/tooltip/content.vue2.js +57 -57
  101. package/es/components/tooltip/tooltip.vue2.js +66 -66
  102. package/es/components/tooltip/trigger.vue2.js +42 -42
  103. package/es/components/tree/tree.vue2.js +72 -72
  104. package/es/components/upload/upload-content.vue2.js +85 -85
  105. package/es/components/upload/upload-list.vue2.js +70 -70
  106. package/es/components/upload/upload.vue2.js +86 -86
  107. package/es/components/verify-code/verify-code.vue2.js +18 -18
  108. package/es/package.json.d.ts +1 -1
  109. package/es/package.json.js +1 -1
  110. package/es/utils/vue/vnode.js +1 -1
  111. package/lib/components/alert/alert.vue2.cjs +1 -1
  112. package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
  113. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  114. package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
  115. package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
  116. package/lib/components/button/button.vue2.cjs +1 -1
  117. package/lib/components/card/card.vue2.cjs +1 -1
  118. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  119. package/lib/components/cascader-panel/index.vue2.cjs +1 -1
  120. package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
  121. package/lib/components/cascader-panel/node.vue2.cjs +1 -1
  122. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  123. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  124. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  125. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  126. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  127. package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
  128. package/lib/components/col/col.vue2.cjs +1 -1
  129. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  130. package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
  131. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  132. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  133. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  134. package/lib/components/date-picker/date-picker.d.ts +1 -1
  135. package/lib/components/date-picker/index.d.ts +2 -2
  136. package/lib/components/descriptions/description.vue2.cjs +1 -1
  137. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  138. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  139. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  140. package/lib/components/divider/divider.vue2.cjs +1 -1
  141. package/lib/components/drawer/drawer.vue2.cjs +1 -1
  142. package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
  143. package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
  144. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  145. package/lib/components/form/form-item.vue2.cjs +1 -1
  146. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  147. package/lib/components/icon/icon.vue2.cjs +1 -1
  148. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  149. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  150. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  151. package/lib/components/image/image.vue2.cjs +1 -1
  152. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  153. package/lib/components/infinite-scroll/index.d.ts +1 -1
  154. package/lib/components/input/input.vue2.cjs +1 -1
  155. package/lib/components/input-number/input-number.vue2.cjs +1 -1
  156. package/lib/components/link/link.vue2.cjs +1 -1
  157. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  158. package/lib/components/logo/logo.vue2.cjs +1 -1
  159. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  160. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  161. package/lib/components/message/message.vue2.cjs +1 -1
  162. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  163. package/lib/components/modal/modal.vue2.cjs +1 -1
  164. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  165. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  166. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  167. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  168. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  169. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  170. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  171. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  172. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  173. package/lib/components/popover/popover.vue2.cjs +1 -1
  174. package/lib/components/popper/trigger.vue2.cjs +1 -1
  175. package/lib/components/progress/progress.vue2.cjs +5 -5
  176. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  177. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  178. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  179. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  180. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  181. package/lib/components/row/row.vue2.cjs +1 -1
  182. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  183. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  184. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  185. package/lib/components/search/search.vue2.cjs +1 -1
  186. package/lib/components/select/index.d.ts +1 -1
  187. package/lib/components/select/select.vue.d.ts +1 -1
  188. package/lib/components/side-menu/index.d.ts +2 -8
  189. package/lib/components/side-menu/side-menu.vue.d.ts +5 -59
  190. package/lib/components/side-menu/types.d.ts +107 -0
  191. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  192. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  193. package/lib/components/slider/button.vue2.cjs +1 -1
  194. package/lib/components/slider/slider.vue2.cjs +1 -1
  195. package/lib/components/steps/item.vue2.cjs +1 -1
  196. package/lib/components/steps/steps.vue2.cjs +1 -1
  197. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  198. package/lib/components/switch/switch.vue2.cjs +1 -1
  199. package/lib/components/table/field.d.ts +4 -4
  200. package/lib/components/teleport/teleport.vue2.cjs +1 -1
  201. package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
  202. package/lib/components/time-picker/index.d.ts +2 -2
  203. package/lib/components/time-picker/time-picker.d.ts +1 -1
  204. package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
  205. package/lib/components/tooltip/content.vue2.cjs +1 -1
  206. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  207. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  208. package/lib/components/tree/tree.vue2.cjs +1 -1
  209. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  210. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  211. package/lib/components/upload/upload.vue2.cjs +1 -1
  212. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  213. package/lib/package.json.cjs +1 -1
  214. package/lib/package.json.d.ts +1 -1
  215. package/package.json +5 -5
  216. package/tags.json +1 -1
  217. package/theme-style/src/mixins/mixins.scss +1 -0
  218. package/web-types.json +1 -1
@@ -1,18 +1,18 @@
1
- import { defineComponent as C, useSlots as g, ref as N, computed as c, createBlock as r, openBlock as s, Transition as S, unref as o, withCtx as V, withDirectives as $, createElementVNode as v, normalizeClass as l, createCommentVNode as i, createElementBlock as a, renderSlot as y, createTextVNode as k, toDisplayString as u, Fragment as E, vShow as I } from "vue";
2
- import { VftIcon as b } from "../icon/index.js";
1
+ import { defineComponent as C, useSlots as g, ref as N, computed as a, createBlock as r, openBlock as o, Transition as S, unref as l, withCtx as V, withDirectives as $, createElementVNode as y, normalizeClass as s, createCommentVNode as i, createElementBlock as c, renderSlot as k, createTextVNode as b, toDisplayString as u, Fragment as x, vShow as E } from "vue";
2
+ import { VftIcon as p } from "../icon/index.js";
3
3
  import "@vueuse/core";
4
4
  import "@vft/utils";
5
5
  import "../config-provider/hooks/use-global-config.js";
6
6
  import "lodash-es";
7
7
  import "../form/index.js";
8
- import { useNamespace as D } from "../../hooks/use-namespace/index.js";
8
+ import { useNamespace as I } from "../../hooks/use-namespace/index.js";
9
9
  import "../../hooks/use-model-toggle/index.js";
10
10
  import "@popperjs/core";
11
11
  import "../../hooks/use-z-index/index.js";
12
- const z = C({
12
+ const D = C({
13
13
  name: "vft-alert"
14
- }), Q = /* @__PURE__ */ C({
15
- ...z,
14
+ }), P = /* @__PURE__ */ C({
15
+ ...D,
16
16
  props: {
17
17
  title: { default: "" },
18
18
  description: { default: "" },
@@ -24,62 +24,62 @@ const z = C({
24
24
  effect: { default: "light" }
25
25
  },
26
26
  emits: {
27
- close: (n) => n instanceof MouseEvent
27
+ close: (e) => e instanceof MouseEvent
28
28
  },
29
- setup(n, { emit: h }) {
30
- const t = D("alert"), B = h, m = g(), d = N(!0), p = c(() => n.type), T = c(() => [
29
+ setup(e, { emit: h }) {
30
+ const t = I("alert"), B = h, m = g(), d = N(!0), f = a(() => e.type), T = a(() => [
31
31
  t.e("icon"),
32
- { [t.is("big")]: !!n.description || !!m.default }
33
- ]), w = c(() => ({ [t.is("bold")]: n.description || m.default })), f = (e) => {
34
- d.value = !1, B("close", e);
32
+ { [t.is("big")]: !!e.description || !!m.default }
33
+ ]), w = a(() => ({ [t.is("bold")]: e.description || m.default })), v = (n) => {
34
+ d.value = !1, B("close", n);
35
35
  };
36
- return (e, F) => (s(), r(S, {
37
- name: o(t).b("fade")
36
+ return (n, z) => (o(), r(S, {
37
+ name: l(t).b("fade")
38
38
  }, {
39
39
  default: V(() => [
40
- $(v("div", {
41
- class: l([o(t).b(), o(t).m(e.type), o(t).is("center", e.center), o(t).is(e.effect)]),
40
+ $(y("div", {
41
+ class: s([l(t).b(), l(t).m(e.type), l(t).is("center", e.center), l(t).is(e.effect)]),
42
42
  role: "alert"
43
43
  }, [
44
- e.showIcon && p.value ? (s(), r(o(b), {
44
+ e.showIcon && f.value ? (o(), r(l(p), {
45
45
  key: 0,
46
- class: l(T.value),
47
- icon: p.value
46
+ class: s(T.value),
47
+ icon: f.value
48
48
  }, null, 8, ["class", "icon"])) : i("", !0),
49
- v("div", {
50
- class: l(o(t).e("content"))
49
+ y("div", {
50
+ class: s(l(t).e("content"))
51
51
  }, [
52
- e.title || e.$slots.title ? (s(), a("span", {
52
+ e.title || n.$slots.title ? (o(), c("span", {
53
53
  key: 0,
54
- class: l([o(t).e("title"), w.value])
54
+ class: s([l(t).e("title"), w.value])
55
55
  }, [
56
- y(e.$slots, "title", {}, () => [
57
- k(u(e.title), 1)
56
+ k(n.$slots, "title", {}, () => [
57
+ b(u(e.title), 1)
58
58
  ])
59
59
  ], 2)) : i("", !0),
60
- e.$slots.default || e.description ? (s(), a("p", {
60
+ n.$slots.default || e.description ? (o(), c("p", {
61
61
  key: 1,
62
- class: l(o(t).e("description"))
62
+ class: s(l(t).e("description"))
63
63
  }, [
64
- y(e.$slots, "default", {}, () => [
65
- k(u(e.description), 1)
64
+ k(n.$slots, "default", {}, () => [
65
+ b(u(e.description), 1)
66
66
  ])
67
67
  ], 2)) : i("", !0),
68
- e.closable ? (s(), a(E, { key: 2 }, [
69
- e.closeText ? (s(), a("div", {
68
+ e.closable ? (o(), c(x, { key: 2 }, [
69
+ e.closeText ? (o(), c("div", {
70
70
  key: 0,
71
- class: l([o(t).e("close-btn"), o(t).is("customed")]),
72
- onClick: f
73
- }, u(e.closeText), 3)) : (s(), r(o(b), {
71
+ class: s([l(t).e("close-btn"), l(t).is("customed")]),
72
+ onClick: v
73
+ }, u(e.closeText), 3)) : (o(), r(l(p), {
74
74
  key: 1,
75
- class: l(o(t).e("close-btn")),
76
- onClick: f,
75
+ class: s(l(t).e("close-btn")),
76
+ onClick: v,
77
77
  icon: "icon-close"
78
78
  }, null, 8, ["class"]))
79
79
  ], 64)) : i("", !0)
80
80
  ], 2)
81
81
  ], 2), [
82
- [I, d.value]
82
+ [E, d.value]
83
83
  ])
84
84
  ]),
85
85
  _: 3
@@ -87,5 +87,5 @@ const z = C({
87
87
  }
88
88
  });
89
89
  export {
90
- Q as default
90
+ P as default
91
91
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as X, useAttrs as pe, ref as c, computed as b, onMounted as ve, createBlock as me, openBlock as E, unref as s, withCtx as p, createElementVNode as z, normalizeStyle as G, normalizeClass as k, createVNode as j, mergeProps as ge, withKeys as y, withModifiers as J, createSlots as he, renderSlot as $, createElementBlock as F, Fragment as be, renderList as ye, createTextVNode as $e, toDisplayString as we, nextTick as Ee } from "vue";
1
+ import { defineComponent as Q, useAttrs as ve, ref as c, computed as b, onMounted as me, createBlock as pe, openBlock as E, unref as s, withCtx as v, createElementVNode as q, normalizeStyle as z, normalizeClass as k, createVNode as G, mergeProps as ge, withKeys as y, withModifiers as j, createSlots as he, renderSlot as $, createElementBlock as F, Fragment as be, renderList as ye, createTextVNode as $e, toDisplayString as we, nextTick as Ee } from "vue";
2
2
  import { isObject as ke, isString as N, isArray as D } from "@vft/utils";
3
3
  import "../form/index.js";
4
4
  import { VftInput as Ae } from "../input/index.js";
5
5
  import { VftScrollbar as Se } from "../scrollbar/index.js";
6
6
  import { VftTooltip as Te } from "../tooltip/index.js";
7
- import { CHANGE_EVENT as Q, INPUT_EVENT as K, UPDATE_MODEL_EVENT as A } from "../../constants/event.js";
7
+ import { CHANGE_EVENT as J, INPUT_EVENT as K, UPDATE_MODEL_EVENT as A } from "../../constants/event.js";
8
8
  import { useAttrs as Ve } from "../../hooks/use-attrs/index.js";
9
9
  import { onClickOutside as Ce } from "@vueuse/core";
10
10
  import { throwError as Ie } from "../../utils/error.js";
@@ -16,11 +16,11 @@ import "@popperjs/core";
16
16
  import "../../hooks/use-z-index/index.js";
17
17
  import { generateId as Ne } from "./types.js";
18
18
  import { useFormDisabled as De } from "../form/hooks/use-form-common-props.js";
19
- const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick"], Re = "ElAutocomplete", Me = X({
19
+ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick"], Re = "ElAutocomplete", xe = Q({
20
20
  name: "vft-autocomplete",
21
21
  inheritAttrs: !1
22
- }), at = /* @__PURE__ */ X({
23
- ...Me,
22
+ }), at = /* @__PURE__ */ Q({
23
+ ...xe,
24
24
  props: {
25
25
  valueKey: { default: "value" },
26
26
  modelValue: { default: "" },
@@ -43,27 +43,27 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
43
43
  emits: {
44
44
  [A]: (t) => N(t),
45
45
  [K]: (t) => N(t),
46
- [Q]: (t) => N(t),
46
+ [J]: (t) => N(t),
47
47
  focus: (t) => t instanceof FocusEvent,
48
48
  blur: (t) => t instanceof FocusEvent,
49
49
  clear: () => !0,
50
50
  select: (t) => ke(t)
51
51
  },
52
- setup(t, { expose: Y, emit: Z }) {
53
- const r = Fe("autocomplete"), i = Z, x = Ve(), _ = pe(), O = De(), o = c(), R = c(), S = c(), M = c();
54
- let P = !1, T = !1;
55
- const u = c([]), l = c(-1), W = c(""), f = c(!1), w = c(!1), v = c(!1), g = b(() => r.b(String(Ne()))), ee = b(() => _.style), d = b(() => (u.value.length > 0 || v.value) && f.value), L = b(() => !t.hideLoading && v.value), te = b(() => o.value ? Array.from(
52
+ setup(t, { expose: X, emit: Y }) {
53
+ const i = Fe("autocomplete"), u = Y, Z = Ve(), _ = ve(), O = De(), o = c(), R = c(), S = c(), x = c();
54
+ let M = !1, T = !1;
55
+ const r = c([]), l = c(-1), P = c(""), f = c(!1), w = c(!1), m = c(!1), g = b(() => i.b(String(Ne()))), ee = b(() => _.style), d = b(() => (r.value.length > 0 || m.value) && f.value), W = b(() => !t.hideLoading && m.value), te = b(() => o.value ? Array.from(
56
56
  o.value.$el.querySelectorAll("input")
57
57
  ) : []), le = async () => {
58
- await Ee(), d.value && (W.value = `${o.value.$el.offsetWidth}px`);
58
+ await Ee(), d.value && (P.value = `${o.value.$el.offsetWidth}px`);
59
59
  }, ae = () => {
60
60
  l.value = -1;
61
- }, U = Be(async (e) => {
61
+ }, L = Be(async (e) => {
62
62
  if (w.value) return;
63
63
  const a = (n) => {
64
- v.value = !1, !w.value && (D(n) ? (u.value = n, l.value = t.highlightFirstItem ? 0 : -1) : Ie(Re, "autocomplete suggestions must be an array"));
64
+ m.value = !1, !w.value && (D(n) ? (r.value = n, l.value = t.highlightFirstItem ? 0 : -1) : Ie(Re, "autocomplete suggestions must be an array"));
65
65
  };
66
- if (v.value = !0, D(t.fetchSuggestions))
66
+ if (m.value = !0, D(t.fetchSuggestions))
67
67
  a(t.fetchSuggestions);
68
68
  else {
69
69
  const n = await t.fetchSuggestions(e, a);
@@ -71,29 +71,29 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
71
71
  }
72
72
  }, t.debounce), oe = (e) => {
73
73
  const a = !!e;
74
- if (i(K, e), i(A, e), w.value = !1, f.value ||= a, !t.triggerOnFocus && !e) {
75
- w.value = !0, u.value = [];
74
+ if (u(K, e), u(A, e), w.value = !1, f.value ||= a, !t.triggerOnFocus && !e) {
75
+ w.value = !0, r.value = [];
76
76
  return;
77
77
  }
78
- U(e);
78
+ L(e);
79
79
  }, se = (e) => {
80
80
  O.value || (e.target?.tagName !== "INPUT" || te.value.includes(document.activeElement)) && (f.value = !0);
81
81
  }, ne = (e) => {
82
- i(Q, e);
83
- }, re = (e) => {
84
- T ? T = !1 : (f.value = !0, i("focus", e), t.triggerOnFocus && !P && U(String(t.modelValue)));
82
+ u(J, e);
85
83
  }, ie = (e) => {
84
+ T ? T = !1 : (f.value = !0, u("focus", e), t.triggerOnFocus && !M && L(String(t.modelValue)));
85
+ }, ue = (e) => {
86
86
  setTimeout(() => {
87
87
  if (S.value?.isFocusInsideContent()) {
88
88
  T = !0;
89
89
  return;
90
90
  }
91
- f.value && h(), i("blur", e);
91
+ f.value && h(), u("blur", e);
92
92
  });
93
- }, ue = () => {
94
- f.value = !1, i(A, ""), i("clear");
95
- }, H = async () => {
96
- d.value && l.value >= 0 && l.value < u.value.length ? V(u.value[l.value]) : t.selectWhenUnmatched && (i("select", { value: t.modelValue }), u.value = [], l.value = -1);
93
+ }, re = () => {
94
+ f.value = !1, u(A, ""), u("clear");
95
+ }, U = async () => {
96
+ d.value && l.value >= 0 && l.value < r.value.length ? V(r.value[l.value]) : t.selectWhenUnmatched && (u("select", { value: t.modelValue }), r.value = [], l.value = -1);
97
97
  }, ce = (e) => {
98
98
  d.value && (e.preventDefault(), e.stopPropagation(), h());
99
99
  }, h = () => {
@@ -103,48 +103,48 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
103
103
  }, de = () => {
104
104
  o.value?.blur();
105
105
  }, V = async (e) => {
106
- i(K, e[t.valueKey]), i(A, e[t.valueKey]), i("select", e), u.value = [], l.value = -1;
106
+ u(K, e[t.valueKey]), u(A, e[t.valueKey]), u("select", e), r.value = [], l.value = -1;
107
107
  }, C = (e) => {
108
- if (!d.value || v.value) return;
108
+ if (!d.value || m.value) return;
109
109
  if (e < 0) {
110
110
  l.value = -1;
111
111
  return;
112
112
  }
113
- e >= u.value.length && (e = u.value.length - 1);
113
+ e >= r.value.length && (e = r.value.length - 1);
114
114
  const a = R.value.querySelector(
115
- `.${r.be("suggestion", "wrap")}`
116
- ), m = a.querySelectorAll(
117
- `.${r.be("suggestion", "list")} li`
118
- )[e], I = a.scrollTop, { offsetTop: q, scrollHeight: B } = m;
119
- q + B > I + a.clientHeight && (a.scrollTop += B), q < I && (a.scrollTop -= B), l.value = e, o.value.ref.setAttribute(
115
+ `.${i.be("suggestion", "wrap")}`
116
+ ), p = a.querySelectorAll(
117
+ `.${i.be("suggestion", "list")} li`
118
+ )[e], I = a.scrollTop, { offsetTop: H, scrollHeight: B } = p;
119
+ H + B > I + a.clientHeight && (a.scrollTop += B), H < I && (a.scrollTop -= B), l.value = e, o.value.ref.setAttribute(
120
120
  "aria-activedescendant",
121
121
  `${g.value}-item-${l.value}`
122
122
  );
123
123
  };
124
- return Ce(M, () => {
124
+ return Ce(x, () => {
125
125
  d.value && h();
126
- }), ve(() => {
126
+ }), me(() => {
127
127
  o.value.ref.setAttribute("role", "textbox"), o.value.ref.setAttribute("aria-autocomplete", "list"), o.value.ref.setAttribute("aria-controls", "id"), o.value.ref.setAttribute(
128
128
  "aria-activedescendant",
129
129
  `${g.value}-item-${l.value}`
130
- ), P = o.value.ref.hasAttribute("readonly");
131
- }), Y({
130
+ ), M = o.value.ref.hasAttribute("readonly");
131
+ }), X({
132
132
  /** @description the index of the currently highlighted item */
133
133
  highlightedIndex: l,
134
134
  /** @description autocomplete whether activated */
135
135
  activated: f,
136
136
  /** @description remote search loading status */
137
- loading: v,
137
+ loading: m,
138
138
  /** @description el-input component instance */
139
139
  inputRef: o,
140
140
  /** @description el-tooltip component instance */
141
141
  popperRef: S,
142
142
  /** @description fetch suggestions result */
143
- suggestions: u,
143
+ suggestions: r,
144
144
  /** @description triggers when a suggestion is clicked */
145
145
  handleSelect: V,
146
146
  /** @description handle keyboard enter event */
147
- handleKeyEnter: H,
147
+ handleKeyEnter: U,
148
148
  /** @description focus the input element */
149
149
  focus: fe,
150
150
  /** @description blur the input element */
@@ -153,56 +153,56 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
153
153
  close: h,
154
154
  /** @description highlight an item in a suggestion */
155
155
  highlight: C
156
- }), (e, a) => (E(), me(s(Te), {
156
+ }), (e, a) => (E(), pe(s(Te), {
157
157
  ref_key: "popperRef",
158
158
  ref: S,
159
159
  visible: d.value,
160
- placement: e.placement,
160
+ placement: t.placement,
161
161
  "fallback-placements": ["bottom-start", "top-start"],
162
- "popper-class": [s(r).e("popper"), e.popperClass],
163
- teleported: e.teleported,
162
+ "popper-class": [s(i).e("popper"), t.popperClass],
163
+ teleported: t.teleported,
164
164
  "gpu-acceleration": !1,
165
165
  pure: "",
166
166
  "manual-mode": "",
167
167
  effect: "light",
168
168
  trigger: "click",
169
- transition: `${s(r).namespace.value}-zoom-in-top`,
169
+ transition: `${s(i).namespace.value}-zoom-in-top`,
170
170
  persistent: "",
171
171
  onBeforeShow: le,
172
172
  onHide: ae
173
173
  }, {
174
- content: p(() => [
175
- z("div", {
174
+ content: v(() => [
175
+ q("div", {
176
176
  ref_key: "regionRef",
177
177
  ref: R,
178
- class: k([s(r).b("suggestion"), s(r).is("loading", L.value)]),
179
- style: G({
180
- [e.fitInputWidth ? "width" : "minWidth"]: W.value,
178
+ class: k([s(i).b("suggestion"), s(i).is("loading", W.value)]),
179
+ style: z({
180
+ [t.fitInputWidth ? "width" : "minWidth"]: P.value,
181
181
  outline: "none"
182
182
  }),
183
183
  role: "region"
184
184
  }, [
185
- j(s(Se), {
185
+ G(s(Se), {
186
186
  id: g.value,
187
187
  tag: "ul",
188
- "wrap-class": s(r).be("suggestion", "wrap"),
189
- "view-class": s(r).be("suggestion", "list"),
188
+ "wrap-class": s(i).be("suggestion", "wrap"),
189
+ "view-class": s(i).be("suggestion", "list"),
190
190
  role: "listbox"
191
191
  }, {
192
- default: p(() => [
193
- L.value ? (E(), F("li", {
192
+ default: v(() => [
193
+ W.value ? (E(), F("li", {
194
194
  key: 0,
195
- class: k(s(r).is("loading"))
196
- }, null, 2)) : (E(!0), F(be, { key: 1 }, ye(u.value, (n, m) => (E(), F("li", {
197
- id: `${g.value}-item-${m}`,
198
- key: m,
199
- class: k({ highlighted: l.value === m }),
195
+ class: k(s(i).is("loading"))
196
+ }, null, 2)) : (E(!0), F(be, { key: 1 }, ye(r.value, (n, p) => (E(), F("li", {
197
+ id: `${g.value}-item-${p}`,
198
+ key: p,
199
+ class: k({ highlighted: l.value === p }),
200
200
  role: "option",
201
- "aria-selected": l.value === m,
201
+ "aria-selected": l.value === p,
202
202
  onClick: (I) => V(n)
203
203
  }, [
204
204
  $(e.$slots, "default", { item: n }, () => [
205
- $e(we(n[e.valueKey]), 1)
205
+ $e(we(n[t.valueKey]), 1)
206
206
  ])
207
207
  ], 10, Oe))), 128))
208
208
  ]),
@@ -210,34 +210,34 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
210
210
  }, 8, ["id", "wrap-class", "view-class"])
211
211
  ], 6)
212
212
  ]),
213
- default: p(() => [
214
- z("div", {
213
+ default: v(() => [
214
+ q("div", {
215
215
  ref_key: "listboxRef",
216
- ref: M,
217
- class: k([s(r).b(), e.$attrs.class]),
218
- style: G(ee.value),
216
+ ref: x,
217
+ class: k([s(i).b(), e.$attrs.class]),
218
+ style: z(ee.value),
219
219
  role: "combobox",
220
220
  "aria-haspopup": "listbox",
221
221
  "aria-expanded": d.value,
222
222
  "aria-owns": g.value
223
223
  }, [
224
- j(s(Ae), ge({
224
+ G(s(Ae), ge({
225
225
  ref_key: "inputRef",
226
226
  ref: o
227
- }, s(x), {
228
- clearable: e.clearable,
227
+ }, s(Z), {
228
+ clearable: t.clearable,
229
229
  disabled: s(O),
230
- name: e.name,
231
- "model-value": e.modelValue,
230
+ name: t.name,
231
+ "model-value": t.modelValue,
232
232
  onInput: oe,
233
233
  onChange: ne,
234
- onFocus: re,
235
- onBlur: ie,
236
- onClear: ue,
234
+ onFocus: ie,
235
+ onBlur: ue,
236
+ onClear: re,
237
237
  onKeydown: [
238
- a[0] || (a[0] = y(J((n) => C(l.value - 1), ["prevent"]), ["up"])),
239
- a[1] || (a[1] = y(J((n) => C(l.value + 1), ["prevent"]), ["down"])),
240
- y(H, ["enter"]),
238
+ a[0] || (a[0] = y(j((n) => C(l.value - 1), ["prevent"]), ["up"])),
239
+ a[1] || (a[1] = y(j((n) => C(l.value + 1), ["prevent"]), ["down"])),
240
+ y(U, ["enter"]),
241
241
  y(h, ["tab"]),
242
242
  y(ce, ["esc"])
243
243
  ],
@@ -245,28 +245,28 @@ const Ke = ["aria-expanded", "aria-owns"], Oe = ["id", "aria-selected", "onClick
245
245
  }), he({ _: 2 }, [
246
246
  e.$slots.prepend ? {
247
247
  name: "prepend",
248
- fn: p(() => [
248
+ fn: v(() => [
249
249
  $(e.$slots, "prepend")
250
250
  ]),
251
251
  key: "0"
252
252
  } : void 0,
253
253
  e.$slots.append ? {
254
254
  name: "append",
255
- fn: p(() => [
255
+ fn: v(() => [
256
256
  $(e.$slots, "append")
257
257
  ]),
258
258
  key: "1"
259
259
  } : void 0,
260
260
  e.$slots.prefix ? {
261
261
  name: "prefix",
262
- fn: p(() => [
262
+ fn: v(() => [
263
263
  $(e.$slots, "prefix")
264
264
  ]),
265
265
  key: "2"
266
266
  } : void 0,
267
267
  e.$slots.suffix ? {
268
268
  name: "suffix",
269
- fn: p(() => [
269
+ fn: v(() => [
270
270
  $(e.$slots, "suffix")
271
271
  ]),
272
272
  key: "3"
@@ -1,16 +1,16 @@
1
- import { defineComponent as v, ref as z, computed as i, watch as h, createElementBlock as p, openBlock as o, normalizeStyle as k, normalizeClass as y, createBlock as n, renderSlot as g, unref as l, normalizeProps as B, mergeProps as E } from "vue";
2
- import { isString as S, isNumber as b, singleAttrToObj as C } from "@vft/utils";
3
- import { VftIcon as V } from "../icon/index.js";
4
- import { VftImage as I } from "../image/index.js";
1
+ import { defineComponent as v, ref as z, computed as i, watch as h, createElementBlock as k, openBlock as o, normalizeStyle as y, normalizeClass as g, createBlock as n, renderSlot as B, unref as c, normalizeProps as E, mergeProps as S } from "vue";
2
+ import { isString as b, isNumber as C, singleAttrToObj as V } from "@vft/utils";
3
+ import { VftIcon as I } from "../icon/index.js";
4
+ import { VftImage as L } from "../image/index.js";
5
5
  import "@vueuse/core";
6
- import { addUnit as L } from "../../utils/helper.js";
6
+ import { addUnit as N } from "../../utils/helper.js";
7
7
  import "lodash-es";
8
8
  import "../form/index.js";
9
- import { useNamespace as N } from "../../hooks/use-namespace/index.js";
9
+ import { useNamespace as P } from "../../hooks/use-namespace/index.js";
10
10
  import "../../hooks/use-model-toggle/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../hooks/use-z-index/index.js";
13
- const J = /* @__PURE__ */ v({
13
+ const H = /* @__PURE__ */ v({
14
14
  __name: "avatar",
15
15
  props: {
16
16
  size: { default: "" },
@@ -21,34 +21,34 @@ const J = /* @__PURE__ */ v({
21
21
  fit: { default: "cover" }
22
22
  },
23
23
  emits: ["error"],
24
- setup(r, { emit: c }) {
25
- const m = c, t = N("avatar"), a = z(!1), u = i(() => {
26
- const e = [t.b()];
27
- return S(r.size) && e.push(t.m(r.size)), !r.src && r.icon && e.push(t.m("icon")), r.shape && e.push(t.m(r.shape)), e;
28
- }), f = i(() => b(r.size) ? t.cssVarBlock({
29
- size: L(r.size) || ""
30
- }) : void 0), s = i(() => C(r.icon, "icon", { size: r.size }));
24
+ setup(e, { emit: l }) {
25
+ const m = l, r = P("avatar"), a = z(!1), u = i(() => {
26
+ const t = [r.b()];
27
+ return b(e.size) && t.push(r.m(e.size)), !e.src && e.icon && t.push(r.m("icon")), e.shape && t.push(r.m(e.shape)), t;
28
+ }), f = i(() => C(e.size) ? r.cssVarBlock({
29
+ size: N(e.size) || ""
30
+ }) : void 0), s = i(() => V(e.icon, "icon", { size: e.size }));
31
31
  h(
32
- () => r.src,
32
+ () => e.src,
33
33
  () => a.value = !1
34
34
  );
35
- function d(e) {
36
- a.value = !0, m("error", e);
35
+ function d(t) {
36
+ a.value = !0, m("error", t);
37
37
  }
38
- return (e, P) => (o(), p("span", {
39
- class: y(u.value),
40
- style: k(f.value)
38
+ return (t, j) => (o(), k("span", {
39
+ class: g(u.value),
40
+ style: y(f.value)
41
41
  }, [
42
- e.src && !a.value ? (o(), n(l(I), {
42
+ e.src && !a.value ? (o(), n(c(L), {
43
43
  key: 0,
44
44
  src: e.src,
45
45
  alt: e.alt,
46
46
  fit: e.fit,
47
47
  onError: d
48
- }, null, 8, ["src", "alt", "fit"])) : s.value?.icon ? (o(), n(l(V), B(E({ key: 1 }, s.value)), null, 16)) : g(e.$slots, "default", { key: 2 })
48
+ }, null, 8, ["src", "alt", "fit"])) : s.value?.icon ? (o(), n(c(I), E(S({ key: 1 }, s.value)), null, 16)) : B(t.$slots, "default", { key: 2 })
49
49
  ], 6));
50
50
  }
51
51
  });
52
52
  export {
53
- J as default
53
+ H as default
54
54
  };
@@ -1,19 +1,19 @@
1
- import { defineComponent as z, computed as r, createElementBlock as s, openBlock as n, normalizeStyle as d, normalizeClass as o, unref as t, createCommentVNode as g, Fragment as k, renderList as x, createVNode as v, withCtx as b, createTextVNode as V, toDisplayString as w } from "vue";
2
- import { VftAvatar as f } from "../avatar/index.js";
1
+ import { defineComponent as f, computed as r, createElementBlock as n, openBlock as s, normalizeStyle as c, normalizeClass as o, unref as t, createCommentVNode as y, Fragment as g, renderList as k, createVNode as d, withCtx as b, createTextVNode as p, toDisplayString as V } from "vue";
2
+ import { VftAvatar as v } from "../avatar/index.js";
3
3
  import "@vueuse/core";
4
- import { addUnit as l } from "@vft/utils";
4
+ import { addUnit as i } from "@vft/utils";
5
5
  import "../config-provider/hooks/use-global-config.js";
6
- import { generateCssVars as N } from "../../utils/ns-cover.js";
6
+ import { generateCssVars as w } from "../../utils/ns-cover.js";
7
7
  import "lodash-es";
8
8
  import "../form/index.js";
9
- import { useNamespace as B } from "../../hooks/use-namespace/index.js";
9
+ import { useNamespace as N } from "../../hooks/use-namespace/index.js";
10
10
  import "../../hooks/use-model-toggle/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../hooks/use-z-index/index.js";
13
- const M = z({
13
+ const B = f({
14
14
  name: "vft-avatar-stack"
15
- }), G = /* @__PURE__ */ z({
16
- ...M,
15
+ }), G = /* @__PURE__ */ f({
16
+ ...B,
17
17
  props: {
18
18
  avatars: { default: () => [] },
19
19
  maxCount: { default: 5 },
@@ -23,45 +23,45 @@ const M = z({
23
23
  borderColor: { default: "white" }
24
24
  },
25
25
  setup(e) {
26
- const a = B("avatar-stack"), m = r(() => e.avatars.slice(0, e.maxCount)), u = r(() => e.avatars.length - e.maxCount), C = r(() => e.overlap !== void 0 ? e.overlap : Math.round(e.size / 3)), p = r(() => Math.max(12, Math.round(e.size * 0.25))), h = r(() => N(
26
+ const a = N("avatar-stack"), l = r(() => e.avatars.slice(0, e.maxCount)), m = r(() => e.avatars.length - e.maxCount), z = r(() => e.overlap !== void 0 ? e.overlap : Math.round(e.size / 3)), C = r(() => Math.max(12, Math.round(e.size * 0.25))), h = r(() => w(
27
27
  {
28
- "avatar-size": l(e.size),
29
- overlap: l(C.value),
30
- "font-size": l(p.value),
28
+ "avatar-size": i(e.size),
29
+ overlap: i(z.value),
30
+ "font-size": i(C.value),
31
31
  "border-color": e.borderColor
32
32
  },
33
33
  "avatar-stack"
34
34
  ));
35
- return (i, S) => (n(), s("div", {
35
+ return (M, S) => (s(), n("div", {
36
36
  class: o(t(a).b()),
37
- style: d(h.value)
37
+ style: c(h.value)
38
38
  }, [
39
- (n(!0), s(k, null, x(m.value, (y, c) => (n(), s("div", {
40
- key: c,
39
+ (s(!0), n(g, null, k(l.value, (x, u) => (s(), n("div", {
40
+ key: u,
41
41
  class: o(t(a).e("item")),
42
- style: d({ zIndex: m.value.length - c })
42
+ style: c({ zIndex: l.value.length - u })
43
43
  }, [
44
- v(t(f), {
45
- src: y,
46
- size: i.size,
44
+ d(t(v), {
45
+ src: x,
46
+ size: e.size,
47
47
  class: o(t(a).e("stacked-avatar"))
48
48
  }, null, 8, ["src", "size", "class"])
49
49
  ], 6))), 128)),
50
- i.showRemainCount && u.value > 0 ? (n(), s("div", {
50
+ e.showRemainCount && m.value > 0 ? (s(), n("div", {
51
51
  key: 0,
52
52
  class: o([t(a).e("item"), t(a).e("remaining-count")]),
53
53
  style: { zIndex: 0 }
54
54
  }, [
55
- v(t(f), {
56
- size: i.size,
55
+ d(t(v), {
56
+ size: e.size,
57
57
  class: o(t(a).e("remaining-avatar"))
58
58
  }, {
59
59
  default: b(() => [
60
- V(" +" + w(u.value), 1)
60
+ p(" +" + V(m.value), 1)
61
61
  ]),
62
62
  _: 1
63
63
  }, 8, ["size", "class"])
64
- ], 2)) : g("", !0)
64
+ ], 2)) : y("", !0)
65
65
  ], 6));
66
66
  }
67
67
  });