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 I, toRefs as ne, useSlots as le, getCurrentInstance as re, ref as C, computed as v, h as M, createVNode as f, onMounted as ie, nextTick as ae, watch as pe, isVNode as ue } from "vue";
1
+ import { defineComponent as oe, toRefs as ne, useSlots as le, getCurrentInstance as re, ref as C, computed as v, h as M, createVNode as f, onMounted as ie, nextTick as ae, watch as pe, isVNode as ue } from "vue";
2
2
  import "../divider/index.js";
3
3
  import { VftIcon as se } from "../icon/index.js";
4
4
  import "../avatar/index.js";
@@ -87,17 +87,15 @@ import "../../utils/ns-cover.js";
87
87
  import { listenerRouteChange as ge, useRouterHelper as ve } from "@vft/router";
88
88
  import { useSortable as be } from "@vft/use";
89
89
  import { useDragLine as ye } from "./use-drag-line.js";
90
- const u = (
91
- /* hoist-static*/
92
- he("side-menu")
93
- );
94
90
  function Ce(b) {
95
91
  return typeof b == "function" || Object.prototype.toString.call(b) === "[object Object]" && !ue(b);
96
92
  }
97
- const Me = I({
98
- name: u.b()
99
- }), no = /* @__PURE__ */ I({
100
- ...Me,
93
+ const u = (
94
+ /* hoist-static*/
95
+ he("side-menu")
96
+ ), oo = /* @__PURE__ */ oe({
97
+ name: u.b(),
98
+ __name: "side-menu",
101
99
  props: {
102
100
  isFixedLeft: {
103
101
  type: Boolean,
@@ -158,16 +156,16 @@ const Me = I({
158
156
  },
159
157
  emits: ["update:collapse", "update:width", "dragEnd", "dragWidthEnd", "select", "subMenuClick", "menuItemMouseenter", "menuItemMouseleave"],
160
158
  setup(b, {
161
- expose: L,
159
+ expose: I,
162
160
  emit: c
163
161
  }) {
164
162
  const t = b, {
165
163
  defaultActive: S,
166
164
  collapse: h,
167
- uniqueOpened: P,
165
+ uniqueOpened: L,
168
166
  defaultOpeneds: x,
169
- openMenuCollapse: H
170
- } = ne(t), r = le(), B = re(), _ = C(), a = v(() => ({
167
+ openMenuCollapse: P
168
+ } = ne(t), r = le(), B = re(), T = C(), a = v(() => ({
171
169
  path: "path",
172
170
  children: "children",
173
171
  title: "title",
@@ -178,9 +176,9 @@ const Me = I({
178
176
  }));
179
177
  ge((e) => {
180
178
  var o;
181
- !e || (o = e.meta) != null && o.hideSide && !t.useRouterJump || (_.value = e.path);
179
+ !e || (o = e.meta) != null && o.hideSide && !t.useRouterJump || (T.value = e.path);
182
180
  });
183
- const U = (e) => {
181
+ const H = (e) => {
184
182
  var n;
185
183
  const o = e.e;
186
184
  if (t.autoScrollActiveDom && o) {
@@ -190,11 +188,11 @@ const Me = I({
190
188
  }, 300);
191
189
  }
192
190
  c("subMenuClick", e);
193
- }, F = (e) => {
191
+ }, U = (e) => {
194
192
  c("menuItemMouseenter", e);
195
- }, Z = (e) => {
193
+ }, F = (e) => {
196
194
  c("menuItemMouseleave", e);
197
- }, T = (e, o) => {
195
+ }, _ = (e, o) => {
198
196
  const n = e[a.value.path], p = e[a.value.title], l = e == null ? void 0 : e[a.value.children], m = e == null ? void 0 : e[a.value.index], s = e == null ? void 0 : e[a.value.icon], d = !!(e != null && e[a.value.disabled]), g = t.disabledJudgeTurnOver ? !d : d, N = m || n || o + p;
199
197
  return l != null && l.length ? M(
200
198
  // @ts-ignore
@@ -210,19 +208,19 @@ const Me = I({
210
208
  popperClass: u.e("popper")
211
209
  },
212
210
  {
213
- default: () => l == null ? void 0 : l.map((i, X) => {
211
+ default: () => l == null ? void 0 : l.map((i, Q) => {
214
212
  var V;
215
- const w = i[a.value.path], W = i[a.value.index], ee = i[a.value.icon], te = i[a.value.title], A = !!i[a.value.disabled], oe = t.disabledJudgeTurnOver ? !A : A;
216
- return (V = i == null ? void 0 : i[a.value.children]) != null && V.length ? T(i, X) : (
213
+ const w = i[a.value.path], W = i[a.value.index], X = i[a.value.icon], ee = i[a.value.title], A = !!i[a.value.disabled], te = t.disabledJudgeTurnOver ? !A : A;
214
+ return (V = i == null ? void 0 : i[a.value.children]) != null && V.length ? _(i, Q) : (
217
215
  // @ts-ignore
218
216
  M(j, {
219
217
  ...i,
220
218
  key: W || w,
221
219
  index: W || w,
222
220
  route: w,
223
- icon: ee,
224
- title: te,
225
- disabled: t.openDisabled && oe
221
+ icon: X,
222
+ title: ee,
223
+ disabled: t.openDisabled && te
226
224
  }, r.menuItem ? () => {
227
225
  var J;
228
226
  return (J = r.menuItem) == null ? void 0 : J.call(r, {
@@ -240,8 +238,8 @@ const Me = I({
240
238
  route: n,
241
239
  icon: s,
242
240
  disabled: t.openDisabled && g,
243
- onMouseenter: () => F(e),
244
- onMouseleave: () => Z(e)
241
+ onMouseenter: () => U(e),
242
+ onMouseleave: () => F(e)
245
243
  }, r.menuItem ? () => {
246
244
  var i;
247
245
  return (i = r.menuItem) == null ? void 0 : i.call(r, {
@@ -249,30 +247,30 @@ const Me = I({
249
247
  index: o
250
248
  });
251
249
  } : "");
252
- }, y = C(), $ = v(() => ({
250
+ }, y = C(), Z = v(() => ({
253
251
  ...t.collapseWidth === 0 && h.value ? {
254
252
  width: 0
255
253
  } : {},
256
254
  height: `calc(100% - ${t.menuTopBottomHeight}px)`
257
- })), z = v(() => {
255
+ })), $ = v(() => {
258
256
  var o, n;
259
257
  let e;
260
258
  return M(f(de, {
261
259
  ref: y,
262
- onSelect: Y,
263
- onOpen: U,
264
- defaultActive: (S == null ? void 0 : S.value) || _.value,
260
+ onSelect: z,
261
+ onOpen: H,
262
+ defaultActive: (S == null ? void 0 : S.value) || T.value,
265
263
  defaultOpeneds: x == null ? void 0 : x.value,
266
264
  class: [u.e("con"), (o = t.dragOption) != null && o.dragClassName ? u.e((n = t.dragOption) == null ? void 0 : n.dragClassName) : ""],
267
- style: $.value,
268
- collapse: H.value ? h.value : !1,
269
- uniqueOpened: P.value,
265
+ style: Z.value,
266
+ collapse: P.value ? h.value : !1,
267
+ uniqueOpened: L.value,
270
268
  collapseTransition: !1
271
- }, Ce(e = t.menus.map((p, l) => T(p, l))) ? e : {
269
+ }, Ce(e = t.menus.map((p, l) => _(p, l))) ? e : {
272
270
  default: () => [e]
273
271
  }));
274
272
  }), D = B.appContext.config.globalProperties.$router;
275
- async function Y(e) {
273
+ async function z(e) {
276
274
  var o, n, p;
277
275
  if (t.useRouterJump) {
278
276
  const {
@@ -311,7 +309,7 @@ const Me = I({
311
309
  }
312
310
  });
313
311
  });
314
- const O = C(), R = C(), k = C(), G = v(() => ({
312
+ const O = C(), R = C(), k = C(), Y = v(() => ({
315
313
  ...t.collapseWidth === 0 && h.value ? {
316
314
  borderRight: "none"
317
315
  } : {},
@@ -321,20 +319,20 @@ const Me = I({
321
319
  pe(() => h.value, (e) => {
322
320
  e ? c("update:width", t.collapseWidth) : c("update:width", k.value || t.width), k.value = t.width;
323
321
  }), t.dragWidthCfg && ye(O, R, B);
324
- const K = v(() => ({
322
+ const G = v(() => ({
325
323
  left: q(t.width)
326
- })), Q = v(() => [u.b(), t.isFixedLeft ? u.m("fixed") : ""]);
327
- return L({
324
+ })), K = v(() => [u.b(), t.isFixedLeft ? u.m("fixed") : ""]);
325
+ return I({
328
326
  sideRef: O
329
327
  }), () => {
330
328
  var e;
331
329
  return f("div", {
332
330
  ref: O,
333
- class: Q.value,
334
- style: G.value
331
+ class: K.value,
332
+ style: Y.value
335
333
  }, [r.top ? f("div", {
336
334
  class: u.e("top")
337
- }, [r.top()]) : null, z.value, r.bottom ? f("div", {
335
+ }, [r.top()]) : null, $.value, r.bottom ? f("div", {
338
336
  class: u.e("bottom")
339
337
  }, [r.bottom()]) : t.showCollapse ? f("div", {
340
338
  onClick: () => c("update:collapse", !h.value),
@@ -347,12 +345,12 @@ const Me = I({
347
345
  icon: "ico-iconoir:sidebar-collapse"
348
346
  }, null)]) : null, (e = r.default) == null ? void 0 : e.call(r), t.dragWidthCfg ? f("div", {
349
347
  ref: R,
350
- style: K.value,
348
+ style: G.value,
351
349
  class: u.e("drag-bar")
352
350
  }, null) : null]);
353
351
  };
354
352
  }
355
353
  });
356
354
  export {
357
- no as default
355
+ oo as default
358
356
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, openBlock as r, createElementBlock as n, normalizeClass as a, unref as e, createBlock as i, createCommentVNode as p } from "vue";
1
+ import { defineComponent as m, openBlock as r, createElementBlock as n, normalizeClass as i, unref as e, createBlock as a, createCommentVNode as p } from "vue";
2
2
  import { useNamespace as c } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -7,19 +7,18 @@ import "@vueuse/core";
7
7
  import "@vft/utils";
8
8
  import "../../utils/ns-cover.js";
9
9
  import { VftIcon as s } from "../icon/index.js";
10
- const l = m({
11
- name: "VftSkeletonItem"
12
- }), g = /* @__PURE__ */ m({
13
- ...l,
10
+ const N = /* @__PURE__ */ m({
11
+ name: "VftSkeletonItem",
12
+ __name: "skeleton-item",
14
13
  props: {
15
14
  variant: { default: "text" }
16
15
  },
17
- setup(f) {
16
+ setup(l) {
18
17
  const t = c("skeleton");
19
- return (o, u) => (r(), n("div", {
20
- class: a([e(t).e("item"), e(t).e(o.variant)])
18
+ return (o, f) => (r(), n("div", {
19
+ class: i([e(t).e("item"), e(t).e(o.variant)])
21
20
  }, [
22
- o.variant === "image" ? (r(), i(e(s), {
21
+ o.variant === "image" ? (r(), a(e(s), {
23
22
  key: 0,
24
23
  icon: "ico-ep:picture-filled"
25
24
  })) : p("", !0)
@@ -27,5 +26,5 @@ const l = m({
27
26
  }
28
27
  });
29
28
  export {
30
- g as default
29
+ N as default
31
30
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as k, computed as y, unref as t, openBlock as o, createElementBlock as a, mergeProps as u, Fragment as s, renderList as p, renderSlot as d, createVNode as h, normalizeClass as f, createBlock as B, createCommentVNode as $, normalizeProps as w } from "vue";
1
+ import { defineComponent as g, computed as y, unref as t, openBlock as o, createElementBlock as a, mergeProps as p, Fragment as s, renderList as u, renderSlot as d, createVNode as h, normalizeClass as f, createBlock as B, createCommentVNode as $, normalizeProps as w } from "vue";
2
2
  import { useNamespace as v } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -11,10 +11,9 @@ import c from "./skeleton-item.vue2.js";
11
11
  const r = (
12
12
  /* hoist-static*/
13
13
  v("skeleton")
14
- ), N = k({
15
- name: r.b()
16
- }), q = /* @__PURE__ */ k({
17
- ...N,
14
+ ), j = /* @__PURE__ */ g({
15
+ name: r.b(),
16
+ __name: "skeleton",
18
17
  props: {
19
18
  animated: { type: Boolean, default: !1 },
20
19
  count: { default: 1 },
@@ -22,22 +21,22 @@ const r = (
22
21
  loading: { type: Boolean, default: !0 },
23
22
  throttle: {}
24
23
  },
25
- setup(n, { expose: g }) {
24
+ setup(n, { expose: k }) {
26
25
  const l = C(y(() => n.loading), n.throttle);
27
- return g({
26
+ return k({
28
27
  /** @description loading state */
29
28
  uiLoading: l
30
- }), (e, b) => t(l) ? (o(), a("div", u({
29
+ }), (e, N) => t(l) ? (o(), a("div", p({
31
30
  key: 0,
32
31
  class: [t(r).b(), t(r).is("animated", e.animated)]
33
32
  }, e.$attrs), [
34
- (o(!0), a(s, null, p(e.count, (m) => (o(), a(s, { key: m }, [
33
+ (o(!0), a(s, null, u(e.count, (m) => (o(), a(s, { key: m }, [
35
34
  e.loading ? d(e.$slots, "template", { key: m }, () => [
36
35
  h(c, {
37
36
  class: f(t(r).is("first")),
38
37
  variant: "p"
39
38
  }, null, 8, ["class"]),
40
- (o(!0), a(s, null, p(e.rows, (i) => (o(), B(c, {
39
+ (o(!0), a(s, null, u(e.rows, (i) => (o(), B(c, {
41
40
  key: i,
42
41
  class: f([
43
42
  t(r).e("paragraph"),
@@ -47,9 +46,9 @@ const r = (
47
46
  }, null, 8, ["class"]))), 128))
48
47
  ]) : $("", !0)
49
48
  ], 64))), 128))
50
- ], 16)) : d(e.$slots, "default", w(u({ key: 1 }, e.$attrs)));
49
+ ], 16)) : d(e.$slots, "default", w(p({ key: 1 }, e.$attrs)));
51
50
  }
52
51
  });
53
52
  export {
54
- q as default
53
+ j as default
55
54
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as H, computed as s, ref as T, watch as w, onMounted as Z, openBlock as n, createElementBlock as u, normalizeClass as r, normalizeStyle as M, withModifiers as ee, createElementVNode as B, unref as i, withKeys as ae, createBlock as V, normalizeProps as E, mergeProps as I, createCommentVNode as c, toDisplayString as N, nextTick as oe } from "vue";
1
+ import { defineComponent as Y, computed as s, ref as T, watch as w, onMounted as Z, openBlock as n, createElementBlock as u, normalizeClass as r, normalizeStyle as M, withModifiers as ee, createElementVNode as B, unref as i, withKeys as ae, createBlock as V, normalizeProps as E, mergeProps as I, createCommentVNode as c, toDisplayString as N, nextTick as oe } from "vue";
2
2
  import { singleAttrToObj as U, addUnit as ie, isPromise as j, isBoolean as le } from "@vft/utils";
3
3
  import { debugWarn as G, throwError as te } from "../../utils/error.js";
4
4
  import "lodash";
5
5
  import "@vueuse/core";
6
- import { UPDATE_MODEL_EVENT as P, CHANGE_EVENT as S, INPUT_EVENT as _ } from "../../constants/event.js";
6
+ import { UPDATE_MODEL_EVENT as P, CHANGE_EVENT as S, INPUT_EVENT as z } from "../../constants/event.js";
7
7
  import "../../utils/ns-cover.js";
8
8
  import { VftIcon as C } from "../icon/index.js";
9
9
  import "../form/index.js";
@@ -15,10 +15,9 @@ import { useFormSize as se, useFormDisabled as ue } from "../form/hooks/use-form
15
15
  const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "true-value", "false-value", "disabled", "tabindex", "onKeydown"], me = ["aria-hidden"], pe = ["aria-hidden"], fe = ["aria-hidden"], o = (
16
16
  /* hoist-static*/
17
17
  ne("switch")
18
- ), he = H({
19
- name: o.b()
20
- }), _e = /* @__PURE__ */ H({
21
- ...he,
18
+ ), Se = /* @__PURE__ */ Y({
19
+ name: o.b(),
20
+ __name: "switch",
22
21
  props: {
23
22
  modelValue: { type: [Boolean, String, Number], default: !1 },
24
23
  value: { type: [Boolean, String, Number], default: !1 },
@@ -42,16 +41,16 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
42
41
  size: {},
43
42
  tabindex: {}
44
43
  },
45
- emits: [P, S, _],
46
- setup(L, { expose: W, emit: d }) {
47
- const a = L, { formItem: v } = re(), $ = se(), { inputId: q } = ce(a, {
44
+ emits: [P, S, z],
45
+ setup(H, { expose: L, emit: d }) {
46
+ const a = H, { formItem: v } = re(), W = se(), { inputId: $ } = ce(a, {
48
47
  formItemContext: v
49
- }), m = s(() => U(a.activeIcon, "icon")), f = s(() => U(a.inactiveIcon, "icon")), y = ue(s(() => a.loading)), g = T(a.modelValue !== !1), h = T(), J = T(), Q = s(() => [
48
+ }), m = s(() => U(a.activeIcon, "icon")), f = s(() => U(a.inactiveIcon, "icon")), y = ue(s(() => a.loading)), g = T(a.modelValue !== !1), h = T(), q = T(), J = s(() => [
50
49
  o.b(),
51
- o.m($.value),
50
+ o.m(W.value),
52
51
  o.is("disabled", y.value),
53
52
  o.is("checked", l.value)
54
- ]), R = s(() => ({
53
+ ]), Q = s(() => ({
55
54
  width: ie(a.width)
56
55
  }));
57
56
  w(
@@ -65,17 +64,17 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
65
64
  g.value = !1;
66
65
  }
67
66
  );
68
- const z = s(() => g.value ? a.modelValue : a.value), l = s(() => z.value === a.activeValue);
69
- [a.activeValue, a.inactiveValue].includes(z.value) || (d(P, a.inactiveValue), d(S, a.inactiveValue), d(_, a.inactiveValue)), w(l, (e) => {
67
+ const D = s(() => g.value ? a.modelValue : a.value), l = s(() => D.value === a.activeValue);
68
+ [a.activeValue, a.inactiveValue].includes(D.value) || (d(P, a.inactiveValue), d(S, a.inactiveValue), d(z, a.inactiveValue)), w(l, (e) => {
70
69
  var t;
71
70
  h.value.checked = e, a.validateEvent && ((t = v == null ? void 0 : v.validate) == null || t.call(v, "change").catch((b) => G(b)));
72
71
  });
73
72
  const k = () => {
74
73
  const e = l.value ? a.inactiveValue : a.activeValue;
75
- d(P, e), d(S, e), d(_, e), oe(() => {
74
+ d(P, e), d(S, e), d(z, e), oe(() => {
76
75
  h.value.checked = l.value;
77
76
  });
78
- }, D = () => {
77
+ }, _ = () => {
79
78
  if (y.value)
80
79
  return;
81
80
  const { beforeChange: e } = a;
@@ -95,21 +94,21 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
95
94
  }).catch((p) => {
96
95
  G(o.b(), `some error occurred: ${p}`);
97
96
  }) : t && k();
98
- }, X = s(() => o.cssVarBlock({
97
+ }, R = s(() => o.cssVarBlock({
99
98
  ...a.activeColor ? { "on-color": a.activeColor } : null,
100
99
  ...a.inactiveColor ? { "off-color": a.inactiveColor } : null,
101
100
  ...a.borderColor ? { "border-color": a.borderColor } : null
102
- })), Y = () => {
101
+ })), X = () => {
103
102
  var e, t;
104
103
  (t = (e = h.value) == null ? void 0 : e.focus) == null || t.call(e);
105
104
  };
106
105
  return Z(() => {
107
106
  h.value.checked = l.value;
108
- }), W({
107
+ }), L({
109
108
  /**
110
109
  * @description manual focus to the switch component
111
110
  **/
112
- focus: Y,
111
+ focus: X,
113
112
  /**
114
113
  * @description whether Switch is checked
115
114
  */
@@ -117,12 +116,12 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
117
116
  }), (e, t) => {
118
117
  var b, p, x, F, K, O, A;
119
118
  return n(), u("div", {
120
- class: r(Q.value),
121
- style: M(X.value),
122
- onClick: ee(D, ["prevent"])
119
+ class: r(J.value),
120
+ style: M(R.value),
121
+ onClick: ee(_, ["prevent"])
123
122
  }, [
124
123
  B("input", {
125
- id: i(q),
124
+ id: i($),
126
125
  ref_key: "input",
127
126
  ref: h,
128
127
  class: r(i(o).e("input")),
@@ -136,7 +135,7 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
136
135
  disabled: i(y),
137
136
  tabindex: e.tabindex,
138
137
  onChange: k,
139
- onKeydown: ae(D, ["enter"])
138
+ onKeydown: ae(_, ["enter"])
140
139
  }, null, 42, ve),
141
140
  !e.inlinePrompt && (e.inactiveIcon || e.inactiveText) ? (n(), u("span", {
142
141
  key: 0,
@@ -154,9 +153,9 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
154
153
  ], 2)) : c("", !0),
155
154
  B("span", {
156
155
  ref_key: "core",
157
- ref: J,
156
+ ref: q,
158
157
  class: r(i(o).e("core")),
159
- style: M(R.value)
158
+ style: M(Q.value)
160
159
  }, [
161
160
  e.inlinePrompt ? (n(), u("div", {
162
161
  key: 0,
@@ -198,5 +197,5 @@ const de = ["onClick"], ve = ["id", "aria-checked", "aria-disabled", "name", "tr
198
197
  }
199
198
  });
200
199
  export {
201
- _e as default
200
+ Se as default
202
201
  };