vft 0.0.97 → 0.0.99

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 (194) hide show
  1. package/es/components/affix/affix.vue2.js +25 -26
  2. package/es/components/alert/alert.vue2.js +17 -18
  3. package/es/components/backtop/backtop.vue2.js +14 -15
  4. package/es/components/button/button-group.vue2.js +14 -15
  5. package/es/components/button/button.vue2.js +24 -25
  6. package/es/components/card/card.vue2.js +10 -11
  7. package/es/components/check-tag/check-tag.vue2.js +10 -11
  8. package/es/components/checkbox/checkbox-button.vue2.js +13 -14
  9. package/es/components/checkbox/checkbox-group.vue2.js +15 -16
  10. package/es/components/checkbox/checkbox.vue2.js +24 -25
  11. package/es/components/clamp/clamp.vue2.js +16 -17
  12. package/es/components/clamp-toggle/clamp-toggle.vue2.js +13 -14
  13. package/es/components/col/col.vue2.js +20 -21
  14. package/es/components/collapse-transition/src/collapse-transition.vue2.js +12 -13
  15. package/es/components/collection/collection-item.vue2.js +6 -7
  16. package/es/components/collection/collection.vue2.js +5 -7
  17. package/es/components/color-picker/color-picker.vue2.js +45 -46
  18. package/es/components/color-picker/components/alpha-slider.vue2.js +20 -21
  19. package/es/components/config-provider/config-provider.vue2.js +22 -23
  20. package/es/components/container/aside.vue2.js +12 -13
  21. package/es/components/container/container.vue2.js +10 -11
  22. package/es/components/container/footer.vue2.js +11 -12
  23. package/es/components/container/header.vue2.js +10 -11
  24. package/es/components/container/main.vue2.js +12 -13
  25. package/es/components/context-menu/context-menu.vue2.js +18 -19
  26. package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +87 -87
  27. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +1 -1
  28. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +1 -1
  29. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +2 -2
  30. package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +39 -40
  31. package/es/components/date-time-select/date-time-select.vue2.js +20 -21
  32. package/es/components/descriptions/description-item.vue2.js +9 -10
  33. package/es/components/descriptions/description.vue2.js +20 -21
  34. package/es/components/descriptions/descriptions-row.vue2.js +15 -16
  35. package/es/components/dialog/dialog-content.vue2.js +12 -13
  36. package/es/components/dialog/dialog.vue2.js +40 -41
  37. package/es/components/divider/divider.vue2.js +10 -11
  38. package/es/components/dropdown/dropdown.vue2.js +38 -39
  39. package/es/components/empty/empty.vue2.js +11 -12
  40. package/es/components/footer-layout/footer-layout.vue2.js +7 -8
  41. package/es/components/form/form-item.vue2.js +43 -44
  42. package/es/components/form/form.vue2.js +28 -29
  43. package/es/components/full-screen/full-screen.vue2.js +15 -16
  44. package/es/components/header-layout/header-layout.vue2.js +21 -22
  45. package/es/components/horizontal-menu/horizontal-menu.vue2.js +50 -51
  46. package/es/components/icon/icon.vue2.js +12 -13
  47. package/es/components/icon-text/icon-text.vue2.js +13 -14
  48. package/es/components/iframe-layout/iframe-layout.vue2.js +15 -16
  49. package/es/components/iframe-layout/iframe-page.vue2.js +12 -13
  50. package/es/components/image/image.vue2.js +25 -26
  51. package/es/components/image-viewer/image-viewer.vue2.js +54 -55
  52. package/es/components/link/link.vue2.js +11 -12
  53. package/es/components/list-cell/list-cell.vue2.js +21 -22
  54. package/es/components/logo/logo.vue2.js +12 -13
  55. package/es/components/md-comment/md-comment.vue2.js +12 -13
  56. package/es/components/md-container/md-container.vue2.js +33 -34
  57. package/es/components/md-vue-playground/md-vue-playground.vue2.js +18 -19
  58. package/es/components/menu/menu-item-group.vue2.js +13 -14
  59. package/es/components/menu/menu-item.vue2.js +12 -13
  60. package/es/components/menu/menu.vue2.js +44 -45
  61. package/es/components/menu/sub-menu.vue2.js +30 -31
  62. package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -38
  63. package/es/components/overlay/overlay.vue2.js +23 -24
  64. package/es/components/page-wrapper/page-wrapper.vue2.js +17 -18
  65. package/es/components/pagination/pagination.vue2.js +17 -18
  66. package/es/components/popconfirm/popconfirm.vue2.js +17 -18
  67. package/es/components/popover/popover.vue2.js +31 -32
  68. package/es/components/popper/arrow.vue2.js +15 -16
  69. package/es/components/popper/content.vue2.js +38 -39
  70. package/es/components/popper/popper.vue2.js +13 -14
  71. package/es/components/popper/trigger.vue2.js +11 -12
  72. package/es/components/qrcode/qrcode.vue2.js +21 -22
  73. package/es/components/radio/radio-button.vue2.js +16 -17
  74. package/es/components/radio/radio-group.vue2.js +16 -17
  75. package/es/components/radio/radio.vue2.js +15 -16
  76. package/es/components/result/result.vue2.js +12 -13
  77. package/es/components/router-view-content/router-view-content.vue2.js +10 -11
  78. package/es/components/row/row.vue2.js +17 -18
  79. package/es/components/scrollbar/scrollbar.vue2.js +30 -31
  80. package/es/components/search/search.vue2.js +39 -40
  81. package/es/components/side-menu/side-menu.vue2.js +43 -45
  82. package/es/components/skeleton/skeleton-item.vue2.js +9 -10
  83. package/es/components/skeleton/skeleton.vue2.js +11 -12
  84. package/es/components/switch/switch.vue2.js +27 -28
  85. package/es/components/table/table.vue2.js +53 -50
  86. package/es/components/tabs/tab-nav.vue2.js +28 -29
  87. package/es/components/tabs/tab-pane.vue2.js +23 -24
  88. package/es/components/tabs/tabs.vue2.js +30 -31
  89. package/es/components/time-picker/common/picker.vue2.js +48 -49
  90. package/es/components/time-select/time-select.vue2.js +28 -29
  91. package/es/components/tooltip/content.vue2.js +36 -37
  92. package/es/components/tooltip/tooltip.vue2.js +15 -16
  93. package/es/components/tooltip/trigger.vue2.js +37 -38
  94. package/es/components/verify-code/verify-code.vue2.js +19 -20
  95. package/es/constants/date.js +7 -7
  96. package/es/package.json.js +1 -1
  97. package/lib/components/affix/affix.vue2.cjs +1 -1
  98. package/lib/components/alert/alert.vue2.cjs +1 -1
  99. package/lib/components/backtop/backtop.vue2.cjs +1 -1
  100. package/lib/components/button/button-group.vue2.cjs +1 -1
  101. package/lib/components/button/button.vue2.cjs +1 -1
  102. package/lib/components/card/card.vue2.cjs +1 -1
  103. package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
  104. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  105. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  106. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  107. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  108. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  109. package/lib/components/col/col.vue2.cjs +1 -1
  110. package/lib/components/collapse-transition/src/collapse-transition.vue2.cjs +1 -1
  111. package/lib/components/collection/collection-item.vue2.cjs +1 -1
  112. package/lib/components/collection/collection.vue2.cjs +1 -1
  113. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  114. package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
  115. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  116. package/lib/components/container/aside.vue2.cjs +1 -1
  117. package/lib/components/container/container.vue2.cjs +1 -1
  118. package/lib/components/container/footer.vue2.cjs +1 -1
  119. package/lib/components/container/header.vue2.cjs +1 -1
  120. package/lib/components/container/main.vue2.cjs +1 -1
  121. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  122. package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
  123. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  124. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  125. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  126. package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
  127. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  128. package/lib/components/descriptions/description-item.vue2.cjs +1 -1
  129. package/lib/components/descriptions/description.vue2.cjs +1 -1
  130. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  131. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  132. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  133. package/lib/components/divider/divider.vue2.cjs +1 -1
  134. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  135. package/lib/components/empty/empty.vue2.cjs +1 -1
  136. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  137. package/lib/components/form/form-item.vue2.cjs +1 -1
  138. package/lib/components/form/form.vue2.cjs +1 -1
  139. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  140. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  141. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  142. package/lib/components/icon/icon.vue2.cjs +1 -1
  143. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  144. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  145. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  146. package/lib/components/image/image.vue2.cjs +1 -1
  147. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  148. package/lib/components/link/link.vue2.cjs +1 -1
  149. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  150. package/lib/components/logo/logo.vue2.cjs +1 -1
  151. package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
  152. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  153. package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
  154. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  155. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  156. package/lib/components/menu/menu.vue2.cjs +1 -1
  157. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  158. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  159. package/lib/components/overlay/overlay.vue2.cjs +1 -1
  160. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  161. package/lib/components/pagination/pagination.vue2.cjs +1 -1
  162. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  163. package/lib/components/popover/popover.vue2.cjs +1 -1
  164. package/lib/components/popper/arrow.vue2.cjs +1 -1
  165. package/lib/components/popper/content.vue2.cjs +1 -1
  166. package/lib/components/popper/popper.vue2.cjs +1 -1
  167. package/lib/components/popper/trigger.vue2.cjs +1 -1
  168. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  169. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  170. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  171. package/lib/components/radio/radio.vue2.cjs +1 -1
  172. package/lib/components/result/result.vue2.cjs +1 -1
  173. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  174. package/lib/components/row/row.vue2.cjs +1 -1
  175. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  176. package/lib/components/search/search.vue2.cjs +1 -1
  177. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  178. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  179. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  180. package/lib/components/switch/switch.vue2.cjs +1 -1
  181. package/lib/components/table/table.vue2.cjs +1 -1
  182. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  183. package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
  184. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  185. package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
  186. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  187. package/lib/components/tooltip/content.vue2.cjs +1 -1
  188. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  189. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  190. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  191. package/lib/constants/date.cjs +1 -1
  192. package/lib/package.json.cjs +1 -1
  193. package/package.json +8 -8
  194. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as V, getCurrentInstance as X, ref as i, computed as b, watch as Z, toRef as y, onBeforeUnmount as _, provide as z, resolveComponent as x, openBlock as O, createElementBlock as ee, normalizeClass as S, unref as o, createVNode as l, createSlots as oe, withCtx as r, renderSlot as C, createBlock as te, mergeProps as T, createCommentVNode as re } from "vue";
1
+ import { defineComponent as Q, getCurrentInstance as X, ref as i, computed as b, watch as Z, toRef as y, onBeforeUnmount as _, provide as z, resolveComponent as x, openBlock as O, createElementBlock as ee, normalizeClass as S, unref as o, createVNode as l, createSlots as oe, withCtx as r, renderSlot as w, createBlock as te, mergeProps as T, createCommentVNode as re } from "vue";
2
2
  import { VftButton as L } from "../button/index.js";
3
3
  import { VftTooltip as ne } from "../tooltip/index.js";
4
4
  import { VftScrollbar as le } from "../scrollbar/index.js";
@@ -7,7 +7,7 @@ import ie from "../roving-focus-group/roving-focus-group.vue.js";
7
7
  import "../roving-focus-group/roving-focus-item.vue2.js";
8
8
  import "../roving-focus-group/roving-focus-group-impl.vue2.js";
9
9
  import "../roving-focus-group/types.js";
10
- import { EVENT_CODE as w } from "../../constants/aria.js";
10
+ import { EVENT_CODE as C } from "../../constants/aria.js";
11
11
  import { OnlyChild as se } from "../slot/only-child.js";
12
12
  import "../form/index.js";
13
13
  import { addUnit as pe, isArray as de } from "@vft/utils";
@@ -24,10 +24,9 @@ import { useFormSize as be } from "../form/hooks/use-form-common-props.js";
24
24
  const n = (
25
25
  /* hoist-static*/
26
26
  ue("dropdown")
27
- ), ve = V({
28
- name: n.b()
29
- }), Ke = /* @__PURE__ */ V({
30
- ...ve,
27
+ ), Ae = /* @__PURE__ */ Q({
28
+ name: n.b(),
29
+ __name: "dropdown",
31
30
  props: {
32
31
  trigger: { default: "hover" },
33
32
  effect: { default: "light" },
@@ -50,12 +49,12 @@ const n = (
50
49
  teleported: { type: Boolean, default: !0 }
51
50
  },
52
51
  emits: ["visible-change", "command", "click"],
53
- setup(N, { emit: d }) {
54
- const s = N, E = X(), a = i(), k = i(), B = i(null), u = i(null), H = i(null), v = i(null), g = i(!1), P = [w.enter, w.space, w.down], D = b(() => ({
52
+ setup(V, { emit: d }) {
53
+ const s = V, N = X(), a = i(), k = i(), B = i(null), u = i(null), E = i(null), v = i(null), g = i(!1), H = [C.enter, C.space, C.down], P = b(() => ({
55
54
  maxHeight: pe(s.maxHeight)
56
55
  }));
57
56
  b(() => [n.m(f.value)]);
58
- const F = fe().value, h = b(() => s.id || F);
57
+ const D = fe().value, h = b(() => s.id || D);
59
58
  Z(
60
59
  [a, y(s, "trigger")],
61
60
  ([e, t], [p]) => {
@@ -80,41 +79,41 @@ const n = (
80
79
  c
81
80
  );
82
81
  });
83
- function A() {
84
- K();
82
+ function F() {
83
+ A();
85
84
  }
86
- function K() {
85
+ function A() {
87
86
  var e;
88
87
  (e = B.value) == null || e.onClose();
89
88
  }
90
89
  const f = be();
91
- function U(...e) {
90
+ function K(...e) {
92
91
  d("command", ...e);
93
92
  }
94
93
  function c() {
95
94
  var e, t;
96
95
  (t = (e = a.value) == null ? void 0 : e.$el) == null || t.focus();
97
96
  }
98
- function G() {
97
+ function U() {
99
98
  }
100
- function J() {
99
+ function G() {
101
100
  const e = o(u);
102
101
  e == null || e.focus(), v.value = null;
103
102
  }
104
- function M(e) {
103
+ function J(e) {
105
104
  v.value = e;
106
105
  }
107
- function W(e) {
106
+ function M(e) {
108
107
  g.value || (e.preventDefault(), e.stopImmediatePropagation());
109
108
  }
110
- function Y() {
109
+ function W() {
111
110
  d("visible-change", !0);
112
111
  }
113
- function j(e) {
112
+ function Y(e) {
114
113
  var t;
115
114
  (e == null ? void 0 : e.type) === "keydown" && ((t = u.value) == null || t.focus());
116
115
  }
117
- function q() {
116
+ function j() {
118
117
  d("visible-change", !1);
119
118
  }
120
119
  z(ce, {
@@ -122,17 +121,17 @@ const n = (
122
121
  role: b(() => s.role),
123
122
  triggerId: h,
124
123
  isUsingKeyboard: g,
125
- onItemEnter: G,
126
- onItemLeave: J
124
+ onItemEnter: U,
125
+ onItemLeave: G
127
126
  }), z("elDropdown", {
128
- instance: E,
127
+ instance: N,
129
128
  dropdownSize: f,
130
- handleClick: A,
131
- commandHandler: U,
129
+ handleClick: F,
130
+ commandHandler: K,
132
131
  trigger: y(s, "trigger"),
133
132
  hideOnClick: y(s, "hideOnClick")
134
133
  });
135
- const Q = (e) => {
134
+ const q = (e) => {
136
135
  d("click", e);
137
136
  };
138
137
  return (e, t) => {
@@ -155,7 +154,7 @@ const n = (
155
154
  "popper-class": [o(n).e("popper"), e.popperClass],
156
155
  "reference-element": (m = k.value) == null ? void 0 : m.$el,
157
156
  trigger: e.trigger,
158
- "trigger-keys": P,
157
+ "trigger-keys": H,
159
158
  "trigger-target-el": u.value,
160
159
  "show-after": e.trigger === "hover" ? e.showTimeout : 0,
161
160
  "stop-popper-mouse-event": !1,
@@ -166,15 +165,15 @@ const n = (
166
165
  teleported: e.teleported,
167
166
  pure: "",
168
167
  persistent: "",
169
- onBeforeShow: Y,
170
- onShow: j,
171
- onBeforeHide: q
168
+ onBeforeShow: W,
169
+ onShow: Y,
170
+ onBeforeHide: j
172
171
  }, oe({
173
172
  content: r(() => [
174
173
  l(o(le), {
175
174
  ref_key: "scrollbar",
176
- ref: H,
177
- "wrap-style": D.value,
175
+ ref: E,
176
+ "wrap-style": P.value,
178
177
  tag: "div",
179
178
  "view-class": [o(n).e("list"), "test"]
180
179
  }, {
@@ -183,13 +182,13 @@ const n = (
183
182
  loop: e.loop,
184
183
  "current-tab-id": v.value,
185
184
  orientation: "horizontal",
186
- onCurrentTabIdChange: M,
187
- onEntryFocus: W
185
+ onCurrentTabIdChange: J,
186
+ onEntryFocus: M
188
187
  }, {
189
188
  default: r(() => [
190
189
  l(o(me), null, {
191
190
  default: r(() => [
192
- C(e.$slots, "dropdown")
191
+ w(e.$slots, "dropdown")
193
192
  ]),
194
193
  _: 3
195
194
  })
@@ -213,7 +212,7 @@ const n = (
213
212
  tabindex: e.tabindex
214
213
  }, {
215
214
  default: r(() => [
216
- C(e.$slots, "default")
215
+ w(e.$slots, "default")
217
216
  ]),
218
217
  _: 3
219
218
  }, 8, ["id", "tabindex"])
@@ -231,10 +230,10 @@ const n = (
231
230
  type: e.type,
232
231
  disabled: e.disabled,
233
232
  tabindex: e.tabindex,
234
- onClick: Q
233
+ onClick: q
235
234
  }), {
236
235
  default: r(() => [
237
- C(e.$slots, "default")
236
+ w(e.$slots, "default")
238
237
  ]),
239
238
  _: 3
240
239
  }, 16, ["size", "type", "disabled", "tabindex"]),
@@ -267,5 +266,5 @@ const n = (
267
266
  }
268
267
  });
269
268
  export {
270
- Ke as default
269
+ Ae as default
271
270
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as f, getCurrentInstance as z, computed as d, openBlock as s, createElementBlock as i, normalizeClass as n, unref as e, createElementVNode as C, normalizeStyle as T, renderSlot as u, createVNode as _, createCommentVNode as N } from "vue";
2
- import { renderTNode as A, setSize as E, VNode as O } from "@vft/utils";
1
+ import { defineComponent as y, getCurrentInstance as z, computed as d, openBlock as s, createElementBlock as i, normalizeClass as n, unref as e, createElementVNode as C, normalizeStyle as T, renderSlot as u, createVNode as A, createCommentVNode as N } from "vue";
2
+ import { renderTNode as E, setSize as O, VNode as _ } from "@vft/utils";
3
3
  import { useNamespace as k } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
5
5
  import "lodash";
@@ -16,10 +16,9 @@ import b from "./assets/no-search.png.js";
16
16
  const h = ["src"], m = (
17
17
  /* hoist-static*/
18
18
  k("empty")
19
- ), x = f({
20
- name: m.b()
21
- }), Y = /* @__PURE__ */ f({
22
- ...x,
19
+ ), X = /* @__PURE__ */ y({
20
+ name: m.b(),
21
+ __name: "empty",
23
22
  props: {
24
23
  img: {},
25
24
  type: { default: o.NO_DATA },
@@ -64,19 +63,19 @@ const h = ["src"], m = (
64
63
  img: b
65
64
  }
66
65
  ]
67
- ])).get(a.type), y = d(() => a.img || (t == null ? void 0 : t.img)), c = d(() => A(g, "desc", { defaultNode: t == null ? void 0 : t.text })), l = v(a.size);
68
- return (r, M) => {
66
+ ])).get(a.type), f = d(() => a.img || (t == null ? void 0 : t.img)), c = d(() => E(g, "desc", { defaultNode: t == null ? void 0 : t.text })), l = v(a.size);
67
+ return (r, L) => {
69
68
  var p;
70
69
  return s(), i("div", {
71
70
  class: n([e(m).b(), e(l) ? e(m).m(e(l)) : ""])
72
71
  }, [
73
72
  C("div", {
74
73
  class: n(e(m).e("image")),
75
- style: T(e(l) ? {} : e(E)(((p = e(t)) == null ? void 0 : p.size) || r.size))
74
+ style: T(e(l) ? {} : e(O)(((p = e(t)) == null ? void 0 : p.size) || r.size))
76
75
  }, [
77
76
  r.$slots.img ? u(r.$slots, "img", { key: 0 }) : (s(), i("img", {
78
77
  key: 1,
79
- src: y.value,
78
+ src: f.value,
80
79
  alt: ""
81
80
  }, null, 8, h))
82
81
  ], 6),
@@ -84,7 +83,7 @@ const h = ["src"], m = (
84
83
  key: 0,
85
84
  class: n(e(m).e("desc"))
86
85
  }, [
87
- _(e(O), { content: c.value }, null, 8, ["content"])
86
+ A(e(_), { content: c.value }, null, 8, ["content"])
88
87
  ], 2)) : N("", !0),
89
88
  r.$slots.default ? (s(), i("div", {
90
89
  key: 1,
@@ -97,5 +96,5 @@ const h = ["src"], m = (
97
96
  }
98
97
  });
99
98
  export {
100
- Y as default
99
+ X as default
101
100
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as s, computed as l, openBlock as a, createBlock as n, unref as t, normalizeClass as r, withCtx as f, createElementVNode as m, renderSlot as p } from "vue";
1
+ import { defineComponent as s, computed as a, openBlock as l, createBlock as n, unref as t, normalizeClass as r, withCtx as f, createElementVNode as m, renderSlot as p } from "vue";
2
2
  import { generateCssVars as c, isNullOrUndefined as d, addUnit as u } from "@vft/utils";
3
3
  import { useNamespace as h } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
@@ -87,20 +87,19 @@ import "../message/index.js";
87
87
  const o = (
88
88
  /* hoist-static*/
89
89
  h("footer-layout")
90
- ), _ = s({
91
- name: o.b()
92
- }), Xt = /* @__PURE__ */ s({
93
- ..._,
90
+ ), Wt = /* @__PURE__ */ s({
91
+ name: o.b(),
92
+ __name: "footer-layout",
94
93
  props: {
95
94
  leftDistance: {}
96
95
  },
97
96
  setup(e) {
98
- return l(() => c(
97
+ return a(() => c(
99
98
  d(e.leftDistance) ? {} : {
100
99
  left: u(e.leftDistance)
101
100
  },
102
101
  "layout-footer"
103
- )), (i, g) => (a(), n(t(C), {
102
+ )), (i, g) => (l(), n(t(C), {
104
103
  class: r(t(o).b())
105
104
  }, {
106
105
  default: f(() => [
@@ -125,5 +124,5 @@ const o = (
125
124
  }
126
125
  });
127
126
  export {
128
- Xt as default
127
+ Wt as default
129
128
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as Y, useSlots as me, inject as D, ref as h, computed as a, watch as E, reactive as he, toRefs as ge, provide as ye, onMounted as be, onBeforeUnmount as Se, openBlock as L, createElementBlock as _e, normalizeClass as g, unref as c, createVNode as T, withCtx as F, createBlock as Ie, resolveDynamicComponent as Ve, normalizeStyle as G, renderSlot as M, createTextVNode as qe, toDisplayString as K, createCommentVNode as U, createElementVNode as O, TransitionGroup as we, nextTick as Fe } from "vue";
1
+ import { defineComponent as fe, useSlots as me, inject as D, ref as h, computed as a, watch as E, reactive as he, toRefs as ge, provide as ye, onMounted as be, onBeforeUnmount as Se, openBlock as L, createElementBlock as Ie, normalizeClass as g, unref as c, createVNode as T, withCtx as F, createBlock as Ve, resolveDynamicComponent as _e, normalizeStyle as G, renderSlot as M, createTextVNode as qe, toDisplayString as K, createCommentVNode as U, createElementVNode as O, TransitionGroup as we, nextTick as Fe } from "vue";
2
2
  import Me from "async-validator";
3
3
  import { castArray as H, clone as J } from "lodash";
4
4
  import { refDebounced as Re } from "@vueuse/core";
@@ -15,10 +15,9 @@ import je from "./form-label-wrap.js";
15
15
  const De = ["role", "aria-labelledby"], o = (
16
16
  /* hoist-static*/
17
17
  $e("form-item")
18
- ), Ee = Y({
19
- name: o.b()
20
- }), xe = /* @__PURE__ */ Y({
21
- ...Ee,
18
+ ), Ce = /* @__PURE__ */ fe({
19
+ name: o.b(),
20
+ __name: "form-item",
22
21
  props: {
23
22
  label: {},
24
23
  labelWidth: { default: "" },
@@ -32,41 +31,41 @@ const De = ["role", "aria-labelledby"], o = (
32
31
  showMessage: { type: Boolean, default: !0 },
33
32
  size: {}
34
33
  },
35
- setup(Z, { expose: k }) {
36
- const s = Z, W = me(), e = D(Pe, void 0), C = D(X, void 0), y = Ae(void 0, { formItem: !1 }), b = Ne().value, n = h([]), d = h(""), x = Re(d, 100), p = h(""), z = h();
34
+ setup(Y, { expose: Z }) {
35
+ const s = Y, W = me(), e = D(Pe, void 0), k = D(X, void 0), y = Ae(void 0, { formItem: !1 }), b = Ne().value, n = h([]), d = h(""), C = Re(d, 100), p = h(""), z = h();
37
36
  let B, m = !1;
38
37
  const $ = a(() => {
39
38
  if ((e == null ? void 0 : e.labelPosition) === "top")
40
39
  return {};
41
40
  const r = Q(s.labelWidth || (e == null ? void 0 : e.labelWidth) || "");
42
41
  return r ? { width: r } : {};
43
- }), ee = a(() => {
42
+ }), x = a(() => {
44
43
  if ((e == null ? void 0 : e.labelPosition) === "top" || e != null && e.inline)
45
44
  return {};
46
- if (!s.label && !s.labelWidth && le)
45
+ if (!s.label && !s.labelWidth && ie)
47
46
  return {};
48
47
  const r = Q(s.labelWidth || (e == null ? void 0 : e.labelWidth) || "");
49
48
  return !s.label && !W.label ? { marginLeft: r } : {};
50
- }), re = a(() => [
49
+ }), ee = a(() => [
51
50
  o.b(),
52
51
  o.m(y.value),
53
52
  o.is("error", d.value === "error"),
54
53
  o.is("validating", d.value === "validating"),
55
54
  o.is("success", d.value === "success"),
56
- o.is("required", ue.value || s.required),
55
+ o.is("required", oe.value || s.required),
57
56
  o.is("no-asterisk", e == null ? void 0 : e.hideRequiredAsterisk),
58
57
  (e == null ? void 0 : e.requireAsteriskPosition) === "right" ? "asterisk-right" : "asterisk-left",
59
58
  { [o.m("feedback")]: e == null ? void 0 : e.statusIcon }
60
- ]), te = a(
59
+ ]), re = a(
61
60
  () => We(s.inlineMessage) ? s.inlineMessage : (e == null ? void 0 : e.inlineMessage) || !1
62
- ), se = a(() => [
61
+ ), te = a(() => [
63
62
  o.e("error"),
64
- { [o.em("error", "inline")]: te.value }
65
- ]), ie = a(() => s.prop ? ze(s.prop) ? s.prop : s.prop.join(".") : ""), S = a(() => !!(s.label || W.label)), _ = a(() => s.for || n.value.length === 1 ? n.value[0] : void 0), I = a(() => !_.value && S.value), le = !!C, N = a(() => {
63
+ { [o.em("error", "inline")]: re.value }
64
+ ]), se = a(() => s.prop ? ze(s.prop) ? s.prop : s.prop.join(".") : ""), S = a(() => !!(s.label || W.label)), I = a(() => s.for || n.value.length === 1 ? n.value[0] : void 0), V = a(() => !I.value && S.value), ie = !!k, N = a(() => {
66
65
  const r = e == null ? void 0 : e.model;
67
66
  if (!(!r || !s.prop))
68
67
  return R(r, s.prop).value;
69
- }), V = a(() => {
68
+ }), _ = a(() => {
70
69
  const { required: r } = s, t = [];
71
70
  s.rules && t.push(...H(s.rules));
72
71
  const i = e == null ? void 0 : e.rules;
@@ -86,33 +85,33 @@ const De = ["role", "aria-labelledby"], o = (
86
85
  t.push({ required: r });
87
86
  }
88
87
  return t;
89
- }), ae = a(() => V.value.length > 0), oe = (r) => V.value.filter((i) => !i.trigger || !r ? !0 : Array.isArray(i.trigger) ? i.trigger.includes(r) : i.trigger === r).map(({ trigger: i, ...l }) => l), ue = a(
90
- () => V.value.some((r) => r.required)
91
- ), ne = a(
92
- () => x.value === "error" && s.showMessage && ((e == null ? void 0 : e.showMessage) ?? !0)
88
+ }), le = a(() => _.value.length > 0), ae = (r) => _.value.filter((i) => !i.trigger || !r ? !0 : Array.isArray(i.trigger) ? i.trigger.includes(r) : i.trigger === r).map(({ trigger: i, ...l }) => l), oe = a(
89
+ () => _.value.some((r) => r.required)
90
+ ), ue = a(
91
+ () => C.value === "error" && s.showMessage && ((e == null ? void 0 : e.showMessage) ?? !0)
93
92
  ), A = a(
94
93
  () => `${s.label || ""}${(e == null ? void 0 : e.labelSuffix) || ""}`
95
94
  ), v = (r) => {
96
95
  d.value = r;
97
- }, de = (r) => {
96
+ }, ne = (r) => {
98
97
  var l;
99
98
  const { errors: t, fields: i } = r;
100
99
  (!t || !i) && console.error(r), v("error"), p.value = t ? ((l = t == null ? void 0 : t[0]) == null ? void 0 : l.message) ?? `${s.prop} is required` : "", e == null || e.emit("validate", s.prop, !1, p.value);
101
- }, pe = () => {
100
+ }, de = () => {
102
101
  v("success"), e == null || e.emit("validate", s.prop, !0, "");
103
- }, ce = async (r) => {
104
- const t = ie.value;
102
+ }, pe = async (r) => {
103
+ const t = se.value;
105
104
  return new Me({
106
105
  [t]: r
107
- }).validate({ [t]: N.value }, { firstFields: !0 }).then(() => (pe(), !0)).catch((l) => (de(l), Promise.reject(l)));
106
+ }).validate({ [t]: N.value }, { firstFields: !0 }).then(() => (de(), !0)).catch((l) => (ne(l), Promise.reject(l)));
108
107
  }, P = async (r, t) => {
109
108
  if (m || !s.prop)
110
109
  return !1;
111
110
  const i = Be(t);
112
- if (!ae.value)
111
+ if (!le.value)
113
112
  return t == null || t(!1), !1;
114
- const l = oe(r);
115
- return l.length === 0 ? (t == null || t(!0), !0) : (v("validating"), ce(l).then(() => (t == null || t(!0), !0)).catch((u) => {
113
+ const l = ae(r);
114
+ return l.length === 0 ? (t == null || t(!0), !0) : (v("validating"), pe(l).then(() => (t == null || t(!0), !0)).catch((u) => {
116
115
  const { fields: f } = u;
117
116
  return t == null || t(!1, f), i ? !1 : Promise.reject(f);
118
117
  }));
@@ -124,9 +123,9 @@ const De = ["role", "aria-labelledby"], o = (
124
123
  return;
125
124
  const t = R(r, s.prop);
126
125
  m = !0, t.value = J(B), await Fe(), q(), m = !1;
127
- }, ve = (r) => {
126
+ }, ce = (r) => {
128
127
  n.value.includes(r) || n.value.push(r);
129
- }, fe = (r) => {
128
+ }, ve = (r) => {
130
129
  n.value = n.value.filter((t) => t !== r);
131
130
  };
132
131
  E(
@@ -146,10 +145,10 @@ const De = ["role", "aria-labelledby"], o = (
146
145
  validateState: d,
147
146
  labelId: b,
148
147
  inputIds: n,
149
- isGroup: I,
148
+ isGroup: V,
150
149
  hasLabel: S,
151
- addInputId: ve,
152
- removeInputId: fe,
150
+ addInputId: ce,
151
+ removeInputId: ve,
153
152
  resetField: j,
154
153
  clearValidate: q,
155
154
  validate: P
@@ -158,7 +157,7 @@ const De = ["role", "aria-labelledby"], o = (
158
157
  s.prop && (e == null || e.addField(w), B = J(N.value));
159
158
  }), Se(() => {
160
159
  e == null || e.removeField(w);
161
- }), k({
160
+ }), Z({
162
161
  /**
163
162
  * @description Form item size.
164
163
  */
@@ -185,22 +184,22 @@ const De = ["role", "aria-labelledby"], o = (
185
184
  resetField: j
186
185
  }), (r, t) => {
187
186
  var i;
188
- return L(), _e("div", {
187
+ return L(), Ie("div", {
189
188
  ref_key: "formItemRef",
190
189
  ref: z,
191
- class: g(re.value),
192
- role: I.value ? "group" : void 0,
193
- "aria-labelledby": I.value ? c(b) : void 0
190
+ class: g(ee.value),
191
+ role: V.value ? "group" : void 0,
192
+ "aria-labelledby": V.value ? c(b) : void 0
194
193
  }, [
195
194
  T(c(je), {
196
195
  "is-auto-width": $.value.width === "auto",
197
196
  "update-all": ((i = c(e)) == null ? void 0 : i.labelWidth) === "auto"
198
197
  }, {
199
198
  default: F(() => [
200
- S.value ? (L(), Ie(Ve(_.value ? "label" : "div"), {
199
+ S.value ? (L(), Ve(_e(I.value ? "label" : "div"), {
201
200
  key: 0,
202
201
  id: c(b),
203
- for: _.value,
202
+ for: I.value,
204
203
  class: g(c(o).e("label")),
205
204
  style: G($.value)
206
205
  }, {
@@ -216,19 +215,19 @@ const De = ["role", "aria-labelledby"], o = (
216
215
  }, 8, ["is-auto-width", "update-all"]),
217
216
  O("div", {
218
217
  class: g(c(o).e("content")),
219
- style: G(ee.value)
218
+ style: G(x.value)
220
219
  }, [
221
220
  M(r.$slots, "default"),
222
221
  T(we, {
223
222
  name: `${c(o).namespace.value}-zoom-in-top`
224
223
  }, {
225
224
  default: F(() => [
226
- ne.value ? M(r.$slots, "error", {
225
+ ue.value ? M(r.$slots, "error", {
227
226
  key: 0,
228
227
  error: p.value
229
228
  }, () => [
230
229
  O("div", {
231
- class: g(se.value)
230
+ class: g(te.value)
232
231
  }, K(p.value), 3)
233
232
  ]) : U("", !0)
234
233
  ]),
@@ -240,5 +239,5 @@ const De = ["role", "aria-labelledby"], o = (
240
239
  }
241
240
  });
242
241
  export {
243
- xe as default
242
+ Ce as default
244
243
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as v, computed as h, watch as x, getCurrentInstance as O, provide as j, reactive as q, openBlock as z, createElementBlock as S, normalizeClass as T, renderSlot as I } from "vue";
1
+ import { defineComponent as V, computed as h, watch as x, getCurrentInstance as O, provide as j, reactive as q, openBlock as z, createElementBlock as S, normalizeClass as T, renderSlot as I } from "vue";
2
2
  import { isFunction as M } from "@vft/utils";
3
3
  import { debugWarn as a } from "../../utils/error.js";
4
4
  import "lodash";
@@ -13,10 +13,9 @@ import { useFormLabelWidth as A, filterFields as d } from "./utils.js";
13
13
  const n = (
14
14
  /* hoist-static*/
15
15
  R("form")
16
- ), K = v({
17
- name: n.b()
18
- }), _ = /* @__PURE__ */ v({
19
- ...K,
16
+ ), k = /* @__PURE__ */ V({
17
+ name: n.b(),
18
+ __name: "form",
20
19
  props: {
21
20
  size: {},
22
21
  disabled: { type: Boolean },
@@ -35,19 +34,19 @@ const n = (
35
34
  scrollToError: { type: Boolean }
36
35
  },
37
36
  emits: ["validate"],
38
- setup(i, { expose: y, emit: F }) {
39
- const s = [], g = W(), B = h(() => [
37
+ setup(i, { expose: v, emit: y }) {
38
+ const s = [], F = W(), g = h(() => [
40
39
  n.b(),
41
40
  // todo: in v2.2.0, we can remove default
42
41
  // in fact, remove it doesn't affect the final style
43
- n.m(g.value || "default"),
42
+ n.m(F.value || "default"),
44
43
  {
45
44
  [n.m(`label-${i.labelPosition}`)]: i.labelPosition,
46
45
  [n.m("inline")]: i.inline
47
46
  }
48
- ]), w = (e) => {
47
+ ]), B = (e) => {
49
48
  s.push(e);
50
- }, b = (e) => {
49
+ }, w = (e) => {
51
50
  e.prop && s.splice(s.indexOf(e), 1);
52
51
  }, u = (e = []) => {
53
52
  if (!i.model) {
@@ -55,20 +54,20 @@ const n = (
55
54
  return;
56
55
  }
57
56
  d(s, e).forEach((t) => t.resetField());
58
- }, c = (e = []) => {
57
+ }, m = (e = []) => {
59
58
  d(s, e).forEach((t) => t.clearValidate());
60
- }, C = h(() => {
59
+ }, b = h(() => {
61
60
  const e = !!i.model;
62
61
  return e || a(n.b(), "model is required for validate to work."), e;
63
- }), E = (e) => {
62
+ }), C = (e) => {
64
63
  if (s.length === 0)
65
64
  return [];
66
65
  const t = d(s, e);
67
66
  return t.length ? t : (a(n.b(), "please pass correct props!"), []);
68
- }, m = async (e) => f(void 0, e), P = async (e = []) => {
69
- if (!C.value)
67
+ }, c = async (e) => f(void 0, e), E = async (e = []) => {
68
+ if (!b.value)
70
69
  return !1;
71
- const t = E(e);
70
+ const t = C(e);
72
71
  if (t.length === 0)
73
72
  return !0;
74
73
  let o = {};
@@ -85,7 +84,7 @@ const n = (
85
84
  }, f = async (e = [], t) => {
86
85
  const o = !M(t);
87
86
  try {
88
- const r = await P(e);
87
+ const r = await E(e);
89
88
  return r === !0 && (t == null || t(r)), r;
90
89
  } catch (r) {
91
90
  if (r instanceof Error)
@@ -101,28 +100,28 @@ const n = (
101
100
  x(
102
101
  () => i.rules,
103
102
  () => {
104
- i.validateOnRuleChange && m().catch((e) => a(e));
103
+ i.validateOnRuleChange && c().catch((e) => a(e));
105
104
  },
106
105
  { deep: !0 }
107
106
  );
108
- const V = O();
107
+ const P = O();
109
108
  return j(
110
109
  $,
111
110
  q({
112
- ...V.props,
113
- emit: F,
111
+ ...P.props,
112
+ emit: y,
114
113
  resetFields: u,
115
- clearValidate: c,
114
+ clearValidate: m,
116
115
  validateField: f,
117
- addField: w,
118
- removeField: b,
116
+ addField: B,
117
+ removeField: w,
119
118
  ...A()
120
119
  })
121
- ), y({
120
+ ), v({
122
121
  /**
123
122
  * @description Validate the whole form. Receives a callback or returns `Promise`.
124
123
  */
125
- validate: m,
124
+ validate: c,
126
125
  /**
127
126
  * @description Validate specified fields.
128
127
  */
@@ -134,18 +133,18 @@ const n = (
134
133
  /**
135
134
  * @description Clear validation message for specified fields.
136
135
  */
137
- clearValidate: c,
136
+ clearValidate: m,
138
137
  /**
139
138
  * @description Scroll to the specified fields.
140
139
  */
141
140
  scrollToField: p
142
141
  }), (e, t) => (z(), S("form", {
143
- class: T(B.value)
142
+ class: T(g.value)
144
143
  }, [
145
144
  I(e.$slots, "default")
146
145
  ], 2));
147
146
  }
148
147
  });
149
148
  export {
150
- _ as default
149
+ k as default
151
150
  };