welcome-ui 10.1.2 → 10.1.4
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/Field.js +23 -23
- package/dist/Swiper.js +276 -261
- package/dist/Tag.js +10 -9
- package/dist/types/components/Field/types.d.ts +3 -3
- package/dist/types/components/Label/types.d.ts +0 -1
- package/dist/types/components/Radio/types.d.ts +1 -1
- package/dist/types/components/Swiper/components/SwiperSlides.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +2 -0
- package/dist/types/components/Swiper/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/Field.js
CHANGED
|
@@ -14,44 +14,44 @@ const W = "_root_1sq1k_2", z = "_label_1sq1k_8", E = "_hint_1sq1k_8", G = "_inli
|
|
|
14
14
|
"hint-max-length": "_hint-max-length_1sq1k_46",
|
|
15
15
|
visuallyHidden: J
|
|
16
16
|
}, h = S(K), y = C({
|
|
17
|
-
getInputProps: (
|
|
17
|
+
getInputProps: (n) => n,
|
|
18
18
|
hintID: "",
|
|
19
19
|
labelID: "",
|
|
20
20
|
variant: void 0
|
|
21
21
|
});
|
|
22
|
-
function _(
|
|
22
|
+
function _(n) {
|
|
23
23
|
const o = A();
|
|
24
|
-
return
|
|
24
|
+
return n || o;
|
|
25
25
|
}
|
|
26
26
|
function P() {
|
|
27
27
|
return L(y);
|
|
28
28
|
}
|
|
29
|
-
const O = T((
|
|
29
|
+
const O = T((n, o) => {
|
|
30
30
|
const {
|
|
31
31
|
children: I,
|
|
32
|
-
className:
|
|
32
|
+
className: N,
|
|
33
33
|
disabled: d,
|
|
34
34
|
error: f,
|
|
35
35
|
hideLabel: g,
|
|
36
36
|
hint: D,
|
|
37
|
-
hintProps:
|
|
38
|
-
id:
|
|
37
|
+
hintProps: a,
|
|
38
|
+
id: p,
|
|
39
39
|
inline: q,
|
|
40
40
|
label: F,
|
|
41
|
-
labelProps:
|
|
41
|
+
labelProps: i,
|
|
42
42
|
maxLength: e,
|
|
43
43
|
required: c,
|
|
44
44
|
success: v,
|
|
45
45
|
warning: x,
|
|
46
46
|
...k
|
|
47
|
-
} =
|
|
47
|
+
} = n, t = f ? "danger" : v ? "success" : x ? "warning" : void 0, l = f ?? x ?? v ?? D ?? (e ? `${new Intl.NumberFormat().format(e.count)} / ${new Intl.NumberFormat().format(e.max)}` : void 0), s = _(i == null ? void 0 : i.id), r = _(a == null ? void 0 : a.id), m = _(p), H = $(
|
|
48
48
|
() => ({
|
|
49
49
|
getInputProps(u) {
|
|
50
|
-
const j = [u["aria-describedby"], l &&
|
|
50
|
+
const j = [u["aria-describedby"], l && r].filter(Boolean).join(" ") || void 0, B = [u["aria-labelledby"], s].filter(Boolean).join(" ");
|
|
51
51
|
return {
|
|
52
52
|
...u,
|
|
53
53
|
"aria-describedby": j,
|
|
54
|
-
"aria-invalid":
|
|
54
|
+
"aria-invalid": t === "danger" ? !0 : void 0,
|
|
55
55
|
"aria-labelledby": B,
|
|
56
56
|
disabled: d,
|
|
57
57
|
id: m,
|
|
@@ -62,23 +62,23 @@ const O = T((i, o) => {
|
|
|
62
62
|
required: c
|
|
63
63
|
};
|
|
64
64
|
},
|
|
65
|
-
hintID:
|
|
66
|
-
labelID:
|
|
67
|
-
variant:
|
|
65
|
+
hintID: r,
|
|
66
|
+
labelID: s,
|
|
67
|
+
variant: t
|
|
68
68
|
}),
|
|
69
|
-
[
|
|
69
|
+
[r, s, t, l, d, m, e == null ? void 0 : e.max, c]
|
|
70
70
|
);
|
|
71
|
-
return /* @__PURE__ */ w("div", { ref: o, ...k, className: h("root", q && "inline",
|
|
71
|
+
return /* @__PURE__ */ w("div", { ref: o, ...k, className: h("root", q && "inline", N), children: [
|
|
72
72
|
/* @__PURE__ */ b(
|
|
73
73
|
R,
|
|
74
74
|
{
|
|
75
|
-
className: h("label", g && "visuallyHidden"),
|
|
76
75
|
disabled: d,
|
|
77
76
|
htmlFor: m,
|
|
78
|
-
id:
|
|
77
|
+
id: s,
|
|
79
78
|
required: c,
|
|
80
|
-
variant:
|
|
81
|
-
...
|
|
79
|
+
variant: t,
|
|
80
|
+
...i,
|
|
81
|
+
className: h("label", g && "visuallyHidden", i == null ? void 0 : i.className),
|
|
82
82
|
children: F
|
|
83
83
|
}
|
|
84
84
|
),
|
|
@@ -87,9 +87,9 @@ const O = T((i, o) => {
|
|
|
87
87
|
M,
|
|
88
88
|
{
|
|
89
89
|
className: h("hint", !!e && "hint-max-length"),
|
|
90
|
-
id:
|
|
91
|
-
variant:
|
|
92
|
-
...
|
|
90
|
+
id: r,
|
|
91
|
+
variant: t,
|
|
92
|
+
...a,
|
|
93
93
|
children: l
|
|
94
94
|
}
|
|
95
95
|
) : null
|
package/dist/Swiper.js
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Swiper.css';
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { a as
|
|
5
|
-
import { useEffect as
|
|
3
|
+
import { jsx as W } from "react/jsx-runtime";
|
|
4
|
+
import { a as G, g as fo, c as K } from "./index-PAaZGbyz.js";
|
|
5
|
+
import { useEffect as j, useLayoutEffect as uo, useState as A, useRef as Z, Children as co, cloneElement as po, createContext as mo, useContext as ko, useMemo as oo, useCallback as F } from "react";
|
|
6
6
|
import { Button as io } from "./Button.js";
|
|
7
7
|
import { Icon as lo } from "./Icon.js";
|
|
8
8
|
var Y, no;
|
|
9
9
|
function xo() {
|
|
10
10
|
if (no) return Y;
|
|
11
11
|
no = 1;
|
|
12
|
-
var r = "Expected a function",
|
|
13
|
-
return
|
|
12
|
+
var r = "Expected a function", n = NaN, i = "[object Symbol]", t = /^\s+|\s+$/g, a = /^[-+]0x[0-9a-f]+$/i, b = /^0b[01]+$/i, e = /^0o[0-7]+$/i, c = parseInt, m = typeof G == "object" && G && G.Object === Object && G, d = typeof self == "object" && self && self.Object === Object && self, g = m || d || Function("return this")(), y = Object.prototype, E = y.toString, I = Math.max, $ = Math.min, h = function() {
|
|
13
|
+
return g.Date.now();
|
|
14
14
|
};
|
|
15
|
-
function N(
|
|
16
|
-
var
|
|
17
|
-
if (typeof
|
|
15
|
+
function N(o, f, k) {
|
|
16
|
+
var v, P, B, O, l, p, u = 0, L = !1, z = !1, S = !0;
|
|
17
|
+
if (typeof o != "function")
|
|
18
18
|
throw new TypeError(r);
|
|
19
|
-
|
|
20
|
-
function V(
|
|
21
|
-
var
|
|
22
|
-
return
|
|
19
|
+
f = C(f) || 0, w(k) && (L = !!k.leading, z = "maxWait" in k, B = z ? I(C(k.maxWait) || 0, f) : B, S = "trailing" in k ? !!k.trailing : S);
|
|
20
|
+
function V(s) {
|
|
21
|
+
var T = v, R = P;
|
|
22
|
+
return v = P = void 0, u = s, O = o.apply(R, T), O;
|
|
23
23
|
}
|
|
24
|
-
function J(
|
|
25
|
-
return
|
|
24
|
+
function J(s) {
|
|
25
|
+
return u = s, l = setTimeout(q, f), L ? V(s) : O;
|
|
26
26
|
}
|
|
27
|
-
function ro(
|
|
28
|
-
var
|
|
29
|
-
return
|
|
27
|
+
function ro(s) {
|
|
28
|
+
var T = s - p, R = s - u, to = f - T;
|
|
29
|
+
return z ? $(to, B - R) : to;
|
|
30
30
|
}
|
|
31
|
-
function D(
|
|
32
|
-
var
|
|
33
|
-
return
|
|
31
|
+
function D(s) {
|
|
32
|
+
var T = s - p, R = s - u;
|
|
33
|
+
return p === void 0 || T >= f || T < 0 || z && R >= B;
|
|
34
34
|
}
|
|
35
35
|
function q() {
|
|
36
|
-
var
|
|
37
|
-
if (D(
|
|
38
|
-
return ao(
|
|
39
|
-
|
|
36
|
+
var s = h();
|
|
37
|
+
if (D(s))
|
|
38
|
+
return ao(s);
|
|
39
|
+
l = setTimeout(q, ro(s));
|
|
40
40
|
}
|
|
41
|
-
function ao(
|
|
42
|
-
return
|
|
41
|
+
function ao(s) {
|
|
42
|
+
return l = void 0, S && v ? V(s) : (v = P = void 0, O);
|
|
43
43
|
}
|
|
44
44
|
function go() {
|
|
45
|
-
|
|
45
|
+
l !== void 0 && clearTimeout(l), u = 0, v = p = P = l = void 0;
|
|
46
46
|
}
|
|
47
47
|
function so() {
|
|
48
|
-
return
|
|
48
|
+
return l === void 0 ? O : ao(h());
|
|
49
49
|
}
|
|
50
50
|
function Q() {
|
|
51
|
-
var
|
|
52
|
-
if (
|
|
53
|
-
if (
|
|
54
|
-
return J(
|
|
55
|
-
if (
|
|
56
|
-
return
|
|
51
|
+
var s = h(), T = D(s);
|
|
52
|
+
if (v = arguments, P = this, p = s, T) {
|
|
53
|
+
if (l === void 0)
|
|
54
|
+
return J(p);
|
|
55
|
+
if (z)
|
|
56
|
+
return l = setTimeout(q, f), V(p);
|
|
57
57
|
}
|
|
58
|
-
return
|
|
58
|
+
return l === void 0 && (l = setTimeout(q, f)), O;
|
|
59
59
|
}
|
|
60
60
|
return Q.cancel = go, Q.flush = so, Q;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
var
|
|
64
|
-
return !!
|
|
62
|
+
function w(o) {
|
|
63
|
+
var f = typeof o;
|
|
64
|
+
return !!o && (f == "object" || f == "function");
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return !!
|
|
66
|
+
function _(o) {
|
|
67
|
+
return !!o && typeof o == "object";
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
return typeof
|
|
69
|
+
function M(o) {
|
|
70
|
+
return typeof o == "symbol" || _(o) && E.call(o) == i;
|
|
71
71
|
}
|
|
72
|
-
function
|
|
73
|
-
if (typeof
|
|
74
|
-
return
|
|
75
|
-
if (
|
|
76
|
-
return
|
|
77
|
-
if (
|
|
78
|
-
var
|
|
79
|
-
|
|
72
|
+
function C(o) {
|
|
73
|
+
if (typeof o == "number")
|
|
74
|
+
return o;
|
|
75
|
+
if (M(o))
|
|
76
|
+
return n;
|
|
77
|
+
if (w(o)) {
|
|
78
|
+
var f = typeof o.valueOf == "function" ? o.valueOf() : o;
|
|
79
|
+
o = w(f) ? f + "" : f;
|
|
80
80
|
}
|
|
81
|
-
if (typeof
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
var
|
|
85
|
-
return
|
|
81
|
+
if (typeof o != "string")
|
|
82
|
+
return o === 0 ? o : +o;
|
|
83
|
+
o = o.replace(t, "");
|
|
84
|
+
var k = b.test(o);
|
|
85
|
+
return k || e.test(o) ? c(o.slice(2), k ? 2 : 8) : a.test(o) ? n : +o;
|
|
86
86
|
}
|
|
87
87
|
return Y = N, Y;
|
|
88
88
|
}
|
|
@@ -1874,27 +1874,32 @@ const wo = /* @__PURE__ */ fo(ho), yo = {
|
|
|
1874
1874
|
transparent var(--pattern-grid-size)
|
|
1875
1875
|
)`
|
|
1876
1876
|
}, vo = Object.entries(yo).reduce(
|
|
1877
|
-
(r, [
|
|
1878
|
-
if (
|
|
1879
|
-
const
|
|
1880
|
-
r[
|
|
1877
|
+
(r, [n, i]) => {
|
|
1878
|
+
if (n.startsWith("--breakpoint-")) {
|
|
1879
|
+
const t = n.replace("--breakpoint-", "");
|
|
1880
|
+
r[t] = i;
|
|
1881
1881
|
}
|
|
1882
1882
|
return r;
|
|
1883
1883
|
},
|
|
1884
1884
|
{}
|
|
1885
1885
|
);
|
|
1886
1886
|
function zo() {
|
|
1887
|
-
return Object.entries(vo).reduce((r, [
|
|
1887
|
+
return Object.entries(vo).reduce((r, [n, i]) => (r[n] = Number(i.replace("px", "")), r), {});
|
|
1888
1888
|
}
|
|
1889
|
-
const So = typeof window > "u" ?
|
|
1889
|
+
const So = typeof window > "u" ? j : uo;
|
|
1890
1890
|
function _o() {
|
|
1891
|
-
const [r,
|
|
1891
|
+
const [r, n] = A({ height: void 0, width: void 0 }), i = ({ height: t, width: a }) => {
|
|
1892
|
+
let b;
|
|
1893
|
+
clearTimeout(b), b = setTimeout(() => {
|
|
1894
|
+
n({ height: t, width: a });
|
|
1895
|
+
}, 300);
|
|
1896
|
+
};
|
|
1892
1897
|
return So(() => {
|
|
1893
|
-
t
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
}
|
|
1897
|
-
return
|
|
1898
|
+
const t = new ResizeObserver(([a]) => {
|
|
1899
|
+
const { blockSize: b, inlineSize: e } = a.contentBoxSize[0];
|
|
1900
|
+
i({ height: b, width: e });
|
|
1901
|
+
});
|
|
1902
|
+
return t.observe(document.documentElement), () => t.disconnect();
|
|
1898
1903
|
}, []), r;
|
|
1899
1904
|
}
|
|
1900
1905
|
const Po = "_root_103s3_3", Lo = "_container_103s3_9", Io = "_arrow_103s3_74", U = {
|
|
@@ -1913,145 +1918,146 @@ const Po = "_root_103s3_3", Lo = "_container_103s3_9", Io = "_arrow_103s3_74", U
|
|
|
1913
1918
|
"arrow-background": "_arrow-background_103s3_101"
|
|
1914
1919
|
}, Oo = K(U), Vo = ({
|
|
1915
1920
|
children: r,
|
|
1916
|
-
className:
|
|
1917
|
-
placement:
|
|
1918
|
-
size:
|
|
1919
|
-
variant:
|
|
1920
|
-
...
|
|
1921
|
+
className: n,
|
|
1922
|
+
placement: i = "side",
|
|
1923
|
+
size: t = "md",
|
|
1924
|
+
variant: a,
|
|
1925
|
+
...b
|
|
1921
1926
|
}) => {
|
|
1922
1927
|
const {
|
|
1923
|
-
navigation: { desktop:
|
|
1928
|
+
navigation: { desktop: e, goNext: c, isNextDisabled: m, mobile: d }
|
|
1924
1929
|
} = eo();
|
|
1925
|
-
return /* @__PURE__ */
|
|
1930
|
+
return /* @__PURE__ */ W(
|
|
1926
1931
|
io,
|
|
1927
1932
|
{
|
|
1928
1933
|
"aria-label": "Next slide",
|
|
1929
1934
|
className: Oo(
|
|
1930
1935
|
"arrow",
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
+
e && "arrow-desktop",
|
|
1937
|
+
d && "arrow-mobile",
|
|
1938
|
+
i === "side" && "arrow-placement-side",
|
|
1939
|
+
i === "side" && "arrow-placement-side-right",
|
|
1940
|
+
n
|
|
1936
1941
|
),
|
|
1937
|
-
disabled:
|
|
1938
|
-
onClick:
|
|
1939
|
-
size:
|
|
1940
|
-
variant:
|
|
1941
|
-
...
|
|
1942
|
-
children: r ?? /* @__PURE__ */
|
|
1942
|
+
disabled: m,
|
|
1943
|
+
onClick: c,
|
|
1944
|
+
size: t,
|
|
1945
|
+
variant: a ?? "secondary",
|
|
1946
|
+
...b,
|
|
1947
|
+
children: r ?? /* @__PURE__ */ W(lo, { name: "angle-right-b" })
|
|
1943
1948
|
}
|
|
1944
1949
|
);
|
|
1945
|
-
},
|
|
1950
|
+
}, To = K(U), jo = ({
|
|
1946
1951
|
children: r,
|
|
1947
|
-
className:
|
|
1948
|
-
placement:
|
|
1949
|
-
size:
|
|
1950
|
-
variant:
|
|
1951
|
-
...
|
|
1952
|
+
className: n,
|
|
1953
|
+
placement: i = "side",
|
|
1954
|
+
size: t = "md",
|
|
1955
|
+
variant: a,
|
|
1956
|
+
...b
|
|
1952
1957
|
}) => {
|
|
1953
1958
|
const {
|
|
1954
|
-
navigation: { desktop:
|
|
1959
|
+
navigation: { desktop: e, goPrev: c, isPrevDisabled: m, mobile: d }
|
|
1955
1960
|
} = eo();
|
|
1956
|
-
return /* @__PURE__ */
|
|
1961
|
+
return /* @__PURE__ */ W(
|
|
1957
1962
|
io,
|
|
1958
1963
|
{
|
|
1959
1964
|
"aria-label": "Previous slide",
|
|
1960
|
-
className:
|
|
1965
|
+
className: To(
|
|
1961
1966
|
"arrow",
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
+
e && "arrow-mobile",
|
|
1968
|
+
d && "arrow-desktop",
|
|
1969
|
+
i === "side" && "arrow-placement-side",
|
|
1970
|
+
i === "side" && "arrow-placement-side-left",
|
|
1971
|
+
n
|
|
1967
1972
|
),
|
|
1968
|
-
disabled:
|
|
1969
|
-
onClick:
|
|
1970
|
-
size:
|
|
1971
|
-
variant:
|
|
1972
|
-
...
|
|
1973
|
-
children: r ?? /* @__PURE__ */
|
|
1973
|
+
disabled: m,
|
|
1974
|
+
onClick: c,
|
|
1975
|
+
size: t,
|
|
1976
|
+
variant: a ?? "secondary",
|
|
1977
|
+
...b,
|
|
1978
|
+
children: r ?? /* @__PURE__ */ W(lo, { name: "angle-left-b" })
|
|
1974
1979
|
}
|
|
1975
1980
|
);
|
|
1976
|
-
}, No = (r,
|
|
1977
|
-
const
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
}, [r]),
|
|
1981
|
-
function
|
|
1982
|
-
|
|
1981
|
+
}, No = (r, n) => {
|
|
1982
|
+
const i = Z();
|
|
1983
|
+
j(() => {
|
|
1984
|
+
i.current = r;
|
|
1985
|
+
}, [r]), j(() => {
|
|
1986
|
+
function t() {
|
|
1987
|
+
i.current();
|
|
1983
1988
|
}
|
|
1984
|
-
if (
|
|
1985
|
-
const
|
|
1986
|
-
return () => clearInterval(
|
|
1989
|
+
if (n !== null) {
|
|
1990
|
+
const a = setInterval(t, n);
|
|
1991
|
+
return () => clearInterval(a);
|
|
1987
1992
|
}
|
|
1988
|
-
}, [
|
|
1989
|
-
},
|
|
1990
|
-
if (
|
|
1993
|
+
}, [n]);
|
|
1994
|
+
}, H = (r, n) => {
|
|
1995
|
+
if (n === 0)
|
|
1991
1996
|
return `${100 / r}%`;
|
|
1992
|
-
const
|
|
1993
|
-
return `calc(${100 / r}% - ${
|
|
1994
|
-
},
|
|
1997
|
+
const t = n * (r === 1 ? 4 : 2) / 16;
|
|
1998
|
+
return `calc(${100 / r}% - ${t}rem)`;
|
|
1999
|
+
}, Co = K(U), Wo = ({ children: r, className: n }) => {
|
|
1995
2000
|
const {
|
|
1996
2001
|
slides: {
|
|
1997
|
-
currentPage:
|
|
1998
|
-
currentSlidesPerView:
|
|
1999
|
-
expandOnLargeScreens:
|
|
2000
|
-
gap:
|
|
2001
|
-
handleScroll:
|
|
2002
|
-
id:
|
|
2003
|
-
isLastPage:
|
|
2004
|
-
length:
|
|
2005
|
-
perView:
|
|
2006
|
-
ref:
|
|
2007
|
-
setLength:
|
|
2002
|
+
currentPage: i,
|
|
2003
|
+
currentSlidesPerView: t,
|
|
2004
|
+
expandOnLargeScreens: a,
|
|
2005
|
+
gap: b,
|
|
2006
|
+
handleScroll: e,
|
|
2007
|
+
id: c,
|
|
2008
|
+
isLastPage: m,
|
|
2009
|
+
length: d,
|
|
2010
|
+
perView: g,
|
|
2011
|
+
ref: y,
|
|
2012
|
+
setLength: E
|
|
2008
2013
|
}
|
|
2009
|
-
} = eo(),
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
}, [
|
|
2013
|
-
const $ = co.map(
|
|
2014
|
-
const
|
|
2015
|
-
return typeof
|
|
2016
|
-
...
|
|
2017
|
-
"aria-hidden":
|
|
2018
|
-
"aria-label": `${
|
|
2014
|
+
} = eo(), I = co.toArray(r);
|
|
2015
|
+
j(() => {
|
|
2016
|
+
E(I.length);
|
|
2017
|
+
}, [I.length, E]);
|
|
2018
|
+
const $ = co.map(I, (h, N) => {
|
|
2019
|
+
const w = `${c}-${N}`, _ = N + 1, M = Math.ceil(_ / t) - 1, C = m ? d - _ >= t : M !== i;
|
|
2020
|
+
return typeof h == "object" && h && "props" in h ? po(h, {
|
|
2021
|
+
...h.props,
|
|
2022
|
+
"aria-hidden": C,
|
|
2023
|
+
"aria-label": `${_} of ${d}`,
|
|
2019
2024
|
"aria-roledescription": "slide",
|
|
2020
|
-
id:
|
|
2021
|
-
key:
|
|
2022
|
-
}) :
|
|
2025
|
+
id: w,
|
|
2026
|
+
key: w
|
|
2027
|
+
}) : h;
|
|
2023
2028
|
});
|
|
2024
|
-
return /* @__PURE__ */
|
|
2029
|
+
return /* @__PURE__ */ W(
|
|
2025
2030
|
"ul",
|
|
2026
2031
|
{
|
|
2027
|
-
className:
|
|
2032
|
+
className: Co(
|
|
2028
2033
|
"container",
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2034
|
+
g.mobile && "container-mobile",
|
|
2035
|
+
g.desktop && "container-desktop",
|
|
2036
|
+
g.tablet && "container-tablet",
|
|
2037
|
+
g.desktop && a && "container-full-width",
|
|
2038
|
+
n
|
|
2033
2039
|
),
|
|
2034
|
-
onScroll:
|
|
2035
|
-
ref:
|
|
2040
|
+
onScroll: e,
|
|
2041
|
+
ref: y,
|
|
2036
2042
|
style: {
|
|
2037
|
-
"--slideDesktop":
|
|
2038
|
-
"--slideMobile":
|
|
2039
|
-
"--slideTablet":
|
|
2040
|
-
"--slideWidthDesktop":
|
|
2041
|
-
"--slideWidthMobile":
|
|
2042
|
-
"--slideWidthTablet":
|
|
2043
|
-
"--slideWithDesktopFullWidth":
|
|
2044
|
-
"--spaceBetween": `${
|
|
2043
|
+
"--slideDesktop": g.desktop,
|
|
2044
|
+
"--slideMobile": g.mobile,
|
|
2045
|
+
"--slideTablet": g.tablet,
|
|
2046
|
+
"--slideWidthDesktop": H(g.desktop, b),
|
|
2047
|
+
"--slideWidthMobile": H(g.mobile, b),
|
|
2048
|
+
"--slideWidthTablet": H(g.tablet, b),
|
|
2049
|
+
"--slideWithDesktopFullWidth": H(g.desktop + 2, b),
|
|
2050
|
+
"--spaceBetween": `${b / 16}rem`
|
|
2045
2051
|
},
|
|
2046
2052
|
children: $
|
|
2047
2053
|
}
|
|
2048
2054
|
);
|
|
2049
|
-
},
|
|
2055
|
+
}, Eo = K(U), bo = mo(null), eo = () => {
|
|
2050
2056
|
const r = ko(bo);
|
|
2051
2057
|
if (!r)
|
|
2052
2058
|
throw new Error("Swiper components must be used within a Swiper component");
|
|
2053
2059
|
return r;
|
|
2054
|
-
},
|
|
2060
|
+
}, x = {
|
|
2055
2061
|
autoplay: { duration: 5e3, enabled: !1, loop: !1 },
|
|
2056
2062
|
navigation: { desktop: !0, mobile: !0 },
|
|
2057
2063
|
slides: {
|
|
@@ -2063,154 +2069,163 @@ const Po = "_root_103s3_3", Lo = "_container_103s3_9", Io = "_arrow_103s3_74", U
|
|
|
2063
2069
|
perView: { desktop: 1, mobile: 1, tablet: 1 }
|
|
2064
2070
|
}
|
|
2065
2071
|
}, $o = {
|
|
2066
|
-
autoplay:
|
|
2067
|
-
navigation:
|
|
2072
|
+
autoplay: x.autoplay,
|
|
2073
|
+
navigation: x.navigation,
|
|
2068
2074
|
slides: {
|
|
2069
|
-
alignment:
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2075
|
+
alignment: x.slides.alignment,
|
|
2076
|
+
currentPage: 0,
|
|
2077
|
+
currentSlidesPerView: x.slides.perView.desktop,
|
|
2078
|
+
expandOnLargeScreens: x.slides.expandOnLargeScreens,
|
|
2079
|
+
gap: x.slides.gap,
|
|
2080
|
+
id: x.slides.id,
|
|
2081
|
+
initialIndex: x.slides.initialIndex,
|
|
2082
|
+
perView: x.slides.perView,
|
|
2083
|
+
setCurrentPage: () => {
|
|
2084
|
+
}
|
|
2076
2085
|
}
|
|
2077
|
-
}, Ao = (r =
|
|
2078
|
-
var
|
|
2079
|
-
const t = {
|
|
2080
|
-
autoplay: { ...
|
|
2081
|
-
navigation: { ...
|
|
2086
|
+
}, Ao = (r = x) => {
|
|
2087
|
+
var y;
|
|
2088
|
+
const [n, i] = A(0), t = {
|
|
2089
|
+
autoplay: { ...x.autoplay, ...r.autoplay },
|
|
2090
|
+
navigation: { ...x.navigation, ...r.navigation },
|
|
2082
2091
|
slides: {
|
|
2083
|
-
...
|
|
2092
|
+
...x.slides,
|
|
2084
2093
|
...r.slides,
|
|
2085
2094
|
perView: {
|
|
2086
|
-
...
|
|
2087
|
-
...(
|
|
2095
|
+
...x.slides.perView,
|
|
2096
|
+
...(y = r.slides) == null ? void 0 : y.perView
|
|
2088
2097
|
}
|
|
2089
2098
|
}
|
|
2090
2099
|
}, {
|
|
2091
|
-
autoplay:
|
|
2092
|
-
navigation:
|
|
2093
|
-
slides: { expandOnLargeScreens:
|
|
2094
|
-
} = t, { width:
|
|
2100
|
+
autoplay: a,
|
|
2101
|
+
navigation: b,
|
|
2102
|
+
slides: { expandOnLargeScreens: e, perView: c }
|
|
2103
|
+
} = t, { width: m } = _o(), d = zo(), g = oo(() => m <= d.md ? c.mobile : m <= d.lg ? c.tablet : m >= d["4xl"] && e ? c.desktop + 2 : c.desktop, [m, d, e, c]);
|
|
2095
2104
|
return {
|
|
2096
|
-
autoplay:
|
|
2097
|
-
navigation:
|
|
2105
|
+
autoplay: a,
|
|
2106
|
+
navigation: b,
|
|
2098
2107
|
slides: {
|
|
2099
2108
|
alignment: t.slides.alignment,
|
|
2100
|
-
|
|
2109
|
+
currentPage: n,
|
|
2110
|
+
currentSlidesPerView: g,
|
|
2101
2111
|
expandOnLargeScreens: t.slides.expandOnLargeScreens,
|
|
2102
2112
|
gap: t.slides.gap,
|
|
2103
2113
|
id: t.slides.id,
|
|
2104
2114
|
initialIndex: t.slides.initialIndex,
|
|
2105
|
-
perView:
|
|
2115
|
+
perView: c,
|
|
2116
|
+
setCurrentPage: i
|
|
2106
2117
|
}
|
|
2107
2118
|
};
|
|
2108
2119
|
}, X = ({
|
|
2109
2120
|
children: r,
|
|
2110
|
-
className:
|
|
2111
|
-
store:
|
|
2112
|
-
...
|
|
2121
|
+
className: n,
|
|
2122
|
+
store: i = $o,
|
|
2123
|
+
...t
|
|
2113
2124
|
}) => {
|
|
2114
|
-
const { autoplay:
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
Math.ceil(o.initialIndex / o.currentSlidesPerView) - 1
|
|
2120
|
-
), e = R(() => {
|
|
2121
|
-
const i = a == null ? void 0 : a.current;
|
|
2122
|
-
if (i && !c.enabled) {
|
|
2123
|
-
const { offsetWidth: u, scrollLeft: g, scrollWidth: _ } = i, w = !(g > o.gap), z = !(_ - (g + u) > o.gap);
|
|
2124
|
-
y(w), N(z);
|
|
2125
|
+
const { autoplay: a, navigation: b, slides: e } = i, { currentPage: c, setCurrentPage: m } = e, d = Z(), g = Z(!1), [y, E] = A(0), [I, $] = A(!1), [h, N] = A(!1), w = Math.ceil(y / e.currentSlidesPerView) || 1, _ = F(() => {
|
|
2126
|
+
const l = d == null ? void 0 : d.current;
|
|
2127
|
+
if (l && !a.enabled) {
|
|
2128
|
+
const { offsetWidth: p, scrollLeft: u, scrollWidth: L } = l, z = !(u > e.gap), S = !(L - (u + p) > e.gap);
|
|
2129
|
+
$(z), N(S);
|
|
2125
2130
|
} else
|
|
2126
|
-
|
|
2127
|
-
}, [
|
|
2128
|
-
var
|
|
2129
|
-
const
|
|
2130
|
-
if (
|
|
2131
|
-
const { children:
|
|
2132
|
-
D !==
|
|
2131
|
+
$(!1), N(!1);
|
|
2132
|
+
}, [a.enabled, e.gap]), M = F(() => {
|
|
2133
|
+
var p, u;
|
|
2134
|
+
const l = d == null ? void 0 : d.current;
|
|
2135
|
+
if (l) {
|
|
2136
|
+
const { children: L, offsetWidth: z, scrollLeft: S, scrollWidth: V } = l, J = (u = (p = L == null ? void 0 : L[0]) == null ? void 0 : p.getBoundingClientRect()) == null ? void 0 : u.width, D = !(V - (S + z) > e.gap) ? w - 1 : Math.round(S / ((J + e.gap) * e.currentSlidesPerView));
|
|
2137
|
+
D !== c && m(D);
|
|
2133
2138
|
}
|
|
2134
|
-
}, [
|
|
2139
|
+
}, [w, c, e.currentSlidesPerView, d, m, e.gap]), C = oo(
|
|
2135
2140
|
() => wo(() => {
|
|
2136
|
-
|
|
2141
|
+
_(), M();
|
|
2137
2142
|
}, 100),
|
|
2138
|
-
[
|
|
2139
|
-
),
|
|
2140
|
-
(
|
|
2141
|
-
var
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2143
|
+
[_, M]
|
|
2144
|
+
), o = F(
|
|
2145
|
+
(l, p = !1) => {
|
|
2146
|
+
var z, S, V;
|
|
2147
|
+
const u = d == null ? void 0 : d.current, L = (V = (S = (z = u == null ? void 0 : u.children) == null ? void 0 : z[0]) == null ? void 0 : S.getBoundingClientRect()) == null ? void 0 : V.width;
|
|
2148
|
+
u == null || u.scrollTo({
|
|
2144
2149
|
// We don't want to have a scroll effect when we first render the swiper
|
|
2145
|
-
behavior:
|
|
2146
|
-
left:
|
|
2150
|
+
behavior: p ? "auto" : "smooth",
|
|
2151
|
+
left: l * (L + e.gap) * e.currentSlidesPerView,
|
|
2147
2152
|
top: 0
|
|
2148
2153
|
});
|
|
2149
2154
|
},
|
|
2150
|
-
[
|
|
2151
|
-
), v =
|
|
2152
|
-
|
|
2153
|
-
}, [
|
|
2154
|
-
|
|
2155
|
-
}, [
|
|
2155
|
+
[e.currentSlidesPerView, e.gap, d]
|
|
2156
|
+
), f = c === 0, k = c === w - 1, v = F(() => {
|
|
2157
|
+
a.enabled && a.loop && k ? o(0) : o(c + 1);
|
|
2158
|
+
}, [c, o, k, a.enabled, a.loop]), P = F(() => {
|
|
2159
|
+
f && a.enabled && a.loop ? o(w - 1) : o(c - 1);
|
|
2160
|
+
}, [w, c, o, f, a.enabled, a.loop]);
|
|
2156
2161
|
No(
|
|
2157
2162
|
() => {
|
|
2158
|
-
|
|
2163
|
+
a.enabled && v();
|
|
2159
2164
|
},
|
|
2160
|
-
|
|
2161
|
-
),
|
|
2162
|
-
const
|
|
2163
|
-
|
|
2165
|
+
a.enabled ? a.duration : null
|
|
2166
|
+
), j(() => {
|
|
2167
|
+
const l = (p) => {
|
|
2168
|
+
p.code === "ArrowLeft" && P(), p.code === "ArrowRight" && v();
|
|
2164
2169
|
};
|
|
2165
|
-
return window.addEventListener("keydown",
|
|
2166
|
-
}, [
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2170
|
+
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
2171
|
+
}, [P, v]);
|
|
2172
|
+
const B = e.alignment === "center" ? (
|
|
2173
|
+
// if centeredSlides is true, we calculate which number is the middle page
|
|
2174
|
+
Math.floor(w / 2)
|
|
2175
|
+
) : (
|
|
2176
|
+
// if centeredSlides is false, we calculate on which page the number in firstSlideToShow props is
|
|
2177
|
+
Math.ceil(e.initialIndex / e.currentSlidesPerView) - 1
|
|
2178
|
+
);
|
|
2179
|
+
j(() => {
|
|
2180
|
+
y > 0 && !g.current && (o(B, !0), g.current = !0);
|
|
2181
|
+
}, [y]), j(() => {
|
|
2182
|
+
_();
|
|
2183
|
+
}, [_, r]), j(() => {
|
|
2184
|
+
g.current && o(c);
|
|
2185
|
+
}, [c, o]);
|
|
2171
2186
|
const O = oo(
|
|
2172
2187
|
() => ({
|
|
2173
2188
|
navigation: {
|
|
2174
2189
|
goNext: v,
|
|
2175
|
-
goPrev:
|
|
2176
|
-
isNextDisabled:
|
|
2177
|
-
isPrevDisabled:
|
|
2178
|
-
...
|
|
2190
|
+
goPrev: P,
|
|
2191
|
+
isNextDisabled: h,
|
|
2192
|
+
isPrevDisabled: I,
|
|
2193
|
+
...b
|
|
2179
2194
|
},
|
|
2180
2195
|
slides: {
|
|
2181
|
-
alignment:
|
|
2182
|
-
currentPage:
|
|
2183
|
-
currentSlidesPerView:
|
|
2184
|
-
expandOnLargeScreens:
|
|
2185
|
-
gap:
|
|
2186
|
-
handleScroll:
|
|
2187
|
-
id:
|
|
2188
|
-
initialIndex:
|
|
2189
|
-
isLastPage:
|
|
2190
|
-
length:
|
|
2191
|
-
perView:
|
|
2192
|
-
ref:
|
|
2193
|
-
setLength:
|
|
2196
|
+
alignment: e.alignment,
|
|
2197
|
+
currentPage: c,
|
|
2198
|
+
currentSlidesPerView: e.currentSlidesPerView,
|
|
2199
|
+
expandOnLargeScreens: e.expandOnLargeScreens,
|
|
2200
|
+
gap: e.gap,
|
|
2201
|
+
handleScroll: C,
|
|
2202
|
+
id: e.id,
|
|
2203
|
+
initialIndex: e.initialIndex,
|
|
2204
|
+
isLastPage: k,
|
|
2205
|
+
length: y,
|
|
2206
|
+
perView: e.perView,
|
|
2207
|
+
ref: d,
|
|
2208
|
+
setLength: E
|
|
2194
2209
|
}
|
|
2195
2210
|
}),
|
|
2196
2211
|
[
|
|
2197
2212
|
v,
|
|
2198
|
-
L,
|
|
2199
2213
|
P,
|
|
2200
|
-
$,
|
|
2201
|
-
f,
|
|
2202
|
-
d,
|
|
2203
2214
|
h,
|
|
2204
2215
|
I,
|
|
2205
|
-
|
|
2206
|
-
|
|
2216
|
+
b,
|
|
2217
|
+
c,
|
|
2218
|
+
C,
|
|
2219
|
+
k,
|
|
2220
|
+
y,
|
|
2221
|
+
e
|
|
2207
2222
|
]
|
|
2208
2223
|
);
|
|
2209
|
-
return /* @__PURE__ */
|
|
2224
|
+
return /* @__PURE__ */ W(bo.Provider, { value: O, children: /* @__PURE__ */ W("div", { className: Eo("root", n), ...t, children: r }) });
|
|
2210
2225
|
};
|
|
2211
2226
|
X.PrevButton = jo;
|
|
2212
2227
|
X.NextButton = Vo;
|
|
2213
|
-
X.Slides =
|
|
2228
|
+
X.Slides = Wo;
|
|
2214
2229
|
X.displayName = "Swiper";
|
|
2215
2230
|
export {
|
|
2216
2231
|
X as Swiper,
|
package/dist/Tag.js
CHANGED
|
@@ -5,12 +5,12 @@ import w from "react";
|
|
|
5
5
|
import { Icon as s } from "./Icon.js";
|
|
6
6
|
import { c as R } from "./index-PAaZGbyz.js";
|
|
7
7
|
import { f as C } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
8
|
-
const S = "_root_4kt6z_7",
|
|
8
|
+
const S = "_root_4kt6z_7", y = "_disabled_4kt6z_51", N = "_ai_4kt6z_68", q = "_removeButton_4kt6z_71", x = "_hasRemoveAction_4kt6z_364", A = "_isSquare_4kt6z_370", T = {
|
|
9
9
|
root: S,
|
|
10
|
-
disabled:
|
|
10
|
+
disabled: y,
|
|
11
11
|
"variant-dash": "_variant-dash_4kt6z_56",
|
|
12
|
-
ai:
|
|
13
|
-
removeButton:
|
|
12
|
+
ai: N,
|
|
13
|
+
removeButton: q,
|
|
14
14
|
"variant-brand": "_variant-brand_4kt6z_74",
|
|
15
15
|
"variant-light-brand": "_variant-light-brand_4kt6z_89",
|
|
16
16
|
"variant-dark-brand": "_variant-dark-brand_4kt6z_96",
|
|
@@ -40,7 +40,7 @@ const S = "_root_4kt6z_7", N = "_disabled_4kt6z_51", q = "_ai_4kt6z_68", x = "_r
|
|
|
40
40
|
"variant-dark-violet": "_variant-dark-violet_4kt6z_328",
|
|
41
41
|
"size-md": "_size-md_4kt6z_350",
|
|
42
42
|
"size-lg": "_size-lg_4kt6z_357",
|
|
43
|
-
hasRemoveAction:
|
|
43
|
+
hasRemoveAction: x,
|
|
44
44
|
isSquare: A
|
|
45
45
|
}, k = R(T);
|
|
46
46
|
function j(a) {
|
|
@@ -63,9 +63,9 @@ const $ = C((a, d) => {
|
|
|
63
63
|
size: c = "lg",
|
|
64
64
|
variant: l = "warm",
|
|
65
65
|
...h
|
|
66
|
-
} = a, u = j(o) === 1 && !r,
|
|
66
|
+
} = a, u = j(o) === 1 && !r, p = (n) => {
|
|
67
67
|
n.stopPropagation(), !i && (t != null && t.onClick && t.onClick(n), r && r());
|
|
68
|
-
},
|
|
68
|
+
}, f = (n) => {
|
|
69
69
|
i || v && v(n);
|
|
70
70
|
};
|
|
71
71
|
return /* @__PURE__ */ b(
|
|
@@ -81,7 +81,7 @@ const $ = C((a, d) => {
|
|
|
81
81
|
i && "disabled",
|
|
82
82
|
z
|
|
83
83
|
),
|
|
84
|
-
onClick:
|
|
84
|
+
onClick: f,
|
|
85
85
|
ref: d,
|
|
86
86
|
...h,
|
|
87
87
|
children: [
|
|
@@ -92,9 +92,10 @@ const $ = C((a, d) => {
|
|
|
92
92
|
{
|
|
93
93
|
"aria-label": "remove tag",
|
|
94
94
|
disabled: i,
|
|
95
|
+
type: "button",
|
|
95
96
|
...t,
|
|
96
97
|
className: k("removeButton", t == null ? void 0 : t.className),
|
|
97
|
-
onClick:
|
|
98
|
+
onClick: p,
|
|
98
99
|
children: /* @__PURE__ */ e(s, { name: "times", size: "md" })
|
|
99
100
|
}
|
|
100
101
|
) : null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
1
|
+
import { ComponentProps, HTMLAttributes } from 'react';
|
|
2
2
|
import { HintProps } from '../Hint/types';
|
|
3
|
-
import {
|
|
3
|
+
import { Label } from '../Label';
|
|
4
4
|
export interface FieldOptions extends VariantProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
disabled?: boolean;
|
|
@@ -13,7 +13,7 @@ export interface FieldOptions extends VariantProps {
|
|
|
13
13
|
*/
|
|
14
14
|
inline?: boolean;
|
|
15
15
|
label: React.ReactNode;
|
|
16
|
-
labelProps?:
|
|
16
|
+
labelProps?: ComponentProps<typeof Label>;
|
|
17
17
|
/**
|
|
18
18
|
* The maximum number of characters allowed in the input field. If provided, a character count will be displayed on hint on the right side.
|
|
19
19
|
*/
|
|
@@ -8,4 +8,4 @@ export interface RadioOptions {
|
|
|
8
8
|
value?: string;
|
|
9
9
|
variant?: 'danger' | 'default';
|
|
10
10
|
}
|
|
11
|
-
export type RadioProps = ComponentPropsWithRef<'input'> &
|
|
11
|
+
export type RadioProps = ComponentPropsWithRef<'input'> & LabelProps & RadioOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SwiperSlidesProps } from '../types';
|
|
2
|
-
export declare const SwiperSlides: ({ children }: SwiperSlidesProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const SwiperSlides: ({ children, className }: SwiperSlidesProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -41,6 +41,7 @@ export declare const useSwiper: (options?: UseSwiperOptions) => {
|
|
|
41
41
|
};
|
|
42
42
|
slides: {
|
|
43
43
|
alignment: "center" | "default";
|
|
44
|
+
currentPage: number;
|
|
44
45
|
currentSlidesPerView: number;
|
|
45
46
|
expandOnLargeScreens: boolean;
|
|
46
47
|
gap: number;
|
|
@@ -51,6 +52,7 @@ export declare const useSwiper: (options?: UseSwiperOptions) => {
|
|
|
51
52
|
mobile: number;
|
|
52
53
|
tablet: number;
|
|
53
54
|
};
|
|
55
|
+
setCurrentPage: React.Dispatch<React.SetStateAction<number>>;
|
|
54
56
|
};
|
|
55
57
|
};
|
|
56
58
|
export declare const Swiper: SwiperComponent;
|
|
@@ -15,6 +15,7 @@ export type SwiperPrevButtonProps = Omit<ButtonProps, 'aria-label' | 'disabled'
|
|
|
15
15
|
export type SwiperProps = ComponentProps<'div'> & SwiperOptions;
|
|
16
16
|
export type SwiperSlidesProps = {
|
|
17
17
|
children: ReactNode;
|
|
18
|
+
className?: string;
|
|
18
19
|
};
|
|
19
20
|
export interface UseSwiperOptions {
|
|
20
21
|
/** If true the swiper will automatically transition between slides */
|