y-design-ssr 0.2.10 → 0.2.12

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 (90) hide show
  1. package/libs/button/index.d.ts +112 -1
  2. package/libs/button/index.mjs +55 -51
  3. package/libs/button/index.umd.js +2 -2
  4. package/libs/cell/index.d.ts +87 -1
  5. package/libs/cell/index.mjs +70 -70
  6. package/libs/cell/index.umd.js +2 -2
  7. package/libs/checkbox/index.d.ts +58 -1
  8. package/libs/checkbox/index.mjs +72 -72
  9. package/libs/checkbox/index.umd.js +2 -2
  10. package/libs/checkboxGroup/index.d.ts +67 -1
  11. package/libs/checkboxGroup/index.mjs +48 -44
  12. package/libs/checkboxGroup/index.umd.js +2 -2
  13. package/libs/col/index.d.ts +24 -1
  14. package/libs/col/index.mjs +49 -45
  15. package/libs/col/index.umd.js +2 -2
  16. package/libs/countdown/index.d.ts +42 -1
  17. package/libs/countdown/index.mjs +54 -50
  18. package/libs/countdown/index.umd.js +2 -2
  19. package/libs/dialog/index.d.ts +157 -1
  20. package/libs/dialog/index.mjs +219 -274
  21. package/libs/dialog/index.umd.js +2 -2
  22. package/libs/empty/index.d.ts +40 -1
  23. package/libs/empty/index.mjs +36 -32
  24. package/libs/empty/index.umd.js +2 -2
  25. package/libs/form/index.d.ts +127 -1
  26. package/libs/form/index.mjs +69 -64
  27. package/libs/form/index.umd.js +2 -2
  28. package/libs/formItem/index.d.ts +118 -1
  29. package/libs/formItem/index.mjs +61 -56
  30. package/libs/formItem/index.umd.js +2 -2
  31. package/libs/icon/index.d.ts +94 -1
  32. package/libs/icon/index.mjs +46 -42
  33. package/libs/icon/index.umd.js +2 -2
  34. package/libs/index.d.ts +3 -56
  35. package/libs/index.mjs +804 -899
  36. package/libs/index.umd.js +2 -2
  37. package/libs/input/index.d.ts +112 -1
  38. package/libs/input/index.mjs +75 -70
  39. package/libs/input/index.umd.js +2 -2
  40. package/libs/list/index.d.ts +112 -1
  41. package/libs/list/index.mjs +110 -106
  42. package/libs/list/index.umd.js +2 -2
  43. package/libs/loading/index.d.ts +112 -1
  44. package/libs/loading/index.mjs +57 -52
  45. package/libs/loading/index.umd.js +2 -2
  46. package/libs/mask/index.d.ts +67 -1
  47. package/libs/mask/index.mjs +54 -50
  48. package/libs/mask/index.umd.js +2 -2
  49. package/libs/popup/index.d.ts +103 -1
  50. package/libs/popup/index.mjs +47 -47
  51. package/libs/popup/index.umd.js +2 -2
  52. package/libs/progress/index.d.ts +130 -1
  53. package/libs/progress/index.mjs +66 -62
  54. package/libs/progress/index.umd.js +2 -2
  55. package/libs/pullrefresh/index.d.ts +67 -1
  56. package/libs/pullrefresh/index.mjs +59 -55
  57. package/libs/pullrefresh/index.umd.js +2 -2
  58. package/libs/row/index.d.ts +42 -1
  59. package/libs/row/index.mjs +55 -51
  60. package/libs/row/index.umd.js +2 -2
  61. package/libs/slider/index.d.ts +121 -1
  62. package/libs/slider/index.mjs +93 -89
  63. package/libs/slider/index.umd.js +2 -2
  64. package/libs/stepper/index.d.ts +94 -1
  65. package/libs/stepper/index.mjs +50 -46
  66. package/libs/stepper/index.umd.js +2 -2
  67. package/libs/swipe/index.d.ts +148 -1
  68. package/libs/swipe/index.mjs +78 -74
  69. package/libs/swipe/index.umd.js +2 -2
  70. package/libs/swipeItem/index.d.ts +22 -1
  71. package/libs/swipeItem/index.mjs +38 -34
  72. package/libs/swipeItem/index.umd.js +2 -2
  73. package/libs/switch/index.d.ts +79 -1
  74. package/libs/switch/index.mjs +32 -28
  75. package/libs/switch/index.umd.js +2 -2
  76. package/libs/tab/index.d.ts +31 -1
  77. package/libs/tab/index.mjs +36 -32
  78. package/libs/tab/index.umd.js +1 -1
  79. package/libs/tabs/index.d.ts +150 -1
  80. package/libs/tabs/index.mjs +89 -85
  81. package/libs/tabs/index.umd.js +2 -2
  82. package/libs/toast/index.d.ts +57 -1
  83. package/libs/toast/index.mjs +59 -57
  84. package/libs/toast/index.umd.js +2 -2
  85. package/libs/tooltip/index.d.ts +112 -1
  86. package/libs/tooltip/index.mjs +69 -65
  87. package/libs/tooltip/index.umd.js +2 -2
  88. package/libs/utils/withInstall.d.ts +5 -0
  89. package/libs/vue-sfc.d.ts +4 -8
  90. package/package.json +2 -2
@@ -1,3 +1,152 @@
1
- import Tabs from './src/tabs';
1
+ declare const Tabs: import("../utils/withInstall").WithInstall<import("vue").DefineComponent<{
2
+ initIndex: {
3
+ type: NumberConstructor;
4
+ default: number;
5
+ };
6
+ initName: {
7
+ type: (StringConstructor | NumberConstructor)[];
8
+ default: null;
9
+ };
10
+ duration: {
11
+ type: NumberConstructor;
12
+ default: number;
13
+ };
14
+ lazy: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ lineColor: {
19
+ type: StringConstructor;
20
+ default: string;
21
+ };
22
+ lineWidth: {
23
+ type: (StringConstructor | NumberConstructor)[];
24
+ default: string;
25
+ };
26
+ lineHeight: {
27
+ type: (StringConstructor | NumberConstructor)[];
28
+ default: string;
29
+ };
30
+ titleWrapperClass: import("vue").PropType<unknown>;
31
+ titleScrollThreshold: {
32
+ type: NumberConstructor;
33
+ default: number;
34
+ };
35
+ titleStyle: {
36
+ type: import("vue").PropType<import("vue").CSSProperties>;
37
+ default: null;
38
+ };
39
+ titleClass: {
40
+ type: import("vue").PropType<unknown>;
41
+ default: null;
42
+ };
43
+ titleActiveStyle: {
44
+ type: import("vue").PropType<import("vue").CSSProperties>;
45
+ default: null;
46
+ };
47
+ titleActiveClass: {
48
+ type: import("vue").PropType<unknown>;
49
+ default: null;
50
+ };
51
+ touchable: {
52
+ type: BooleanConstructor;
53
+ default: boolean;
54
+ };
55
+ changeWithAnimation: {
56
+ type: BooleanConstructor;
57
+ default: boolean;
58
+ };
59
+ size: {
60
+ type: import("vue").PropType<"small" | "large" | "middle">;
61
+ default: string;
62
+ };
63
+ align: {
64
+ type: import("vue").PropType<"center" | "left">;
65
+ default: string;
66
+ };
67
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
68
+ initIndex: {
69
+ type: NumberConstructor;
70
+ default: number;
71
+ };
72
+ initName: {
73
+ type: (StringConstructor | NumberConstructor)[];
74
+ default: null;
75
+ };
76
+ duration: {
77
+ type: NumberConstructor;
78
+ default: number;
79
+ };
80
+ lazy: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ lineColor: {
85
+ type: StringConstructor;
86
+ default: string;
87
+ };
88
+ lineWidth: {
89
+ type: (StringConstructor | NumberConstructor)[];
90
+ default: string;
91
+ };
92
+ lineHeight: {
93
+ type: (StringConstructor | NumberConstructor)[];
94
+ default: string;
95
+ };
96
+ titleWrapperClass: import("vue").PropType<unknown>;
97
+ titleScrollThreshold: {
98
+ type: NumberConstructor;
99
+ default: number;
100
+ };
101
+ titleStyle: {
102
+ type: import("vue").PropType<import("vue").CSSProperties>;
103
+ default: null;
104
+ };
105
+ titleClass: {
106
+ type: import("vue").PropType<unknown>;
107
+ default: null;
108
+ };
109
+ titleActiveStyle: {
110
+ type: import("vue").PropType<import("vue").CSSProperties>;
111
+ default: null;
112
+ };
113
+ titleActiveClass: {
114
+ type: import("vue").PropType<unknown>;
115
+ default: null;
116
+ };
117
+ touchable: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ changeWithAnimation: {
122
+ type: BooleanConstructor;
123
+ default: boolean;
124
+ };
125
+ size: {
126
+ type: import("vue").PropType<"small" | "large" | "middle">;
127
+ default: string;
128
+ };
129
+ align: {
130
+ type: import("vue").PropType<"center" | "left">;
131
+ default: string;
132
+ };
133
+ }>>, {
134
+ size: "small" | "large" | "middle";
135
+ initIndex: number;
136
+ initName: string | number;
137
+ duration: number;
138
+ lazy: boolean;
139
+ lineColor: string;
140
+ lineWidth: string | number;
141
+ lineHeight: string | number;
142
+ titleScrollThreshold: number;
143
+ titleStyle: import("vue").CSSProperties;
144
+ titleClass: null;
145
+ titleActiveStyle: import("vue").CSSProperties;
146
+ titleActiveClass: null;
147
+ touchable: boolean;
148
+ changeWithAnimation: boolean;
149
+ align: "center" | "left";
150
+ }>>;
2
151
  export default Tabs;
3
152
  export * from './src/constants';
@@ -1,11 +1,11 @@
1
- import { ref as z, reactive as N, getCurrentInstance as ie, provide as Se, isVNode as re, inject as Ne, onUnmounted as Ce, computed as C, defineComponent as H, createVNode as b, watch as ee, onMounted as ce, nextTick as te, onBeforeUnmount as Te, onBeforeUpdate as ze } from "vue";
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
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
3
  (o, l) => o + (n[l] ? V(e, l) : ""),
4
4
  ""
5
- ) : "", Ee = (e) => (n, o) => {
5
+ ) : "", ze = (e) => (n, o) => {
6
6
  let l = n, v = o;
7
7
  return l && typeof l != "string" && (v = l, l = ""), l = l ? `${e}__${l}` : e, `${l}${V(l, v)}`;
8
- }, Le = () => (e, n) => n ? `${V(`y-${e}`, n)}` : `y-${e}`, $e = {
8
+ }, Ee = () => (e, n) => n ? `${V(`y-${e}`, n)}` : `y-${e}`, Le = {
9
9
  "pull-refresh": {
10
10
  pulling: "下拉刷新...",
11
11
  loosing: "释放刷新...",
@@ -19,30 +19,30 @@ const V = (e, n) => n ? typeof n == "string" ? ` ${e}--${n}` : Array.isArray(n)
19
19
  };
20
20
  z("zh-CN");
21
21
  N({
22
- "zh-CN": $e
22
+ "zh-CN": Le
23
23
  });
24
24
  const U = (e) => {
25
25
  const n = `y-${e}`;
26
- return [n, Ee(n), Le()];
27
- }, ae = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%") ? n * Number(e.replace(/%/g, "")) / 100 : Number(e), xe = (e) => {
26
+ return [n, ze(n), Ee()];
27
+ }, ie = (e, n) => typeof e == "string" && e.includes("%") && e.includes("%") ? n * Number(e.replace(/%/g, "")) / 100 : Number(e), $e = (e) => {
28
28
  const n = [], o = (l) => {
29
29
  Array.isArray(l) && l.forEach((v) => {
30
30
  var u;
31
- re(v) && (n.push(v), (u = v.component) != null && u.subTree && o(v.component.subTree.children), v.children && o(v.children));
31
+ se(v) && (n.push(v), (u = v.component) != null && u.subTree && o(v.component.subTree.children), v.children && o(v.children));
32
32
  });
33
33
  };
34
34
  return o(e), n;
35
- }, Ie = (e, n) => {
36
- const o = xe(n.subTree.children);
35
+ }, xe = (e, n) => {
36
+ const o = $e(n.subTree.children);
37
37
  e.sort((l, v) => o.indexOf(l.vnode) - o.indexOf(v.vnode));
38
- }, ue = (e) => {
39
- const n = ie(), o = N([]);
38
+ }, ce = (e) => {
39
+ const n = le(), o = N([]);
40
40
  return {
41
41
  childrens: o,
42
42
  initProvide: (v) => {
43
43
  Se(e, {
44
44
  addChild: (s) => {
45
- s.proxy && (o.push(s), n && Ie(o, n));
45
+ s.proxy && (o.push(s), n && xe(o, n));
46
46
  },
47
47
  removeChild: (s) => {
48
48
  const f = o.indexOf(s);
@@ -53,11 +53,11 @@ const U = (e) => {
53
53
  });
54
54
  }
55
55
  };
56
- }, fe = (e) => {
57
- const n = Ne(e, null), o = ie();
56
+ }, ue = (e) => {
57
+ const n = pe(e, null), o = le();
58
58
  if (n && o) {
59
59
  const { childrens: l, addChild: v, removeChild: u } = n;
60
- return v(o), Ce(() => u(o)), {
60
+ return v(o), Ne(() => u(o)), {
61
61
  index: C(() => l.indexOf(o)),
62
62
  parent: n
63
63
  };
@@ -66,8 +66,8 @@ const U = (e) => {
66
66
  parent: null,
67
67
  index: z(-1)
68
68
  };
69
- }, [Be, De] = U("swipe-item"), K = /* @__PURE__ */ H({
70
- name: Be,
69
+ }, [Ie, Be] = U("swipe-item"), K = /* @__PURE__ */ H({
70
+ name: Ie,
71
71
  props: {
72
72
  clonenNode: {
73
73
  type: Object,
@@ -81,9 +81,9 @@ const U = (e) => {
81
81
  setup(e, {
82
82
  slots: n
83
83
  }) {
84
- const o = ie(), {
84
+ const o = le(), {
85
85
  parent: l
86
- } = fe(ve);
86
+ } = ue(de);
87
87
  !e.clonenNode && o && (l == null || l.children.push(o));
88
88
  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
89
  const c = `${(l == null ? void 0 : l.itemDetail.size) || 0}px`;
@@ -103,14 +103,14 @@ const U = (e) => {
103
103
  var s, f;
104
104
  const c = ((s = l == null ? void 0 : l.itemShowedList) == null ? void 0 : s.list[v.value || 0]) || !1;
105
105
  return b("div", {
106
- class: De(),
106
+ class: Be(),
107
107
  style: u.value
108
108
  }, [c ? e.clonenNode || ((f = n.default) == null ? void 0 : f.call(n)) : null]);
109
109
  };
110
110
  }
111
111
  });
112
- var ne = /* @__PURE__ */ ((e) => (e.left = "left", e.top = "top", e.bottom = "bottom", e.right = "right", e))(ne || {}), W = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(W || {});
113
- const ke = {
112
+ 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 || {});
113
+ const De = {
114
114
  autoplayTime: {
115
115
  type: Number,
116
116
  default: 0
@@ -175,12 +175,12 @@ const ke = {
175
175
  type: String,
176
176
  default: "center"
177
177
  }
178
- }, [de, q] = U("swipe"), ve = de, _e = /* @__PURE__ */ H({
179
- name: de,
178
+ }, [fe, q] = U("swipe"), de = fe, ke = /* @__PURE__ */ H({
179
+ name: fe,
180
180
  components: {
181
181
  YSwipeItem: K
182
182
  },
183
- props: ke,
183
+ props: De,
184
184
  setup(e, {
185
185
  slots: n,
186
186
  emit: o,
@@ -188,7 +188,7 @@ const ke = {
188
188
  }) {
189
189
  const {
190
190
  initProvide: v
191
- } = ue(ve), u = N([]), c = z(Number(e.initIndex)), s = N({
191
+ } = ce(de), u = N([]), c = z(Number(e.initIndex)), s = N({
192
192
  // 元素尺寸
193
193
  size: 0,
194
194
  // 间距
@@ -216,17 +216,17 @@ const ke = {
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 S = t * y, E = S + s.size;
220
- (S >= m && S < w || E > m && E < w || S < m && E > w) && (k.list[y] = !0);
219
+ const p = t * y, E = p + s.size;
220
+ (p >= m && p < w || E > m && E < w || p < m && E > w) && (k.list[y] = !0);
221
221
  }
222
222
  }, k = N({
223
223
  list: B()
224
- }), p = () => {
224
+ }), S = () => {
225
225
  k.list = B(), R();
226
226
  };
227
- ee(() => [...u], p);
227
+ Z(() => [...u], S);
228
228
  const D = (t, a) => {
229
- t ? s.size = ae(t, a) : s.size = a, s.space = Number(e.itemSpace) || 0, s.isFillViewport = s.size >= a, f.viewportSize = a, f.cloneNodeCount = G();
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();
230
230
  }, G = () => {
231
231
  if (x.value) {
232
232
  const t = s.size + s.space;
@@ -243,16 +243,16 @@ const ke = {
243
243
  width: t,
244
244
  height: a
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), p(), h();
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();
247
247
  };
248
- ce(() => {
249
- if (te(L).catch(() => {
248
+ re(() => {
249
+ if (ee(L).catch(() => {
250
250
  }), e.touchable && T.value) {
251
251
  const t = T.value;
252
252
  t.addEventListener("touchstart", M, !1), t.addEventListener("mousedown", M, !1), t.addEventListener("touchmove", P, !1), t.addEventListener("mousemove", P, !1), t.addEventListener("touchend", $, !1), t.addEventListener("mouseup", $, !1), t.addEventListener("mouseleave", $, !1), t.addEventListener("touchcancel", $, !1);
253
253
  }
254
254
  window.addEventListener("resize", L, !1), window.addEventListener("orientationchange", L, !1);
255
- }), Te(() => {
255
+ }), Ce(() => {
256
256
  if (d(), e.touchable && T.value) {
257
257
  const t = T.value;
258
258
  t.removeEventListener("touchstart", M, !1), t.removeEventListener("mousedown", M, !1), t.removeEventListener("mousemove", P, !1), t.removeEventListener("touchmove", P, !1), t.removeEventListener("mouseup", $, !1), t.removeEventListener("touchend", $, !1), t.removeEventListener("mouseleave", $, !1), t.removeEventListener("touchcancel", $, !1);
@@ -337,32 +337,32 @@ const ke = {
337
337
  return;
338
338
  r.isDragging = !1;
339
339
  const a = (/* @__PURE__ */ new Date()).getTime() - r.startTime.getTime();
340
- ge() && (Math.abs(r.offset) > he.value || Math.abs(r.offset) / a > 0.5) && (r.offset > 0 ? Y() : O()), r.offset = 0, h();
341
- }, he = C(() => ae(e.minSwipeDistance, s.size + s.space)), ge = () => {
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 = () => {
342
342
  if (x.value)
343
343
  return !0;
344
344
  const t = r.offset > 0 ? c.value - 1 : c.value + 1;
345
345
  return t >= 0 && t < u.length;
346
- }, ye = C(() => {
346
+ }, ge = C(() => {
347
347
  const t = r.isDragging && !e.isFollowHand ? f.offset : f.offset + r.offset, a = {};
348
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
- }), be = C(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? ne.left : ne.bottom)}`]);
349
+ }), ye = C(() => ["y-swipe__dots", `y-swipe__dots--${e.dotsPosition || (e.vertical ? te.left : te.bottom)}`]);
350
350
  l({
351
351
  moveTo: A,
352
352
  next: O,
353
353
  prev: Y,
354
354
  resize: L
355
355
  });
356
- const we = N({
356
+ const be = N({
357
357
  children: u,
358
358
  activeIndex: c,
359
359
  props: e,
360
360
  itemDetail: s,
361
361
  itemShowedList: k
362
362
  });
363
- v(we);
364
- const pe = () => e.dots ? b("div", {
365
- class: be.value
363
+ v(be);
364
+ const we = () => e.dots ? b("div", {
365
+ class: ye.value
366
366
  }, [u.map((t, a) => {
367
367
  const m = q("dot", {
368
368
  active: a === c.value
@@ -382,27 +382,27 @@ const ke = {
382
382
  ref: T
383
383
  }, [b("div", {
384
384
  class: q("track"),
385
- style: ye.value,
385
+ style: ge.value,
386
386
  ref: g
387
387
  }, [Array(f.cloneNodeCount).fill("").map((a, m) => {
388
- var S, E, X;
389
- const w = _(m - f.cloneNodeCount), y = (X = (S = u[w]) == null ? void 0 : (E = S.slots).default) == null ? void 0 : X.call(E);
388
+ var p, E, X;
389
+ const w = _(m - f.cloneNodeCount), y = (X = (p = u[w]) == null ? void 0 : (E = p.slots).default) == null ? void 0 : X.call(E);
390
390
  return y ? b(K, {
391
391
  clonenNode: y,
392
392
  index: w
393
393
  }, null) : null;
394
394
  }), (t = n.default) == null ? void 0 : t.call(n), Array(f.cloneNodeCount).fill("").map((a, m) => {
395
- var S, E, X;
396
- const w = _(m), y = (X = (S = u[w]) == null ? void 0 : (E = S.slots).default) == null ? void 0 : X.call(E);
395
+ var p, E, X;
396
+ const w = _(m), y = (X = (p = u[w]) == null ? void 0 : (E = p.slots).default) == null ? void 0 : X.call(E);
397
397
  return y ? b(K, {
398
398
  clonenNode: y,
399
399
  index: w
400
400
  }, null) : null;
401
- })]), n.dots ? n.dots() : pe()]);
401
+ })]), n.dots ? n.dots() : we()]);
402
402
  };
403
403
  }
404
- }), [Ae, oe] = U("tabs-title"), se = /* @__PURE__ */ H({
405
- name: Ae,
404
+ }), [_e, ae] = U("tabs-title"), oe = /* @__PURE__ */ H({
405
+ name: _e,
406
406
  props: {
407
407
  active: {
408
408
  type: Boolean,
@@ -428,12 +428,12 @@ const ke = {
428
428
  setup(e) {
429
429
  const {
430
430
  parent: n
431
- } = fe(me), o = C(() => [{
431
+ } = ue(ve), o = C(() => [{
432
432
  "y-el--clickable": !e.disabled
433
- }, oe({
433
+ }, ae({
434
434
  scrollable: e.scrollable,
435
435
  disabled: e.disabled
436
- }), oe(`${(n == null ? void 0 : n.props.size) || "middle"}`, {
436
+ }), ae(`${(n == null ? void 0 : n.props.size) || "middle"}`, {
437
437
  active: e.active
438
438
  }), n == null ? void 0 : n.props.titleClass, e.active ? n == null ? void 0 : n.props.titleActiveClass : ""]), l = C(() => ({
439
439
  ...n == null ? void 0 : n.props.titleStyle,
@@ -454,7 +454,7 @@ const ke = {
454
454
  }, [u ? u() : v]);
455
455
  };
456
456
  }
457
- }), J = null, Ye = {
457
+ }), J = null, Ae = {
458
458
  initIndex: {
459
459
  type: Number,
460
460
  default: 0
@@ -521,15 +521,15 @@ const ke = {
521
521
  default: "center"
522
522
  }
523
523
  };
524
- function Oe(e) {
525
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !re(e);
524
+ function Ye(e) {
525
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !se(e);
526
526
  }
527
- const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
528
- name: le,
527
+ const [ne, Q] = U("tabs"), ve = ne, Oe = /* @__PURE__ */ H({
528
+ name: ne,
529
529
  components: {
530
- YTabTitle: se
530
+ YTabTitle: oe
531
531
  },
532
- props: Ye,
532
+ props: Ae,
533
533
  setup(e, {
534
534
  slots: n,
535
535
  emit: o,
@@ -537,7 +537,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
537
537
  }) {
538
538
  const {
539
539
  initProvide: v
540
- } = ue(me), 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) => {
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) => {
541
541
  g.value = i;
542
542
  const d = s.value;
543
543
  d && (d == null || d.moveTo(i, e.changeWithAnimation));
@@ -551,8 +551,8 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
551
551
  B(d);
552
552
  }
553
553
  });
554
- const p = z([]), D = z(), G = (i) => (d) => {
555
- p.value[i] = d;
554
+ const S = z([]), D = z(), G = (i) => (d) => {
555
+ S.value[i] = d;
556
556
  }, L = (i) => {
557
557
  const {
558
558
  title: d,
@@ -561,30 +561,30 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
561
561
  } = c[i].$props || {};
562
562
  g.value !== i && (o(r ? "disabledClick" : "click", i, d, h), !r && B(i));
563
563
  }, j = async () => {
564
- await te(() => {
564
+ await ee(() => {
565
565
  if (!f.value || !D.value)
566
566
  return;
567
567
  const i = D.value;
568
- if (!i || !p.value[g.value])
568
+ if (!i || !S.value[g.value])
569
569
  return;
570
- const d = p.value[g.value].$el, h = d.offsetLeft - (i.offsetWidth - d.offsetWidth) / 2 - i.scrollLeft;
570
+ const d = S.value[g.value].$el, h = d.offsetLeft - (i.offsetWidth - d.offsetWidth) / 2 - i.scrollLeft;
571
571
  i.scrollBy({
572
572
  left: h,
573
573
  behavior: "smooth"
574
574
  });
575
575
  });
576
576
  };
577
- ze(() => {
578
- p.value = [];
577
+ Te(() => {
578
+ S.value = [];
579
579
  });
580
580
  const x = N({
581
581
  transform: "translateX(50%)",
582
582
  transition: "all 0ms ease-out"
583
583
  }), I = async () => {
584
- await te(() => {
585
- if (!p.value || p.value.length === 0)
584
+ await ee(() => {
585
+ if (!S.value || S.value.length === 0)
586
586
  return;
587
- const i = g.value >= p.value.length ? 0 : g.value, d = p.value[i].$el, h = d.offsetLeft + d.offsetWidth / 2;
587
+ const i = g.value >= S.value.length ? 0 : g.value, d = S.value[i].$el, h = d.offsetLeft + d.offsetWidth / 2;
588
588
  x.transform = `translateX(${h}px) translateX(-50%)`, u.value && (x.transition = `all ${e.duration}ms ease-out`), u.value = !0;
589
589
  });
590
590
  }, F = (i) => {
@@ -606,11 +606,11 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
606
606
  });
607
607
  v(A);
608
608
  const Y = (i) => O(i) && /^\d+(\.\d+)?$/.test(i) ? `${i}px` : i, O = (i) => Object.prototype.toString.call(i) === "[object String]";
609
- return ce(async () => {
609
+ return re(async () => {
610
610
  await I();
611
- }), ee(() => g.value, async () => {
611
+ }), Z(() => g.value, async () => {
612
612
  await I(), await j();
613
- }), ee(() => {
613
+ }), Z(() => {
614
614
  var i;
615
615
  return (i = n.default) == null ? void 0 : i.length;
616
616
  }, async () => {
@@ -618,7 +618,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
618
618
  }), () => {
619
619
  let i;
620
620
  return b("div", {
621
- class: le
621
+ class: ne
622
622
  }, [b("div", {
623
623
  class: Q("list")
624
624
  }, [b("div", {
@@ -628,7 +628,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
628
628
  [e.size]: e.size,
629
629
  [e.align]: e.align
630
630
  })
631
- }, [c.length > 0 && c.map((d, h) => b(se, {
631
+ }, [c.length > 0 && c.map((d, h) => b(oe, {
632
632
  title: d.title,
633
633
  disabled: d.disabled,
634
634
  "title-slot": d.$slots.title,
@@ -645,7 +645,7 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
645
645
  height: Y(e.lineHeight),
646
646
  backgroundColor: e.lineColor
647
647
  }
648
- }, null)])]), n.default ? b(_e, {
648
+ }, null)])]), n.default ? b(ke, {
649
649
  ref: s,
650
650
  dots: !1,
651
651
  loop: !1,
@@ -656,18 +656,22 @@ const [le, Q] = U("tabs"), me = le, Z = /* @__PURE__ */ H({
656
656
  "is-follow-hand": e.changeWithAnimation,
657
657
  onChange: F,
658
658
  onAfterChange: _
659
- }, Oe(i = n.default()) ? i : {
659
+ }, Ye(i = n.default()) ? i : {
660
660
  default: () => [i]
661
661
  }) : null]);
662
662
  };
663
663
  }
664
664
  });
665
- Z.install = (e) => {
666
- const { name: n } = Z;
667
- e.component(n, Z);
668
- };
665
+ function Xe(e) {
666
+ const n = e;
667
+ return n.install = (o) => {
668
+ const { name: l } = e;
669
+ l && o.component(l, e);
670
+ }, n;
671
+ }
672
+ const je = Xe(Oe);
669
673
  export {
670
- Ye as acceptProps,
671
- Z as default,
674
+ Ae as acceptProps,
675
+ je as default,
672
676
  J as unknownProp
673
677
  };