welcome-ui 8.0.0 → 8.0.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.
- package/dist/AXB53BZF-BOEe01VW.mjs +25 -0
- package/dist/Accordion.mjs +17 -17
- package/dist/Alert.mjs +19 -19
- package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
- package/dist/Badge.mjs +1 -1
- package/dist/Breadcrumb.mjs +27 -26
- package/dist/Button.mjs +2 -2
- package/dist/Checkbox.mjs +1 -1
- package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
- package/dist/DatePicker.mjs +4 -4
- package/dist/DateTimePicker.mjs +9 -9
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +7 -7
- package/dist/DropdownMenu.mjs +262 -262
- package/dist/Field.mjs +25 -25
- package/dist/FileDrop.mjs +273 -267
- package/dist/FileUpload.mjs +26 -26
- package/dist/Files.mjs +1 -1
- package/dist/Hint.mjs +1 -1
- package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
- package/dist/Icons.mjs +88 -88
- package/dist/IconsFont.mjs +159 -159
- package/dist/InputText.mjs +1 -1
- package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
- package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
- package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
- package/dist/Label.mjs +2 -2
- package/dist/Link.mjs +3 -3
- package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
- package/dist/Modal.mjs +13 -13
- package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
- package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
- package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
- package/dist/Pagination.mjs +22 -22
- package/dist/Picker.mjs +2 -2
- package/dist/Popover.mjs +2 -2
- package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
- package/dist/Radio.mjs +18 -18
- package/dist/RadioGroup.mjs +15 -15
- package/dist/RadioTab.mjs +9 -9
- package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
- package/dist/Search.mjs +2 -2
- package/dist/Select.mjs +719 -716
- package/dist/Shape.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Swiper.mjs +284 -278
- package/dist/Tabs.mjs +128 -128
- package/dist/Tag.mjs +16 -16
- package/dist/Text.mjs +1 -1
- package/dist/Textarea.mjs +4 -4
- package/dist/TimePicker.mjs +6 -6
- package/dist/Toast.mjs +69 -69
- package/dist/Toggle.mjs +2 -2
- package/dist/Tooltip.mjs +60 -60
- package/dist/UniversalLink.mjs +8 -8
- package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
- package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
- package/dist/VariantIcon.mjs +4 -4
- package/dist/WelcomeLoader.mjs +4862 -9223
- package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
- package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
- package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
- package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
- package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
- package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
- package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
- package/dist/index-BhcLigYU.mjs +77 -0
- package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
- package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
- package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
- package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
- package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
- package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
- package/dist/radio-group-RFyDp0KD.mjs +51 -0
- package/dist/theme.mjs +670 -615
- package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
- package/dist/utils.mjs +29 -91
- package/package.json +13 -13
- package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
- package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
- package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
- package/dist/NLEBE274-C94QU78N.mjs +0 -84
- package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
- package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
- package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
- package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
- package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
- package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
- package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
- package/dist/radio-group-CGC6DTFJ.mjs +0 -51
package/dist/Swiper.mjs
CHANGED
|
@@ -1,119 +1,125 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import
|
|
5
|
-
import { u as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { IconsFont as
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
2
|
+
import C, { useRef as lt, useEffect as X, useState as tt, useMemo as ut, Children as it, cloneElement as ft, useCallback as Q } from "react";
|
|
3
|
+
import { c as Y, g as ht } from "./_commonjsHelpers-CXJ7dpIk.mjs";
|
|
4
|
+
import B, { system as ct, css as P, th as rt, useTheme as gt } from "@xstyled/styled-components";
|
|
5
|
+
import { u as mt } from "./use-viewport-CfklieD-.mjs";
|
|
6
|
+
import { Button as pt } from "./Button.mjs";
|
|
7
|
+
import { IconsFont as ot } from "./IconsFont.mjs";
|
|
8
|
+
var et, st;
|
|
9
|
+
function wt() {
|
|
10
|
+
if (st) return et;
|
|
11
|
+
st = 1;
|
|
12
|
+
var i = "Expected a function", e = NaN, a = "[object Symbol]", f = /^\s+|\s+$/g, s = /^[-+]0x[0-9a-f]+$/i, d = /^0b[01]+$/i, g = /^0o[0-7]+$/i, S = parseInt, D = typeof Y == "object" && Y && Y.Object === Object && Y, L = typeof self == "object" && self && self.Object === Object && self, V = D || L || Function("return this")(), N = Object.prototype, z = N.toString, h = Math.max, H = Math.min, $ = function() {
|
|
13
|
+
return V.Date.now();
|
|
14
|
+
};
|
|
15
|
+
function T(t, r, u) {
|
|
16
|
+
var R, A, W, m, p, x, O = 0, J = !1, j = !1, G = !0;
|
|
17
|
+
if (typeof t != "function")
|
|
18
|
+
throw new TypeError(i);
|
|
19
|
+
r = M(r) || 0, y(u) && (J = !!u.leading, j = "maxWait" in u, W = j ? h(M(u.maxWait) || 0, r) : W, G = "trailing" in u ? !!u.trailing : G);
|
|
20
|
+
function K(n) {
|
|
21
|
+
var b = R, I = A;
|
|
22
|
+
return R = A = void 0, O = n, m = t.apply(I, b), m;
|
|
23
|
+
}
|
|
24
|
+
function E(n) {
|
|
25
|
+
return O = n, p = setTimeout(l, r), J ? K(n) : m;
|
|
26
|
+
}
|
|
27
|
+
function _(n) {
|
|
28
|
+
var b = n - x, I = n - O, Z = r - b;
|
|
29
|
+
return j ? H(Z, W - I) : Z;
|
|
30
|
+
}
|
|
31
|
+
function F(n) {
|
|
32
|
+
var b = n - x, I = n - O;
|
|
33
|
+
return x === void 0 || b >= r || b < 0 || j && I >= W;
|
|
34
|
+
}
|
|
35
|
+
function l() {
|
|
36
|
+
var n = $();
|
|
37
|
+
if (F(n))
|
|
38
|
+
return o(n);
|
|
39
|
+
p = setTimeout(l, _(n));
|
|
40
|
+
}
|
|
41
|
+
function o(n) {
|
|
42
|
+
return p = void 0, G && R ? K(n) : (R = A = void 0, m);
|
|
43
|
+
}
|
|
44
|
+
function c() {
|
|
45
|
+
p !== void 0 && clearTimeout(p), O = 0, R = x = A = p = void 0;
|
|
46
|
+
}
|
|
47
|
+
function w() {
|
|
48
|
+
return p === void 0 ? m : o($());
|
|
49
|
+
}
|
|
50
|
+
function v() {
|
|
51
|
+
var n = $(), b = F(n);
|
|
52
|
+
if (R = arguments, A = this, x = n, b) {
|
|
53
|
+
if (p === void 0)
|
|
54
|
+
return E(x);
|
|
55
|
+
if (j)
|
|
56
|
+
return p = setTimeout(l, r), K(x);
|
|
57
|
+
}
|
|
58
|
+
return p === void 0 && (p = setTimeout(l, r)), m;
|
|
59
|
+
}
|
|
60
|
+
return v.cancel = c, v.flush = w, v;
|
|
36
61
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
62
|
+
function y(t) {
|
|
63
|
+
var r = typeof t;
|
|
64
|
+
return !!t && (r == "object" || r == "function");
|
|
39
65
|
}
|
|
40
|
-
function
|
|
41
|
-
|
|
66
|
+
function U(t) {
|
|
67
|
+
return !!t && typeof t == "object";
|
|
42
68
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
69
|
+
function q(t) {
|
|
70
|
+
return typeof t == "symbol" || U(t) && z.call(t) == a;
|
|
45
71
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
function M(t) {
|
|
73
|
+
if (typeof t == "number")
|
|
74
|
+
return t;
|
|
75
|
+
if (q(t))
|
|
76
|
+
return e;
|
|
77
|
+
if (y(t)) {
|
|
78
|
+
var r = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
79
|
+
t = y(r) ? r + "" : r;
|
|
53
80
|
}
|
|
54
|
-
|
|
81
|
+
if (typeof t != "string")
|
|
82
|
+
return t === 0 ? t : +t;
|
|
83
|
+
t = t.replace(f, "");
|
|
84
|
+
var u = d.test(t);
|
|
85
|
+
return u || g.test(t) ? S(t.slice(2), u ? 2 : 8) : s.test(t) ? e : +t;
|
|
55
86
|
}
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
function q(t) {
|
|
59
|
-
var e = typeof t;
|
|
60
|
-
return !!t && (e == "object" || e == "function");
|
|
61
|
-
}
|
|
62
|
-
function Wt(t) {
|
|
63
|
-
return !!t && typeof t == "object";
|
|
87
|
+
return et = T, et;
|
|
64
88
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
if (q(t)) {
|
|
74
|
-
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
75
|
-
t = q(e) ? e + "" : e;
|
|
76
|
-
}
|
|
77
|
-
if (typeof t != "string")
|
|
78
|
-
return t === 0 ? t : +t;
|
|
79
|
-
t = t.replace(yt, "");
|
|
80
|
-
var n = St.test(t);
|
|
81
|
-
return n || xt.test(t) ? Pt(t.slice(2), n ? 2 : 8) : vt.test(t) ? et : +t;
|
|
82
|
-
}
|
|
83
|
-
var It = Tt;
|
|
84
|
-
const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
85
|
-
const n = rt();
|
|
86
|
-
z(() => {
|
|
87
|
-
n.current = t;
|
|
88
|
-
}, [t]), z(() => {
|
|
89
|
-
function o() {
|
|
90
|
-
n.current();
|
|
89
|
+
var bt = wt();
|
|
90
|
+
const $t = /* @__PURE__ */ ht(bt), yt = (i, e) => {
|
|
91
|
+
const a = lt();
|
|
92
|
+
X(() => {
|
|
93
|
+
a.current = i;
|
|
94
|
+
}, [i]), X(() => {
|
|
95
|
+
function f() {
|
|
96
|
+
a.current();
|
|
91
97
|
}
|
|
92
98
|
if (e !== null) {
|
|
93
|
-
const
|
|
94
|
-
return () => clearInterval(
|
|
99
|
+
const s = setInterval(f, e);
|
|
100
|
+
return () => clearInterval(s);
|
|
95
101
|
}
|
|
96
102
|
}, [e]);
|
|
97
|
-
},
|
|
103
|
+
}, k = (i = 3, e, a) => {
|
|
98
104
|
if (e === 0)
|
|
99
|
-
return `${100 /
|
|
100
|
-
const
|
|
101
|
-
return `calc(${100 /
|
|
102
|
-
},
|
|
105
|
+
return `${100 / i}%`;
|
|
106
|
+
const s = a(e * (i === 1 ? 4 : 2));
|
|
107
|
+
return `calc(${100 / i}% - ${s})`;
|
|
108
|
+
}, dt = B.div`
|
|
103
109
|
overflow-y: hidden;
|
|
104
110
|
position: relative;
|
|
105
111
|
width: 100%;
|
|
106
112
|
height: 100%;
|
|
107
113
|
|
|
108
|
-
${
|
|
109
|
-
`,
|
|
110
|
-
({ disabled:
|
|
114
|
+
${ct}
|
|
115
|
+
`, at = B(pt)(
|
|
116
|
+
({ disabled: i, withDarkUI: e, withNavigation: { desktop: a, mobile: f } }) => P`
|
|
111
117
|
top: 50%;
|
|
112
118
|
transform: translate3d(0, -50%, 0);
|
|
113
|
-
z-index: ${
|
|
114
|
-
display: ${
|
|
119
|
+
z-index: ${f ? 1 : -1};
|
|
120
|
+
display: ${f ? "flex" : "none"};
|
|
115
121
|
|
|
116
|
-
${!e &&
|
|
122
|
+
${!e && P`
|
|
117
123
|
background-color: neutral-10 !important;
|
|
118
124
|
|
|
119
125
|
&:hover {
|
|
@@ -122,17 +128,17 @@ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
|
122
128
|
`}
|
|
123
129
|
|
|
124
130
|
@media (min-width: md) {
|
|
125
|
-
z-index: ${
|
|
126
|
-
display: ${
|
|
131
|
+
z-index: ${a ? 1 : -1};
|
|
132
|
+
display: ${a ? "flex" : "none"};
|
|
127
133
|
}
|
|
128
134
|
|
|
129
|
-
${
|
|
135
|
+
${i && P`
|
|
130
136
|
opacity: 0;
|
|
131
137
|
z-index: -1;
|
|
132
138
|
`};
|
|
133
139
|
`
|
|
134
|
-
),
|
|
135
|
-
({ withPagination: { desktop:
|
|
140
|
+
), vt = B.divBox(
|
|
141
|
+
({ withPagination: { desktop: i, mobile: e } }) => P`
|
|
136
142
|
justify-content: center;
|
|
137
143
|
position: absolute;
|
|
138
144
|
bottom: 0;
|
|
@@ -143,24 +149,24 @@ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
|
143
149
|
display: ${e ? "flex" : "none"};
|
|
144
150
|
|
|
145
151
|
@media (min-width: md) {
|
|
146
|
-
z-index: ${
|
|
147
|
-
display: ${
|
|
152
|
+
z-index: ${i ? 1 : -1};
|
|
153
|
+
display: ${i ? "flex" : "none"};
|
|
148
154
|
}
|
|
149
155
|
`
|
|
150
|
-
),
|
|
151
|
-
({ active:
|
|
156
|
+
), St = B.div(
|
|
157
|
+
({ active: i, withDarkUI: e }) => P`
|
|
152
158
|
height: 10;
|
|
153
159
|
width: 10;
|
|
154
160
|
border-radius: 50%;
|
|
155
161
|
cursor: pointer;
|
|
156
162
|
margin: 0 xxs;
|
|
157
|
-
${
|
|
158
|
-
${e &&
|
|
159
|
-
background-color: ${
|
|
163
|
+
${i ? rt("swipers.navigation.bullet.active") : rt("swipers.navigation.bullet.default")}
|
|
164
|
+
${e && P`
|
|
165
|
+
background-color: ${i ? "neutral-90" : "neutral-50"};
|
|
160
166
|
`}
|
|
161
|
-
${
|
|
167
|
+
${ct}
|
|
162
168
|
`
|
|
163
|
-
),
|
|
169
|
+
), xt = B.ulBox(({ fullWidth: i, slidesPerView: { desktop: e, mobile: a, tablet: f }, spaceBetween: s, theme: d }) => P`
|
|
164
170
|
scroll-snap-type: x mandatory;
|
|
165
171
|
display: flex;
|
|
166
172
|
-webkit-overflow-scrolling: touch;
|
|
@@ -182,9 +188,9 @@ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
|
182
188
|
|
|
183
189
|
> * {
|
|
184
190
|
list-style-type: none;
|
|
185
|
-
margin-right: ${
|
|
186
|
-
min-width: ${
|
|
187
|
-
max-width: ${
|
|
191
|
+
margin-right: ${s};
|
|
192
|
+
min-width: ${k(a, s, d.toRem)};
|
|
193
|
+
max-width: ${k(a, s, d.toRem)};
|
|
188
194
|
flex: 1;
|
|
189
195
|
|
|
190
196
|
&:last-child {
|
|
@@ -193,12 +199,12 @@ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
|
193
199
|
}
|
|
194
200
|
|
|
195
201
|
@media (min-width: sm) {
|
|
196
|
-
${
|
|
202
|
+
${a && P`
|
|
197
203
|
> * {
|
|
198
|
-
min-width: ${
|
|
199
|
-
max-width: ${
|
|
204
|
+
min-width: ${k(a, s, d.toRem)};
|
|
205
|
+
max-width: ${k(a, s, d.toRem)};
|
|
200
206
|
|
|
201
|
-
&:nth-of-type(${
|
|
207
|
+
&:nth-of-type(${a}n + 1) {
|
|
202
208
|
scroll-snap-align: start;
|
|
203
209
|
}
|
|
204
210
|
}
|
|
@@ -206,12 +212,12 @@ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
|
206
212
|
}
|
|
207
213
|
|
|
208
214
|
@media (min-width: md) {
|
|
209
|
-
${
|
|
215
|
+
${f && P`
|
|
210
216
|
> * {
|
|
211
|
-
min-width: ${
|
|
212
|
-
max-width: ${
|
|
217
|
+
min-width: ${k(f, s, d.toRem)};
|
|
218
|
+
max-width: ${k(f, s, d.toRem)};
|
|
213
219
|
|
|
214
|
-
&:nth-of-type(${
|
|
220
|
+
&:nth-of-type(${f}n + 1) {
|
|
215
221
|
scroll-snap-align: start;
|
|
216
222
|
}
|
|
217
223
|
}
|
|
@@ -219,10 +225,10 @@ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
|
219
225
|
}
|
|
220
226
|
|
|
221
227
|
@media (min-width: lg) {
|
|
222
|
-
${e &&
|
|
228
|
+
${e && P`
|
|
223
229
|
> * {
|
|
224
|
-
min-width: ${
|
|
225
|
-
max-width: ${
|
|
230
|
+
min-width: ${k(e, s, d.toRem)};
|
|
231
|
+
max-width: ${k(e, s, d.toRem)};
|
|
226
232
|
|
|
227
233
|
scroll-snap-align: unset;
|
|
228
234
|
|
|
@@ -238,213 +244,213 @@ const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
|
238
244
|
}
|
|
239
245
|
|
|
240
246
|
@media (min-width: xl) {
|
|
241
|
-
${e &&
|
|
247
|
+
${e && i && P`
|
|
242
248
|
> * {
|
|
243
|
-
min-width: ${
|
|
244
|
-
max-width: ${
|
|
249
|
+
min-width: ${k(e + 2, s, d.toRem)};
|
|
250
|
+
max-width: ${k(e + 2, s, d.toRem)};
|
|
245
251
|
}
|
|
246
252
|
`}
|
|
247
253
|
}
|
|
248
|
-
`),
|
|
254
|
+
`), Ct = (i = {}) => {
|
|
249
255
|
const {
|
|
250
256
|
autoplay: e = !1,
|
|
251
|
-
centeredSlides:
|
|
252
|
-
duration:
|
|
253
|
-
firstSlideToShow:
|
|
254
|
-
fullWidth:
|
|
255
|
-
id:
|
|
256
|
-
loop:
|
|
257
|
-
navigationSize:
|
|
258
|
-
slidesPerView:
|
|
259
|
-
spaceBetween:
|
|
260
|
-
withDarkUI:
|
|
261
|
-
withNavigation:
|
|
262
|
-
withPagination:
|
|
263
|
-
} =
|
|
257
|
+
centeredSlides: a = !1,
|
|
258
|
+
duration: f = 5e3,
|
|
259
|
+
firstSlideToShow: s = 0,
|
|
260
|
+
fullWidth: d = !1,
|
|
261
|
+
id: g = "swiper",
|
|
262
|
+
loop: S = !1,
|
|
263
|
+
navigationSize: D = "md",
|
|
264
|
+
slidesPerView: L = { mobile: 1, tablet: 1, desktop: 1 },
|
|
265
|
+
spaceBetween: V = 20,
|
|
266
|
+
withDarkUI: N = !1,
|
|
267
|
+
withNavigation: z = { mobile: !0, desktop: !0 },
|
|
268
|
+
withPagination: h = { mobile: !1, desktop: !1 }
|
|
269
|
+
} = i, H = S || e, { width: $ } = mt(), [T, y] = tt(0), [U, q] = tt(!1), [M, t] = tt(!1), r = lt(), { screens: u } = gt(), R = ut(() => $ <= u.md ? L.mobile : $ <= u.lg ? L.tablet : $ >= u["4xl"] && d ? L.desktop + 2 : L.desktop, [d, $, u, L]);
|
|
264
270
|
return {
|
|
265
|
-
centeredSlides:
|
|
266
|
-
firstSlideToShow:
|
|
267
|
-
currentSlidesPerView:
|
|
268
|
-
currentPage:
|
|
269
|
-
setCurrentPage:
|
|
270
|
-
fullWidth:
|
|
271
|
-
id:
|
|
272
|
-
navigationSize:
|
|
273
|
-
slidesPerView:
|
|
274
|
-
spaceBetween:
|
|
275
|
-
withNavigation:
|
|
276
|
-
withPagination:
|
|
271
|
+
centeredSlides: a,
|
|
272
|
+
firstSlideToShow: s,
|
|
273
|
+
currentSlidesPerView: R,
|
|
274
|
+
currentPage: T,
|
|
275
|
+
setCurrentPage: y,
|
|
276
|
+
fullWidth: d,
|
|
277
|
+
id: g,
|
|
278
|
+
navigationSize: D,
|
|
279
|
+
slidesPerView: L,
|
|
280
|
+
spaceBetween: V,
|
|
281
|
+
withNavigation: z,
|
|
282
|
+
withPagination: h,
|
|
277
283
|
autoplay: e,
|
|
278
|
-
shouldLoop:
|
|
279
|
-
duration:
|
|
280
|
-
withDarkUI:
|
|
281
|
-
ref:
|
|
282
|
-
setShowLeftArrow:
|
|
283
|
-
setShowRightArrow:
|
|
284
|
-
showLeftArrow:
|
|
285
|
-
showRightArrow:
|
|
284
|
+
shouldLoop: H,
|
|
285
|
+
duration: f,
|
|
286
|
+
withDarkUI: N,
|
|
287
|
+
ref: r,
|
|
288
|
+
setShowLeftArrow: q,
|
|
289
|
+
setShowRightArrow: t,
|
|
290
|
+
showLeftArrow: U,
|
|
291
|
+
showRightArrow: M
|
|
286
292
|
};
|
|
287
|
-
},
|
|
293
|
+
}, Pt = ({ children: i, dataTestId: e, store: a, ...f }) => {
|
|
288
294
|
const {
|
|
289
|
-
autoplay:
|
|
290
|
-
centeredSlides:
|
|
291
|
-
currentPage:
|
|
292
|
-
currentSlidesPerView:
|
|
293
|
-
duration:
|
|
294
|
-
firstSlideToShow:
|
|
295
|
-
fullWidth:
|
|
296
|
-
id:
|
|
297
|
-
navigationSize:
|
|
298
|
-
ref:
|
|
299
|
-
setCurrentPage:
|
|
300
|
-
setShowLeftArrow:
|
|
301
|
-
setShowRightArrow:
|
|
302
|
-
shouldLoop:
|
|
303
|
-
showLeftArrow:
|
|
304
|
-
showRightArrow:
|
|
305
|
-
slidesPerView:
|
|
306
|
-
spaceBetween:
|
|
307
|
-
withDarkUI:
|
|
308
|
-
withNavigation:
|
|
309
|
-
withPagination:
|
|
310
|
-
} =
|
|
311
|
-
const
|
|
312
|
-
return
|
|
313
|
-
...
|
|
314
|
-
id:
|
|
315
|
-
key:
|
|
316
|
-
"aria-hidden":
|
|
295
|
+
autoplay: s,
|
|
296
|
+
centeredSlides: d,
|
|
297
|
+
currentPage: g,
|
|
298
|
+
currentSlidesPerView: S,
|
|
299
|
+
duration: D,
|
|
300
|
+
firstSlideToShow: L,
|
|
301
|
+
fullWidth: V,
|
|
302
|
+
id: N,
|
|
303
|
+
navigationSize: z,
|
|
304
|
+
ref: h,
|
|
305
|
+
setCurrentPage: H,
|
|
306
|
+
setShowLeftArrow: $,
|
|
307
|
+
setShowRightArrow: T,
|
|
308
|
+
shouldLoop: y,
|
|
309
|
+
showLeftArrow: U,
|
|
310
|
+
showRightArrow: q,
|
|
311
|
+
slidesPerView: M,
|
|
312
|
+
spaceBetween: t,
|
|
313
|
+
withDarkUI: r,
|
|
314
|
+
withNavigation: u,
|
|
315
|
+
withPagination: R
|
|
316
|
+
} = a, A = it.toArray(i).length, W = Math.ceil(A / S), m = Array.from(Array(W).keys()), p = g === 0, x = g === m.length - 1, O = it.map(i, (l, o) => {
|
|
317
|
+
const c = `${N}-${o}`, w = o + 1, v = Math.ceil(w / S) - 1, n = x ? A - w >= S : v !== g;
|
|
318
|
+
return ft(l, {
|
|
319
|
+
...l.props,
|
|
320
|
+
id: c,
|
|
321
|
+
key: c,
|
|
322
|
+
"aria-hidden": n,
|
|
317
323
|
"aria-roledescription": "slide",
|
|
318
|
-
"aria-label": `${
|
|
324
|
+
"aria-label": `${w} of ${A}`
|
|
319
325
|
});
|
|
320
|
-
}),
|
|
326
|
+
}), J = d ? (
|
|
321
327
|
// if centeredSlides is true, we calculate which number is the middle page
|
|
322
|
-
Math.floor(
|
|
328
|
+
Math.floor(W / 2)
|
|
323
329
|
) : (
|
|
324
330
|
// if centeredSlides is false, we calculate on which page the number in firstSlideToShow props is
|
|
325
|
-
Math.ceil(
|
|
326
|
-
),
|
|
327
|
-
const
|
|
328
|
-
if (
|
|
329
|
-
const { offsetWidth:
|
|
330
|
-
|
|
331
|
+
Math.ceil(L / S) - 1
|
|
332
|
+
), j = Q(() => {
|
|
333
|
+
const l = h == null ? void 0 : h.current;
|
|
334
|
+
if (l && !y) {
|
|
335
|
+
const { offsetWidth: o, scrollLeft: c, scrollWidth: w } = l, v = !(c > t), n = !(w - (c + o) > t);
|
|
336
|
+
$(!v), T(!n);
|
|
331
337
|
} else
|
|
332
|
-
|
|
333
|
-
}, [
|
|
334
|
-
var
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
337
|
-
const { children:
|
|
338
|
-
|
|
338
|
+
$(!0), T(!0);
|
|
339
|
+
}, [h, $, T, y, t]), G = () => {
|
|
340
|
+
var o, c;
|
|
341
|
+
const l = h == null ? void 0 : h.current;
|
|
342
|
+
if (l) {
|
|
343
|
+
const { children: w, offsetWidth: v, scrollLeft: n, scrollWidth: b } = l, I = (c = (o = w == null ? void 0 : w[0]) == null ? void 0 : o.getBoundingClientRect()) == null ? void 0 : c.width, nt = !(b - (n + v) > t) ? m.length - 1 : Math.round(n / ((I + t) * S));
|
|
344
|
+
nt !== g && H(nt);
|
|
339
345
|
}
|
|
340
|
-
},
|
|
341
|
-
|
|
342
|
-
}, 100),
|
|
343
|
-
(
|
|
344
|
-
var
|
|
345
|
-
const
|
|
346
|
-
|
|
347
|
-
left:
|
|
346
|
+
}, K = $t(() => {
|
|
347
|
+
j(), G();
|
|
348
|
+
}, 100), E = Q(
|
|
349
|
+
(l, o = !1) => {
|
|
350
|
+
var v, n, b;
|
|
351
|
+
const c = h == null ? void 0 : h.current, w = (b = (n = (v = c == null ? void 0 : c.children) == null ? void 0 : v[0]) == null ? void 0 : n.getBoundingClientRect()) == null ? void 0 : b.width;
|
|
352
|
+
c == null || c.scrollTo({
|
|
353
|
+
left: l * (w + t) * S,
|
|
348
354
|
top: 0,
|
|
349
355
|
// We don't want to have a scroll effect when we first render the swiper
|
|
350
|
-
behavior:
|
|
356
|
+
behavior: o ? "auto" : "smooth"
|
|
351
357
|
});
|
|
352
358
|
},
|
|
353
|
-
[
|
|
354
|
-
),
|
|
355
|
-
|
|
356
|
-
}, [
|
|
357
|
-
|
|
358
|
-
}, [
|
|
359
|
-
return
|
|
359
|
+
[S, t, h]
|
|
360
|
+
), _ = Q(() => {
|
|
361
|
+
E(y && x ? 0 : g + 1);
|
|
362
|
+
}, [g, E, x, y]), F = Q(() => {
|
|
363
|
+
E(p && y ? m.length - 1 : g - 1);
|
|
364
|
+
}, [m.length, g, E, p, y]);
|
|
365
|
+
return yt(
|
|
360
366
|
() => {
|
|
361
|
-
|
|
367
|
+
s && _();
|
|
362
368
|
},
|
|
363
|
-
|
|
364
|
-
),
|
|
365
|
-
const
|
|
366
|
-
|
|
369
|
+
s ? D : null
|
|
370
|
+
), X(() => {
|
|
371
|
+
const l = (o) => {
|
|
372
|
+
o.code === "ArrowLeft" && F(), o.code === "ArrowRight" && _();
|
|
367
373
|
};
|
|
368
|
-
return window.addEventListener("keydown",
|
|
369
|
-
}, [
|
|
370
|
-
|
|
371
|
-
}, []),
|
|
372
|
-
|
|
373
|
-
}, [
|
|
374
|
-
|
|
374
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
375
|
+
}, [F, _]), X(() => {
|
|
376
|
+
E(J, !0);
|
|
377
|
+
}, []), X(() => {
|
|
378
|
+
j();
|
|
379
|
+
}, [j, i]), /* @__PURE__ */ C.createElement(dt, { "data-testid": e, ...f }, /* @__PURE__ */ C.createElement(
|
|
380
|
+
xt,
|
|
375
381
|
{
|
|
376
|
-
fullWidth:
|
|
377
|
-
onScroll:
|
|
378
|
-
ref:
|
|
379
|
-
slidesPerView:
|
|
380
|
-
spaceBetween:
|
|
382
|
+
fullWidth: V,
|
|
383
|
+
onScroll: K,
|
|
384
|
+
ref: h,
|
|
385
|
+
slidesPerView: M,
|
|
386
|
+
spaceBetween: t
|
|
381
387
|
},
|
|
382
|
-
|
|
383
|
-
), /* @__PURE__ */
|
|
384
|
-
|
|
388
|
+
O
|
|
389
|
+
), /* @__PURE__ */ C.createElement(
|
|
390
|
+
at,
|
|
385
391
|
{
|
|
386
392
|
"aria-label": "Previous slide",
|
|
387
393
|
"data-testid": e && `${e}-prev-button`,
|
|
388
|
-
disabled: !
|
|
394
|
+
disabled: !U,
|
|
389
395
|
left: 10,
|
|
390
|
-
onClick:
|
|
396
|
+
onClick: F,
|
|
391
397
|
position: "absolute",
|
|
392
398
|
shape: "circle",
|
|
393
|
-
size:
|
|
394
|
-
variant:
|
|
395
|
-
withDarkUI:
|
|
396
|
-
withNavigation:
|
|
399
|
+
size: z,
|
|
400
|
+
variant: r ? "secondary" : "ghost",
|
|
401
|
+
withDarkUI: r,
|
|
402
|
+
withNavigation: u
|
|
397
403
|
},
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
), /* @__PURE__ */
|
|
400
|
-
|
|
404
|
+
/* @__PURE__ */ C.createElement(ot.Left, null)
|
|
405
|
+
), /* @__PURE__ */ C.createElement(
|
|
406
|
+
at,
|
|
401
407
|
{
|
|
402
408
|
"aria-label": "Next slide",
|
|
403
409
|
"data-testid": e && `${e}-next-button`,
|
|
404
|
-
disabled: !
|
|
405
|
-
onClick:
|
|
410
|
+
disabled: !q,
|
|
411
|
+
onClick: _,
|
|
406
412
|
position: "absolute",
|
|
407
413
|
right: 10,
|
|
408
414
|
shape: "circle",
|
|
409
|
-
size:
|
|
410
|
-
variant:
|
|
411
|
-
withDarkUI:
|
|
412
|
-
withNavigation:
|
|
415
|
+
size: z,
|
|
416
|
+
variant: r ? "secondary" : "ghost",
|
|
417
|
+
withDarkUI: r,
|
|
418
|
+
withNavigation: u
|
|
413
419
|
},
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
), /* @__PURE__ */
|
|
416
|
-
|
|
420
|
+
/* @__PURE__ */ C.createElement(ot.Right, null)
|
|
421
|
+
), /* @__PURE__ */ C.createElement(
|
|
422
|
+
vt,
|
|
417
423
|
{
|
|
418
424
|
className: "swiper-pagination",
|
|
419
425
|
"data-testid": e && `${e}-pagination`,
|
|
420
426
|
role: "tablist",
|
|
421
|
-
withPagination:
|
|
427
|
+
withPagination: R
|
|
422
428
|
},
|
|
423
|
-
|
|
424
|
-
const
|
|
425
|
-
idx:
|
|
429
|
+
m.length > 1 && m.map((l, o) => {
|
|
430
|
+
const c = {
|
|
431
|
+
idx: o,
|
|
426
432
|
role: "tab",
|
|
427
|
-
"aria-controls": `${
|
|
428
|
-
"aria-label": `${
|
|
429
|
-
"aria-selected":
|
|
430
|
-
onClick: () =>
|
|
433
|
+
"aria-controls": `${N}-${o}`,
|
|
434
|
+
"aria-label": `${o + 1} of ${m.length}`,
|
|
435
|
+
"aria-selected": o === g,
|
|
436
|
+
onClick: () => E(o)
|
|
431
437
|
};
|
|
432
|
-
return /* @__PURE__ */
|
|
433
|
-
|
|
438
|
+
return /* @__PURE__ */ C.createElement(
|
|
439
|
+
St,
|
|
434
440
|
{
|
|
435
|
-
active:
|
|
436
|
-
key: `bullet-${
|
|
437
|
-
withDarkUI:
|
|
438
|
-
...
|
|
441
|
+
active: o === g,
|
|
442
|
+
key: `bullet-${o + 1}`,
|
|
443
|
+
withDarkUI: r,
|
|
444
|
+
...c
|
|
439
445
|
}
|
|
440
446
|
);
|
|
441
447
|
})
|
|
442
448
|
));
|
|
443
449
|
};
|
|
444
|
-
|
|
445
|
-
const
|
|
450
|
+
Pt.displayName = "Swiper";
|
|
451
|
+
const Tt = dt;
|
|
446
452
|
export {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
453
|
+
Tt as StyledSwiper,
|
|
454
|
+
Pt as Swiper,
|
|
455
|
+
Ct as useSwiper
|
|
450
456
|
};
|