@seresweb/website-component 2.2.1 → 2.3.0

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 (104) hide show
  1. package/README.md +5 -4
  2. package/dist/_icons-DtBTpiO2.cjs +11 -0
  3. package/dist/_icons-FW35XHO0.js +14 -0
  4. package/dist/_utils-B7LThWoT.js +26 -0
  5. package/dist/_utils-CtkVBTg-.cjs +1 -0
  6. package/dist/cjs/checkbox.cjs +1 -0
  7. package/dist/cjs/col.cjs +1 -0
  8. package/dist/cjs/config-provider.cjs +1 -0
  9. package/dist/cjs/date-picker.cjs +1 -0
  10. package/dist/cjs/date-select.cjs +1 -0
  11. package/dist/cjs/horizontal-viewer.cjs +1 -1
  12. package/dist/cjs/image-indicator.cjs +1 -1
  13. package/dist/cjs/index.cjs +1 -1
  14. package/dist/cjs/input.cjs +1 -1
  15. package/dist/cjs/layz-image.cjs +1 -1
  16. package/dist/cjs/locales.cjs +1 -0
  17. package/dist/cjs/parameter-box.cjs +1 -1
  18. package/dist/cjs/radio.cjs +1 -1
  19. package/dist/cjs/row.cjs +1 -0
  20. package/dist/cjs/select.cjs +1 -0
  21. package/dist/cjs/swiper-normal.cjs +1 -1
  22. package/dist/cjs/swiper-showcase.cjs +1 -1
  23. package/dist/cjs/tab-indicator.cjs +1 -1
  24. package/dist/css/checkbox.css +1 -0
  25. package/dist/css/col.css +1 -0
  26. package/dist/css/date-picker.css +1 -0
  27. package/dist/css/date-select.css +1 -0
  28. package/dist/css/input.css +1 -1
  29. package/dist/css/radio.css +1 -1
  30. package/dist/css/row.css +1 -0
  31. package/dist/css/select.css +1 -0
  32. package/dist/css/swiper-showcase.css +1 -1
  33. package/dist/en-US-BBTWftdk.js +35 -0
  34. package/dist/en-US-UkqgG0fb.cjs +1 -0
  35. package/dist/es/checkbox.mjs +82 -0
  36. package/dist/es/col.mjs +48 -0
  37. package/dist/es/config-provider.mjs +17 -0
  38. package/dist/es/date-picker.mjs +6 -0
  39. package/dist/es/date-select.mjs +113 -0
  40. package/dist/es/horizontal-viewer.mjs +1 -1
  41. package/dist/es/image-indicator.mjs +1 -1
  42. package/dist/es/index.mjs +61 -41
  43. package/dist/es/input.mjs +17 -16
  44. package/dist/es/layz-image.mjs +18 -17
  45. package/dist/es/locales.mjs +41 -0
  46. package/dist/es/parameter-box.mjs +123 -85
  47. package/dist/es/radio.mjs +27 -23
  48. package/dist/es/row.mjs +63 -0
  49. package/dist/es/select.mjs +210 -0
  50. package/dist/es/swiper-normal.mjs +1 -1
  51. package/dist/es/swiper-showcase.mjs +110 -95
  52. package/dist/es/tab-indicator.mjs +65 -79
  53. package/dist/global.d.ts +8 -0
  54. package/dist/index-B-sVxtkA.cjs +1 -0
  55. package/dist/{index-tkvNmWjy.js → index-BPX4w5Vn.js} +113 -106
  56. package/dist/index-Bc4wAl0z.js +644 -0
  57. package/dist/index-CEjz1ubF.cjs +1 -0
  58. package/dist/index.css +1 -1
  59. package/dist/scss/checkbox.scss +155 -0
  60. package/dist/scss/col.scss +16 -0
  61. package/dist/scss/date-picker.scss +226 -0
  62. package/dist/scss/date-select.scss +41 -0
  63. package/dist/scss/index.scss +6 -0
  64. package/dist/scss/input.scss +44 -4
  65. package/dist/scss/radio.scss +6 -6
  66. package/dist/scss/row.scss +10 -0
  67. package/dist/scss/select.scss +210 -0
  68. package/dist/scss/swiper-showcase.scss +54 -17
  69. package/dist/types/components/_icons.d.ts +4 -0
  70. package/dist/types/components/_utils.d.ts +4 -0
  71. package/dist/types/components/checkbox/checkbox.vue.d.ts +24 -0
  72. package/dist/types/components/checkbox/index.d.ts +6 -0
  73. package/dist/types/components/checkbox/type.d.ts +30 -0
  74. package/dist/types/components/col/col.vue.d.ts +21 -0
  75. package/dist/types/components/col/index.d.ts +6 -0
  76. package/dist/types/components/col/type.d.ts +24 -0
  77. package/dist/types/components/config-provider/config-provider.vue.d.ts +20 -0
  78. package/dist/types/components/config-provider/index.d.ts +27 -0
  79. package/dist/types/components/config-provider/type.d.ts +4 -0
  80. package/dist/types/components/date-picker/date-picker.vue.d.ts +16 -0
  81. package/dist/types/components/date-picker/index.d.ts +53 -0
  82. package/dist/types/components/date-picker/type.d.ts +12 -0
  83. package/dist/types/components/date-select/date-select.vue.d.ts +16 -0
  84. package/dist/types/components/date-select/index.d.ts +7 -0
  85. package/dist/types/components/date-select/type.d.ts +16 -0
  86. package/dist/types/components/index.d.ts +8 -0
  87. package/dist/types/components/input/input.vue.d.ts +1 -0
  88. package/dist/types/components/input/type.d.ts +1 -0
  89. package/dist/types/components/locales/ar-SA.d.ts +20 -0
  90. package/dist/types/components/locales/en-US.d.ts +20 -0
  91. package/dist/types/components/locales/index.d.ts +44 -0
  92. package/dist/types/components/radio/radio.vue.d.ts +2 -2
  93. package/dist/types/components/row/index.d.ts +6 -0
  94. package/dist/types/components/row/row.vue.d.ts +23 -0
  95. package/dist/types/components/row/type.d.ts +7 -0
  96. package/dist/types/components/select/index.d.ts +7 -0
  97. package/dist/types/components/select/select.vue.d.ts +48 -0
  98. package/dist/types/components/select/type.d.ts +20 -0
  99. package/dist/types/components/swiper-normal/swiper-normal.vue.d.ts +2 -2
  100. package/dist/types/components/swiper-showcase/type.d.ts +28 -0
  101. package/dist/types/components/swiper-vehicle/swiper-vehicle.vue.d.ts +2 -2
  102. package/dist/types/components/tab-indicator/tab-indicator.vue.d.ts +2 -2
  103. package/package.json +2 -1
  104. package/dist/index-BIPlvoY9.cjs +0 -1
@@ -1,8 +1,8 @@
1
- import { defineComponent as V, ref as v, computed as x, watch as M, nextTick as E, onMounted as Z, onBeforeUnmount as N, createElementBlock as o, createCommentVNode as _, openBlock as c, normalizeClass as t, unref as i, createElementVNode as e, Fragment as R, renderList as O, createVNode as I, toDisplayString as f } from "vue";
1
+ import { defineComponent as V, ref as f, computed as x, watch as M, nextTick as E, onMounted as R, onBeforeUnmount as Z, createElementBlock as l, createCommentVNode as d, openBlock as o, normalizeClass as i, unref as s, createElementVNode as t, Fragment as N, renderList as O, createVNode as I, toDisplayString as p } from "vue";
2
2
  import { S as z } from "../swiper-bundle-DOQ1LV4x.js";
3
- import { P as s } from "../_vars-BV4QQF-p.js";
3
+ import { P as e } from "../_vars-BV4QQF-p.js";
4
4
  import { ScLayzImage as D } from "./layz-image.mjs";
5
- const F = { class: "swiper-wrapper" }, T = ["disabled"], U = ["disabled"], g = /* @__PURE__ */ V({
5
+ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["disabled"], g = /* @__PURE__ */ V({
6
6
  __name: "swiper-showcase",
7
7
  props: {
8
8
  dataList: { default: () => [] },
@@ -12,134 +12,149 @@ const F = { class: "swiper-wrapper" }, T = ["disabled"], U = ["disabled"], g = /
12
12
  placeholder: {}
13
13
  },
14
14
  emits: ["slideChange"],
15
- setup(d, { emit: b }) {
16
- const a = d, B = b;
17
- let r = null;
18
- const p = v(), h = v(!0), u = v(!0), m = x(() => a.dataList && a.dataList.length > 0), C = (w) => [
19
- `${s}-swiper-showcase__nav-btn`,
20
- w ? `${s}-swiper-showcase__nav-btn--prev` : `${s}-swiper-showcase__nav-btn--next`
21
- ], k = () => {
22
- if (!r) {
23
- h.value = !0, u.value = !0;
15
+ setup(h, { emit: y }) {
16
+ const r = h, b = y;
17
+ let n = null;
18
+ const u = f(), v = f(!0), _ = f(!0), k = x(() => r.dataList && r.dataList.length > 0), C = (w) => [
19
+ `${e}-swiper-showcase__nav-btn`,
20
+ w ? `${e}-swiper-showcase__nav-btn--prev` : `${e}-swiper-showcase__nav-btn--next`
21
+ ], m = () => {
22
+ if (!n) {
23
+ v.value = !0, _.value = !0;
24
24
  return;
25
25
  }
26
- h.value = r.isBeginning, u.value = r.isEnd, B("slideChange", r.activeIndex);
27
- }, L = () => {
28
- r && (r.destroy(), r = null);
26
+ v.value = n.isBeginning, _.value = n.isEnd, b("slideChange", n.activeIndex);
29
27
  }, $ = () => {
30
- var l;
31
- if (L(), !p.value || !m.value) return;
28
+ n && (n.destroy(), n = null);
29
+ }, L = () => {
30
+ var c;
31
+ if ($(), !u.value || !k.value) return;
32
32
  const w = {
33
33
  0: { slidesPerView: 1, spaceBetween: 12 },
34
- 768: { slidesPerView: Math.min(2, a.slidesPerView), spaceBetween: 16 },
35
- 1024: { slidesPerView: a.slidesPerView, spaceBetween: a.spaceBetween }
34
+ 768: { slidesPerView: Math.min(2, r.slidesPerView), spaceBetween: 16 },
35
+ 1024: { slidesPerView: r.slidesPerView, spaceBetween: r.spaceBetween }
36
36
  };
37
- r = new z(p.value, {
38
- slidesPerView: a.slidesPerView,
39
- spaceBetween: a.spaceBetween,
37
+ n = new z(u.value, {
38
+ slidesPerView: r.slidesPerView,
39
+ spaceBetween: r.spaceBetween,
40
40
  observer: !0,
41
41
  observeParents: !0,
42
- ...a.swiperOptions,
42
+ ...r.swiperOptions,
43
43
  breakpoints: {
44
44
  ...w,
45
- ...((l = a.swiperOptions) == null ? void 0 : l.breakpoints) || {}
45
+ ...((c = r.swiperOptions) == null ? void 0 : c.breakpoints) || {}
46
46
  }
47
- }), r.on("slideChange", k), k();
48
- }, y = () => {
49
- r && r.slideNext();
47
+ }), n.on("slideChange", m), m();
48
+ }, B = () => {
49
+ n && n.slideNext();
50
50
  }, S = () => {
51
- r && r.slidePrev();
51
+ n && n.slidePrev();
52
52
  };
53
53
  return M(
54
- () => [a.dataList, a.slidesPerView, a.spaceBetween, a.swiperOptions],
54
+ () => [r.dataList, r.slidesPerView, r.spaceBetween, r.swiperOptions],
55
55
  () => {
56
- E($);
56
+ E(L);
57
57
  },
58
58
  { deep: !0 }
59
- ), Z(() => {
60
- $();
61
- }), N(() => {
59
+ ), R(() => {
62
60
  L();
63
- }), (w, l) => m.value ? (c(), o(
61
+ }), Z(() => {
62
+ $();
63
+ }), (w, c) => k.value ? (o(), l(
64
64
  "div",
65
65
  {
66
66
  key: 0,
67
- class: t(`${i(s)}-swiper-showcase`)
67
+ class: i(`${s(e)}-swiper-showcase`)
68
68
  },
69
69
  [
70
- e(
70
+ t(
71
71
  "div",
72
72
  {
73
73
  ref_key: "swiperRef",
74
- ref: p,
75
- class: t(`${i(s)}-swiper-showcase__main`)
74
+ ref: u,
75
+ class: i(`${s(e)}-swiper-showcase__main`)
76
76
  },
77
77
  [
78
- e("div", F, [
79
- (c(!0), o(
80
- R,
78
+ t("div", F, [
79
+ (o(!0), l(
80
+ N,
81
81
  null,
82
- O(w.dataList, (n, P) => (c(), o("div", {
83
- key: `${n.title}-${P}`,
82
+ O(w.dataList, (a, P) => (o(), l("div", {
83
+ key: `${a.title}-${P}`,
84
84
  class: "swiper-slide"
85
85
  }, [
86
- e(
86
+ t(
87
87
  "div",
88
88
  {
89
- class: t(`${i(s)}-swiper-showcase__card`)
89
+ class: i(`${s(e)}-swiper-showcase__card`)
90
90
  },
91
91
  [
92
- e(
92
+ t(
93
93
  "div",
94
94
  {
95
- class: t(`${i(s)}-swiper-showcase__media`)
95
+ class: i(`${s(e)}-swiper-showcase__media`)
96
96
  },
97
97
  [
98
- n.tag ? (c(), o(
98
+ a.tag ? (o(), l(
99
99
  "div",
100
100
  {
101
101
  key: 0,
102
- class: t(`${i(s)}-swiper-showcase__tag`)
102
+ class: i(`${s(e)}-swiper-showcase__tag`)
103
103
  },
104
- f(n.tag),
104
+ p(a.tag),
105
105
  3
106
106
  /* TEXT, CLASS */
107
- )) : _("v-if", !0),
108
- I(i(D), {
109
- src: n.url || w.placeholder || "",
110
- alt: n.alt || n.title || "",
111
- class: t(`${i(s)}-swiper-showcase__image`),
112
- "img-class": "sc-swiper-showcase__img"
113
- }, null, 8, ["src", "alt", "class"])
107
+ )) : d("v-if", !0),
108
+ I(s(D), {
109
+ src: a.url || w.placeholder || "",
110
+ alt: a.alt || a.title || "",
111
+ class: i(`${s(e)}-swiper-showcase__image`),
112
+ "img-class": `${s(e)}-swiper-showcase__img`
113
+ }, null, 8, ["src", "alt", "class", "img-class"])
114
114
  ],
115
115
  2
116
116
  /* CLASS */
117
117
  ),
118
- e(
118
+ t(
119
119
  "div",
120
120
  {
121
- class: t(`${i(s)}-swiper-showcase__info`)
121
+ class: i(`${s(e)}-swiper-showcase__info`)
122
122
  },
123
123
  [
124
- e(
124
+ t(
125
125
  "div",
126
126
  {
127
- class: t(`${i(s)}-swiper-showcase__title`)
127
+ class: i(`${s(e)}-swiper-showcase__title`)
128
128
  },
129
- f(n.title),
129
+ p(a.title),
130
130
  3
131
131
  /* TEXT, CLASS */
132
132
  ),
133
- n.desc ? (c(), o(
133
+ a.date ? (o(), l(
134
134
  "div",
135
135
  {
136
136
  key: 0,
137
- class: t(`${i(s)}-swiper-showcase__desc`)
137
+ class: i(`${s(e)}-swiper-showcase__date`)
138
+ },
139
+ p(a.date),
140
+ 3
141
+ /* TEXT, CLASS */
142
+ )) : d("v-if", !0),
143
+ a.desc ? (o(), l(
144
+ "div",
145
+ {
146
+ key: 1,
147
+ class: i(`${s(e)}-swiper-showcase__desc`)
138
148
  },
139
- f(n.desc),
149
+ p(a.desc),
140
150
  3
141
151
  /* TEXT, CLASS */
142
- )) : _("v-if", !0)
152
+ )) : d("v-if", !0),
153
+ a.link ? (o(), l("a", {
154
+ key: 2,
155
+ href: a.link,
156
+ class: i(`${s(e)}-swiper-showcase__link`)
157
+ }, p(a.linkText || "Read More"), 11, T)) : d("v-if", !0)
143
158
  ],
144
159
  2
145
160
  /* CLASS */
@@ -157,46 +172,46 @@ const F = { class: "swiper-wrapper" }, T = ["disabled"], U = ["disabled"], g = /
157
172
  2
158
173
  /* CLASS */
159
174
  ),
160
- e(
175
+ t(
161
176
  "div",
162
177
  {
163
- class: t(`${i(s)}-swiper-showcase__nav`)
178
+ class: i(`${s(e)}-swiper-showcase__nav`)
164
179
  },
165
180
  [
166
- e("button", {
181
+ t("button", {
167
182
  type: "button",
168
- class: t(C(!0)),
169
- disabled: h.value,
183
+ class: i(C(!0)),
184
+ disabled: v.value,
170
185
  "aria-label": "previous",
171
186
  onClick: S
172
187
  }, [
173
- (c(), o(
188
+ (o(), l(
174
189
  "svg",
175
190
  {
176
191
  "aria-hidden": "true",
177
- class: t(`${i(s)}-swiper-showcase__nav-icon ${i(s)}-swiper-showcase__nav-icon--prev`),
192
+ class: i(`${s(e)}-swiper-showcase__nav-icon ${s(e)}-swiper-showcase__nav-icon--prev`),
178
193
  width: "48",
179
194
  height: "48",
180
195
  viewBox: "0 0 48 48",
181
196
  fill: "none",
182
197
  xmlns: "http://www.w3.org/2000/svg"
183
198
  },
184
- [...l[0] || (l[0] = [
185
- e(
199
+ [...c[0] || (c[0] = [
200
+ t(
186
201
  "g",
187
202
  { id: "right" },
188
203
  [
189
- e("path", {
204
+ t("path", {
190
205
  d: "M24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 2.2267e-10 24 4.97351e-10C10.7452 7.72026e-10 0 10.7452 0 24C0 37.2548 10.7452 48 24 48Z",
191
206
  fill: "white",
192
207
  "fill-opacity": "0.3"
193
208
  }),
194
- e("path", {
209
+ t("path", {
195
210
  d: "M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",
196
211
  stroke: "white",
197
212
  "stroke-opacity": "0.1"
198
213
  }),
199
- e("path", {
214
+ t("path", {
200
215
  id: "Rectangle 302 (Stroke)",
201
216
  d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
202
217
  fill: "white"
@@ -209,41 +224,41 @@ const F = { class: "swiper-wrapper" }, T = ["disabled"], U = ["disabled"], g = /
209
224
  2
210
225
  /* CLASS */
211
226
  ))
212
- ], 10, T),
213
- e("button", {
227
+ ], 10, U),
228
+ t("button", {
214
229
  type: "button",
215
- class: t(C(!1)),
216
- disabled: u.value,
230
+ class: i(C(!1)),
231
+ disabled: _.value,
217
232
  "aria-label": "next",
218
- onClick: y
233
+ onClick: B
219
234
  }, [
220
- (c(), o(
235
+ (o(), l(
221
236
  "svg",
222
237
  {
223
238
  "aria-hidden": "true",
224
- class: t(`${i(s)}-swiper-showcase__nav-icon`),
239
+ class: i(`${s(e)}-swiper-showcase__nav-icon`),
225
240
  width: "48",
226
241
  height: "48",
227
242
  viewBox: "0 0 48 48",
228
243
  fill: "none",
229
244
  xmlns: "http://www.w3.org/2000/svg"
230
245
  },
231
- [...l[1] || (l[1] = [
232
- e(
246
+ [...c[1] || (c[1] = [
247
+ t(
233
248
  "g",
234
249
  { id: "right" },
235
250
  [
236
- e("path", {
251
+ t("path", {
237
252
  d: "M24 48C37.2548 48 48 37.2548 48 24C48 10.7452 37.2548 2.2267e-10 24 4.97351e-10C10.7452 7.72026e-10 0 10.7452 0 24C0 37.2548 10.7452 48 24 48Z",
238
253
  fill: "white",
239
254
  "fill-opacity": "0.3"
240
255
  }),
241
- e("path", {
256
+ t("path", {
242
257
  d: "M47.5 24C47.5 11.0213 36.9787 0.5 24 0.5C11.0213 0.5 0.5 11.0213 0.5 24C0.5 36.9787 11.0213 47.5 24 47.5C36.9787 47.5 47.5 36.9787 47.5 24Z",
243
258
  stroke: "white",
244
259
  "stroke-opacity": "0.1"
245
260
  }),
246
- e("path", {
261
+ t("path", {
247
262
  id: "Rectangle 302 (Stroke)",
248
263
  d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
249
264
  fill: "white"
@@ -256,7 +271,7 @@ const F = { class: "swiper-wrapper" }, T = ["disabled"], U = ["disabled"], g = /
256
271
  2
257
272
  /* CLASS */
258
273
  ))
259
- ], 10, U)
274
+ ], 10, X)
260
275
  ],
261
276
  2
262
277
  /* CLASS */
@@ -264,11 +279,11 @@ const F = { class: "swiper-wrapper" }, T = ["disabled"], U = ["disabled"], g = /
264
279
  ],
265
280
  2
266
281
  /* CLASS */
267
- )) : _("v-if", !0);
282
+ )) : d("v-if", !0);
268
283
  }
269
284
  });
270
- g.install = (d) => (d.component("ScSwiperShowcase", g), d);
271
- const G = g;
285
+ g.install = (h) => (h.component("ScSwiperShowcase", g), h);
286
+ const H = g;
272
287
  export {
273
- G as ScSwiperShowcase
288
+ H as ScSwiperShowcase
274
289
  };
@@ -1,21 +1,7 @@
1
- import { defineComponent as B, ref as _, watch as H, onMounted as W, onBeforeUnmount as C, watchEffect as z, createElementBlock as p, openBlock as h, normalizeClass as s, unref as r, createElementVNode as $, createCommentVNode as F, Fragment as T, renderList as I, normalizeStyle as V } from "vue";
2
- import { P as o } from "../_vars-BV4QQF-p.js";
3
- const X = (n, L, u = 500) => {
4
- if (!n) return;
5
- const b = n.scrollLeft;
6
- let a = null;
7
- const f = (t) => {
8
- a || (a = t);
9
- const l = t - a;
10
- if (l >= u)
11
- n.scrollLeft = L;
12
- else {
13
- const d = y(l, b, L - b, u);
14
- n.scrollLeft = d, requestAnimationFrame(f);
15
- }
16
- }, y = (t, l, d, m) => (t /= m / 2, t < 1 ? d / 2 * t + l : (t--, -d / 2 * (t * (t - 2) - 1) + l));
17
- requestAnimationFrame(f);
18
- }, A = ["onClick", "innerHTML"], q = ["innerHTML"], S = /* @__PURE__ */ B({
1
+ import { defineComponent as B, ref as s, watch as H, onMounted as W, onBeforeUnmount as C, watchEffect as z, createElementBlock as c, openBlock as d, normalizeClass as r, unref as t, createElementVNode as f, createCommentVNode as X, Fragment as k, renderList as I, normalizeStyle as T } from "vue";
2
+ import { P as a } from "../_vars-BV4QQF-p.js";
3
+ import { s as x } from "../_utils-B7LThWoT.js";
4
+ const F = ["onClick", "innerHTML"], N = ["innerHTML"], $ = /* @__PURE__ */ B({
19
5
  __name: "tab-indicator",
20
6
  props: {
21
7
  modelValue: { default: 0 },
@@ -25,35 +11,35 @@ const X = (n, L, u = 500) => {
25
11
  adapt2TextWidth: { type: Boolean }
26
12
  },
27
13
  emits: ["change", "update:modelValue"],
28
- setup(n, { emit: L }) {
29
- const u = n, b = L, a = _(), f = _([]), y = _([]), t = _(u.modelValue), l = _({ width: "0px", transform: "translateX(0)" }), d = _({}), m = () => {
30
- const e = f.value[t.value], w = (e == null ? void 0 : e.offsetWidth) || 0, c = `translateX(${e == null ? void 0 : e.offsetLeft}px)`;
31
- l.value = {
32
- width: `${w}px`,
33
- transform: c
14
+ setup(m, { emit: V }) {
15
+ const h = m, y = V, i = s(), b = s([]), g = s([]), u = s(h.modelValue), w = s({ width: "0px", transform: "translateX(0)" }), L = s({}), v = () => {
16
+ const e = b.value[u.value], p = (e == null ? void 0 : e.offsetWidth) || 0, n = `translateX(${e == null ? void 0 : e.offsetLeft}px)`;
17
+ w.value = {
18
+ width: `${p}px`,
19
+ transform: n
34
20
  };
35
- const i = Math.max(...y.value.map((v) => v.offsetHeight));
36
- d.value = {
37
- height: `${i}px`
21
+ const o = Math.max(...g.value.map((l) => l.offsetHeight));
22
+ L.value = {
23
+ height: `${o}px`
38
24
  };
39
25
  };
40
26
  H(
41
- () => u.modelValue,
27
+ () => h.modelValue,
42
28
  () => {
43
- t.value = u.modelValue;
29
+ u.value = h.modelValue;
44
30
  }
45
31
  );
46
32
  const E = (e) => {
47
- const w = document.documentElement.getAttribute("dir") || "ltr", i = f.value.map((v) => v.offsetWidth).slice(0, e).reduce((v, k, R) => v + (R + 1 === e ? k * 0.5 : k), 0);
48
- X(a.value, w === "rtl" ? -i : i, 500);
33
+ const p = document.documentElement.getAttribute("dir") || "ltr", o = b.value.map((l) => l.offsetWidth).slice(0, e).reduce((l, S, R) => l + (R + 1 === e ? S * 0.5 : S), 0);
34
+ x(i.value, p === "rtl" ? -o : o, 500);
49
35
  }, M = (e) => {
50
- E(e), t.value = e, b("change", e), b("update:modelValue", e);
36
+ E(e), u.value = e, y("change", e), y("update:modelValue", e);
51
37
  };
52
- let g = null;
38
+ let _ = null;
53
39
  return W(() => {
54
- window.addEventListener("resize", m), a.value !== void 0 && (g = new IntersectionObserver(
40
+ window.addEventListener("resize", v), i.value !== void 0 && (_ = new IntersectionObserver(
55
41
  ([e]) => {
56
- e.isIntersecting && m();
42
+ e.isIntersecting && v();
57
43
  },
58
44
  {
59
45
  root: null,
@@ -63,53 +49,53 @@ const X = (n, L, u = 500) => {
63
49
  threshold: 0
64
50
  // 元素刚进入就触发
65
51
  }
66
- ), g.observe(a.value));
52
+ ), _.observe(i.value));
67
53
  }), C(() => {
68
- window.removeEventListener("resize", m), g && a.value && g.unobserve(a.value);
54
+ window.removeEventListener("resize", v), _ && i.value && _.unobserve(i.value);
69
55
  }), z(() => {
70
- m();
71
- }), (e, w) => (h(), p(
56
+ v();
57
+ }), (e, p) => (d(), c(
72
58
  "div",
73
59
  {
74
- class: s([
75
- `${r(o)}-tab-indicator`,
76
- e.isSeparate && `${r(o)}-tab-indicator__separate`,
77
- e.adapt2TextWidth && `${r(o)}-tab-indicator__adapt`
60
+ class: r([
61
+ `${t(a)}-tab-indicator`,
62
+ e.isSeparate && `${t(a)}-tab-indicator__separate`,
63
+ e.adapt2TextWidth && `${t(a)}-tab-indicator__adapt`
78
64
  ])
79
65
  },
80
66
  [
81
- $(
67
+ f(
82
68
  "div",
83
69
  {
84
70
  ref_key: "scrollRef",
85
- ref: a,
86
- class: s(`${r(o)}-tab-indicator__scroll`)
71
+ ref: i,
72
+ class: r(`${t(a)}-tab-indicator__scroll`)
87
73
  },
88
74
  [
89
- $(
75
+ f(
90
76
  "div",
91
77
  {
92
- class: s(`${r(o)}-tab-indicator__wrap`)
78
+ class: r(`${t(a)}-tab-indicator__wrap`)
93
79
  },
94
80
  [
95
- $(
81
+ f(
96
82
  "div",
97
83
  {
98
- class: s(`${r(o)}-tab-indicator__main`)
84
+ class: r(`${t(a)}-tab-indicator__main`)
99
85
  },
100
86
  [
101
- (h(!0), p(
102
- T,
87
+ (d(!0), c(
88
+ k,
103
89
  null,
104
- I(e.dataList, (c, i) => (h(), p("div", {
90
+ I(e.dataList, (n, o) => (d(), c("div", {
105
91
  ref_for: !0,
106
92
  ref_key: "indicatorItemRef",
107
- ref: f,
108
- key: c.title,
109
- class: s([`${r(o)}-tab-indicator__item`, t.value === i && `${r(o)}-tab-indicator__active`]),
110
- onClick: (v) => M(i),
111
- innerHTML: c.title
112
- }, null, 10, A))),
93
+ ref: b,
94
+ key: n.title,
95
+ class: r([`${t(a)}-tab-indicator__item`, u.value === o && `${t(a)}-tab-indicator__active`]),
96
+ onClick: (l) => M(o),
97
+ innerHTML: n.title
98
+ }, null, 10, F))),
113
99
  128
114
100
  /* KEYED_FRAGMENT */
115
101
  ))
@@ -117,17 +103,17 @@ const X = (n, L, u = 500) => {
117
103
  2
118
104
  /* CLASS */
119
105
  ),
120
- $(
106
+ f(
121
107
  "div",
122
108
  {
123
- class: s(`${r(o)}-tab-indicator__scrollbar`)
109
+ class: r(`${t(a)}-tab-indicator__scrollbar`)
124
110
  },
125
111
  [
126
- $(
112
+ f(
127
113
  "div",
128
114
  {
129
- class: s(`${r(o)}-tab-indicator__scrollbar-drag`),
130
- style: V(l.value)
115
+ class: r(`${t(a)}-tab-indicator__scrollbar-drag`),
116
+ style: T(w.value)
131
117
  },
132
118
  null,
133
119
  6
@@ -145,40 +131,40 @@ const X = (n, L, u = 500) => {
145
131
  2
146
132
  /* CLASS */
147
133
  ),
148
- e.showIntro ? (h(), p(
134
+ e.showIntro ? (d(), c(
149
135
  "div",
150
136
  {
151
137
  key: 0,
152
- class: s(`${r(o)}-tab-indicator__intro`),
153
- style: V(d.value)
138
+ class: r(`${t(a)}-tab-indicator__intro`),
139
+ style: T(L.value)
154
140
  },
155
141
  [
156
- (h(!0), p(
157
- T,
142
+ (d(!0), c(
143
+ k,
158
144
  null,
159
- I(e.dataList, (c, i) => (h(), p("p", {
145
+ I(e.dataList, (n, o) => (d(), c("p", {
160
146
  ref_for: !0,
161
147
  ref_key: "introItemRef",
162
- ref: y,
163
- key: c.title,
164
- class: s([`${r(o)}-tab-indicator__intro-item`, t.value === i && `${r(o)}-tab-indicator__active`]),
165
- innerHTML: c.desc
166
- }, null, 10, q))),
148
+ ref: g,
149
+ key: n.title,
150
+ class: r([`${t(a)}-tab-indicator__intro-item`, u.value === o && `${t(a)}-tab-indicator__active`]),
151
+ innerHTML: n.desc
152
+ }, null, 10, N))),
167
153
  128
168
154
  /* KEYED_FRAGMENT */
169
155
  ))
170
156
  ],
171
157
  6
172
158
  /* CLASS, STYLE */
173
- )) : F("v-if", !0)
159
+ )) : X("v-if", !0)
174
160
  ],
175
161
  2
176
162
  /* CLASS */
177
163
  ));
178
164
  }
179
165
  });
180
- S.install = (n) => (n.component("ScTabIndicator", S), n);
181
- const P = S;
166
+ $.install = (m) => (m.component("ScTabIndicator", $), m);
167
+ const O = $;
182
168
  export {
183
- P as ScTabIndicator
169
+ O as ScTabIndicator
184
170
  };
package/dist/global.d.ts CHANGED
@@ -6,8 +6,11 @@ declare module 'vue' {
6
6
  ScSwiperVehicle: typeof import("@seresweb/website-component")["ScSwiperVehicle"];
7
7
  ScSwiperShowcase: typeof import("@seresweb/website-component")["ScSwiperShowcase"];
8
8
  ScSwiperNormal: typeof import("@seresweb/website-component")["ScSwiperNormal"];
9
+ ScSelect: typeof import("@seresweb/website-component")["ScSelect"];
10
+ ScRow: typeof import("@seresweb/website-component")["ScRow"];
9
11
  ScRadio: typeof import("@seresweb/website-component")["ScRadio"];
10
12
  ScParameterBox: typeof import("@seresweb/website-component")["ScParameterBox"];
13
+ ScLocales: typeof import("@seresweb/website-component")["ScLocales"];
11
14
  ScLayzImage: typeof import("@seresweb/website-component")["ScLayzImage"];
12
15
  ScInput: typeof import("@seresweb/website-component")["ScInput"];
13
16
  ScImageIndicator: typeof import("@seresweb/website-component")["ScImageIndicator"];
@@ -15,6 +18,11 @@ declare module 'vue' {
15
18
  ScGradualHighlight: typeof import("@seresweb/website-component")["ScGradualHighlight"];
16
19
  ScDropdown: typeof import("@seresweb/website-component")["ScDropdown"];
17
20
  ScDrawer: typeof import("@seresweb/website-component")["ScDrawer"];
21
+ ScDateSelect: typeof import("@seresweb/website-component")["ScDateSelect"];
22
+ ScDatePicker: typeof import("@seresweb/website-component")["ScDatePicker"];
23
+ ScConfigProvider: typeof import("@seresweb/website-component")["ScConfigProvider"];
24
+ ScCol: typeof import("@seresweb/website-component")["ScCol"];
25
+ ScCheckbox: typeof import("@seresweb/website-component")["ScCheckbox"];
18
26
  ScAnimatedNumber: typeof import("@seresweb/website-component")["ScAnimatedNumber"];
19
27
  ScAccordionInfoPanel: typeof import("@seresweb/website-component")["ScAccordionInfoPanel"];
20
28
  }