welcome-ui 7.1.1 → 7.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 +2 -8
- package/dist/Accordion.mjs +8 -8
- package/dist/Alert.mjs +79 -72
- package/dist/Breadcrumb.mjs +3 -2
- package/dist/Button.mjs +59 -45
- package/dist/Icons.mjs +621 -625
- package/dist/Swiper.mjs +47 -45
- package/dist/VariantIcon.mjs +22 -21
- package/dist/index-BrfXjmHY.mjs +36 -0
- package/dist/theme.mjs +411 -350
- package/dist/types/components/Accordion/styles.d.ts +2 -2
- package/dist/types/components/Alert/index.d.ts +3 -5
- package/dist/types/components/Alert/theme.d.ts +5 -5
- package/dist/types/components/Avatar/index.d.ts +2 -5
- package/dist/types/components/Avatar/theme.d.ts +4 -3
- package/dist/types/components/Avatar/utils.d.ts +2 -2
- package/dist/types/components/Badge/styles.d.ts +1 -1
- package/dist/types/components/Breadcrumb/index.d.ts +2 -4
- package/dist/types/components/Button/index.d.ts +8 -6
- package/dist/types/components/Button/theme.d.ts +3 -3
- package/dist/types/components/ButtonGroup/styles.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +1 -1
- package/dist/types/components/DateTimePickerCommon/styles.d.ts +2 -2
- package/dist/types/components/Drawer/styles.d.ts +1 -1
- package/dist/types/components/DropdownMenu/Item.styled.d.ts +1 -1
- package/dist/types/components/DropdownMenu/Separator.styled.d.ts +1 -1
- package/dist/types/components/Field/styles.d.ts +2 -2
- package/dist/types/components/FileDrop/styles.d.ts +2 -2
- package/dist/types/components/Hint/index.d.ts +1 -1
- package/dist/types/components/Hint/styles.d.ts +1 -1
- package/dist/types/components/Icon/index.d.ts +1 -1
- package/dist/types/components/Icon/theme.d.ts +5 -8
- package/dist/types/components/IconsFont/index.d.ts +1 -1
- package/dist/types/components/IconsFont/styles.d.ts +1 -1
- package/dist/types/components/InputText/styles.d.ts +2 -2
- package/dist/types/components/Label/styles.d.ts +1 -1
- package/dist/types/components/Loader/index.d.ts +2 -3
- package/dist/types/components/Loader/theme.d.ts +5 -6
- package/dist/types/components/Logo/styles.d.ts +1 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +2 -1
- package/dist/types/components/Modal/Assets/index.d.ts +3 -3
- package/dist/types/components/Modal/Assets/styles.d.ts +3 -3
- package/dist/types/components/Modal/Close.d.ts +2 -1
- package/dist/types/components/Modal/index.d.ts +4 -4
- package/dist/types/components/Modal/theme.d.ts +2 -3
- package/dist/types/components/Pagination/styles.d.ts +3 -3
- package/dist/types/components/Popover/Arrow.d.ts +2 -1
- package/dist/types/components/Popover/Content.d.ts +2 -1
- package/dist/types/components/Popover/Popover.d.ts +2 -2
- package/dist/types/components/Popover/PopoverHover.d.ts +2 -2
- package/dist/types/components/Popover/styles.d.ts +2 -2
- package/dist/types/components/Radio/styles.d.ts +2 -2
- package/dist/types/components/RadioTab/styles.d.ts +3 -3
- package/dist/types/components/Search/styles.d.ts +5 -5
- package/dist/types/components/Select/styles.d.ts +4 -4
- package/dist/types/components/Slider/styles.d.ts +2 -2
- package/dist/types/components/Swiper/index.d.ts +2 -2
- package/dist/types/components/Swiper/styles.d.ts +2 -2
- package/dist/types/components/System/index.d.ts +2 -3
- package/dist/types/components/Table/index.d.ts +1 -1
- package/dist/types/components/Table/styles.d.ts +1 -1
- package/dist/types/components/Tabs/styles.d.ts +2 -2
- package/dist/types/components/Tag/index.d.ts +2 -5
- package/dist/types/components/Tag/styles.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Text/styles.d.ts +1 -1
- package/dist/types/components/TimePicker/styles.d.ts +1 -1
- package/dist/types/components/Toast/Growl.d.ts +2 -1
- package/dist/types/components/Toast/Snackbar.d.ts +2 -1
- package/dist/types/components/Toast/styles.d.ts +4 -4
- package/dist/types/components/Toast/theme.d.ts +1 -0
- package/dist/types/components/Toggle/index.d.ts +1 -2
- package/dist/types/components/Toggle/styles.d.ts +1 -2
- package/dist/types/components/Toggle/theme.d.ts +4 -3
- package/dist/types/components/Tooltip/styles.d.ts +1 -1
- package/dist/types/components/VariantIcon/index.d.ts +1 -3
- package/dist/types/components/VariantIcon/theme.d.ts +3 -7
- package/dist/types/theme/index.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/ts-utils.d.ts +19 -0
- package/package.json +6 -6
- package/dist/index-RUkz9Z2V.mjs +0 -31
package/dist/Swiper.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import A, { useRef as rt, useEffect as
|
|
2
|
+
import A, { useRef as rt, useEffect as z, useState as K, useMemo as ft, Children as Y, cloneElement as ht, useCallback as D } from "react";
|
|
3
3
|
import { c as V, g as gt } from "./_commonjsHelpers-CXJ7dpIk.mjs";
|
|
4
|
-
import
|
|
4
|
+
import M, { system as ot, css as b, th as Z, useTheme as mt } from "@xstyled/styled-components";
|
|
5
5
|
import { u as pt } from "./use-viewport-m3glsbna.mjs";
|
|
6
6
|
import { Button as wt } from "./Button.mjs";
|
|
7
7
|
import { IconsFont as tt } from "./IconsFont.mjs";
|
|
8
|
-
var $t = "Expected a function", et = NaN,
|
|
8
|
+
var $t = "Expected a function", et = NaN, bt = "[object Symbol]", yt = /^\s+|\s+$/g, vt = /^[-+]0x[0-9a-f]+$/i, St = /^0b[01]+$/i, xt = /^0o[0-7]+$/i, Pt = parseInt, Rt = typeof V == "object" && V && V.Object === Object && V, Lt = typeof self == "object" && self && self.Object === Object && self, kt = Rt || Lt || Function("return this")(), Et = Object.prototype, At = Et.toString, jt = Math.max, Ct = Math.min, X = function() {
|
|
9
9
|
return kt.Date.now();
|
|
10
10
|
};
|
|
11
11
|
function Tt(t, e, n) {
|
|
12
|
-
var o, r, s, c, a, w, h = 0, C = !1,
|
|
12
|
+
var o, r, s, c, a, w, h = 0, C = !1, y = !1, R = !0;
|
|
13
13
|
if (typeof t != "function")
|
|
14
14
|
throw new TypeError($t);
|
|
15
|
-
e = nt(e) || 0, q(n) && (C = !!n.leading,
|
|
15
|
+
e = nt(e) || 0, q(n) && (C = !!n.leading, y = "maxWait" in n, s = y ? jt(nt(n.maxWait) || 0, e) : s, R = "trailing" in n ? !!n.trailing : R);
|
|
16
16
|
function d(i) {
|
|
17
17
|
var f = o, x = r;
|
|
18
18
|
return o = r = void 0, h = i, c = t.apply(x, f), c;
|
|
@@ -22,11 +22,11 @@ function Tt(t, e, n) {
|
|
|
22
22
|
}
|
|
23
23
|
function v(i) {
|
|
24
24
|
var f = i - w, x = i - h, W = e - f;
|
|
25
|
-
return
|
|
25
|
+
return y ? Ct(W, s - x) : W;
|
|
26
26
|
}
|
|
27
27
|
function L(i) {
|
|
28
28
|
var f = i - w, x = i - h;
|
|
29
|
-
return w === void 0 || f >= e || f < 0 ||
|
|
29
|
+
return w === void 0 || f >= e || f < 0 || y && x >= s;
|
|
30
30
|
}
|
|
31
31
|
function p() {
|
|
32
32
|
var i = X();
|
|
@@ -40,7 +40,7 @@ function Tt(t, e, n) {
|
|
|
40
40
|
function I() {
|
|
41
41
|
a !== void 0 && clearTimeout(a), h = 0, o = w = r = a = void 0;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function N() {
|
|
44
44
|
return a === void 0 ? c : T(X());
|
|
45
45
|
}
|
|
46
46
|
function g() {
|
|
@@ -48,12 +48,12 @@ function Tt(t, e, n) {
|
|
|
48
48
|
if (o = arguments, r = this, w = i, f) {
|
|
49
49
|
if (a === void 0)
|
|
50
50
|
return O(w);
|
|
51
|
-
if (
|
|
51
|
+
if (y)
|
|
52
52
|
return a = setTimeout(p, e), d(w);
|
|
53
53
|
}
|
|
54
54
|
return a === void 0 && (a = setTimeout(p, e)), c;
|
|
55
55
|
}
|
|
56
|
-
return g.cancel = I, g.flush =
|
|
56
|
+
return g.cancel = I, g.flush = N, g;
|
|
57
57
|
}
|
|
58
58
|
function q(t) {
|
|
59
59
|
var e = typeof t;
|
|
@@ -63,7 +63,7 @@ function Wt(t) {
|
|
|
63
63
|
return !!t && typeof t == "object";
|
|
64
64
|
}
|
|
65
65
|
function Ot(t) {
|
|
66
|
-
return typeof t == "symbol" || Wt(t) && At.call(t) ==
|
|
66
|
+
return typeof t == "symbol" || Wt(t) && At.call(t) == bt;
|
|
67
67
|
}
|
|
68
68
|
function nt(t) {
|
|
69
69
|
if (typeof t == "number")
|
|
@@ -76,16 +76,16 @@ function nt(t) {
|
|
|
76
76
|
}
|
|
77
77
|
if (typeof t != "string")
|
|
78
78
|
return t === 0 ? t : +t;
|
|
79
|
-
t = t.replace(
|
|
79
|
+
t = t.replace(yt, "");
|
|
80
80
|
var n = St.test(t);
|
|
81
81
|
return n || xt.test(t) ? Pt(t.slice(2), n ? 2 : 8) : vt.test(t) ? et : +t;
|
|
82
82
|
}
|
|
83
83
|
var It = Tt;
|
|
84
|
-
const
|
|
84
|
+
const Nt = /* @__PURE__ */ gt(It), zt = (t, e) => {
|
|
85
85
|
const n = rt();
|
|
86
|
-
|
|
86
|
+
z(() => {
|
|
87
87
|
n.current = t;
|
|
88
|
-
}, [t]),
|
|
88
|
+
}, [t]), z(() => {
|
|
89
89
|
function o() {
|
|
90
90
|
n.current();
|
|
91
91
|
}
|
|
@@ -99,21 +99,21 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
99
99
|
return `${100 / t}%`;
|
|
100
100
|
const r = n(e * (t === 1 ? 4 : 2));
|
|
101
101
|
return `calc(${100 / t}% - ${r})`;
|
|
102
|
-
}, st =
|
|
102
|
+
}, st = M.div`
|
|
103
103
|
overflow-y: hidden;
|
|
104
104
|
position: relative;
|
|
105
105
|
width: 100%;
|
|
106
106
|
height: 100%;
|
|
107
107
|
|
|
108
108
|
${ot}
|
|
109
|
-
`, it =
|
|
110
|
-
({ disabled: t, withDarkUI: e, withNavigation: { desktop: n, mobile: o } }) =>
|
|
109
|
+
`, it = M(wt)(
|
|
110
|
+
({ disabled: t, withDarkUI: e, withNavigation: { desktop: n, mobile: o } }) => b`
|
|
111
111
|
top: 50%;
|
|
112
112
|
transform: translate3d(0, -50%, 0);
|
|
113
113
|
z-index: ${o ? 1 : -1};
|
|
114
114
|
display: ${o ? "flex" : "none"};
|
|
115
115
|
|
|
116
|
-
${!e &&
|
|
116
|
+
${!e && b`
|
|
117
117
|
background-color: neutral-10 !important;
|
|
118
118
|
|
|
119
119
|
&:hover {
|
|
@@ -126,13 +126,13 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
126
126
|
display: ${n ? "flex" : "none"};
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
${t &&
|
|
129
|
+
${t && b`
|
|
130
130
|
opacity: 0;
|
|
131
131
|
z-index: -1;
|
|
132
132
|
`};
|
|
133
133
|
`
|
|
134
|
-
),
|
|
135
|
-
({ withPagination: { desktop: t, mobile: e } }) =>
|
|
134
|
+
), Mt = M.divBox(
|
|
135
|
+
({ withPagination: { desktop: t, mobile: e } }) => b`
|
|
136
136
|
justify-content: center;
|
|
137
137
|
position: absolute;
|
|
138
138
|
bottom: 0;
|
|
@@ -147,20 +147,20 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
147
147
|
display: ${t ? "flex" : "none"};
|
|
148
148
|
}
|
|
149
149
|
`
|
|
150
|
-
), Ft =
|
|
151
|
-
({ active: t, withDarkUI: e }) =>
|
|
150
|
+
), Ft = M.div(
|
|
151
|
+
({ active: t, withDarkUI: e }) => b`
|
|
152
152
|
height: 10;
|
|
153
153
|
width: 10;
|
|
154
154
|
border-radius: 50%;
|
|
155
155
|
cursor: pointer;
|
|
156
156
|
margin: 0 xxs;
|
|
157
157
|
${t ? Z("swipers.navigation.bullet.active") : Z("swipers.navigation.bullet.default")}
|
|
158
|
-
${e &&
|
|
158
|
+
${e && b`
|
|
159
159
|
background-color: ${t ? "neutral-90" : "neutral-50"};
|
|
160
160
|
`}
|
|
161
161
|
${ot}
|
|
162
162
|
`
|
|
163
|
-
), _t =
|
|
163
|
+
), _t = M.ulBox(({ fullWidth: t, slidesPerView: { desktop: e, mobile: n, tablet: o }, spaceBetween: r, theme: s }) => b`
|
|
164
164
|
scroll-snap-type: x mandatory;
|
|
165
165
|
display: flex;
|
|
166
166
|
-webkit-overflow-scrolling: touch;
|
|
@@ -193,7 +193,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
@media (min-width: sm) {
|
|
196
|
-
${n &&
|
|
196
|
+
${n && b`
|
|
197
197
|
> * {
|
|
198
198
|
min-width: ${S(n, r, s.toRem)};
|
|
199
199
|
max-width: ${S(n, r, s.toRem)};
|
|
@@ -206,7 +206,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
@media (min-width: md) {
|
|
209
|
-
${o &&
|
|
209
|
+
${o && b`
|
|
210
210
|
> * {
|
|
211
211
|
min-width: ${S(o, r, s.toRem)};
|
|
212
212
|
max-width: ${S(o, r, s.toRem)};
|
|
@@ -219,7 +219,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
@media (min-width: lg) {
|
|
222
|
-
${e &&
|
|
222
|
+
${e && b`
|
|
223
223
|
> * {
|
|
224
224
|
min-width: ${S(e, r, s.toRem)};
|
|
225
225
|
max-width: ${S(e, r, s.toRem)};
|
|
@@ -238,7 +238,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
@media (min-width: xl) {
|
|
241
|
-
${e && t &&
|
|
241
|
+
${e && t && b`
|
|
242
242
|
> * {
|
|
243
243
|
min-width: ${S(e + 2, r, s.toRem)};
|
|
244
244
|
max-width: ${S(e + 2, r, s.toRem)};
|
|
@@ -257,10 +257,10 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
257
257
|
navigationSize: w = "md",
|
|
258
258
|
slidesPerView: h = { mobile: 1, tablet: 1, desktop: 1 },
|
|
259
259
|
spaceBetween: C = 20,
|
|
260
|
-
withDarkUI:
|
|
260
|
+
withDarkUI: y = !1,
|
|
261
261
|
withNavigation: R = { mobile: !0, desktop: !0 },
|
|
262
262
|
withPagination: d = { mobile: !1, desktop: !1 }
|
|
263
|
-
} = t, O = a || e, { width: v } = pt(), [L, p] = K(0), [T, I] = K(!1), [
|
|
263
|
+
} = t, O = a || e, { width: v } = pt(), [L, p] = K(0), [T, I] = K(!1), [N, g] = K(!1), i = rt(), { screens: f } = mt(), x = ft(() => v <= f.md ? h.mobile : v <= f.lg ? h.tablet : v >= f["4xl"] && s ? h.desktop + 2 : h.desktop, [s, v, f, h]);
|
|
264
264
|
return {
|
|
265
265
|
centeredSlides: n,
|
|
266
266
|
firstSlideToShow: r,
|
|
@@ -277,12 +277,12 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
277
277
|
autoplay: e,
|
|
278
278
|
shouldLoop: O,
|
|
279
279
|
duration: o,
|
|
280
|
-
withDarkUI:
|
|
280
|
+
withDarkUI: y,
|
|
281
281
|
ref: i,
|
|
282
282
|
setShowLeftArrow: I,
|
|
283
283
|
setShowRightArrow: g,
|
|
284
284
|
showLeftArrow: T,
|
|
285
|
-
showRightArrow:
|
|
285
|
+
showRightArrow: N
|
|
286
286
|
};
|
|
287
287
|
}, Dt = ({ children: t, dataTestId: e, store: n, ...o }) => {
|
|
288
288
|
const {
|
|
@@ -293,7 +293,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
293
293
|
duration: w,
|
|
294
294
|
firstSlideToShow: h,
|
|
295
295
|
fullWidth: C,
|
|
296
|
-
id:
|
|
296
|
+
id: y,
|
|
297
297
|
navigationSize: R,
|
|
298
298
|
ref: d,
|
|
299
299
|
setCurrentPage: O,
|
|
@@ -302,13 +302,13 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
302
302
|
shouldLoop: p,
|
|
303
303
|
showLeftArrow: T,
|
|
304
304
|
showRightArrow: I,
|
|
305
|
-
slidesPerView:
|
|
305
|
+
slidesPerView: N,
|
|
306
306
|
spaceBetween: g,
|
|
307
307
|
withDarkUI: i,
|
|
308
308
|
withNavigation: f,
|
|
309
309
|
withPagination: x
|
|
310
310
|
} = n, W = Y.toArray(t).length, B = Math.ceil(W / a), j = Array.from(Array(B).keys()), J = c === 0, H = c === j.length - 1, at = Y.map(t, (m, l) => {
|
|
311
|
-
const u = `${
|
|
311
|
+
const u = `${y}-${l}`, $ = l + 1, E = Math.ceil($ / a) - 1, P = H ? W - $ >= a : E !== c;
|
|
312
312
|
return ht(m, {
|
|
313
313
|
...m.props,
|
|
314
314
|
id: u,
|
|
@@ -337,7 +337,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
337
337
|
const { children: $, offsetWidth: E, scrollLeft: P, scrollWidth: _ } = m, ut = (u = (l = $ == null ? void 0 : $[0]) == null ? void 0 : l.getBoundingClientRect()) == null ? void 0 : u.width, Q = !(_ - (P + E) > g) ? j.length - 1 : Math.round(P / ((ut + g) * a));
|
|
338
338
|
Q !== c && O(Q);
|
|
339
339
|
}
|
|
340
|
-
}, dt =
|
|
340
|
+
}, dt = Nt(() => {
|
|
341
341
|
U(), ct();
|
|
342
342
|
}, 100), k = D(
|
|
343
343
|
(m, l = !1) => {
|
|
@@ -356,19 +356,19 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
356
356
|
}, [c, k, H, p]), G = D(() => {
|
|
357
357
|
k(J && p ? j.length - 1 : c - 1);
|
|
358
358
|
}, [j.length, c, k, J, p]);
|
|
359
|
-
return
|
|
359
|
+
return zt(
|
|
360
360
|
() => {
|
|
361
361
|
r && F();
|
|
362
362
|
},
|
|
363
363
|
r ? w : null
|
|
364
|
-
),
|
|
364
|
+
), z(() => {
|
|
365
365
|
const m = (l) => {
|
|
366
366
|
l.code === "ArrowLeft" && G(), l.code === "ArrowRight" && F();
|
|
367
367
|
};
|
|
368
368
|
return window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m);
|
|
369
|
-
}, [G, F]),
|
|
369
|
+
}, [G, F]), z(() => {
|
|
370
370
|
k(lt, !0);
|
|
371
|
-
}, []),
|
|
371
|
+
}, []), z(() => {
|
|
372
372
|
U();
|
|
373
373
|
}, [U, t]), /* @__PURE__ */ A.createElement(st, { "data-testid": e, ...o }, /* @__PURE__ */ A.createElement(
|
|
374
374
|
_t,
|
|
@@ -376,13 +376,14 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
376
376
|
fullWidth: C,
|
|
377
377
|
onScroll: dt,
|
|
378
378
|
ref: d,
|
|
379
|
-
slidesPerView:
|
|
379
|
+
slidesPerView: N,
|
|
380
380
|
spaceBetween: g
|
|
381
381
|
},
|
|
382
382
|
at
|
|
383
383
|
), /* @__PURE__ */ A.createElement(
|
|
384
384
|
it,
|
|
385
385
|
{
|
|
386
|
+
"aria-label": "Previous slide",
|
|
386
387
|
"data-testid": e && `${e}-prev-button`,
|
|
387
388
|
disabled: !T,
|
|
388
389
|
left: 10,
|
|
@@ -398,6 +399,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
398
399
|
), /* @__PURE__ */ A.createElement(
|
|
399
400
|
it,
|
|
400
401
|
{
|
|
402
|
+
"aria-label": "Next slide",
|
|
401
403
|
"data-testid": e && `${e}-next-button`,
|
|
402
404
|
disabled: !I,
|
|
403
405
|
onClick: F,
|
|
@@ -411,7 +413,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
411
413
|
},
|
|
412
414
|
/* @__PURE__ */ A.createElement(tt.Right, null)
|
|
413
415
|
), /* @__PURE__ */ A.createElement(
|
|
414
|
-
|
|
416
|
+
Mt,
|
|
415
417
|
{
|
|
416
418
|
className: "swiper-pagination",
|
|
417
419
|
"data-testid": e && `${e}-pagination`,
|
|
@@ -422,7 +424,7 @@ const zt = /* @__PURE__ */ gt(It), Mt = (t, e) => {
|
|
|
422
424
|
const u = {
|
|
423
425
|
idx: l,
|
|
424
426
|
role: "tab",
|
|
425
|
-
"aria-controls": `${
|
|
427
|
+
"aria-controls": `${y}-${l}`,
|
|
426
428
|
"aria-label": `${l + 1} of ${j.length}`,
|
|
427
429
|
"aria-selected": l === c,
|
|
428
430
|
onClick: () => k(l)
|
package/dist/VariantIcon.mjs
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import t, { useMemo as a } from "react";
|
|
3
|
+
import f, { css as m, th as u, system as s } from "@xstyled/styled-components";
|
|
4
4
|
import "./Icon.mjs";
|
|
5
|
-
import { P as i, C as I, I as d, A as p, S as E } from "./index-
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
const
|
|
8
|
-
({ variant:
|
|
5
|
+
import { P as i, C as I, I as d, A as p, S as E, a as x } from "./index-BrfXjmHY.mjs";
|
|
6
|
+
import { forwardRef as y } from "./System.mjs";
|
|
7
|
+
const _ = f.divBox(
|
|
8
|
+
({ variant: n }) => m`
|
|
9
9
|
display: inline-flex;
|
|
10
|
-
${u(`variantIcon.${
|
|
10
|
+
${u(`variantIcon.${n}`)}
|
|
11
11
|
flex-shrink: 0;
|
|
12
12
|
align-self: center;
|
|
13
13
|
|
|
14
14
|
${s};
|
|
15
15
|
`
|
|
16
|
-
),
|
|
17
|
-
({ icon:
|
|
18
|
-
const o =
|
|
19
|
-
if (
|
|
20
|
-
if (
|
|
21
|
-
if (e === "default") return /* @__PURE__ */
|
|
22
|
-
if (e === "success") return /* @__PURE__ */
|
|
23
|
-
if (e === "info") return /* @__PURE__ */
|
|
24
|
-
if (e === "warning") return /* @__PURE__ */
|
|
25
|
-
if (e === "danger") return /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
), $ = y(
|
|
17
|
+
({ icon: n, size: r = "md", variant: e, ...l }, c) => {
|
|
18
|
+
const o = a(() => {
|
|
19
|
+
if (n === null) return null;
|
|
20
|
+
if (n) return n;
|
|
21
|
+
if (e === "default") return /* @__PURE__ */ t.createElement(i, { size: r });
|
|
22
|
+
if (e === "success") return /* @__PURE__ */ t.createElement(I, { size: r });
|
|
23
|
+
if (e === "info") return /* @__PURE__ */ t.createElement(d, { size: r });
|
|
24
|
+
if (e === "warning") return /* @__PURE__ */ t.createElement(p, { size: r });
|
|
25
|
+
if (e === "danger") return /* @__PURE__ */ t.createElement(E, { size: r });
|
|
26
|
+
if (e === "ai") return /* @__PURE__ */ t.createElement(x, { size: r });
|
|
27
|
+
}, [r, n, e]);
|
|
28
|
+
return o ? /* @__PURE__ */ t.createElement(_, { ref: c, variant: e, ...l }, o) : null;
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
|
-
|
|
31
|
+
$.displayName = "VariantIcon";
|
|
31
32
|
export {
|
|
32
|
-
|
|
33
|
+
$ as VariantIcon
|
|
33
34
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import c from "react";
|
|
3
|
+
import { Icon as e } from "./Icon.mjs";
|
|
4
|
+
const o = 15, n = 15, a = '<path fill="currentColor" d="m55.542 9.07 41.48 66.67a6.395 6.395 0 0 1 .32 6.225 6.482 6.482 0 0 1-5.123 3.604L9.256 94.957A6.502 6.502 0 0 1 3.12 92.15a6.41 6.41 0 0 1-.33-6.703L44.27 9.39v-.001c1.12-2.053 3.193-3.318 5.544-3.385a6.475 6.475 0 0 1 5.728 3.067Zm-3.217 61.689a3.726 3.726 0 0 0-.493-.601c-1.495-1.497-4.173-1.497-5.655 0a4.016 4.016 0 0 0-1.173 2.833c0 1.042.428 2.085 1.173 2.833A3.992 3.992 0 0 0 49.004 77a4.015 4.015 0 0 0 2.828-1.176 4.414 4.414 0 0 0 .867-1.31c.092-.24.173-.494.226-.748a5.24 5.24 0 0 0 .067-.775c0-.268-.028-.535-.067-.789a4.985 4.985 0 0 0-.226-.748 4.443 4.443 0 0 0-.374-.695ZM45 37.009v20.257a4.005 4.005 0 0 0 4 4.009c2.21 0 4-1.796 4-4.01V37.01c0-2.215-1.79-4.01-4-4.01-2.209 0-4 1.795-4 4.01Z"/>', l = {
|
|
5
|
+
width: o,
|
|
6
|
+
height: n,
|
|
7
|
+
block: a
|
|
8
|
+
}, S = (t) => /* @__PURE__ */ c.createElement(e, { alt: "Alert", content: l, ...t }), r = 15, h = 15, i = '<path fill="currentColor" fill-rule="evenodd" d="M74.68 21.64a6.51 6.51 0 0 1 9.155-.492 6.453 6.453 0 0 1 .707 8.907l-.211.246-43.47 48.058a6.495 6.495 0 0 1-4.828 2.141c-1.449 0-2.86-.48-4.013-1.385l-.283-.235-15.54-13.665a6.455 6.455 0 0 1-.555-9.153 6.512 6.512 0 0 1 8.902-.756l.248.208 10.72 9.425L74.68 21.641Z" clip-rule="evenodd"/>', s = {
|
|
9
|
+
width: r,
|
|
10
|
+
height: h,
|
|
11
|
+
block: i
|
|
12
|
+
}, V = (t) => /* @__PURE__ */ c.createElement(e, { alt: "Check", content: s, ...t }), d = 15, u = 15, $ = '<path fill="currentColor" d="M83.95 12.62C74.807 4.513 62.657.85 49.731 2.317 23.412 5.297 2 29.005 2 55.167c0 12.738 4.992 24.178 14.054 32.214C23.876 94.32 33.9 98 44.73 98c1.824 0 3.674-.105 5.536-.315C76.587 94.703 98 70.995 98 44.833c0-12.737-4.99-24.177-14.05-32.213ZM56.492 66.181c2.219-.25 4.228 1.293 4.48 3.432.254 2.139-1.341 4.07-3.562 4.314-.439.048-.878.073-1.314.073-2.838 0-5.599-1.003-7.737-2.84-2.467-2.121-3.882-5.163-3.882-8.347V49.825l-3.97.436c-2.224.244-4.23-1.293-4.482-3.432-.253-2.139 1.342-4.07 3.565-4.314l8.477-.93a4.142 4.142 0 0 1 3.155.963 3.842 3.842 0 0 1 1.352 2.91v17.355a3.29 3.29 0 0 0 1.177 2.529 3.582 3.582 0 0 0 2.74.84Zm-12.33-35.895a4.548 4.548 0 0 1-.365-1.742 4.52 4.52 0 0 1 1.391-3.222c1.092-1.053 2.725-1.533 4.264-1.235.298.052.593.143.877.26.283.104.567.247.81.416.27.17.514.351.728.559a4.51 4.51 0 0 1 1.377 3.223c0 .298-.027.597-.095.883a3.677 3.677 0 0 1-.27.858 3.699 3.699 0 0 1-.43.78c-.175.246-.366.48-.582.688a4.43 4.43 0 0 1-.729.572 5.21 5.21 0 0 1-.81.416 5.177 5.177 0 0 1-.877.26c-.31.051-.62.09-.93.09a4.846 4.846 0 0 1-3.928-2.027 5.523 5.523 0 0 1-.432-.78Z"/>', m = {
|
|
13
|
+
width: d,
|
|
14
|
+
height: u,
|
|
15
|
+
block: $
|
|
16
|
+
}, P = (t) => /* @__PURE__ */ c.createElement(e, { alt: "Information", content: m, ...t }), Z = 15, k = 15, f = '<path fill="currentColor" fill-rule="evenodd" d="M80.086 40.154a2.402 2.402 0 0 0-2.25-1.02l-24.929 2.81V6.365a2.37 2.37 0 0 0-1.812-2.294 2.4 2.4 0 0 0-2.692 1.183L19.781 58.402a2.345 2.345 0 0 0 .133 2.443 2.4 2.4 0 0 0 2.25 1.021l24.928-2.81v35.578a2.37 2.37 0 0 0 1.813 2.296c.194.047.388.07.58.07.869 0 1.69-.468 2.111-1.253l28.624-53.15a2.348 2.348 0 0 0-.134-2.443Z" clip-rule="evenodd"/>', p = {
|
|
17
|
+
width: Z,
|
|
18
|
+
height: k,
|
|
19
|
+
block: f
|
|
20
|
+
}, q = (t) => /* @__PURE__ */ c.createElement(e, { alt: "Promote", content: p, ...t }), v = 15, b = 15, g = '<path fill="currentColor" d="M94.977 44.758a2.373 2.373 0 0 0-2.544-2.096c-6.758.487-13.077-1.55-17.823-5.744-4.696-4.153-7.43-10.075-7.7-16.683a2.368 2.368 0 0 0-2.383-2.266c-1.282 0-2.333 1.004-2.383 2.266-.57 13.99-12.016 26.63-26.054 28.786-1.262.199-2.153 1.342-2.003 2.604a2.378 2.378 0 0 0 2.544 2.096c6.759-.487 13.087 1.55 17.823 5.744 4.696 4.153 7.42 10.075 7.7 16.673a2.368 2.368 0 0 0 2.383 2.266c1.282 0 2.333-1.004 2.383-2.266.57-13.99 12.016-26.64 26.054-28.786 1.262-.199 2.153-1.342 2.003-2.603v.01Zm-30.56 20.42a26.992 26.992 0 0 0-6.789-9.23 27.527 27.527 0 0 0-10.163-5.695c7.83-4.024 14.028-10.89 17.182-19.028a26.992 26.992 0 0 0 6.789 9.23 27.527 27.527 0 0 0 10.163 5.695c-7.83 4.024-14.028 10.89-17.182 19.028ZM24.445 48.594c1.282 0 2.333-1.004 2.383-2.266.33-8.078 6.94-15.372 15.05-16.624 1.261-.198 2.152-1.341 2.002-2.603a2.373 2.373 0 0 0-2.543-2.097c-3.845.269-7.45-.874-10.143-3.259-2.664-2.355-4.216-5.723-4.366-9.48A2.368 2.368 0 0 0 24.445 10c-1.282 0-2.333 1.004-2.383 2.266-.33 8.078-6.94 15.372-15.05 16.624-1.261.198-2.153 1.341-2.002 2.603.15 1.262 1.261 2.206 2.543 2.097 3.845-.279 7.45.874 10.143 3.259 2.664 2.355 4.216 5.723 4.366 9.48a2.368 2.368 0 0 0 2.383 2.265ZM20.87 33.311a17.764 17.764 0 0 0-4.616-2.95c3.565-2.256 6.479-5.476 8.331-9.232a17.277 17.277 0 0 0 3.435 4.154 17.766 17.766 0 0 0 4.616 2.95c-3.565 2.256-6.479 5.476-8.331 9.232a17.755 17.755 0 0 0-3.435-4.154Zm22.92 40.532c-2.073.149-4.015-.467-5.447-1.739-1.422-1.262-2.253-3.06-2.333-5.088a2.368 2.368 0 0 0-2.383-2.265c-1.282 0-2.333 1.004-2.383 2.265-.18 4.462-3.835 8.506-8.321 9.192-1.262.199-2.153 1.341-2.003 2.603.15 1.262 1.262 2.206 2.544 2.097 2.072-.15 4.015.467 5.447 1.739 1.422 1.262 2.253 3.06 2.333 5.087A2.368 2.368 0 0 0 33.627 90c1.282 0 2.333-1.004 2.383-2.266.18-4.461 3.835-8.505 8.32-9.191 1.262-.199 2.154-1.341 2.003-2.603a2.365 2.365 0 0 0-2.543-2.097ZM33.457 80.56a11.14 11.14 0 0 0-1.382-1.45 10.736 10.736 0 0 0-1.642-1.213 14.98 14.98 0 0 0 3.344-3.706c.41.516.871 1.003 1.382 1.45.51.458 1.061.865 1.642 1.213a15.02 15.02 0 0 0-3.344 3.716v-.01Z"/>', w = {
|
|
21
|
+
width: v,
|
|
22
|
+
height: b,
|
|
23
|
+
block: g
|
|
24
|
+
}, _ = (t) => /* @__PURE__ */ c.createElement(e, { alt: "Sparkles", content: w, ...t }), C = 15, M = 15, A = '<path fill="currentColor" fill-rule="evenodd" d="M5.863 49.971c-3.518 3.745-3.835 8.974-.723 11.924L41.114 96c3.378 3.203 9.445 2.476 13.264-1.589L95.137 51.03c3.518-3.745 3.835-8.974.723-11.924L59.886 5c-3.378-3.203-9.445-2.476-13.264 1.589L5.862 49.97ZM53.325 64.76c.145.214.267.454.373.695.093.24.174.494.227.748.039.254.067.522.067.789 0 .254-.028.52-.067.775a5 5 0 0 1-.226.748c-.107.24-.228.481-.374.695a3.822 3.822 0 0 1-.493.615A4.015 4.015 0 0 1 50.004 71a3.991 3.991 0 0 1-2.827-1.176 4.062 4.062 0 0 1-1.173-2.833c0-1.056.428-2.098 1.173-2.833 1.481-1.497 4.16-1.497 5.655 0 .185.173.345.387.493.601ZM46 31.009a4.005 4.005 0 0 1 4-4.01c2.21 0 4 1.796 4 4.01v20.257a4.005 4.005 0 0 1-4 4.009c-2.209 0-4-1.796-4-4.01V31.01Z" clip-rule="evenodd"/>', I = {
|
|
25
|
+
width: C,
|
|
26
|
+
height: M,
|
|
27
|
+
block: A
|
|
28
|
+
}, x = (t) => /* @__PURE__ */ c.createElement(e, { alt: "SquareAlert", content: I, ...t });
|
|
29
|
+
export {
|
|
30
|
+
S as A,
|
|
31
|
+
V as C,
|
|
32
|
+
P as I,
|
|
33
|
+
q as P,
|
|
34
|
+
x as S,
|
|
35
|
+
_ as a
|
|
36
|
+
};
|