@seresweb/website-component 2.2.2 → 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.
- package/README.md +5 -4
- package/dist/_icons-DtBTpiO2.cjs +11 -0
- package/dist/_icons-FW35XHO0.js +14 -0
- package/dist/_utils-B7LThWoT.js +26 -0
- package/dist/_utils-CtkVBTg-.cjs +1 -0
- package/dist/cjs/checkbox.cjs +1 -0
- package/dist/cjs/col.cjs +1 -0
- package/dist/cjs/config-provider.cjs +1 -0
- package/dist/cjs/date-picker.cjs +1 -0
- package/dist/cjs/date-select.cjs +1 -0
- package/dist/cjs/horizontal-viewer.cjs +1 -1
- package/dist/cjs/image-indicator.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/input.cjs +1 -1
- package/dist/cjs/layz-image.cjs +1 -1
- package/dist/cjs/locales.cjs +1 -0
- package/dist/cjs/parameter-box.cjs +1 -1
- package/dist/cjs/radio.cjs +1 -1
- package/dist/cjs/row.cjs +1 -0
- package/dist/cjs/select.cjs +1 -0
- package/dist/cjs/swiper-normal.cjs +1 -1
- package/dist/cjs/swiper-showcase.cjs +1 -1
- package/dist/cjs/tab-indicator.cjs +1 -1
- package/dist/css/checkbox.css +1 -0
- package/dist/css/col.css +1 -0
- package/dist/css/date-picker.css +1 -0
- package/dist/css/date-select.css +1 -0
- package/dist/css/input.css +1 -1
- package/dist/css/radio.css +1 -1
- package/dist/css/row.css +1 -0
- package/dist/css/select.css +1 -0
- package/dist/en-US-BBTWftdk.js +35 -0
- package/dist/en-US-UkqgG0fb.cjs +1 -0
- package/dist/es/checkbox.mjs +82 -0
- package/dist/es/col.mjs +48 -0
- package/dist/es/config-provider.mjs +17 -0
- package/dist/es/date-picker.mjs +6 -0
- package/dist/es/date-select.mjs +113 -0
- package/dist/es/horizontal-viewer.mjs +1 -1
- package/dist/es/image-indicator.mjs +1 -1
- package/dist/es/index.mjs +61 -41
- package/dist/es/input.mjs +17 -16
- package/dist/es/layz-image.mjs +18 -17
- package/dist/es/locales.mjs +41 -0
- package/dist/es/parameter-box.mjs +123 -85
- package/dist/es/radio.mjs +27 -23
- package/dist/es/row.mjs +63 -0
- package/dist/es/select.mjs +210 -0
- package/dist/es/swiper-normal.mjs +1 -1
- package/dist/es/swiper-showcase.mjs +37 -37
- package/dist/es/tab-indicator.mjs +65 -79
- package/dist/global.d.ts +8 -0
- package/dist/index-B-sVxtkA.cjs +1 -0
- package/dist/{index-tkvNmWjy.js → index-BPX4w5Vn.js} +113 -106
- package/dist/index-Bc4wAl0z.js +644 -0
- package/dist/index-CEjz1ubF.cjs +1 -0
- package/dist/index.css +1 -1
- package/dist/scss/checkbox.scss +155 -0
- package/dist/scss/col.scss +16 -0
- package/dist/scss/date-picker.scss +226 -0
- package/dist/scss/date-select.scss +41 -0
- package/dist/scss/index.scss +6 -0
- package/dist/scss/input.scss +44 -4
- package/dist/scss/radio.scss +6 -6
- package/dist/scss/row.scss +10 -0
- package/dist/scss/select.scss +210 -0
- package/dist/types/components/_icons.d.ts +4 -0
- package/dist/types/components/_utils.d.ts +4 -0
- package/dist/types/components/checkbox/checkbox.vue.d.ts +24 -0
- package/dist/types/components/checkbox/index.d.ts +6 -0
- package/dist/types/components/checkbox/type.d.ts +30 -0
- package/dist/types/components/col/col.vue.d.ts +21 -0
- package/dist/types/components/col/index.d.ts +6 -0
- package/dist/types/components/col/type.d.ts +24 -0
- package/dist/types/components/config-provider/config-provider.vue.d.ts +20 -0
- package/dist/types/components/config-provider/index.d.ts +27 -0
- package/dist/types/components/config-provider/type.d.ts +4 -0
- package/dist/types/components/date-picker/date-picker.vue.d.ts +16 -0
- package/dist/types/components/date-picker/index.d.ts +53 -0
- package/dist/types/components/date-picker/type.d.ts +12 -0
- package/dist/types/components/date-select/date-select.vue.d.ts +16 -0
- package/dist/types/components/date-select/index.d.ts +7 -0
- package/dist/types/components/date-select/type.d.ts +16 -0
- package/dist/types/components/index.d.ts +8 -0
- package/dist/types/components/input/input.vue.d.ts +1 -0
- package/dist/types/components/input/type.d.ts +1 -0
- package/dist/types/components/locales/ar-SA.d.ts +20 -0
- package/dist/types/components/locales/en-US.d.ts +20 -0
- package/dist/types/components/locales/index.d.ts +44 -0
- package/dist/types/components/radio/radio.vue.d.ts +2 -2
- package/dist/types/components/row/index.d.ts +6 -0
- package/dist/types/components/row/row.vue.d.ts +23 -0
- package/dist/types/components/row/type.d.ts +7 -0
- package/dist/types/components/select/index.d.ts +7 -0
- package/dist/types/components/select/select.vue.d.ts +48 -0
- package/dist/types/components/select/type.d.ts +20 -0
- package/dist/types/components/swiper-normal/swiper-normal.vue.d.ts +2 -2
- package/dist/types/components/swiper-vehicle/swiper-vehicle.vue.d.ts +2 -2
- package/dist/types/components/tab-indicator/tab-indicator.vue.d.ts +2 -2
- package/package.json +2 -1
- package/dist/index-BIPlvoY9.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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
3
|
import { P as e } from "../_vars-BV4QQF-p.js";
|
|
4
4
|
import { ScLayzImage as D } from "./layz-image.mjs";
|
|
@@ -64,18 +64,18 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
64
64
|
"div",
|
|
65
65
|
{
|
|
66
66
|
key: 0,
|
|
67
|
-
class:
|
|
67
|
+
class: i(`${s(e)}-swiper-showcase`)
|
|
68
68
|
},
|
|
69
69
|
[
|
|
70
|
-
|
|
70
|
+
t(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
73
|
ref_key: "swiperRef",
|
|
74
74
|
ref: u,
|
|
75
|
-
class:
|
|
75
|
+
class: i(`${s(e)}-swiper-showcase__main`)
|
|
76
76
|
},
|
|
77
77
|
[
|
|
78
|
-
|
|
78
|
+
t("div", F, [
|
|
79
79
|
(o(!0), l(
|
|
80
80
|
N,
|
|
81
81
|
null,
|
|
@@ -83,48 +83,48 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
83
83
|
key: `${a.title}-${P}`,
|
|
84
84
|
class: "swiper-slide"
|
|
85
85
|
}, [
|
|
86
|
-
|
|
86
|
+
t(
|
|
87
87
|
"div",
|
|
88
88
|
{
|
|
89
|
-
class:
|
|
89
|
+
class: i(`${s(e)}-swiper-showcase__card`)
|
|
90
90
|
},
|
|
91
91
|
[
|
|
92
|
-
|
|
92
|
+
t(
|
|
93
93
|
"div",
|
|
94
94
|
{
|
|
95
|
-
class:
|
|
95
|
+
class: i(`${s(e)}-swiper-showcase__media`)
|
|
96
96
|
},
|
|
97
97
|
[
|
|
98
98
|
a.tag ? (o(), l(
|
|
99
99
|
"div",
|
|
100
100
|
{
|
|
101
101
|
key: 0,
|
|
102
|
-
class:
|
|
102
|
+
class: i(`${s(e)}-swiper-showcase__tag`)
|
|
103
103
|
},
|
|
104
104
|
p(a.tag),
|
|
105
105
|
3
|
|
106
106
|
/* TEXT, CLASS */
|
|
107
107
|
)) : d("v-if", !0),
|
|
108
|
-
I(
|
|
108
|
+
I(s(D), {
|
|
109
109
|
src: a.url || w.placeholder || "",
|
|
110
110
|
alt: a.alt || a.title || "",
|
|
111
|
-
class:
|
|
112
|
-
"img-class":
|
|
113
|
-
}, null, 8, ["src", "alt", "class"])
|
|
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
|
-
|
|
118
|
+
t(
|
|
119
119
|
"div",
|
|
120
120
|
{
|
|
121
|
-
class:
|
|
121
|
+
class: i(`${s(e)}-swiper-showcase__info`)
|
|
122
122
|
},
|
|
123
123
|
[
|
|
124
|
-
|
|
124
|
+
t(
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
|
-
class:
|
|
127
|
+
class: i(`${s(e)}-swiper-showcase__title`)
|
|
128
128
|
},
|
|
129
129
|
p(a.title),
|
|
130
130
|
3
|
|
@@ -134,7 +134,7 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
136
|
key: 0,
|
|
137
|
-
class:
|
|
137
|
+
class: i(`${s(e)}-swiper-showcase__date`)
|
|
138
138
|
},
|
|
139
139
|
p(a.date),
|
|
140
140
|
3
|
|
@@ -144,7 +144,7 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
146
146
|
key: 1,
|
|
147
|
-
class:
|
|
147
|
+
class: i(`${s(e)}-swiper-showcase__desc`)
|
|
148
148
|
},
|
|
149
149
|
p(a.desc),
|
|
150
150
|
3
|
|
@@ -153,7 +153,7 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
153
153
|
a.link ? (o(), l("a", {
|
|
154
154
|
key: 2,
|
|
155
155
|
href: a.link,
|
|
156
|
-
class:
|
|
156
|
+
class: i(`${s(e)}-swiper-showcase__link`)
|
|
157
157
|
}, p(a.linkText || "Read More"), 11, T)) : d("v-if", !0)
|
|
158
158
|
],
|
|
159
159
|
2
|
|
@@ -172,15 +172,15 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
172
172
|
2
|
|
173
173
|
/* CLASS */
|
|
174
174
|
),
|
|
175
|
-
|
|
175
|
+
t(
|
|
176
176
|
"div",
|
|
177
177
|
{
|
|
178
|
-
class:
|
|
178
|
+
class: i(`${s(e)}-swiper-showcase__nav`)
|
|
179
179
|
},
|
|
180
180
|
[
|
|
181
|
-
|
|
181
|
+
t("button", {
|
|
182
182
|
type: "button",
|
|
183
|
-
class:
|
|
183
|
+
class: i(C(!0)),
|
|
184
184
|
disabled: v.value,
|
|
185
185
|
"aria-label": "previous",
|
|
186
186
|
onClick: S
|
|
@@ -189,7 +189,7 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
189
189
|
"svg",
|
|
190
190
|
{
|
|
191
191
|
"aria-hidden": "true",
|
|
192
|
-
class:
|
|
192
|
+
class: i(`${s(e)}-swiper-showcase__nav-icon ${s(e)}-swiper-showcase__nav-icon--prev`),
|
|
193
193
|
width: "48",
|
|
194
194
|
height: "48",
|
|
195
195
|
viewBox: "0 0 48 48",
|
|
@@ -197,21 +197,21 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
197
197
|
xmlns: "http://www.w3.org/2000/svg"
|
|
198
198
|
},
|
|
199
199
|
[...c[0] || (c[0] = [
|
|
200
|
-
|
|
200
|
+
t(
|
|
201
201
|
"g",
|
|
202
202
|
{ id: "right" },
|
|
203
203
|
[
|
|
204
|
-
|
|
204
|
+
t("path", {
|
|
205
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",
|
|
206
206
|
fill: "white",
|
|
207
207
|
"fill-opacity": "0.3"
|
|
208
208
|
}),
|
|
209
|
-
|
|
209
|
+
t("path", {
|
|
210
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",
|
|
211
211
|
stroke: "white",
|
|
212
212
|
"stroke-opacity": "0.1"
|
|
213
213
|
}),
|
|
214
|
-
|
|
214
|
+
t("path", {
|
|
215
215
|
id: "Rectangle 302 (Stroke)",
|
|
216
216
|
d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
|
|
217
217
|
fill: "white"
|
|
@@ -225,9 +225,9 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
225
225
|
/* CLASS */
|
|
226
226
|
))
|
|
227
227
|
], 10, U),
|
|
228
|
-
|
|
228
|
+
t("button", {
|
|
229
229
|
type: "button",
|
|
230
|
-
class:
|
|
230
|
+
class: i(C(!1)),
|
|
231
231
|
disabled: _.value,
|
|
232
232
|
"aria-label": "next",
|
|
233
233
|
onClick: B
|
|
@@ -236,7 +236,7 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
236
236
|
"svg",
|
|
237
237
|
{
|
|
238
238
|
"aria-hidden": "true",
|
|
239
|
-
class:
|
|
239
|
+
class: i(`${s(e)}-swiper-showcase__nav-icon`),
|
|
240
240
|
width: "48",
|
|
241
241
|
height: "48",
|
|
242
242
|
viewBox: "0 0 48 48",
|
|
@@ -244,21 +244,21 @@ const F = { class: "swiper-wrapper" }, T = ["href"], U = ["disabled"], X = ["dis
|
|
|
244
244
|
xmlns: "http://www.w3.org/2000/svg"
|
|
245
245
|
},
|
|
246
246
|
[...c[1] || (c[1] = [
|
|
247
|
-
|
|
247
|
+
t(
|
|
248
248
|
"g",
|
|
249
249
|
{ id: "right" },
|
|
250
250
|
[
|
|
251
|
-
|
|
251
|
+
t("path", {
|
|
252
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",
|
|
253
253
|
fill: "white",
|
|
254
254
|
"fill-opacity": "0.3"
|
|
255
255
|
}),
|
|
256
|
-
|
|
256
|
+
t("path", {
|
|
257
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",
|
|
258
258
|
stroke: "white",
|
|
259
259
|
"stroke-opacity": "0.1"
|
|
260
260
|
}),
|
|
261
|
-
|
|
261
|
+
t("path", {
|
|
262
262
|
id: "Rectangle 302 (Stroke)",
|
|
263
263
|
d: "M20.8076 14.8076L20.679 17.6098L27.0692 24L20.679 30.3902L20.8076 33.1924L30 24L20.8076 14.8076Z",
|
|
264
264
|
fill: "white"
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import { defineComponent as B, ref as
|
|
2
|
-
import { P as
|
|
3
|
-
|
|
4
|
-
|
|
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(
|
|
29
|
-
const
|
|
30
|
-
const e =
|
|
31
|
-
|
|
32
|
-
width: `${
|
|
33
|
-
transform:
|
|
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
|
|
36
|
-
|
|
37
|
-
height: `${
|
|
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
|
-
() =>
|
|
27
|
+
() => h.modelValue,
|
|
42
28
|
() => {
|
|
43
|
-
|
|
29
|
+
u.value = h.modelValue;
|
|
44
30
|
}
|
|
45
31
|
);
|
|
46
32
|
const E = (e) => {
|
|
47
|
-
const
|
|
48
|
-
|
|
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),
|
|
36
|
+
E(e), u.value = e, y("change", e), y("update:modelValue", e);
|
|
51
37
|
};
|
|
52
|
-
let
|
|
38
|
+
let _ = null;
|
|
53
39
|
return W(() => {
|
|
54
|
-
window.addEventListener("resize",
|
|
40
|
+
window.addEventListener("resize", v), i.value !== void 0 && (_ = new IntersectionObserver(
|
|
55
41
|
([e]) => {
|
|
56
|
-
e.isIntersecting &&
|
|
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
|
-
),
|
|
52
|
+
), _.observe(i.value));
|
|
67
53
|
}), C(() => {
|
|
68
|
-
window.removeEventListener("resize",
|
|
54
|
+
window.removeEventListener("resize", v), _ && i.value && _.unobserve(i.value);
|
|
69
55
|
}), z(() => {
|
|
70
|
-
|
|
71
|
-
}), (e,
|
|
56
|
+
v();
|
|
57
|
+
}), (e, p) => (d(), c(
|
|
72
58
|
"div",
|
|
73
59
|
{
|
|
74
|
-
class:
|
|
75
|
-
`${
|
|
76
|
-
e.isSeparate && `${
|
|
77
|
-
e.adapt2TextWidth && `${
|
|
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:
|
|
86
|
-
class:
|
|
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:
|
|
78
|
+
class: r(`${t(a)}-tab-indicator__wrap`)
|
|
93
79
|
},
|
|
94
80
|
[
|
|
95
|
-
|
|
81
|
+
f(
|
|
96
82
|
"div",
|
|
97
83
|
{
|
|
98
|
-
class:
|
|
84
|
+
class: r(`${t(a)}-tab-indicator__main`)
|
|
99
85
|
},
|
|
100
86
|
[
|
|
101
|
-
(
|
|
102
|
-
|
|
87
|
+
(d(!0), c(
|
|
88
|
+
k,
|
|
103
89
|
null,
|
|
104
|
-
I(e.dataList, (
|
|
90
|
+
I(e.dataList, (n, o) => (d(), c("div", {
|
|
105
91
|
ref_for: !0,
|
|
106
92
|
ref_key: "indicatorItemRef",
|
|
107
|
-
ref:
|
|
108
|
-
key:
|
|
109
|
-
class:
|
|
110
|
-
onClick: (
|
|
111
|
-
innerHTML:
|
|
112
|
-
}, null, 10,
|
|
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:
|
|
109
|
+
class: r(`${t(a)}-tab-indicator__scrollbar`)
|
|
124
110
|
},
|
|
125
111
|
[
|
|
126
|
-
|
|
112
|
+
f(
|
|
127
113
|
"div",
|
|
128
114
|
{
|
|
129
|
-
class:
|
|
130
|
-
style:
|
|
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 ? (
|
|
134
|
+
e.showIntro ? (d(), c(
|
|
149
135
|
"div",
|
|
150
136
|
{
|
|
151
137
|
key: 0,
|
|
152
|
-
class:
|
|
153
|
-
style:
|
|
138
|
+
class: r(`${t(a)}-tab-indicator__intro`),
|
|
139
|
+
style: T(L.value)
|
|
154
140
|
},
|
|
155
141
|
[
|
|
156
|
-
(
|
|
157
|
-
|
|
142
|
+
(d(!0), c(
|
|
143
|
+
k,
|
|
158
144
|
null,
|
|
159
|
-
I(e.dataList, (
|
|
145
|
+
I(e.dataList, (n, o) => (d(), c("p", {
|
|
160
146
|
ref_for: !0,
|
|
161
147
|
ref_key: "introItemRef",
|
|
162
|
-
ref:
|
|
163
|
-
key:
|
|
164
|
-
class:
|
|
165
|
-
innerHTML:
|
|
166
|
-
}, null, 10,
|
|
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
|
-
)) :
|
|
159
|
+
)) : X("v-if", !0)
|
|
174
160
|
],
|
|
175
161
|
2
|
|
176
162
|
/* CLASS */
|
|
177
163
|
));
|
|
178
164
|
}
|
|
179
165
|
});
|
|
180
|
-
|
|
181
|
-
const
|
|
166
|
+
$.install = (m) => (m.component("ScTabIndicator", $), m);
|
|
167
|
+
const O = $;
|
|
182
168
|
export {
|
|
183
|
-
|
|
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
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const de=require("./_utils-CtkVBTg-.cjs"),r=require("vue"),b=require("./_vars-CyrPevgT.cjs"),fe=require("./en-US-UkqgG0fb.cjs"),he=require("./_icons-DtBTpiO2.cjs");function le(z){return z&&z.__esModule&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z}var ee={exports:{}},me=ee.exports,ue;function pe(){return ue||(ue=1,(function(z,ne){(function(B,g){z.exports=g()})(me,(function(){var B=1e3,g=6e4,W=36e5,H="millisecond",$="second",y="minute",S="hour",F="day",k="week",w="month",Z="quarter",I="year",X="date",f="Invalid Date",a=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(i){var t=["th","st","nd","rd"],e=i%100;return"["+i+(t[(e-20)%10]||t[e]||t[0])+"]"}},v=function(i,t,e){var s=String(i);return!s||s.length>=t?i:""+Array(t+1-s.length).join(e)+i},P={s:v,z:function(i){var t=-i.utcOffset(),e=Math.abs(t),s=Math.floor(e/60),n=e%60;return(t<=0?"+":"-")+v(s,2,"0")+":"+v(n,2,"0")},m:function i(t,e){if(t.date()<e.date())return-i(e,t);var s=12*(e.year()-t.year())+(e.month()-t.month()),n=t.clone().add(s,w),u=e-n<0,c=t.clone().add(s+(u?-1:1),w);return+(-(s+(e-n)/(u?n-c:c-n))||0)},a:function(i){return i<0?Math.ceil(i)||0:Math.floor(i)},p:function(i){return{M:w,y:I,w:k,d:F,D:X,h:S,m:y,s:$,ms:H,Q:Z}[i]||String(i||"").toLowerCase().replace(/s$/,"")},u:function(i){return i===void 0}},E="en",x={};x[E]=p;var R="$isDayjsObject",m=function(i){return i instanceof L||!(!i||!i[R])},D=function i(t,e,s){var n;if(!t)return E;if(typeof t=="string"){var u=t.toLowerCase();x[u]&&(n=u),e&&(x[u]=e,n=u);var c=t.split("-");if(!n&&c.length>1)return i(c[0])}else{var d=t.name;x[d]=t,n=d}return!s&&n&&(E=n),n||!s&&E},h=function(i,t){if(m(i))return i.clone();var e=typeof t=="object"?t:{};return e.date=i,e.args=arguments,new L(e)},l=P;l.l=D,l.i=m,l.w=function(i,t){return h(i,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var L=(function(){function i(e){this.$L=D(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[R]=!0}var t=i.prototype;return t.parse=function(e){this.$d=(function(s){var n=s.date,u=s.utc;if(n===null)return new Date(NaN);if(l.u(n))return new Date;if(n instanceof Date)return new Date(n);if(typeof n=="string"&&!/Z$/i.test(n)){var c=n.match(a);if(c){var d=c[2]-1||0,M=(c[7]||"0").substring(0,3);return u?new Date(Date.UTC(c[1],d,c[3]||1,c[4]||0,c[5]||0,c[6]||0,M)):new Date(c[1],d,c[3]||1,c[4]||0,c[5]||0,c[6]||0,M)}}return new Date(n)})(e),this.init()},t.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},t.$utils=function(){return l},t.isValid=function(){return this.$d.toString()!==f},t.isSame=function(e,s){var n=h(e);return this.startOf(s)<=n&&n<=this.endOf(s)},t.isAfter=function(e,s){return h(e)<this.startOf(s)},t.isBefore=function(e,s){return this.endOf(s)<h(e)},t.$g=function(e,s,n){return l.u(e)?this[s]:this.set(n,e)},t.unix=function(){return Math.floor(this.valueOf()/1e3)},t.valueOf=function(){return this.$d.getTime()},t.startOf=function(e,s){var n=this,u=!!l.u(s)||s,c=l.p(e),d=function(A,O){var V=l.w(n.$u?Date.UTC(n.$y,O,A):new Date(n.$y,O,A),n);return u?V:V.endOf(F)},M=function(A,O){return l.w(n.toDate()[A].apply(n.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(O)),n)},_=this.$W,Y=this.$M,T=this.$D,q="set"+(this.$u?"UTC":"");switch(c){case I:return u?d(1,0):d(31,11);case w:return u?d(1,Y):d(0,Y+1);case k:var N=this.$locale().weekStart||0,Q=(_<N?_+7:_)-N;return d(u?T-Q:T+(6-Q),Y);case F:case X:return M(q+"Hours",0);case S:return M(q+"Minutes",1);case y:return M(q+"Seconds",2);case $:return M(q+"Milliseconds",3);default:return this.clone()}},t.endOf=function(e){return this.startOf(e,!1)},t.$set=function(e,s){var n,u=l.p(e),c="set"+(this.$u?"UTC":""),d=(n={},n[F]=c+"Date",n[X]=c+"Date",n[w]=c+"Month",n[I]=c+"FullYear",n[S]=c+"Hours",n[y]=c+"Minutes",n[$]=c+"Seconds",n[H]=c+"Milliseconds",n)[u],M=u===F?this.$D+(s-this.$W):s;if(u===w||u===I){var _=this.clone().set(X,1);_.$d[d](M),_.init(),this.$d=_.set(X,Math.min(this.$D,_.daysInMonth())).$d}else d&&this.$d[d](M);return this.init(),this},t.set=function(e,s){return this.clone().$set(e,s)},t.get=function(e){return this[l.p(e)]()},t.add=function(e,s){var n,u=this;e=Number(e);var c=l.p(s),d=function(Y){var T=h(u);return l.w(T.date(T.date()+Math.round(Y*e)),u)};if(c===w)return this.set(w,this.$M+e);if(c===I)return this.set(I,this.$y+e);if(c===F)return d(1);if(c===k)return d(7);var M=(n={},n[y]=g,n[S]=W,n[$]=B,n)[c]||1,_=this.$d.getTime()+e*M;return l.w(_,this)},t.subtract=function(e,s){return this.add(-1*e,s)},t.format=function(e){var s=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var u=e||"YYYY-MM-DDTHH:mm:ssZ",c=l.z(this),d=this.$H,M=this.$m,_=this.$M,Y=n.weekdays,T=n.months,q=n.meridiem,N=function(O,V,U,J){return O&&(O[V]||O(s,u))||U[V].slice(0,J)},Q=function(O){return l.s(d%12||12,O,"0")},A=q||function(O,V,U){var J=O<12?"AM":"PM";return U?J.toLowerCase():J};return u.replace(o,(function(O,V){return V||(function(U){switch(U){case"YY":return String(s.$y).slice(-2);case"YYYY":return l.s(s.$y,4,"0");case"M":return _+1;case"MM":return l.s(_+1,2,"0");case"MMM":return N(n.monthsShort,_,T,3);case"MMMM":return N(T,_);case"D":return s.$D;case"DD":return l.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return N(n.weekdaysMin,s.$W,Y,2);case"ddd":return N(n.weekdaysShort,s.$W,Y,3);case"dddd":return Y[s.$W];case"H":return String(d);case"HH":return l.s(d,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return A(d,M,!0);case"A":return A(d,M,!1);case"m":return String(M);case"mm":return l.s(M,2,"0");case"s":return String(s.$s);case"ss":return l.s(s.$s,2,"0");case"SSS":return l.s(s.$ms,3,"0");case"Z":return c}return null})(O)||c.replace(":","")}))},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(e,s,n){var u,c=this,d=l.p(s),M=h(e),_=(M.utcOffset()-this.utcOffset())*g,Y=this-M,T=function(){return l.m(c,M)};switch(d){case I:u=T()/12;break;case w:u=T();break;case Z:u=T()/3;break;case k:u=(Y-_)/6048e5;break;case F:u=(Y-_)/864e5;break;case S:u=Y/W;break;case y:u=Y/g;break;case $:u=Y/B;break;default:u=Y}return n?u:l.a(u)},t.daysInMonth=function(){return this.endOf(w).$D},t.$locale=function(){return x[this.$L]},t.locale=function(e,s){if(!e)return this.$L;var n=this.clone(),u=D(e,s,!0);return u&&(n.$L=u),n},t.clone=function(){return l.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},i})(),C=L.prototype;return h.prototype=C,[["$ms",H],["$s",$],["$m",y],["$H",S],["$W",F],["$M",w],["$y",I],["$D",X]].forEach((function(i){C[i[1]]=function(t){return this.$g(t,i[0],i[1])}})),h.extend=function(i,t){return i.$i||(i(t,L,h),i.$i=!0),h},h.locale=D,h.isDayjs=m,h.unix=function(i){return h(1e3*i)},h.en=x[E],h.Ls=x,h.p={},h}))})(ee)),ee.exports}var $e=pe();const j=le($e);var te={exports:{}},ve=te.exports,ce;function De(){return ce||(ce=1,(function(z,ne){(function(B,g){z.exports=g()})(ve,(function(){var B={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},g=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,W=/\d/,H=/\d\d/,$=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,S={},F=function(a){return(a=+a)+(a>68?1900:2e3)},k=function(a){return function(o){this[a]=+o}},w=[/[+-]\d\d:?(\d\d)?|Z/,function(a){(this.zone||(this.zone={})).offset=(function(o){if(!o||o==="Z")return 0;var p=o.match(/([+-]|\d\d)/g),v=60*p[1]+(+p[2]||0);return v===0?0:p[0]==="+"?-v:v})(a)}],Z=function(a){var o=S[a];return o&&(o.indexOf?o:o.s.concat(o.f))},I=function(a,o){var p,v=S.meridiem;if(v){for(var P=1;P<=24;P+=1)if(a.indexOf(v(P,0,o))>-1){p=P>12;break}}else p=a===(o?"pm":"PM");return p},X={A:[y,function(a){this.afternoon=I(a,!1)}],a:[y,function(a){this.afternoon=I(a,!0)}],Q:[W,function(a){this.month=3*(a-1)+1}],S:[W,function(a){this.milliseconds=100*+a}],SS:[H,function(a){this.milliseconds=10*+a}],SSS:[/\d{3}/,function(a){this.milliseconds=+a}],s:[$,k("seconds")],ss:[$,k("seconds")],m:[$,k("minutes")],mm:[$,k("minutes")],H:[$,k("hours")],h:[$,k("hours")],HH:[$,k("hours")],hh:[$,k("hours")],D:[$,k("day")],DD:[H,k("day")],Do:[y,function(a){var o=S.ordinal,p=a.match(/\d+/);if(this.day=p[0],o)for(var v=1;v<=31;v+=1)o(v).replace(/\[|\]/g,"")===a&&(this.day=v)}],w:[$,k("week")],ww:[H,k("week")],M:[$,k("month")],MM:[H,k("month")],MMM:[y,function(a){var o=Z("months"),p=(Z("monthsShort")||o.map((function(v){return v.slice(0,3)}))).indexOf(a)+1;if(p<1)throw new Error;this.month=p%12||p}],MMMM:[y,function(a){var o=Z("months").indexOf(a)+1;if(o<1)throw new Error;this.month=o%12||o}],Y:[/[+-]?\d+/,k("year")],YY:[H,function(a){this.year=F(a)}],YYYY:[/\d{4}/,k("year")],Z:w,ZZ:w};function f(a){var o,p;o=a,p=S&&S.formats;for(var v=(a=o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(h,l,L){var C=L&&L.toUpperCase();return l||p[L]||B[L]||p[C].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(i,t,e){return t||e.slice(1)}))}))).match(g),P=v.length,E=0;E<P;E+=1){var x=v[E],R=X[x],m=R&&R[0],D=R&&R[1];v[E]=D?{regex:m,parser:D}:x.replace(/^\[|\]$/g,"")}return function(h){for(var l={},L=0,C=0;L<P;L+=1){var i=v[L];if(typeof i=="string")C+=i.length;else{var t=i.regex,e=i.parser,s=h.slice(C),n=t.exec(s)[0];e.call(l,n),h=h.replace(n,"")}}return(function(u){var c=u.afternoon;if(c!==void 0){var d=u.hours;c?d<12&&(u.hours+=12):d===12&&(u.hours=0),delete u.afternoon}})(l),l}}return function(a,o,p){p.p.customParseFormat=!0,a&&a.parseTwoDigitYear&&(F=a.parseTwoDigitYear);var v=o.prototype,P=v.parse;v.parse=function(E){var x=E.date,R=E.utc,m=E.args;this.$u=R;var D=m[1];if(typeof D=="string"){var h=m[2]===!0,l=m[3]===!0,L=h||l,C=m[2];l&&(C=m[2]),S=this.$locale(),!h&&C&&(S=p.Ls[C]),this.$d=(function(s,n,u,c){try{if(["x","X"].indexOf(n)>-1)return new Date((n==="X"?1e3:1)*s);var d=f(n)(s),M=d.year,_=d.month,Y=d.day,T=d.hours,q=d.minutes,N=d.seconds,Q=d.milliseconds,A=d.zone,O=d.week,V=new Date,U=Y||(M||_?1:V.getDate()),J=M||V.getFullYear(),G=0;M&&!_||(G=_>0?_-1:V.getMonth());var K,re=T||0,ae=q||0,se=N||0,ie=Q||0;return A?new Date(Date.UTC(J,G,U,re,ae,se,ie+60*A.offset*1e3)):u?new Date(Date.UTC(J,G,U,re,ae,se,ie)):(K=new Date(J,G,U,re,ae,se,ie),O&&(K=c(K).week(O).toDate()),K)}catch{return new Date("")}})(x,D,R,p),this.init(),C&&C!==!0&&(this.$L=this.locale(C).$L),L&&x!=this.format(D)&&(this.$d=new Date("")),S={}}else if(D instanceof Array)for(var i=D.length,t=1;t<=i;t+=1){m[1]=D[t-1];var e=p.apply(this,m);if(e.isValid()){this.$d=e.$d,this.$L=e.$L,this.init();break}t===i&&(this.$d=new Date(""))}else P.call(this,E)}}}))})(te)),te.exports}var ye=De();const Me=le(ye),ke=["innerHTML"],_e=["innerHTML"],ge=["onClick"],oe="YYYY-MM-DD",Se=r.defineComponent({name:"ScDatePicker",__name:"date-picker",props:{modelValue:{default:null},format:{default:oe},disabled:{type:Boolean,default:!1},dark:{type:Boolean,default:!1},minDate:{default:void 0},maxDate:{default:void 0}},emits:["update:modelValue","change"],setup(z,{emit:ne}){j.extend(Me);const B=he.ChevronDownIcon,g=z,W=ne,H=r.inject("scLocale",fe.enUS),$=r.ref(new Date().getFullYear()),y=r.ref(new Date().getMonth()),S=f=>{if(f==null)return null;if(f instanceof Date){const a=j(f);return a.isValid()?a:null}if(typeof f=="string"){const a=j(f,g.format||oe,!0);if(a.isValid())return a;const o=j(f);return o.isValid()?o:null}return null},F=r.computed(()=>S(g.modelValue)),k=r.computed(()=>{const f=[],a=j().year($.value).month(y.value).date(1),o=a.endOf("month"),p=a.subtract(1,"day"),v=j(),P=a.day(),E=P===0?6:P-1;for(let m=E-1;m>=0;m--){const D=p.date()-m,h=j().year($.value).month(y.value-1).date(D);f.push({date:D,fullDate:h,key:`prev-${D}`,isOtherMonth:!0,isToday:!1,isSelected:!1,isDisabled:w(h)})}const x=o.date();for(let m=1;m<=x;m++){const D=j().year($.value).month(y.value).date(m),h=D.isSame(v,"day"),l=F.value?D.isSame(F.value,"day"):!1;f.push({date:m,fullDate:D,key:`current-${m}`,isOtherMonth:!1,isToday:h,isSelected:l,isDisabled:w(D)})}const R=42-f.length;for(let m=1;m<=R;m++){const D=j().year($.value).month(y.value+1).date(m);f.push({date:m,fullDate:D,key:`next-${m}`,isOtherMonth:!0,isToday:!1,isSelected:!1,isDisabled:w(D)})}return f});function w(f){if(g.minDate){const a=S(g.minDate);if(a&&f.isBefore(a,"day"))return!0}if(g.maxDate){const a=S(g.maxDate);if(a&&f.isAfter(a,"day"))return!0}return!1}function Z(f){f.preventDefault(),y.value===0?(y.value=11,$.value--):y.value--}function I(f){f.preventDefault(),y.value===11?(y.value=0,$.value++):y.value++}function X(f,a){if(f.preventDefault(),a.isDisabled||g.disabled)return;const o=typeof g.modelValue=="string"?a.fullDate.format(g.format||oe):a.fullDate.toDate();W("update:modelValue",o),W("change",o)}return r.watch(F,f=>{f&&($.value=f.year(),y.value=f.month())},{immediate:!0}),(f,a)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([`${r.unref(b.PREFIX)}-date-picker`,{[`${r.unref(b.PREFIX)}-date-picker--disabled`]:f.disabled,[`${r.unref(b.PREFIX)}-date-picker--dark`]:f.dark}])},[r.createElementVNode("div",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__panel`)},[r.createElementVNode("div",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__header`)},[r.createElementVNode("button",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__nav`),onClick:Z},[r.createElementVNode("span",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__nav-prev`),innerHTML:r.unref(B),"aria-hidden":"true"},null,10,ke)],2),r.createElementVNode("div",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__header-label`)},r.toDisplayString(r.unref(H).datePicker.months[y.value])+" "+r.toDisplayString($.value),3),r.createElementVNode("button",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__nav`),onClick:I},[r.createElementVNode("span",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__nav-next`),innerHTML:r.unref(B),"aria-hidden":"true"},null,10,_e)],2)],2),r.createElementVNode("div",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__weekdays`)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(H).datePicker.weekdays,o=>(r.openBlock(),r.createElementBlock("div",{key:o,class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__weekday`)},r.toDisplayString(o),3))),128))],2),r.createElementVNode("div",{class:r.normalizeClass(`${r.unref(b.PREFIX)}-date-picker__days`)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(k.value,o=>(r.openBlock(),r.createElementBlock("div",{key:o.key,class:r.normalizeClass([`${r.unref(b.PREFIX)}-date-picker__day`,{[`${r.unref(b.PREFIX)}-date-picker__day--today`]:o.isToday,[`${r.unref(b.PREFIX)}-date-picker__day--selected`]:o.isSelected,[`${r.unref(b.PREFIX)}-date-picker__day--other-month`]:o.isOtherMonth,[`${r.unref(b.PREFIX)}-date-picker__day--disabled`]:o.isDisabled}]),onClick:p=>X(p,o)},r.toDisplayString(o.date),11,ge))),128))],2)],2)],2))}}),we=de.withInstall(Se);exports.ScDatePicker=we;exports.dayjs=j;
|