y-design-ssr 1.1.1 → 1.1.3

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 (70) hide show
  1. package/libs/button/index.css +1 -1
  2. package/libs/button/index.umd.js +2 -2
  3. package/libs/cell/index.css +1 -1
  4. package/libs/cell/index.umd.js +2 -2
  5. package/libs/checkbox/index.css +1 -1
  6. package/libs/checkbox/index.umd.js +2 -2
  7. package/libs/checkboxGroup/index.css +1 -1
  8. package/libs/checkboxGroup/index.umd.js +2 -2
  9. package/libs/col/index.css +1 -1
  10. package/libs/col/index.umd.js +2 -2
  11. package/libs/countDown/index.css +1 -1
  12. package/libs/countDown/index.umd.js +2 -2
  13. package/libs/dialog/index.css +1 -1
  14. package/libs/dialog/index.umd.js +2 -2
  15. package/libs/dropdown/index.css +1 -1
  16. package/libs/dropdown/index.umd.js +2 -2
  17. package/libs/dropdownItem/index.css +1 -1
  18. package/libs/dropdownItem/index.umd.js +2 -2
  19. package/libs/empty/index.css +1 -1
  20. package/libs/empty/index.umd.js +2 -2
  21. package/libs/form/index.css +1 -1
  22. package/libs/form/index.umd.js +2 -2
  23. package/libs/formItem/index.css +1 -1
  24. package/libs/formItem/index.umd.js +2 -2
  25. package/libs/icon/index.css +1 -1
  26. package/libs/icon/index.umd.js +2 -2
  27. package/libs/index.css +1 -1
  28. package/libs/index.mjs +127 -125
  29. package/libs/index.umd.js +2 -2
  30. package/libs/input/index.css +1 -1
  31. package/libs/input/index.umd.js +2 -2
  32. package/libs/layout/index.css +1 -1
  33. package/libs/layout/index.umd.js +1 -1
  34. package/libs/list/index.css +1 -1
  35. package/libs/list/index.umd.js +2 -2
  36. package/libs/loading/index.css +1 -1
  37. package/libs/loading/index.umd.js +2 -2
  38. package/libs/mask/index.css +1 -1
  39. package/libs/mask/index.umd.js +2 -2
  40. package/libs/pagination/index.css +1 -1
  41. package/libs/pagination/index.umd.js +2 -2
  42. package/libs/popup/index.css +1 -1
  43. package/libs/popup/index.umd.js +2 -2
  44. package/libs/progress/index.css +1 -1
  45. package/libs/progress/index.umd.js +2 -2
  46. package/libs/pullRefresh/index.css +1 -1
  47. package/libs/pullRefresh/index.umd.js +2 -2
  48. package/libs/row/index.css +1 -1
  49. package/libs/row/index.umd.js +2 -2
  50. package/libs/slider/index.css +1 -1
  51. package/libs/slider/index.umd.js +2 -2
  52. package/libs/stepper/index.css +1 -1
  53. package/libs/stepper/index.umd.js +2 -2
  54. package/libs/style/index.css +1 -1
  55. package/libs/style/index.umd.js +1 -1
  56. package/libs/swipe/index.css +1 -1
  57. package/libs/swipe/index.mjs +92 -90
  58. package/libs/swipe/index.umd.js +2 -2
  59. package/libs/swipeItem/index.css +1 -1
  60. package/libs/swipeItem/index.umd.js +1 -1
  61. package/libs/switch/index.css +1 -1
  62. package/libs/switch/index.umd.js +1 -1
  63. package/libs/tabs/index.css +1 -1
  64. package/libs/tabs/index.mjs +122 -120
  65. package/libs/tabs/index.umd.js +2 -2
  66. package/libs/toast/index.css +1 -1
  67. package/libs/toast/index.umd.js +2 -2
  68. package/libs/tooltip/index.css +1 -1
  69. package/libs/tooltip/index.umd.js +2 -2
  70. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { ref as z, reactive as N, getCurrentInstance as le, provide as Se, isVNode as se, inject as pe, onUnmounted as Ne, computed as C, defineComponent as H, createVNode as b, watch as Z, onMounted as re, nextTick as ee, onBeforeUnmount as Ce, onBeforeUpdate as Te } from "vue";
2
- const V = (e, n) => n ? typeof n == "string" ? ` ${e}--${n}` : Array.isArray(n) ? n.reduce((o, l) => o + V(e, l), "") : Object.keys(n).reduce(
3
- (o, l) => o + (n[l] ? V(e, l) : ""),
1
+ import { ref as z, reactive as N, getCurrentInstance as le, provide as Se, isVNode as oe, inject as pe, onUnmounted as Ne, computed as C, defineComponent as H, createVNode as b, watch as Z, onMounted as re, nextTick as ee, onBeforeUnmount as Ce, onBeforeUpdate as Te } from "vue";
2
+ const V = (e, n) => n ? typeof n == "string" ? ` ${e}--${n}` : Array.isArray(n) ? n.reduce((a, l) => a + V(e, l), "") : Object.keys(n).reduce(
3
+ (a, l) => a + (n[l] ? V(e, l) : ""),
4
4
  ""
5
- ) : "", ze = (e) => (n, o) => {
6
- let l = n, v = o;
5
+ ) : "", ze = (e) => (n, a) => {
6
+ let l = n, v = a;
7
7
  return l && typeof l != "string" && (v = l, l = ""), l = l ? `${e}__${l}` : e, `${l}${V(l, v)}`;
8
8
  }, Ee = () => (e, n) => n ? `${V(`y-${e}`, n)}` : `y-${e}`, Le = {
9
9
  "pull-refresh": {
@@ -27,40 +27,40 @@ const U = (e) => {
27
27
  };
28
28
  var te = /* @__PURE__ */ ((e) => (e.left = "left", e.top = "top", e.bottom = "bottom", e.right = "right", e))(te || {}), W = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(W || {});
29
29
  const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%") ? n * Number(e.replace(/%/g, "")) / 100 : Number(e), $e = (e) => {
30
- const n = [], o = (l) => {
30
+ const n = [], a = (l) => {
31
31
  Array.isArray(l) && l.forEach((v) => {
32
32
  var u;
33
- se(v) && (n.push(v), (u = v.component) != null && u.subTree && o(v.component.subTree.children), v.children && o(v.children));
33
+ oe(v) && (n.push(v), (u = v.component) != null && u.subTree && a(v.component.subTree.children), v.children && a(v.children));
34
34
  });
35
35
  };
36
- return o(e), n;
36
+ return a(e), n;
37
37
  }, xe = (e, n) => {
38
- const o = $e(n.subTree.children);
39
- e.sort((l, v) => o.indexOf(l.vnode) - o.indexOf(v.vnode));
38
+ const a = $e(n.subTree.children);
39
+ e.sort((l, v) => a.indexOf(l.vnode) - a.indexOf(v.vnode));
40
40
  }, ce = (e) => {
41
- const n = le(), o = N([]);
41
+ const n = le(), a = N([]);
42
42
  return {
43
- children: o,
43
+ children: a,
44
44
  initProvide: (v) => {
45
45
  Se(e, {
46
- addChild: (s) => {
47
- s.proxy && (o.push(s), n && xe(o, n));
46
+ addChild: (r) => {
47
+ r.proxy && (a.push(r), n && xe(a, n));
48
48
  },
49
- removeChild: (s) => {
50
- const f = o.indexOf(s);
51
- o.splice(f, 1);
49
+ removeChild: (r) => {
50
+ const f = a.indexOf(r);
51
+ a.splice(f, 1);
52
52
  },
53
- children: o,
53
+ children: a,
54
54
  ...v
55
55
  });
56
56
  }
57
57
  };
58
58
  }, ue = (e) => {
59
- const n = pe(e, null), o = le();
60
- if (n && o) {
59
+ const n = pe(e, null), a = le();
60
+ if (n && a) {
61
61
  const { children: l, addChild: v, removeChild: u } = n;
62
- return v(o), Ne(() => u(o)), {
63
- index: C(() => l.indexOf(o)),
62
+ return v(a), Ne(() => u(a)), {
63
+ index: C(() => l.indexOf(a)),
64
64
  parent: n
65
65
  };
66
66
  }
@@ -68,8 +68,8 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
68
68
  parent: null,
69
69
  index: z(-1)
70
70
  };
71
- }, [Ie, Be] = U("swipe-item"), K = /* @__PURE__ */ H({
72
- name: Ie,
71
+ }, [De, Ie] = U("swipe-item"), K = /* @__PURE__ */ H({
72
+ name: De,
73
73
  props: {
74
74
  clonenNode: {
75
75
  type: Object,
@@ -83,34 +83,34 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
83
83
  setup(e, {
84
84
  slots: n
85
85
  }) {
86
- const o = le(), {
86
+ const a = le(), {
87
87
  parent: l
88
88
  } = ue(de);
89
- !e.clonenNode && o && (l == null || l.children.push(o));
90
- const v = C(() => e.clonenNode ? e.index : l == null ? void 0 : l.children.findIndex((c) => c.proxy === (o == null ? void 0 : o.proxy))), u = C(() => {
89
+ !e.clonenNode && a && (l == null || l.children.push(a));
90
+ const v = C(() => e.clonenNode ? e.index : l == null ? void 0 : l.children.findIndex((c) => c.proxy === (a == null ? void 0 : a.proxy))), u = C(() => {
91
91
  const c = `${(l == null ? void 0 : l.itemDetail.size) || 0}px`;
92
- let s = "auto";
92
+ let r = "auto";
93
93
  const f = `${(l == null ? void 0 : l.itemDetail.space) || 0}px`;
94
- return l != null && l.props.autoHeight && (l == null ? void 0 : l.activeIndex) !== v.value && (s = "0"), l != null && l.props.vertical ? {
94
+ return l != null && l.props.autoHeight && (l == null ? void 0 : l.activeIndex) !== v.value && (r = "0"), l != null && l.props.vertical ? {
95
95
  height: c,
96
- width: s,
96
+ width: r,
97
97
  marginBottom: f
98
98
  } : {
99
99
  width: c,
100
- height: s,
100
+ height: r,
101
101
  marginRight: f
102
102
  };
103
103
  });
104
104
  return () => {
105
- var s, f;
106
- const c = ((s = l == null ? void 0 : l.itemShowedList) == null ? void 0 : s.list[v.value || 0]) || !1;
105
+ var r, f;
106
+ const c = ((r = l == null ? void 0 : l.itemShowedList) == null ? void 0 : r.list[v.value || 0]) || !1;
107
107
  return b("div", {
108
- class: Be(),
108
+ class: Ie(),
109
109
  style: u.value
110
110
  }, [c ? e.clonenNode || ((f = n.default) == null ? void 0 : f.call(n)) : null]);
111
111
  };
112
112
  }
113
- }), De = {
113
+ }), Be = {
114
114
  autoplayTime: {
115
115
  type: Number,
116
116
  default: 0
@@ -180,15 +180,15 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
180
180
  components: {
181
181
  YSwipeItem: K
182
182
  },
183
- props: De,
183
+ props: Be,
184
184
  setup(e, {
185
185
  slots: n,
186
- emit: o,
186
+ emit: a,
187
187
  expose: l
188
188
  }) {
189
189
  const {
190
190
  initProvide: v
191
- } = ce(de), u = N([]), c = z(Number(e.initIndex)), s = N({
191
+ } = ce(de), u = N([]), c = z(Number(e.initIndex)), r = N({
192
192
  // 元素尺寸
193
193
  size: 0,
194
194
  // 间距
@@ -202,37 +202,37 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
202
202
  viewportSize: 0,
203
203
  // 重复节点个数
204
204
  cloneNodeCount: 0
205
- }), T = z(), g = z(), B = () => {
206
- const t = u.length, a = [];
205
+ }), T = z(), g = z(), I = () => {
206
+ const t = u.length, s = [];
207
207
  for (let m = 0; m < t; m++)
208
- a.push(!e.lazy);
209
- return a;
208
+ s.push(!e.lazy);
209
+ return s;
210
210
  }, R = () => {
211
211
  if (!e.lazy)
212
212
  return;
213
- const t = s.size + s.space, a = u.length * t;
214
- let m = -(f.offset + r.offset) - f.cloneNodeCount * t;
215
- m < 0 && (m += a);
213
+ const t = r.size + r.space, s = u.length * t;
214
+ let m = -(f.offset + o.offset) - f.cloneNodeCount * t;
215
+ m < 0 && (m += s);
216
216
  const w = m + f.viewportSize;
217
217
  for (let y = 0; y < u.length; y++)
218
218
  if (!k.list[y]) {
219
- const p = t * y, E = p + s.size;
219
+ const p = t * y, E = p + r.size;
220
220
  (p >= m && p < w || E > m && E < w || p < m && E > w) && (k.list[y] = !0);
221
221
  }
222
222
  }, k = N({
223
- list: B()
223
+ list: I()
224
224
  }), S = () => {
225
- k.list = B(), R();
225
+ k.list = I(), R();
226
226
  };
227
227
  Z(() => [...u], S);
228
- const D = (t, a) => {
229
- t ? s.size = ie(t, a) : s.size = a, s.space = Number(e.itemSpace) || 0, s.isFillViewport = s.size >= a, f.viewportSize = a, f.cloneNodeCount = G();
228
+ const B = (t, s) => {
229
+ t ? r.size = ie(t, s) : r.size = s, r.space = Number(e.itemSpace) || 0, r.isFillViewport = r.size >= s, f.viewportSize = s, f.cloneNodeCount = G();
230
230
  }, G = () => {
231
231
  if (x.value) {
232
- const t = s.size + s.space;
232
+ const t = r.size + r.space;
233
233
  if (t === 0)
234
234
  return 0;
235
- const a = f.viewportSize * 2 - t, m = Math.ceil(a / t);
235
+ const s = f.viewportSize * 2 - t, m = Math.ceil(s / t);
236
236
  return Math.min(m, u.length - 1);
237
237
  }
238
238
  return 0;
@@ -241,9 +241,9 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
241
241
  return;
242
242
  const {
243
243
  width: t,
244
- height: a
244
+ height: s
245
245
  } = T.value.getBoundingClientRect();
246
- e.vertical ? D(e.itemSize, a) : D(e.itemSize, t), c.value = c.value >= u.length ? u.length - 1 : c.value, c.value < 0 && (c.value = 0), I(c.value), S(), h();
246
+ e.vertical ? B(e.itemSize, s) : B(e.itemSize, t), c.value = c.value >= u.length ? u.length - 1 : c.value, c.value < 0 && (c.value = 0), D(c.value), S(), h();
247
247
  };
248
248
  re(() => {
249
249
  if (ee(L).catch(() => {
@@ -266,23 +266,23 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
266
266
  t = 0;
267
267
  break;
268
268
  case W.center:
269
- t = (f.viewportSize - s.size) / 2;
269
+ t = (f.viewportSize - r.size) / 2;
270
270
  break;
271
271
  case W.end:
272
- t = f.viewportSize - s.size;
272
+ t = f.viewportSize - r.size;
273
273
  break;
274
274
  default:
275
275
  t = 0;
276
276
  }
277
277
  return t;
278
- }), x = C(() => e.loop && u.length > 1), I = (t) => {
279
- const a = s.size + s.space;
280
- x.value ? f.offset = -a * (t + f.cloneNodeCount) + j.value : (f.offset = -a * t + j.value, e.align !== "center" && (t === 0 && (f.offset = 0), t === u.length - 1 && (f.offset = -a * t + f.viewportSize - s.size)));
278
+ }), x = C(() => e.loop && u.length > 1), D = (t) => {
279
+ const s = r.size + r.space;
280
+ x.value ? f.offset = -s * (t + f.cloneNodeCount) + j.value : (f.offset = -s * t + j.value, e.align !== "center" && (t === 0 && (f.offset = 0), t === u.length - 1 && (f.offset = -s * t + f.viewportSize - r.size)));
281
281
  }, F = () => {
282
- I(c.value), o("afterChange", c.value);
283
- }, _ = (t) => (u.length + t) % u.length, A = (t, a = !0) => {
284
- c.value = _(t), I(t), R(), o("change", c.value), a ? (r.transitionEnabled = !0, g.value && g.value.addEventListener("transitionend", () => {
285
- r.transitionEnabled = !1, F();
282
+ D(c.value), a("afterChange", c.value);
283
+ }, _ = (t) => (u.length + t) % u.length, A = (t, s = !0) => {
284
+ c.value = _(t), D(t), R(), a("change", c.value), s ? (o.transitionEnabled = !0, g.value && g.value.addEventListener("transitionend", () => {
285
+ o.transitionEnabled = !1, F();
286
286
  }, {
287
287
  once: !0
288
288
  })) : F();
@@ -298,7 +298,7 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
298
298
  e.autoplayTime && u.length > 1 && (i && clearInterval(i), i = setInterval(() => {
299
299
  O();
300
300
  }, Number(e.autoplayTime)));
301
- }, r = N({
301
+ }, o = N({
302
302
  // 拖拽中
303
303
  isDragging: !1,
304
304
  // 是否首次拖动
@@ -312,40 +312,42 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
312
312
  // 开始拖动时间
313
313
  startTime: /* @__PURE__ */ new Date(),
314
314
  // 是否在执行动画
315
- transitionEnabled: !1
315
+ transitionEnabled: !1,
316
+ // 当前次拖拽不满足翻页条件
317
+ isDissatisfy: !1
316
318
  }), M = (t) => {
317
- if (r.transitionEnabled)
319
+ if (o.transitionEnabled)
318
320
  return;
319
- let a = 0, m = 0;
320
- "touches" in t ? (a = t.touches[0].clientX, m = t.touches[0].clientY) : (a = t.clientX, m = t.clientY), r.startX = a, r.startY = m, r.isDragging = !0, r.isFirstTouch = !0, r.startTime = /* @__PURE__ */ new Date();
321
+ let s = 0, m = 0;
322
+ "touches" in t ? (s = t.touches[0].clientX, m = t.touches[0].clientY) : (s = t.clientX, m = t.clientY), o.startX = s, o.startY = m, o.isDragging = !0, o.isFirstTouch = !0, o.startTime = /* @__PURE__ */ new Date(), d();
321
323
  }, P = (t) => {
322
- if (!r.isDragging)
324
+ if (!o.isDragging)
323
325
  return;
324
- let a = 0, m = 0;
325
- "touches" in t ? (a = t.touches[0].clientX, m = t.touches[0].clientY) : (a = t.clientX, m = t.clientY);
326
- const w = a - r.startX, y = m - r.startY;
327
- if (r.isFirstTouch && (r.isFirstTouch = !1, Math.abs(w) < Math.abs(y) !== e.vertical)) {
328
- r.isDragging = !1;
326
+ let s = 0, m = 0;
327
+ "touches" in t ? (s = t.touches[0].clientX, m = t.touches[0].clientY) : (s = t.clientX, m = t.clientY);
328
+ const w = s - o.startX, y = m - o.startY;
329
+ if (o.isFirstTouch && (o.isFirstTouch = !1, Math.abs(w) < Math.abs(y) !== e.vertical)) {
330
+ o.isDragging = !1;
329
331
  return;
330
332
  }
331
- t.preventDefault(), r.offset = e.vertical ? y : w, R(), o("dragging", {
332
- percent: r.offset / (s.size + s.space),
333
- offset: r.offset
334
- });
333
+ t.preventDefault(), o.offset = e.vertical ? y : w, R(), a("dragging", {
334
+ percent: o.offset / (r.size + r.space),
335
+ offset: o.offset
336
+ }), o.isDissatisfy = !1;
335
337
  }, $ = () => {
336
- if (!r.isDragging)
338
+ if (!o.isDragging)
337
339
  return;
338
- r.isDragging = !1;
339
- const a = (/* @__PURE__ */ new Date()).getTime() - r.startTime.getTime();
340
- he() && (Math.abs(r.offset) > me.value || Math.abs(r.offset) / a > 0.5) && (r.offset > 0 ? Y() : O()), r.offset = 0, h();
341
- }, me = C(() => ie(e.minSwipeDistance, s.size + s.space)), he = () => {
340
+ o.isDragging = !1;
341
+ const s = (/* @__PURE__ */ new Date()).getTime() - o.startTime.getTime();
342
+ he() && (Math.abs(o.offset) > me.value || Math.abs(o.offset) / s > 0.5) ? (o.offset > 0 ? Y() : O(), o.offset = 0, o.isDissatisfy = !1) : (o.offset = 0, o.isDissatisfy = !0), h();
343
+ }, me = C(() => ie(e.minSwipeDistance, r.size + r.space)), he = () => {
342
344
  if (x.value)
343
345
  return !0;
344
- const t = r.offset > 0 ? c.value - 1 : c.value + 1;
346
+ const t = o.offset > 0 ? c.value - 1 : c.value + 1;
345
347
  return t >= 0 && t < u.length;
346
348
  }, ge = C(() => {
347
- const t = r.isDragging && !e.isFollowHand ? f.offset : f.offset + r.offset, a = {};
348
- return e.vertical ? (a.transform = `translate3d(0, ${t}px, 0)`, a.transitionDuration = r.transitionEnabled ? `${e.duration}ms` : "0ms") : (a.transform = `translate3d(${t}px, 0, 0)`, a.transitionDuration = r.transitionEnabled ? `${e.duration}ms` : "0ms"), r.isDragging && (a.transition = "none"), e.vertical && (a.flexDirection = "column"), e.autoHeight && (a.display = "block", a.whiteSpace = "nowrap"), a;
349
+ const t = o.isDragging && !e.isFollowHand ? f.offset : f.offset + o.offset, s = {};
350
+ return e.vertical ? (s.transform = `translate3d(0, ${t}px, 0)`, s.transitionDuration = o.transitionEnabled ? `${e.duration}ms` : "0ms") : (s.transform = `translate3d(${t}px, 0, 0)`, s.transitionDuration = o.transitionEnabled || o.isDissatisfy ? `${e.duration}ms` : "0ms"), o.isDragging && (s.transition = "none"), e.vertical && (s.flexDirection = "column"), e.autoHeight && (s.display = "block", s.whiteSpace = "nowrap"), s;
349
351
  }), ye = C(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? te.left : te.bottom)}`]);
350
352
  l({
351
353
  moveTo: A,
@@ -357,22 +359,22 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
357
359
  children: u,
358
360
  activeIndex: c,
359
361
  props: e,
360
- itemDetail: s,
362
+ itemDetail: r,
361
363
  itemShowedList: k
362
364
  });
363
365
  v(be);
364
366
  const we = () => e.dots ? b("div", {
365
367
  class: ye.value
366
- }, [u.map((t, a) => {
368
+ }, [u.map((t, s) => {
367
369
  const m = q("dot", {
368
- active: a === c.value
370
+ active: s === c.value
369
371
  });
370
372
  return b("div", {
371
373
  class: m,
372
374
  style: {
373
375
  backgroundColor: e.dotsColor
374
376
  },
375
- key: a
377
+ key: s
376
378
  }, null);
377
379
  })]) : null;
378
380
  return () => {
@@ -384,14 +386,14 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
384
386
  class: q("track"),
385
387
  style: ge.value,
386
388
  ref: g
387
- }, [Array(f.cloneNodeCount).fill("").map((a, m) => {
389
+ }, [Array(f.cloneNodeCount).fill("").map((s, m) => {
388
390
  var p, E, X;
389
391
  const w = _(m - f.cloneNodeCount), y = (X = (p = u[w]) == null ? void 0 : (E = p.slots).default) == null ? void 0 : X.call(E);
390
392
  return y ? b(K, {
391
393
  clonenNode: y,
392
394
  index: w
393
395
  }, null) : null;
394
- }), (t = n.default) == null ? void 0 : t.call(n), Array(f.cloneNodeCount).fill("").map((a, m) => {
396
+ }), (t = n.default) == null ? void 0 : t.call(n), Array(f.cloneNodeCount).fill("").map((s, m) => {
395
397
  var p, E, X;
396
398
  const w = _(m), y = (X = (p = u[w]) == null ? void 0 : (E = p.slots).default) == null ? void 0 : X.call(E);
397
399
  return y ? b(K, {
@@ -401,7 +403,7 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
401
403
  })]), n.dots ? n.dots() : we()]);
402
404
  };
403
405
  }
404
- }), [_e, ae] = U("tabs-title"), oe = /* @__PURE__ */ H({
406
+ }), [_e, se] = U("tabs-title"), ae = /* @__PURE__ */ H({
405
407
  name: _e,
406
408
  props: {
407
409
  active: {
@@ -428,12 +430,12 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
428
430
  setup(e) {
429
431
  const {
430
432
  parent: n
431
- } = ue(ve), o = C(() => [{
433
+ } = ue(ve), a = C(() => [{
432
434
  "y-el--clickable": !e.disabled
433
- }, ae({
435
+ }, se({
434
436
  scrollable: e.scrollable,
435
437
  disabled: e.disabled
436
- }), ae(`${(n == null ? void 0 : n.props.size) || "middle"}`, {
438
+ }), se(`${(n == null ? void 0 : n.props.size) || "middle"}`, {
437
439
  active: e.active
438
440
  }), n == null ? void 0 : n.props.titleClass, e.active ? n == null ? void 0 : n.props.titleActiveClass : ""]), l = C(() => ({
439
441
  ...n == null ? void 0 : n.props.titleStyle,
@@ -447,7 +449,7 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
447
449
  titleSlot: u
448
450
  } = e;
449
451
  return b("div", {
450
- class: o.value,
452
+ class: a.value,
451
453
  title: v,
452
454
  style: l.value,
453
455
  role: "presentation"
@@ -522,49 +524,49 @@ const ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%")
522
524
  }
523
525
  };
524
526
  function Ye(e) {
525
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !se(e);
527
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !oe(e);
526
528
  }
527
529
  const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
528
530
  name: ne,
529
531
  components: {
530
- YTabTitle: oe
532
+ YTabTitle: ae
531
533
  },
532
534
  props: Ae,
533
535
  setup(e, {
534
536
  slots: n,
535
- emit: o,
537
+ emit: a,
536
538
  expose: l
537
539
  }) {
538
540
  const {
539
541
  initProvide: v
540
- } = ce(ve), u = z(!1), c = N([]), s = z(), f = C(() => c.length > e.titleScrollThreshold), T = (i) => c.findIndex((d) => (d.$props ? d.$props.name : "") === i), g = z(e.initName ? T(e.initName) : e.initIndex), B = (i) => {
542
+ } = ce(ve), u = z(!1), c = N([]), r = z(), f = C(() => c.length > e.titleScrollThreshold), T = (i) => c.findIndex((d) => (d.$props ? d.$props.name : "") === i), g = z(e.initName ? T(e.initName) : e.initIndex), I = (i) => {
541
543
  g.value = i;
542
- const d = s.value;
544
+ const d = r.value;
543
545
  d && (d == null || d.moveTo(i, e.changeWithAnimation));
544
546
  };
545
547
  l({
546
548
  scrollToByIndex: (i) => {
547
- B(i);
549
+ I(i);
548
550
  },
549
551
  scrollToByName: (i) => {
550
552
  const d = T(i);
551
- B(d);
553
+ I(d);
552
554
  }
553
555
  });
554
- const S = z([]), D = z(), G = (i) => (d) => {
556
+ const S = z([]), B = z(), G = (i) => (d) => {
555
557
  S.value[i] = d;
556
558
  }, L = (i) => {
557
559
  const {
558
560
  title: d,
559
561
  name: h,
560
- disabled: r
562
+ disabled: o
561
563
  } = c[i].$props || {};
562
- g.value !== i && (o(r ? "disabledClick" : "click", i, d, h), !r && B(i));
564
+ g.value !== i && (a(o ? "disabledClick" : "click", i, d, h), !o && I(i));
563
565
  }, j = async () => {
564
566
  await ee(() => {
565
- if (!f.value || !D.value)
567
+ if (!f.value || !B.value)
566
568
  return;
567
- const i = D.value;
569
+ const i = B.value;
568
570
  if (!i || !S.value[g.value])
569
571
  return;
570
572
  const d = S.value[g.value].$el, h = d.offsetLeft - (i.offsetWidth - d.offsetWidth) / 2 - i.scrollLeft;
@@ -580,7 +582,7 @@ const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
580
582
  const x = N({
581
583
  transform: "translateX(50%)",
582
584
  transition: "all 0ms ease-out"
583
- }), I = async () => {
585
+ }), D = async () => {
584
586
  await ee(() => {
585
587
  if (!S.value || S.value.length === 0)
586
588
  return;
@@ -592,13 +594,13 @@ const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
592
594
  title: d,
593
595
  name: h
594
596
  } = c[i].$props || {};
595
- o("change", i, d, h), g.value = i;
597
+ a("change", i, d, h), g.value = i;
596
598
  }, _ = (i) => {
597
599
  const {
598
600
  title: d,
599
601
  name: h
600
602
  } = c[i].$props || {};
601
- o("afterChange", i, d, h), g.value = i;
603
+ a("afterChange", i, d, h), g.value = i;
602
604
  }, A = N({
603
605
  children: c,
604
606
  activeIndex: g,
@@ -607,14 +609,14 @@ const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
607
609
  v(A);
608
610
  const Y = (i) => O(i) && /^\d+(\.\d+)?$/.test(i) ? `${i}px` : i, O = (i) => Object.prototype.toString.call(i) === "[object String]";
609
611
  return re(async () => {
610
- await I();
612
+ await D();
611
613
  }), Z(() => g.value, async () => {
612
- await I(), await j();
614
+ await D(), await j();
613
615
  }), Z(() => {
614
616
  var i;
615
617
  return (i = n.default) == null ? void 0 : i.length;
616
618
  }, async () => {
617
- await I();
619
+ await D();
618
620
  }), () => {
619
621
  let i;
620
622
  return b("div", {
@@ -622,13 +624,13 @@ const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
622
624
  }, [b("div", {
623
625
  class: Q("list")
624
626
  }, [b("div", {
625
- ref: D,
627
+ ref: B,
626
628
  class: Q("list-child-wrapper", {
627
629
  scrollable: f.value,
628
630
  [e.size]: e.size,
629
631
  [e.align]: e.align
630
632
  })
631
- }, [c.length > 0 && c.map((d, h) => b(oe, {
633
+ }, [c.length > 0 && c.map((d, h) => b(ae, {
632
634
  title: d.title,
633
635
  disabled: d.disabled,
634
636
  "title-slot": d.$slots.title,
@@ -646,7 +648,7 @@ const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
646
648
  backgroundColor: e.lineColor
647
649
  }
648
650
  }, null)])]), n.default ? b(ke, {
649
- ref: s,
651
+ ref: r,
650
652
  dots: !1,
651
653
  loop: !1,
652
654
  initIndex: g.value,
@@ -664,9 +666,9 @@ const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
664
666
  });
665
667
  function Xe(e) {
666
668
  const n = e;
667
- return n.install = (o) => {
669
+ return n.install = (a) => {
668
670
  const { name: l } = e;
669
- l && o.component(l, e);
671
+ l && a.component(l, e);
670
672
  }, n;
671
673
  }
672
674
  const je = Xe(Oe);