welcome-ui 8.1.0-alpha.2 → 8.1.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/dist/AspectRatio.mjs +4 -2
- package/dist/Avatar.mjs +4 -4
- package/dist/Breadcrumb.mjs +19 -19
- package/dist/Button.mjs +2 -2
- package/dist/{CustomPopper-CZt4RioF.mjs → CustomPopper-B2Cqfph4.mjs} +4 -4
- package/dist/DatePicker.mjs +1 -1
- package/dist/DateTimePicker.mjs +3 -3
- package/dist/DateTimePickerCommon.mjs +1 -1
- package/dist/Drawer.mjs +2 -2
- package/dist/Field.mjs +25 -25
- package/dist/FieldGroup.mjs +4 -4
- package/dist/FileDrop.mjs +6 -6
- package/dist/FileUpload.mjs +30 -30
- package/dist/Icon.mjs +11 -11
- package/dist/IconsFont.mjs +1 -1
- package/dist/InputText.mjs +26 -26
- package/dist/Label.mjs +5 -5
- package/dist/Link.mjs +22 -21
- package/dist/Modal.mjs +34 -34
- package/dist/PasswordInput.mjs +5 -5
- package/dist/Picker.mjs +5 -5
- package/dist/Popover.mjs +10 -10
- package/dist/Radio.mjs +1 -1
- package/dist/Search.mjs +52 -50
- package/dist/Select.mjs +10 -10
- package/dist/Slider.mjs +9 -9
- package/dist/Swiper.mjs +3 -3
- package/dist/TimePicker.mjs +1 -1
- package/dist/Toast.mjs +4 -4
- package/dist/Toggle.mjs +8 -8
- package/dist/WuiProvider.mjs +1 -1
- package/dist/types/components/Alert/theme.d.ts +1 -1
- package/dist/types/components/AspectRatio/styles.d.ts +3 -2
- package/dist/types/components/Avatar/theme.d.ts +1 -1
- package/dist/types/components/Button/theme.d.ts +1 -1
- package/dist/types/components/ButtonGroup/index.d.ts +2 -2
- package/dist/types/components/Icon/theme.d.ts +1 -1
- package/dist/types/components/Loader/theme.d.ts +1 -1
- package/dist/types/components/Modal/theme.d.ts +1 -1
- package/dist/types/components/Swiper/index.d.ts +1 -1
- package/dist/types/components/Swiper/styles.d.ts +4 -4
- package/dist/types/components/Tabs/theme.d.ts +1 -1
- package/dist/types/components/Tag/theme.d.ts +1 -1
- package/dist/types/components/Toggle/theme.d.ts +1 -1
- package/dist/types/components/VariantIcon/theme.d.ts +1 -1
- package/package.json +6 -3
package/dist/AspectRatio.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { j as i } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
|
3
3
|
import { forwardRef as s } from "./System.mjs";
|
|
4
4
|
import r, { css as n } from "@xstyled/styled-components";
|
|
5
5
|
const p = r.divBox(
|
|
6
|
-
({ ratio: t
|
|
6
|
+
({ ratio: t }) => n`
|
|
7
7
|
position: relative;
|
|
8
8
|
|
|
9
9
|
& > * {
|
|
@@ -32,7 +32,9 @@ const p = r.divBox(
|
|
|
32
32
|
padding-bottom: ${1 / t * 100}%;
|
|
33
33
|
}
|
|
34
34
|
`
|
|
35
|
-
), c = s(
|
|
35
|
+
), c = s(
|
|
36
|
+
({ ratio: t = 4 / 3, ...o }, e) => /* @__PURE__ */ i.jsx(p, { ratio: t, ref: e, ...o })
|
|
37
|
+
);
|
|
36
38
|
c.displayName = "AspectRatio";
|
|
37
39
|
export {
|
|
38
40
|
c as AspectRatio
|
package/dist/Avatar.mjs
CHANGED
|
@@ -31,12 +31,12 @@ const T = y(
|
|
|
31
31
|
w: n,
|
|
32
32
|
...h
|
|
33
33
|
}, x) => {
|
|
34
|
-
const l = j(),
|
|
34
|
+
const l = j(), u = o || z(l.colors, e), c = l.avatars.sizes[f], d = t || `calc(${n ? l.toRem(n) : c} / 2.5)`;
|
|
35
35
|
return /* @__PURE__ */ s.jsxs(
|
|
36
36
|
b,
|
|
37
37
|
{
|
|
38
38
|
"aria-label": e,
|
|
39
|
-
backgroundColor:
|
|
39
|
+
backgroundColor: u,
|
|
40
40
|
h: a || c,
|
|
41
41
|
ref: x,
|
|
42
42
|
role: "img",
|
|
@@ -44,8 +44,8 @@ const T = y(
|
|
|
44
44
|
w: n || c,
|
|
45
45
|
...h,
|
|
46
46
|
children: [
|
|
47
|
-
i
|
|
48
|
-
!i && /* @__PURE__ */ s.jsx(v, { children: /* @__PURE__ */ s.jsx(A, { fontSize:
|
|
47
|
+
i ? /* @__PURE__ */ s.jsx("img", { alt: e, src: i }) : null,
|
|
48
|
+
!i && /* @__PURE__ */ s.jsx(v, { children: /* @__PURE__ */ s.jsx(A, { fontSize: d, m: 0, children: r(e) }) })
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
);
|
package/dist/Breadcrumb.mjs
CHANGED
|
@@ -37,8 +37,8 @@ var z = function(e) {
|
|
|
37
37
|
return this.x = t, this.y = r, this.width = n, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, z(this);
|
|
38
38
|
}
|
|
39
39
|
return e.prototype.toJSON = function() {
|
|
40
|
-
var t = this, r = t.x, n = t.y, i = t.top, a = t.right, o = t.bottom,
|
|
41
|
-
return { x: r, y: n, top: i, right: a, bottom: o, left:
|
|
40
|
+
var t = this, r = t.x, n = t.y, i = t.top, a = t.right, o = t.bottom, l = t.left, v = t.width, c = t.height;
|
|
41
|
+
return { x: r, y: n, top: i, right: a, bottom: o, left: l, width: v, height: c };
|
|
42
42
|
}, e.fromRect = function(t) {
|
|
43
43
|
return new e(t.x, t.y, t.width, t.height);
|
|
44
44
|
}, e;
|
|
@@ -86,11 +86,11 @@ var z = function(e) {
|
|
|
86
86
|
return M.get(e);
|
|
87
87
|
if (ae(e))
|
|
88
88
|
return M.set(e, Q), Q;
|
|
89
|
-
var r = getComputedStyle(e), n = V(e) && e.ownerSVGElement && e.getBBox(), i = !De && r.boxSizing === "border-box", a = ke.test(r.writingMode || ""), o = !n && K.test(r.overflowY || ""),
|
|
89
|
+
var r = getComputedStyle(e), n = V(e) && e.ownerSVGElement && e.getBBox(), i = !De && r.boxSizing === "border-box", a = ke.test(r.writingMode || ""), o = !n && K.test(r.overflowY || ""), l = !n && K.test(r.overflowX || ""), v = n ? 0 : f(r.paddingTop), c = n ? 0 : f(r.paddingRight), E = n ? 0 : f(r.paddingBottom), d = n ? 0 : f(r.paddingLeft), W = n ? 0 : f(r.borderTopWidth), D = n ? 0 : f(r.borderRightWidth), I = n ? 0 : f(r.borderBottomWidth), $ = n ? 0 : f(r.borderLeftWidth), B = d + c, m = v + E, T = $ + D, S = W + I, s = l ? e.offsetHeight - S - e.clientHeight : 0, u = o ? e.offsetWidth - T - e.clientWidth : 0, p = i ? B + T : 0, x = i ? m + S : 0, h = n ? n.width : f(r.width) - p - u, b = n ? n.height : f(r.height) - x - s, _ = h + B + u + T, be = b + m + s + S, X = z({
|
|
90
90
|
devicePixelContentBoxSize: R(Math.round(h * devicePixelRatio), Math.round(b * devicePixelRatio), a),
|
|
91
91
|
borderBoxSize: R(_, be, a),
|
|
92
92
|
contentBoxSize: R(h, b, a),
|
|
93
|
-
contentRect: new se(d,
|
|
93
|
+
contentRect: new se(d, v, h, b)
|
|
94
94
|
});
|
|
95
95
|
return M.set(e, X), X;
|
|
96
96
|
}, ue = function(e, t, r) {
|
|
@@ -109,7 +109,7 @@ var z = function(e) {
|
|
|
109
109
|
this.target = t, this.contentRect = r.contentRect, this.borderBoxSize = z([r.borderBoxSize]), this.contentBoxSize = z([r.contentBoxSize]), this.devicePixelContentBoxSize = z([r.devicePixelContentBoxSize]);
|
|
110
110
|
}
|
|
111
111
|
return e;
|
|
112
|
-
}(),
|
|
112
|
+
}(), le = function(e) {
|
|
113
113
|
if (ae(e))
|
|
114
114
|
return 1 / 0;
|
|
115
115
|
for (var t = 0, r = e.parentNode; r; )
|
|
@@ -119,12 +119,12 @@ var z = function(e) {
|
|
|
119
119
|
var e = 1 / 0, t = [];
|
|
120
120
|
w.forEach(function(o) {
|
|
121
121
|
if (o.activeTargets.length !== 0) {
|
|
122
|
-
var
|
|
122
|
+
var l = [];
|
|
123
123
|
o.activeTargets.forEach(function(c) {
|
|
124
|
-
var E = new Ie(c.target), d =
|
|
125
|
-
|
|
124
|
+
var E = new Ie(c.target), d = le(c.target);
|
|
125
|
+
l.push(E), c.lastReportedSize = ue(c.target, c.observedBox), d < e && (e = d);
|
|
126
126
|
}), t.push(function() {
|
|
127
|
-
o.callback.call(o.observer,
|
|
127
|
+
o.callback.call(o.observer, l, o.observer);
|
|
128
128
|
}), o.activeTargets.splice(0, o.activeTargets.length);
|
|
129
129
|
}
|
|
130
130
|
});
|
|
@@ -136,7 +136,7 @@ var z = function(e) {
|
|
|
136
136
|
}, Z = function(e) {
|
|
137
137
|
w.forEach(function(r) {
|
|
138
138
|
r.activeTargets.splice(0, r.activeTargets.length), r.skippedTargets.splice(0, r.skippedTargets.length), r.observationTargets.forEach(function(i) {
|
|
139
|
-
i.isActive() && (
|
|
139
|
+
i.isActive() && (le(i.target) > e ? r.activeTargets.push(i) : r.skippedTargets.push(i));
|
|
140
140
|
});
|
|
141
141
|
});
|
|
142
142
|
}, Ae = function() {
|
|
@@ -144,8 +144,8 @@ var z = function(e) {
|
|
|
144
144
|
for (Z(e); Ee(); )
|
|
145
145
|
e = Me(), Z(e);
|
|
146
146
|
return Be() && Te(), e > 0;
|
|
147
|
-
}, F,
|
|
148
|
-
return
|
|
147
|
+
}, F, ve = [], Le = function() {
|
|
148
|
+
return ve.splice(0).forEach(function(e) {
|
|
149
149
|
return e();
|
|
150
150
|
});
|
|
151
151
|
}, Ne = function(e) {
|
|
@@ -157,7 +157,7 @@ var z = function(e) {
|
|
|
157
157
|
r.textContent = "".concat(t ? t-- : t++);
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
ve.push(e), F();
|
|
161
161
|
}, We = function(e) {
|
|
162
162
|
Ne(function() {
|
|
163
163
|
requestAnimationFrame(e);
|
|
@@ -326,7 +326,7 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
326
326
|
flex: "0 0 auto",
|
|
327
327
|
lineHeight: "normal",
|
|
328
328
|
children: [
|
|
329
|
-
n
|
|
329
|
+
n ? /* @__PURE__ */ g.jsx(Je, { role: "presentation", children: n }) : null,
|
|
330
330
|
/* @__PURE__ */ g.jsx(
|
|
331
331
|
qe,
|
|
332
332
|
{
|
|
@@ -387,7 +387,7 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
387
387
|
separator: n = /* @__PURE__ */ g.jsx(ze, { size: "xs" }),
|
|
388
388
|
...i
|
|
389
389
|
}, a) => {
|
|
390
|
-
const o = P(null),
|
|
390
|
+
const o = P(null), l = P(null), v = P(null), [c, E] = j(!1), [d, W] = j(0), D = me.toArray(e).filter(Boolean), I = D.length, $ = D.map((s, u) => {
|
|
391
391
|
const p = I === 1 || I === u + 1, x = p && r;
|
|
392
392
|
return ge.isValidElement(s) ? xe(s, {
|
|
393
393
|
isActive: x,
|
|
@@ -401,7 +401,7 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
401
401
|
}
|
|
402
402
|
const m = q((s) => {
|
|
403
403
|
const u = 1 - s;
|
|
404
|
-
B(
|
|
404
|
+
B(l.current, u), B(v.current, s);
|
|
405
405
|
}, []), T = q(() => {
|
|
406
406
|
const { current: s } = o;
|
|
407
407
|
if (!s) return;
|
|
@@ -429,11 +429,11 @@ const je = (e, t, r) => Math.min(Math.max(e, t), r), qe = y.aBox`
|
|
|
429
429
|
const s = new Xe(S);
|
|
430
430
|
return o.current && s.observe(o.current), () => s.disconnect();
|
|
431
431
|
}, []), J(() => {
|
|
432
|
-
|
|
432
|
+
l.current && v.current && m(0);
|
|
433
433
|
}, [c, m]), /* @__PURE__ */ g.jsxs(Ye, { as: "nav", ref: a, ...i, children: [
|
|
434
|
-
c
|
|
434
|
+
c ? /* @__PURE__ */ g.jsx(de, { gradientBackground: t, ref: l }) : null,
|
|
435
435
|
/* @__PURE__ */ g.jsx(Ke, { dir: "rtl", onScroll: T, ref: o, children: $.reverse() }),
|
|
436
|
-
c
|
|
436
|
+
c ? /* @__PURE__ */ g.jsx(fe, { gradientBackground: t, ref: v }) : null
|
|
437
437
|
] });
|
|
438
438
|
}
|
|
439
439
|
);
|
package/dist/Button.mjs
CHANGED
|
@@ -123,7 +123,7 @@ const B = (s, i = "square") => n`
|
|
|
123
123
|
variant: d ? "disabled" : a,
|
|
124
124
|
...b,
|
|
125
125
|
children: [
|
|
126
|
-
o
|
|
126
|
+
o ? /* @__PURE__ */ r.jsxs("div", { children: [
|
|
127
127
|
/* @__PURE__ */ r.jsx(
|
|
128
128
|
l,
|
|
129
129
|
{
|
|
@@ -140,7 +140,7 @@ const B = (s, i = "square") => n`
|
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
142
|
/* @__PURE__ */ r.jsx(l, { opacity: "0", children: i })
|
|
143
|
-
] }),
|
|
143
|
+
] }) : null,
|
|
144
144
|
!o && i
|
|
145
145
|
]
|
|
146
146
|
}
|
|
@@ -6930,11 +6930,11 @@ const yl = mo(
|
|
|
6930
6930
|
const l = ko[i || "md"];
|
|
6931
6931
|
return /* @__PURE__ */ fe.jsxs(cl, { focused: n, onBlur: a, onFocus: r, children: [
|
|
6932
6932
|
/* @__PURE__ */ fe.jsx("input", { value: s || "", ...c, ref: u }),
|
|
6933
|
-
t && e !== "right"
|
|
6934
|
-
s
|
|
6933
|
+
t && e !== "right" ? /* @__PURE__ */ fe.jsx(hn, { iconPlacement: e || "left", size: l, children: v.cloneElement(t, { ...t.props, size: l }) }) : null,
|
|
6934
|
+
s ? /* @__PURE__ */ fe.jsxs(fn, { size: l, children: [
|
|
6935
6935
|
/* @__PURE__ */ fe.jsx(_o, { "aria-label": "clear date", onClick: o }),
|
|
6936
|
-
t && e === "right"
|
|
6937
|
-
] })
|
|
6936
|
+
t && e === "right" ? v.cloneElement(t, { ...t.props, size: l }) : null
|
|
6937
|
+
] }) : null
|
|
6938
6938
|
] });
|
|
6939
6939
|
}
|
|
6940
6940
|
);
|
package/dist/DatePicker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as a } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
3
|
import { useState as k, useRef as V, useEffect as E } from "react";
|
|
4
|
-
import { g as W, D as R, S as X, c as Z, C as $, b as z } from "./CustomPopper-
|
|
4
|
+
import { g as W, D as R, S as X, c as Z, C as $, b as z } from "./CustomPopper-B2Cqfph4.mjs";
|
|
5
5
|
import { forwardRef as B } from "./System.mjs";
|
|
6
6
|
const g = B(
|
|
7
7
|
({
|
package/dist/DateTimePicker.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as a } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
3
|
import d, { Children as f, useState as $, useEffect as P, cloneElement as b } from "react";
|
|
4
4
|
import { DatePicker as j } from "./DatePicker.mjs";
|
|
5
|
-
import { S as w, a as S, g as _, D as A } from "./CustomPopper-
|
|
5
|
+
import { S as w, a as S, g as _, D as A } from "./CustomPopper-B2Cqfph4.mjs";
|
|
6
6
|
import { forwardRef as R } from "./System.mjs";
|
|
7
7
|
import { TimePicker as T } from "./TimePicker.mjs";
|
|
8
8
|
import V, { css as F } from "@xstyled/styled-components";
|
|
@@ -64,7 +64,7 @@ const g = F`
|
|
|
64
64
|
const e = p(t);
|
|
65
65
|
((s = new Date(t)) == null ? void 0 : s.getTime()) - (e == null ? void 0 : e.getTime()) !== 0 && i && o(e), D(e);
|
|
66
66
|
}, [t]), /* @__PURE__ */ a.jsxs(I, { "data-testid": m, children: [
|
|
67
|
-
r
|
|
67
|
+
r ? f.map(r, (e, s) => d.isValidElement(e) ? b(e, {
|
|
68
68
|
// give ref only to the first child
|
|
69
69
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
70
70
|
// @ts-expect-error
|
|
@@ -75,7 +75,7 @@ const g = F`
|
|
|
75
75
|
timeIntervals: y,
|
|
76
76
|
transparent: c,
|
|
77
77
|
value: E
|
|
78
|
-
}) : e),
|
|
78
|
+
}) : e) : null,
|
|
79
79
|
!r && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
80
80
|
/* @__PURE__ */ a.jsx(
|
|
81
81
|
j,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as a, b as t, c as r, D as o, S as i, a as g, f as m, g as u, d as D, e as c } from "./CustomPopper-
|
|
2
|
+
import { C as a, b as t, c as r, D as o, S as i, a as g, f as m, g as u, d as D, e as c } from "./CustomPopper-B2Cqfph4.mjs";
|
|
3
3
|
export {
|
|
4
4
|
a as CustomHeader,
|
|
5
5
|
t as CustomInput,
|
package/dist/Drawer.mjs
CHANGED
|
@@ -86,7 +86,7 @@ const I = n.divBox`
|
|
|
86
86
|
i
|
|
87
87
|
] })
|
|
88
88
|
] }),
|
|
89
|
-
t
|
|
89
|
+
t ? /* @__PURE__ */ r.jsx(l, { alignItems: "center", display: "flex", flexShrink: 0, gap: "md", children: t }) : null
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
), O = ({ icon: t, size: e = "md" }) => /* @__PURE__ */ r.jsx(S, { size: e, children: /* @__PURE__ */ r.jsx(t, { color: "neutral-90", size: e }) }), R = (t) => {
|
|
@@ -246,7 +246,7 @@ const I = n.divBox`
|
|
|
246
246
|
store: a,
|
|
247
247
|
...j,
|
|
248
248
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
249
|
-
w
|
|
249
|
+
w ? /* @__PURE__ */ r.jsx(h, {}) : null,
|
|
250
250
|
t
|
|
251
251
|
] })
|
|
252
252
|
}
|
package/dist/Field.mjs
CHANGED
|
@@ -12,7 +12,7 @@ const Y = s`
|
|
|
12
12
|
align-items: flex-start;
|
|
13
13
|
overflow-wrap: break-word;
|
|
14
14
|
`, _ = c.divBox.withConfig({ shouldForwardProp: z })(
|
|
15
|
-
({ checked: t, isCheckable: o, isRadioGroup:
|
|
15
|
+
({ checked: t, isCheckable: o, isRadioGroup: l, withHintText: u }) => s`
|
|
16
16
|
${o && s`
|
|
17
17
|
input {
|
|
18
18
|
margin-top: xs;
|
|
@@ -20,12 +20,12 @@ const Y = s`
|
|
|
20
20
|
`}
|
|
21
21
|
${P} {
|
|
22
22
|
${o && Y};
|
|
23
|
-
${o &&
|
|
23
|
+
${o && u && i("defaultFields.checkablelabel.default")}
|
|
24
24
|
${t && i("defaultFields.checkablelabel.checked")}
|
|
25
25
|
${!o && s`
|
|
26
26
|
margin-bottom: sm;
|
|
27
27
|
`}
|
|
28
|
-
${
|
|
28
|
+
${l && s`
|
|
29
29
|
margin-bottom: md;
|
|
30
30
|
`}
|
|
31
31
|
}
|
|
@@ -92,18 +92,18 @@ const Y = s`
|
|
|
92
92
|
}, K = (t) => J[t] || t, Q = ({
|
|
93
93
|
error: t,
|
|
94
94
|
success: o,
|
|
95
|
-
warning:
|
|
95
|
+
warning: l
|
|
96
96
|
}) => {
|
|
97
97
|
if (t) return "danger";
|
|
98
|
-
if (
|
|
98
|
+
if (l) return "warning";
|
|
99
99
|
if (o) return "success";
|
|
100
100
|
}, U = () => `wui-field-${Math.random().toString(36).slice(2)}`, X = ["disabled", "required", "variant"], Z = C(
|
|
101
101
|
({
|
|
102
102
|
children: t,
|
|
103
103
|
dataTestId: o,
|
|
104
|
-
disabled:
|
|
105
|
-
disabledIcon:
|
|
106
|
-
error:
|
|
104
|
+
disabled: l,
|
|
105
|
+
disabledIcon: u,
|
|
106
|
+
error: m,
|
|
107
107
|
flexDirection: w,
|
|
108
108
|
hint: k,
|
|
109
109
|
label: x,
|
|
@@ -113,12 +113,12 @@ const Y = s`
|
|
|
113
113
|
warning: b,
|
|
114
114
|
...R
|
|
115
115
|
}, G) => {
|
|
116
|
-
const d = K(t.props.type || t.type.displayName), I = d === "radio", g = d === "RadioGroup", T = d === "FieldGroup", B = d === "checkbox", E = t.type.displayName === "Toggle", e = I || B || E, L = w || (e ? "row" : "column"), S = T || g,
|
|
117
|
-
disabled:
|
|
116
|
+
const d = K(t.props.type || t.type.displayName), I = d === "radio", g = d === "RadioGroup", T = d === "FieldGroup", B = d === "checkbox", E = t.type.displayName === "Toggle", e = I || B || E, L = w || (e ? "row" : "column"), S = T || g, r = Q({ error: m, success: h, warning: b }), a = r ? m || b || h : k, W = !!a, p = t.props.id || t.props.name || U(), $ = F.cloneElement(F.Children.only(t), {
|
|
117
|
+
disabled: l,
|
|
118
118
|
id: p,
|
|
119
119
|
required: f,
|
|
120
120
|
transparent: j,
|
|
121
|
-
variant:
|
|
121
|
+
variant: r,
|
|
122
122
|
...S ? { flexDirection: L } : {}
|
|
123
123
|
});
|
|
124
124
|
return V(() => {
|
|
@@ -139,49 +139,49 @@ const Y = s`
|
|
|
139
139
|
withHintText: W,
|
|
140
140
|
children: [
|
|
141
141
|
/* @__PURE__ */ n.jsxs(M, { children: [
|
|
142
|
-
e
|
|
142
|
+
e ? $ : null,
|
|
143
143
|
/* @__PURE__ */ n.jsxs(O, { children: [
|
|
144
|
-
x
|
|
144
|
+
x ? /* @__PURE__ */ n.jsxs(
|
|
145
145
|
H,
|
|
146
146
|
{
|
|
147
147
|
checkableField: e,
|
|
148
148
|
dataTestId: o ? `${o}-label` : void 0,
|
|
149
|
-
disabled:
|
|
150
|
-
disabledIcon:
|
|
149
|
+
disabled: l,
|
|
150
|
+
disabledIcon: u,
|
|
151
151
|
htmlFor: p,
|
|
152
152
|
required: f,
|
|
153
|
-
variant:
|
|
153
|
+
variant: r,
|
|
154
154
|
withDisabledIcon: !e,
|
|
155
155
|
children: [
|
|
156
|
-
e
|
|
156
|
+
e ? /* @__PURE__ */ n.jsx(D, { size: "sm", variant: r }) : null,
|
|
157
157
|
x
|
|
158
158
|
]
|
|
159
159
|
}
|
|
160
|
-
),
|
|
161
|
-
e &&
|
|
160
|
+
) : null,
|
|
161
|
+
e && a ? /* @__PURE__ */ n.jsx(
|
|
162
162
|
v,
|
|
163
163
|
{
|
|
164
164
|
checkableField: !0,
|
|
165
165
|
dataTestId: o ? `${o}-hint` : void 0,
|
|
166
166
|
mt: "0",
|
|
167
|
-
variant:
|
|
168
|
-
children:
|
|
167
|
+
variant: r,
|
|
168
|
+
children: a
|
|
169
169
|
}
|
|
170
|
-
)
|
|
170
|
+
) : null
|
|
171
171
|
] })
|
|
172
172
|
] }),
|
|
173
173
|
!e && $,
|
|
174
|
-
!e &&
|
|
174
|
+
!e && a ? /* @__PURE__ */ n.jsx(v, { dataTestId: o ? `${o}-hint` : void 0, variant: r, children: a }) : null
|
|
175
175
|
]
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
179
|
);
|
|
180
180
|
Z.displayName = "Field";
|
|
181
|
-
const
|
|
181
|
+
const at = q, ct = A;
|
|
182
182
|
export {
|
|
183
183
|
Z as Field,
|
|
184
184
|
ct as IconGroupWrapper,
|
|
185
|
-
|
|
185
|
+
at as IconWrapper,
|
|
186
186
|
K as getBaseType
|
|
187
187
|
};
|
package/dist/FieldGroup.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
-
import { Label as
|
|
4
|
-
import { shouldForwardProp as
|
|
3
|
+
import { Label as l } from "./Label.mjs";
|
|
4
|
+
import { shouldForwardProp as m, forwardRef as n } from "./System.mjs";
|
|
5
5
|
import p, { th as a } from "@xstyled/styled-components";
|
|
6
|
-
const o = p.fieldsetBox.withConfig({ shouldForwardProp:
|
|
6
|
+
const o = p.fieldsetBox.withConfig({ shouldForwardProp: m })`
|
|
7
7
|
width: 100%;
|
|
8
8
|
min-width: 0;
|
|
9
9
|
min-height: 0;
|
|
@@ -16,7 +16,7 @@ const o = p.fieldsetBox.withConfig({ shouldForwardProp: l })`
|
|
|
16
16
|
}
|
|
17
17
|
`, f = n(
|
|
18
18
|
({ children: d, dataTestId: e, label: i, required: r }, s) => /* @__PURE__ */ t.jsxs(o, { "data-testid": e, ref: s, children: [
|
|
19
|
-
i
|
|
19
|
+
i ? /* @__PURE__ */ t.jsx(l, { as: "legend", required: r, children: i }) : null,
|
|
20
20
|
d
|
|
21
21
|
] })
|
|
22
22
|
);
|
package/dist/FileDrop.mjs
CHANGED
|
@@ -2166,10 +2166,10 @@ const Lt = ({
|
|
|
2166
2166
|
/* @__PURE__ */ d.jsx(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }),
|
|
2167
2167
|
/* @__PURE__ */ d.jsx(bi, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4", children: r }),
|
|
2168
2168
|
!e && /* @__PURE__ */ d.jsx(bi, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm", children: c }),
|
|
2169
|
-
e
|
|
2169
|
+
e ? /* @__PURE__ */ d.jsxs(gi, { as: "a", href: i, mt: "md", rel: "noopener", size: "sm", target: "_blank", children: [
|
|
2170
2170
|
/* @__PURE__ */ d.jsx("span", { children: n }),
|
|
2171
2171
|
/* @__PURE__ */ d.jsx(Ka, {})
|
|
2172
|
-
] })
|
|
2172
|
+
] }) : null
|
|
2173
2173
|
] });
|
|
2174
2174
|
}, la = ({
|
|
2175
2175
|
disabled: i,
|
|
@@ -2345,10 +2345,10 @@ const Lt = ({
|
|
|
2345
2345
|
openFile: oi,
|
|
2346
2346
|
wordings: ni
|
|
2347
2347
|
}),
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
v
|
|
2351
|
-
] })
|
|
2348
|
+
k && (W || h || v) ? /* @__PURE__ */ d.jsxs(Mt, { children: [
|
|
2349
|
+
W || h ? /* @__PURE__ */ d.jsx(gi, { onClick: oi, shape: "circle", size: "sm", type: "button", variant: "tertiary", children: /* @__PURE__ */ d.jsx(qa, {}) }) : null,
|
|
2350
|
+
v ? /* @__PURE__ */ d.jsx(gi, { danger: !0, onClick: C, shape: "circle", size: "sm", type: "button", children: /* @__PURE__ */ d.jsx(Ta, {}) }) : null
|
|
2351
|
+
] }) : null
|
|
2352
2352
|
] })
|
|
2353
2353
|
]
|
|
2354
2354
|
}
|
package/dist/FileUpload.mjs
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as e } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Box as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { getFileIcon as
|
|
7
|
-
import { shouldForwardProp as
|
|
8
|
-
import { Tag as
|
|
3
|
+
import { useState as z, useRef as A, useEffect as _ } from "react";
|
|
4
|
+
import { Box as D } from "./Box.mjs";
|
|
5
|
+
import { Button as N } from "./Button.mjs";
|
|
6
|
+
import { getFileIcon as O, getFileName as P, getFileSize as K } from "./Files.mjs";
|
|
7
|
+
import { shouldForwardProp as M, forwardRef as X } from "./System.mjs";
|
|
8
|
+
import { Tag as Y } from "./Tag.mjs";
|
|
9
9
|
import { c as b } from "./create-event-rXDe5aCQ.mjs";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import Z from "@xstyled/styled-components";
|
|
11
|
+
const q = Z.inputBox.withConfig({ shouldForwardProp: M })`
|
|
12
12
|
display: none;
|
|
13
|
-
`,
|
|
14
|
-
const a =
|
|
15
|
-
return /* @__PURE__ */ e.jsxs(
|
|
13
|
+
`, G = 2e6, H = "*/*", d = (r) => Array.isArray(r) ? r : r ? [r] : [], J = ({ file: r, onRemove: f }) => {
|
|
14
|
+
const a = O(r), o = P(r), u = K(r);
|
|
15
|
+
return /* @__PURE__ */ e.jsxs(Y, { "data-id": o, mr: "sm", mt: "sm", onRemove: f, children: [
|
|
16
16
|
/* @__PURE__ */ e.jsx(a, { size: "md" }),
|
|
17
17
|
o,
|
|
18
|
-
|
|
18
|
+
u ? /* @__PURE__ */ e.jsxs(D, { color: "beige-60", children: [
|
|
19
19
|
"(",
|
|
20
|
-
|
|
20
|
+
u,
|
|
21
21
|
")"
|
|
22
|
-
] })
|
|
22
|
+
] }) : null
|
|
23
23
|
] }, o);
|
|
24
|
-
},
|
|
24
|
+
}, Q = X(
|
|
25
25
|
({
|
|
26
|
-
accept: r =
|
|
26
|
+
accept: r = H,
|
|
27
27
|
children: f,
|
|
28
28
|
dataTestId: a,
|
|
29
29
|
disabled: o,
|
|
30
30
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
31
|
-
draggable:
|
|
32
|
-
handleAddFile:
|
|
31
|
+
draggable: u,
|
|
32
|
+
handleAddFile: j,
|
|
33
33
|
handleRemoveFile: x,
|
|
34
|
-
maxSize: g =
|
|
34
|
+
maxSize: g = G,
|
|
35
35
|
multiple: L,
|
|
36
36
|
name: E,
|
|
37
37
|
onBlur: i,
|
|
38
38
|
onChange: n,
|
|
39
39
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
40
|
-
onError:
|
|
41
|
-
preview: v =
|
|
40
|
+
onError: V,
|
|
41
|
+
preview: v = J,
|
|
42
42
|
value: w = [],
|
|
43
43
|
...k
|
|
44
44
|
}, p) => {
|
|
45
|
-
const [c, y] =
|
|
45
|
+
const [c, y] = z(d(w)), F = A();
|
|
46
46
|
_(() => {
|
|
47
47
|
y(d(w));
|
|
48
48
|
}, [w]), _(() => () => {
|
|
@@ -56,9 +56,9 @@ const G = q.inputBox.withConfig({ shouldForwardProp: X })`
|
|
|
56
56
|
);
|
|
57
57
|
y(s), s.length === 1 && (s = s[0]);
|
|
58
58
|
const U = b({ name: E, value: s });
|
|
59
|
-
n == null || n(U),
|
|
59
|
+
n == null || n(U), j == null || j(s), i == null || i();
|
|
60
60
|
}, R = (t) => {
|
|
61
|
-
const s = c.filter((
|
|
61
|
+
const s = c.filter((l) => l !== t), U = L ? s : void 0;
|
|
62
62
|
y(s);
|
|
63
63
|
const m = b({ name: E, value: U });
|
|
64
64
|
n == null || n(m), x == null || x(t), i == null || i();
|
|
@@ -71,10 +71,10 @@ const G = q.inputBox.withConfig({ shouldForwardProp: X })`
|
|
|
71
71
|
files: c,
|
|
72
72
|
onRemoveFile: R,
|
|
73
73
|
openFile: I
|
|
74
|
-
}) : /* @__PURE__ */ e.jsx(
|
|
74
|
+
}) : /* @__PURE__ */ e.jsx(N, { disabled: o, onClick: I, children: "Upload file" }),
|
|
75
75
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
76
76
|
/* @__PURE__ */ e.jsx(
|
|
77
|
-
|
|
77
|
+
q,
|
|
78
78
|
{
|
|
79
79
|
accept: r,
|
|
80
80
|
"data-testid": a,
|
|
@@ -92,18 +92,18 @@ const G = q.inputBox.withConfig({ shouldForwardProp: X })`
|
|
|
92
92
|
},
|
|
93
93
|
T
|
|
94
94
|
),
|
|
95
|
-
v
|
|
95
|
+
v ? c.map((t) => /* @__PURE__ */ e.jsx(
|
|
96
96
|
v,
|
|
97
97
|
{
|
|
98
98
|
file: t,
|
|
99
99
|
onRemove: () => R(t)
|
|
100
100
|
},
|
|
101
101
|
t instanceof File ? t.name : t
|
|
102
|
-
))
|
|
102
|
+
)) : null
|
|
103
103
|
] });
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
Q.displayName = "FileUpload";
|
|
107
107
|
export {
|
|
108
|
-
|
|
108
|
+
Q as FileUpload
|
|
109
109
|
};
|
package/dist/Icon.mjs
CHANGED
|
@@ -8,29 +8,29 @@ const g = i`
|
|
|
8
8
|
stroke: inherit;
|
|
9
9
|
fill: none;
|
|
10
10
|
}
|
|
11
|
-
`,
|
|
11
|
+
`, u = i`
|
|
12
12
|
g,
|
|
13
13
|
path {
|
|
14
14
|
stroke: none;
|
|
15
15
|
}
|
|
16
|
-
`,
|
|
16
|
+
`, l = d.svgBox(({ isFlag: o, size: s = "md", stroked: r, theme: t }) => {
|
|
17
17
|
const e = t.icons[s] || s;
|
|
18
18
|
return i`
|
|
19
|
-
${!o && (r ? g :
|
|
19
|
+
${!o && (r ? g : u)};
|
|
20
20
|
width: ${e};
|
|
21
21
|
height: ${e};
|
|
22
22
|
`;
|
|
23
|
-
}),
|
|
24
|
-
({ content: o, dataTestId: s, size: r = "md", title: t, ...e },
|
|
23
|
+
}), f = m(
|
|
24
|
+
({ content: o, dataTestId: s, size: r = "md", title: t, ...e }, n) => {
|
|
25
25
|
const c = e.className || "";
|
|
26
26
|
return o ? /* @__PURE__ */ a.jsx(
|
|
27
|
-
|
|
27
|
+
l,
|
|
28
28
|
{
|
|
29
29
|
alt: t,
|
|
30
30
|
dangerouslySetInnerHTML: { __html: o.block },
|
|
31
|
-
"data-testid": s
|
|
31
|
+
"data-testid": s ? `icon-${s}` : null,
|
|
32
32
|
isFlag: o.isFlag,
|
|
33
|
-
ref:
|
|
33
|
+
ref: n,
|
|
34
34
|
role: "img",
|
|
35
35
|
size: r,
|
|
36
36
|
stroked: o.stroked,
|
|
@@ -42,9 +42,9 @@ const g = i`
|
|
|
42
42
|
) : null;
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
|
|
46
|
-
const k =
|
|
45
|
+
f.displayName = "Icon";
|
|
46
|
+
const k = l;
|
|
47
47
|
export {
|
|
48
|
-
|
|
48
|
+
f as Icon,
|
|
49
49
|
k as StyledIcon
|
|
50
50
|
};
|
package/dist/IconsFont.mjs
CHANGED