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,9 +1,9 @@
1
- import { defineComponent as H, ref as ee, reactive as te, computed as d, watch as ne, onMounted as ie, onUpdated as ue, createElementBlock as C, openBlock as S, withModifiers as V, normalizeClass as P, unref as u, withDirectives as G, createCommentVNode as R, createVNode as B, withKeys as N } from "vue";
1
+ import { defineComponent as L, ref as ee, reactive as te, computed as d, watch as ne, onMounted as ie, onUpdated as ue, createElementBlock as C, openBlock as S, withModifiers as V, normalizeClass as P, unref as u, withDirectives as R, createCommentVNode as W, createVNode as B, withKeys as N } from "vue";
2
2
  import { isNumber as s, isUndefined as h, isString as le } from "@vft/utils";
3
3
  import "../form/index.js";
4
- import { VftIcon as W } from "../icon/index.js";
4
+ import { VftIcon as Y } from "../icon/index.js";
5
5
  import { VftInput as ae } from "../input/index.js";
6
- import { UPDATE_MODEL_EVENT as f, INPUT_EVENT as I, CHANGE_EVENT as Y } from "../../constants/event.js";
6
+ import { UPDATE_MODEL_EVENT as f, INPUT_EVENT as I, CHANGE_EVENT as $ } from "../../constants/event.js";
7
7
  import "@vueuse/core";
8
8
  import { debugWarn as O } from "../../utils/error.js";
9
9
  import "../config-provider/hooks/use-global-config.js";
@@ -12,13 +12,13 @@ import { useNamespace as re } from "../../hooks/use-namespace/index.js";
12
12
  import "../../hooks/use-model-toggle/index.js";
13
13
  import "@popperjs/core";
14
14
  import "../../hooks/use-z-index/index.js";
15
- import { vRepeatClick as $ } from "./directives.js";
15
+ import { vRepeatClick as H } from "./directives.js";
16
16
  import { useFormItem as oe } from "../form/hooks/use-form-item.js";
17
- import { useFormSize as se, useFormDisabled as me } from "../form/hooks/use-form-common-props.js";
18
- const ce = H({
17
+ import { useFormSize as se, useFormDisabled as ce } from "../form/hooks/use-form-common-props.js";
18
+ const me = L({
19
19
  name: "vft-input-number"
20
- }), Be = /* @__PURE__ */ H({
21
- ...ce,
20
+ }), Be = /* @__PURE__ */ L({
21
+ ...me,
22
22
  props: {
23
23
  id: { default: void 0 },
24
24
  step: { default: 1 },
@@ -39,154 +39,154 @@ const ce = H({
39
39
  validateEvent: { type: Boolean, default: !0 }
40
40
  },
41
41
  emits: {
42
- [Y]: (t, y) => y !== t,
43
- blur: (t) => t instanceof FocusEvent,
44
- focus: (t) => t instanceof FocusEvent,
45
- [I]: (t) => s(t) || b(t),
46
- [f]: (t) => s(t) || b(t)
42
+ [$]: (e, x) => x !== e,
43
+ blur: (e) => e instanceof FocusEvent,
44
+ focus: (e) => e instanceof FocusEvent,
45
+ [I]: (e) => s(e) || b(e),
46
+ [f]: (e) => s(e) || b(e)
47
47
  },
48
- setup(t, { expose: y, emit: L }) {
49
- const o = re("input-number"), r = L, m = ee(), l = te({
50
- currentValue: t.modelValue,
48
+ setup(e, { expose: x, emit: j }) {
49
+ const o = re("input-number"), r = j, c = ee(), l = te({
50
+ currentValue: e.modelValue,
51
51
  userInput: null
52
52
  }), { formItem: T } = oe(), D = d(
53
- () => t.modelValue && s(t.modelValue) && t.modelValue <= t.min
53
+ () => e.modelValue && s(e.modelValue) && e.modelValue <= e.min
54
54
  ), M = d(
55
- () => t.modelValue && s(t.modelValue) && t.modelValue >= t.max
56
- ), j = d(() => {
57
- const e = z(t.step);
58
- return h(t.precision) ? Math.max(z(t.modelValue), e) : (e > t.precision && O(
55
+ () => e.modelValue && s(e.modelValue) && e.modelValue >= e.max
56
+ ), q = d(() => {
57
+ const t = z(e.step);
58
+ return h(e.precision) ? Math.max(z(e.modelValue), t) : (t > e.precision && O(
59
59
  "InputNumber",
60
60
  "precision should not be less than the decimal places of step"
61
- ), t.precision);
62
- }), w = d(() => t.controls && t.controlsPosition === "right"), k = se(), c = me(), g = d(() => {
61
+ ), e.precision);
62
+ }), y = d(() => e.controls && e.controlsPosition === "right"), k = se(), m = ce(), w = d(() => {
63
63
  if (l.userInput !== null)
64
64
  return l.userInput;
65
- let e = l.currentValue;
66
- if (b(e)) return "";
67
- if (s(e)) {
68
- if (Number.isNaN(e)) return "";
69
- h(t.precision) || (e = e?.toFixed(t.precision));
65
+ let t = l.currentValue;
66
+ if (b(t)) return "";
67
+ if (s(t)) {
68
+ if (Number.isNaN(t)) return "";
69
+ h(e.precision) || (t = t?.toFixed(e.precision));
70
70
  }
71
- return e;
72
- }), E = (e, n) => {
73
- if (h(n) && (n = j.value), n === 0) return Math.round(e);
74
- let i = String(e);
71
+ return t;
72
+ }), g = (t, n) => {
73
+ if (h(n) && (n = q.value), n === 0) return Math.round(t);
74
+ let i = String(t);
75
75
  const a = i.indexOf(".");
76
- if (a === -1 || !i.replace(".", "").split("")[a + n]) return e;
77
- const U = i.length;
78
- return i.charAt(U - 1) === "5" && (i = `${i.slice(0, Math.max(0, U - 1))}6`), Number.parseFloat(Number(i).toFixed(n));
79
- }, z = (e) => {
80
- if (b(e)) return 0;
81
- const n = e.toString(), i = n.indexOf(".");
76
+ if (a === -1 || !i.replace(".", "").split("")[a + n]) return t;
77
+ const G = i.length;
78
+ return i.charAt(G - 1) === "5" && (i = `${i.slice(0, Math.max(0, G - 1))}6`), Number.parseFloat(Number(i).toFixed(n));
79
+ }, z = (t) => {
80
+ if (b(t)) return 0;
81
+ const n = t.toString(), i = n.indexOf(".");
82
82
  let a = 0;
83
83
  return i !== -1 && (a = n.length - i - 1), a;
84
- }, K = (e, n = 1) => s(e) ? E(e + t.step * n) : l.currentValue, F = () => {
85
- if (t.readonly || c.value || M.value) return;
86
- const e = Number(g.value) || 0, n = K(e);
84
+ }, K = (t, n = 1) => s(t) ? g(t + e.step * n) : l.currentValue, E = () => {
85
+ if (e.readonly || m.value || M.value) return;
86
+ const t = Number(w.value) || 0, n = K(t);
87
87
  v(n), r(I, l.currentValue);
88
- }, x = () => {
89
- if (t.readonly || c.value || D.value) return;
90
- const e = Number(g.value) || 0, n = K(e, -1);
88
+ }, F = () => {
89
+ if (e.readonly || m.value || D.value) return;
90
+ const t = Number(w.value) || 0, n = K(t, -1);
91
91
  v(n), r(I, l.currentValue);
92
- }, A = (e, n) => {
93
- let i = Number(e);
94
- if (b(e) || Number.isNaN(i))
92
+ }, A = (t, n) => {
93
+ let i = Number(t);
94
+ if (b(t) || Number.isNaN(i))
95
95
  return null;
96
- if (e === "") {
97
- if (t.valueOnClear === null)
96
+ if (t === "") {
97
+ if (e.valueOnClear === null)
98
98
  return null;
99
- i = le(t.valueOnClear) ? { min: t.min, max: t.max }[t.valueOnClear] : t.valueOnClear;
99
+ i = le(e.valueOnClear) ? { min: e.min, max: e.max }[e.valueOnClear] : e.valueOnClear;
100
100
  }
101
- return t.stepStrictly && (i = E(Math.round(i / t.step) * t.step, t.precision)), h(t.precision) || (i = E(i, t.precision)), (i > t.max || i < t.min) && (i = i > t.max ? t.max : t.min, n && r(f, i)), i;
102
- }, v = (e, n = !0) => {
103
- const i = l.currentValue, a = A(e);
101
+ return e.stepStrictly && (i = g(Math.round(i / e.step) * e.step, e.precision)), h(e.precision) || (i = g(i, e.precision)), (i > e.max || i < e.min) && (i = i > e.max ? e.max : e.min, n && r(f, i)), i;
102
+ }, v = (t, n = !0) => {
103
+ const i = l.currentValue, a = A(t);
104
104
  if (!n) {
105
105
  r(f, a);
106
106
  return;
107
107
  }
108
- i !== a && (l.userInput = null, r(f, a), r(Y, a, i), t.validateEvent && T?.validate?.("change").catch((p) => O(p)), l.currentValue = a);
109
- }, q = (e) => {
110
- l.userInput = e;
111
- const n = e === "" ? null : Number(e);
108
+ i !== a && (l.userInput = null, r(f, a), r($, a, i), e.validateEvent && T?.validate?.("change").catch((U) => O(U)), l.currentValue = a);
109
+ }, J = (t) => {
110
+ l.userInput = t;
111
+ const n = t === "" ? null : Number(t);
112
112
  r(I, n), v(n, !1);
113
- }, J = (e) => {
114
- const n = e !== "" ? Number(e) : "";
115
- (s(n) && !Number.isNaN(n) || e === "") && v(n), l.userInput = null;
116
- }, Q = () => {
117
- m.value?.focus?.();
113
+ }, Q = (t) => {
114
+ const n = t !== "" ? Number(t) : "";
115
+ (s(n) && !Number.isNaN(n) || t === "") && v(n), l.userInput = null;
118
116
  }, X = () => {
119
- m.value?.blur?.();
120
- }, Z = (e) => {
121
- r("focus", e);
122
- }, _ = (e) => {
123
- r("blur", e), t.validateEvent && T?.validate?.("blur").catch((n) => O(n));
117
+ c.value?.focus?.();
118
+ }, Z = () => {
119
+ c.value?.blur?.();
120
+ }, p = (t) => {
121
+ r("focus", t);
122
+ }, _ = (t) => {
123
+ r("blur", t), e.validateEvent && T?.validate?.("blur").catch((n) => O(n));
124
124
  };
125
125
  return ne(
126
- () => t.modelValue,
127
- (e) => {
128
- const n = A(l.userInput), i = A(e, !0);
126
+ () => e.modelValue,
127
+ (t) => {
128
+ const n = A(l.userInput), i = A(t, !0);
129
129
  !s(n) && (!n || n !== i) && (l.currentValue = i, l.userInput = null);
130
130
  },
131
131
  { immediate: !0 }
132
132
  ), ie(() => {
133
- const e = m.value?.input;
134
- if (e.setAttribute("role", "spinbutton"), Number.isFinite(t.max) ? e.setAttribute("aria-valuemax", String(t.max)) : e.removeAttribute("aria-valuemax"), Number.isFinite(t.min) ? e.setAttribute("aria-valuemin", String(t.min)) : e.removeAttribute("aria-valuemin"), e.setAttribute("aria-valuenow", String(l.currentValue)), e.setAttribute("aria-disabled", String(c.value)), !s(t.modelValue) && t.modelValue !== null) {
135
- let n = Number(t.modelValue);
133
+ const t = c.value?.input;
134
+ if (t.setAttribute("role", "spinbutton"), Number.isFinite(e.max) ? t.setAttribute("aria-valuemax", String(e.max)) : t.removeAttribute("aria-valuemax"), Number.isFinite(e.min) ? t.setAttribute("aria-valuemin", String(e.min)) : t.removeAttribute("aria-valuemin"), t.setAttribute("aria-valuenow", String(l.currentValue)), t.setAttribute("aria-disabled", String(m.value)), !s(e.modelValue) && e.modelValue !== null) {
135
+ let n = Number(e.modelValue);
136
136
  Number.isNaN(n) && (n = null), r(f, n);
137
137
  }
138
138
  }), ue(() => {
139
- m.value?.input?.setAttribute("aria-valuenow", `${l.currentValue}`);
140
- }), y({
139
+ c.value?.input?.setAttribute("aria-valuenow", `${l.currentValue}`);
140
+ }), x({
141
141
  /** @description get focus the input component */
142
- focus: Q,
142
+ focus: X,
143
143
  /** @description remove focus the input component */
144
- blur: X
145
- }), (e, n) => (S(), C("div", {
144
+ blur: Z
145
+ }), (t, n) => (S(), C("div", {
146
146
  class: P([
147
147
  u(o).b(),
148
148
  u(o).m(u(k)),
149
- u(o).is("disabled", u(c)),
149
+ u(o).is("disabled", u(m)),
150
150
  u(o).is("without-controls", !e.controls),
151
- u(o).is("controls-right", w.value)
151
+ u(o).is("controls-right", y.value)
152
152
  ]),
153
153
  onDragstart: n[1] || (n[1] = V(() => {
154
154
  }, ["prevent"]))
155
155
  }, [
156
- e.controls ? G((S(), C("span", {
156
+ e.controls ? R((S(), C("span", {
157
157
  key: 0,
158
158
  role: "button",
159
159
  class: P([u(o).e("decrease"), u(o).is("disabled", D.value)]),
160
- onKeydown: N(x, ["enter"])
160
+ onKeydown: N(F, ["enter"])
161
161
  }, [
162
- B(u(W), {
163
- icon: w.value ? "icon-arrow-down" : "icon-minus"
162
+ B(u(Y), {
163
+ icon: y.value ? "icon-arrow-down" : "icon-minus"
164
164
  }, null, 8, ["icon"])
165
165
  ], 34)), [
166
- [u($), x]
167
- ]) : R("", !0),
168
- e.controls ? G((S(), C("span", {
166
+ [u(H), F]
167
+ ]) : W("", !0),
168
+ e.controls ? R((S(), C("span", {
169
169
  key: 1,
170
170
  role: "button",
171
171
  class: P([u(o).e("increase"), u(o).is("disabled", M.value)]),
172
- onKeydown: N(F, ["enter"])
172
+ onKeydown: N(E, ["enter"])
173
173
  }, [
174
- B(u(W), {
175
- icon: w.value ? "icon-arrow-up" : "icon-plus"
174
+ B(u(Y), {
175
+ icon: y.value ? "icon-arrow-up" : "icon-plus"
176
176
  }, null, 8, ["icon"])
177
177
  ], 34)), [
178
- [u($), F]
179
- ]) : R("", !0),
178
+ [u(H), E]
179
+ ]) : W("", !0),
180
180
  B(u(ae), {
181
181
  id: e.id,
182
182
  ref_key: "input",
183
- ref: m,
183
+ ref: c,
184
184
  type: "number",
185
185
  step: e.step,
186
- "model-value": g.value,
186
+ "model-value": w.value,
187
187
  placeholder: e.placeholder,
188
188
  readonly: e.readonly,
189
- disabled: u(c),
189
+ disabled: u(m),
190
190
  size: u(k),
191
191
  max: e.max,
192
192
  min: e.min,
@@ -196,13 +196,13 @@ const ce = H({
196
196
  onWheel: n[0] || (n[0] = V(() => {
197
197
  }, ["prevent"])),
198
198
  onKeydown: [
199
- N(V(F, ["prevent"]), ["up"]),
200
- N(V(x, ["prevent"]), ["down"])
199
+ N(V(E, ["prevent"]), ["up"]),
200
+ N(V(F, ["prevent"]), ["down"])
201
201
  ],
202
202
  onBlur: _,
203
- onFocus: Z,
204
- onInput: q,
205
- onChange: J
203
+ onFocus: p,
204
+ onInput: J,
205
+ onChange: Q
206
206
  }, null, 8, ["id", "step", "model-value", "placeholder", "readonly", "disabled", "size", "max", "min", "name", "label", "onKeydown"])
207
207
  ], 34));
208
208
  }
@@ -1,6 +1,6 @@
1
1
  import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
2
2
  import { EVENT_CODE as g } from "../../../constants/aria.js";
3
- import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
3
+ import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } from "../../../constants/event.js";
4
4
  import "@vueuse/core";
5
5
  import { isUndefined as K } from "@vft/utils";
6
6
  import { debugWarn as C } from "../../../utils/error.js";
@@ -1,4 +1,4 @@
1
- import { defineComponent as c, getCurrentInstance as k, computed as b, createElementBlock as l, openBlock as r, normalizeClass as a, unref as t, createBlock as y, createCommentVNode as s, normalizeProps as C, mergeProps as g, renderSlot as B } from "vue";
1
+ import { defineComponent as s, getCurrentInstance as k, computed as b, createElementBlock as l, openBlock as i, normalizeClass as a, unref as t, createBlock as y, createCommentVNode as c, normalizeProps as C, mergeProps as g, renderSlot as B } from "vue";
2
2
  import { VftIcon as v } from "../icon/index.js";
3
3
  import "@vueuse/core";
4
4
  import { singleAttrToObj as P } from "@vft/utils";
@@ -11,9 +11,9 @@ import "@popperjs/core";
11
11
  import "../../hooks/use-z-index/index.js";
12
12
  import { useRouterHelper as $ } from "@vft/router";
13
13
  import "vue-router";
14
- const h = c({
14
+ const h = s({
15
15
  name: "vft-link"
16
- }), G = /* @__PURE__ */ c({
16
+ }), F = /* @__PURE__ */ s({
17
17
  ...h,
18
18
  props: {
19
19
  type: { default: "default" },
@@ -24,31 +24,31 @@ const h = c({
24
24
  icon: {}
25
25
  },
26
26
  emits: ["click"],
27
- setup(o, { emit: m }) {
28
- const n = R("link"), u = m, p = k().appContext.config.globalProperties.$router, { go: d } = $(p);
29
- function f(e) {
30
- o.route && d(o.route, o.isReplace), o.disabled || u("click", e);
27
+ setup(e, { emit: m }) {
28
+ const o = R("link"), u = m, d = k().appContext.config.globalProperties.$router, { go: f } = $(d);
29
+ function p(n) {
30
+ e.route && f(e.route, e.isReplace), e.disabled || u("click", n);
31
31
  }
32
- const i = b(() => P(o.icon, "icon"));
33
- return (e, I) => (r(), l("span", {
32
+ const r = b(() => P(e.icon, "icon"));
33
+ return (n, I) => (i(), l("span", {
34
34
  class: a([
35
- t(n).b(),
36
- t(n).m(e.type),
37
- t(n).is("disabled", e.disabled),
38
- t(n).is("underline", e.underline && !e.disabled)
35
+ t(o).b(),
36
+ t(o).m(e.type),
37
+ t(o).is("disabled", e.disabled),
38
+ t(o).is("underline", e.underline && !e.disabled)
39
39
  ]),
40
- onClick: f
40
+ onClick: p
41
41
  }, [
42
- i.value?.icon ? (r(), y(t(v), C(g({ key: 0 }, i.value)), null, 16)) : s("", !0),
43
- e.$slots.default ? (r(), l("span", {
42
+ r.value?.icon ? (i(), y(t(v), C(g({ key: 0 }, r.value)), null, 16)) : c("", !0),
43
+ n.$slots.default ? (i(), l("span", {
44
44
  key: 1,
45
- class: a(t(n).e("inner"))
45
+ class: a(t(o).e("inner"))
46
46
  }, [
47
- B(e.$slots, "default")
48
- ], 2)) : s("", !0)
47
+ B(n.$slots, "default")
48
+ ], 2)) : c("", !0)
49
49
  ], 2));
50
50
  }
51
51
  });
52
52
  export {
53
- G as default
53
+ F as default
54
54
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, ref as y, computed as x, createElementBlock as m, openBlock as r, normalizeClass as c, normalizeStyle as V, unref as e, Fragment as N, renderList as z, createElementVNode as f, createVNode as B, mergeProps as d, toDisplayString as D, createBlock as p, createCommentVNode as T } from "vue";
1
+ import { defineComponent as h, ref as y, computed as _, createElementBlock as m, openBlock as l, normalizeClass as r, normalizeStyle as V, unref as e, Fragment as N, renderList as z, createElementVNode as f, createVNode as B, mergeProps as d, toDisplayString as D, createBlock as p, createCommentVNode as T } from "vue";
2
2
  import { VftIcon as g } from "../icon/index.js";
3
3
  import "@vueuse/core";
4
4
  import { VNode as b, singleAttrToObj as E } from "@vft/utils";
@@ -21,45 +21,45 @@ const j = ["onClick"], A = h({
21
21
  activeIndex: {}
22
22
  },
23
23
  emits: ["item-click"],
24
- setup(i, { emit: k }) {
25
- const n = S("list-cell"), C = k, u = y(i.activeIndex), I = x(() => H(
24
+ setup(c, { emit: k }) {
25
+ const n = S("list-cell"), C = k, u = y(c.activeIndex), I = _(() => H(
26
26
  {
27
- height: v(i.cellHeight),
28
- "left-text-distance": v(i.leftTextDistance)
27
+ height: v(c.cellHeight),
28
+ "left-text-distance": v(c.leftTextDistance)
29
29
  },
30
30
  "list-cell"
31
31
  ));
32
- function _(o, l) {
33
- u.value = l, C("item-click", o, l);
32
+ function x(i, o) {
33
+ u.value = o, C("item-click", i, o);
34
34
  }
35
- const s = (o, l = {}) => E(o, "icon", {
35
+ const s = (i, o = {}) => E(i, "icon", {
36
36
  size: 16,
37
- ...l
37
+ ...o
38
38
  });
39
- return (o, l) => (r(), m("div", {
39
+ return (i, o) => (l(), m("div", {
40
40
  style: V(I.value),
41
- class: c(e(n).b())
41
+ class: r(e(n).b())
42
42
  }, [
43
- (r(!0), m(N, null, z(o.list, (t, a) => (r(), m("div", {
44
- onClick: (F) => _(t, a),
43
+ (l(!0), m(N, null, z(c.list, (t, a) => (l(), m("div", {
44
+ onClick: (F) => x(t, a),
45
45
  key: a,
46
- class: c([e(n).e("item"), e(n).is("active", u.value === a)])
46
+ class: r([e(n).e("item"), e(n).is("active", u.value === a)])
47
47
  }, [
48
48
  f("div", {
49
- class: c(e(n).m("left"))
49
+ class: r(e(n).m("left"))
50
50
  }, [
51
51
  B(e(g), d({ ref_for: !0 }, s(t.leftIcon)), null, 16),
52
52
  f("span", {
53
- class: c(e(n).e("text"))
53
+ class: r(e(n).e("text"))
54
54
  }, D(t.text), 3)
55
55
  ], 2),
56
56
  f("div", {
57
- class: c(e(n).m("right"))
57
+ class: r(e(n).m("right"))
58
58
  }, [
59
- t?.rightContent ? (r(), p(e(b), {
59
+ t?.rightContent ? (l(), p(e(b), {
60
60
  key: 0,
61
61
  content: t.rightContent
62
- }, null, 8, ["content"])) : s(t.rightIcon)?.icon ? (r(), p(e(g), d({
62
+ }, null, 8, ["content"])) : s(t.rightIcon)?.icon ? (l(), p(e(g), d({
63
63
  key: 1,
64
64
  ref_for: !0
65
65
  }, s(t.rightIcon)), null, 16)) : T("", !0)
@@ -1,50 +1,50 @@
1
- import { defineComponent as m, computed as i, getCurrentInstance as d, createElementBlock as r, createCommentVNode as l, openBlock as n, normalizeStyle as k, normalizeClass as s, unref as a, toDisplayString as C } from "vue";
1
+ import { defineComponent as c, computed as r, getCurrentInstance as p, createElementBlock as o, createCommentVNode as l, openBlock as n, normalizeStyle as d, normalizeClass as i, unref as a, toDisplayString as k } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../config-provider/hooks/use-global-config.js";
5
5
  import "lodash-es";
6
6
  import "../form/index.js";
7
- import { useNamespace as h } from "../../hooks/use-namespace/index.js";
7
+ import { useNamespace as C } from "../../hooks/use-namespace/index.js";
8
8
  import "../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
- import { useRouterHelper as y } from "@vft/router";
12
- const v = ["src"], P = m({
11
+ import { useRouterHelper as h } from "@vft/router";
12
+ const y = ["src"], v = c({
13
13
  name: "vft-logo"
14
- }), _ = /* @__PURE__ */ m({
15
- ...P,
14
+ }), R = /* @__PURE__ */ c({
15
+ ...v,
16
16
  props: {
17
17
  title: {},
18
18
  logo: {},
19
19
  jumpPath: { default: "/" }
20
20
  },
21
- setup(e) {
22
- const t = h("logo"), c = i(() => [t.b()]), u = d().appContext.config.globalProperties.$router, { go: p } = y(u);
21
+ setup(t) {
22
+ const e = C("logo"), s = r(() => [e.b()]), m = p().appContext.config.globalProperties.$router, { go: u } = h(m);
23
23
  function g() {
24
- e.jumpPath && p(e.jumpPath);
24
+ t.jumpPath && u(t.jumpPath);
25
25
  }
26
- const f = i(
27
- () => e.jumpPath ? {} : t.cssVarBlock({ cursor: "inital" })
26
+ const f = r(
27
+ () => t.jumpPath ? {} : e.cssVarBlock({ cursor: "inital" })
28
28
  );
29
- return (o, B) => o.logo || o.title ? (n(), r("div", {
29
+ return (j, x) => t.logo || t.title ? (n(), o("div", {
30
30
  key: 0,
31
- class: s(c.value),
31
+ class: i(s.value),
32
32
  onClick: g,
33
- style: k(f.value)
33
+ style: d(f.value)
34
34
  }, [
35
- o.logo ? (n(), r("img", {
35
+ t.logo ? (n(), o("img", {
36
36
  key: 0,
37
- class: s(a(t).e("img")),
38
- src: o.logo,
37
+ class: i(a(e).e("img")),
38
+ src: t.logo,
39
39
  alt: ""
40
- }, null, 10, v)) : l("", !0),
41
- o.title ? (n(), r("div", {
40
+ }, null, 10, y)) : l("", !0),
41
+ t.title ? (n(), o("div", {
42
42
  key: 1,
43
- class: s(a(t).e("title"))
44
- }, C(o.title), 3)) : l("", !0)
43
+ class: i(a(e).e("title"))
44
+ }, k(t.title), 3)) : l("", !0)
45
45
  ], 6)) : l("", !0);
46
46
  }
47
47
  });
48
48
  export {
49
- _ as default
49
+ R as default
50
50
  };
@@ -1,30 +1,30 @@
1
- import { defineComponent as n, createElementBlock as o, openBlock as r, normalizeClass as l, unref as i, createElementVNode as m, renderSlot as s, Fragment as p, createTextVNode as a, toDisplayString as u } from "vue";
1
+ import { defineComponent as n, createElementBlock as o, openBlock as r, normalizeClass as l, unref as i, createElementVNode as m, renderSlot as s, Fragment as a, createTextVNode as u, toDisplayString as c } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../config-provider/hooks/use-global-config.js";
5
5
  import "lodash-es";
6
6
  import "../form/index.js";
7
- import { useNamespace as c } from "../../hooks/use-namespace/index.js";
7
+ import { useNamespace as f } from "../../hooks/use-namespace/index.js";
8
8
  import "../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
- const f = n({
11
+ const d = n({
12
12
  name: "vft-menu-item-group"
13
13
  }), V = /* @__PURE__ */ n({
14
- ...f,
14
+ ...d,
15
15
  props: {
16
16
  title: {}
17
17
  },
18
- setup(d) {
19
- const t = c("menu-item-group");
18
+ setup(p) {
19
+ const t = f("menu-item-group");
20
20
  return (e, _) => (r(), o("li", {
21
21
  class: l(i(t).b())
22
22
  }, [
23
23
  m("div", {
24
24
  class: l(i(t).e("title"))
25
25
  }, [
26
- e.$slots.title ? s(e.$slots, "title", { key: 1 }) : (r(), o(p, { key: 0 }, [
27
- a(u(e.title), 1)
26
+ e.$slots.title ? s(e.$slots, "title", { key: 1 }) : (r(), o(a, { key: 0 }, [
27
+ u(c(p.title), 1)
28
28
  ], 64))
29
29
  ], 2),
30
30
  m("ul", null, [