welcome-ui 8.1.0-alpha.1 → 8.1.0-alpha.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/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 +66 -66
- 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 +5 -2
package/dist/InputText.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as o } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
-
import
|
|
3
|
+
import n from "react";
|
|
4
4
|
import { Box as _ } from "./Box.mjs";
|
|
5
5
|
import { ClearButton as y } from "./ClearButton.mjs";
|
|
6
6
|
import { IconWrapper as S, IconGroupWrapper as T } from "./Field.mjs";
|
|
@@ -9,11 +9,11 @@ import { c as $ } from "./create-event-rXDe5aCQ.mjs";
|
|
|
9
9
|
import { d as k, F as A } from "./field-styles-BVlRlvuu.mjs";
|
|
10
10
|
import D, { css as G } from "@xstyled/styled-components";
|
|
11
11
|
const L = D.inputBox.withConfig({ shouldForwardProp: N })(
|
|
12
|
-
({ iconPlacement: p, isClearable:
|
|
12
|
+
({ iconPlacement: p, isClearable: l, size: i, transparent: t, variant: r }) => G`
|
|
13
13
|
${k({
|
|
14
14
|
iconPlacement: p,
|
|
15
|
-
isClearable:
|
|
16
|
-
size:
|
|
15
|
+
isClearable: l,
|
|
16
|
+
size: i,
|
|
17
17
|
transparent: t,
|
|
18
18
|
variant: r
|
|
19
19
|
})};
|
|
@@ -22,27 +22,27 @@ const L = D.inputBox.withConfig({ shouldForwardProp: N })(
|
|
|
22
22
|
), O = W(
|
|
23
23
|
({
|
|
24
24
|
autoFocus: p,
|
|
25
|
-
dataTestId:
|
|
26
|
-
disabled:
|
|
25
|
+
dataTestId: l,
|
|
26
|
+
disabled: i,
|
|
27
27
|
icon: t,
|
|
28
28
|
iconPlacement: r = "left",
|
|
29
|
-
isClearable:
|
|
30
|
-
name:
|
|
31
|
-
onBlur:
|
|
29
|
+
isClearable: d,
|
|
30
|
+
name: m,
|
|
31
|
+
onBlur: x,
|
|
32
32
|
onChange: s,
|
|
33
33
|
onFocus: c,
|
|
34
34
|
onKeyDown: I,
|
|
35
35
|
placeholder: a,
|
|
36
|
-
size:
|
|
36
|
+
size: u = "md",
|
|
37
37
|
transparent: j,
|
|
38
38
|
type: h = "text",
|
|
39
|
-
value:
|
|
39
|
+
value: f,
|
|
40
40
|
variant: E,
|
|
41
41
|
...v
|
|
42
42
|
}, w) => {
|
|
43
|
-
const z =
|
|
43
|
+
const z = d && r === "right", B = t && r, e = A[u], F = () => {
|
|
44
44
|
const R = $({
|
|
45
|
-
name:
|
|
45
|
+
name: m,
|
|
46
46
|
value: ""
|
|
47
47
|
});
|
|
48
48
|
s == null || s(R);
|
|
@@ -52,31 +52,31 @@ const L = D.inputBox.withConfig({ shouldForwardProp: N })(
|
|
|
52
52
|
L,
|
|
53
53
|
{
|
|
54
54
|
autoFocus: p,
|
|
55
|
-
"data-testid":
|
|
56
|
-
disabled:
|
|
55
|
+
"data-testid": l,
|
|
56
|
+
disabled: i,
|
|
57
57
|
iconPlacement: !!t && r,
|
|
58
|
-
id:
|
|
59
|
-
isClearable:
|
|
60
|
-
name:
|
|
61
|
-
onBlur:
|
|
58
|
+
id: m,
|
|
59
|
+
isClearable: d,
|
|
60
|
+
name: m,
|
|
61
|
+
onBlur: x,
|
|
62
62
|
onChange: s,
|
|
63
63
|
onFocus: c,
|
|
64
64
|
onKeyDown: I,
|
|
65
65
|
placeholder: a,
|
|
66
66
|
ref: w,
|
|
67
|
-
size:
|
|
67
|
+
size: u,
|
|
68
68
|
transparent: j,
|
|
69
69
|
type: h,
|
|
70
|
-
value:
|
|
70
|
+
value: f,
|
|
71
71
|
variant: E,
|
|
72
72
|
...v
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
B && !z
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
r === "right" && t
|
|
79
|
-
] })
|
|
75
|
+
B && !z ? /* @__PURE__ */ o.jsx(S, { iconPlacement: r, size: e, children: n.cloneElement(t, { ...t.props, size: e }) }) : null,
|
|
76
|
+
d ? /* @__PURE__ */ o.jsxs(T, { size: e, children: [
|
|
77
|
+
f ? /* @__PURE__ */ o.jsx(y, { onClick: F }) : null,
|
|
78
|
+
r === "right" && t ? n.cloneElement(t, { ...t.props, size: e }) : null
|
|
79
|
+
] }) : null
|
|
80
80
|
] });
|
|
81
81
|
}
|
|
82
82
|
);
|
package/dist/Label.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as t } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
3
|
import "./Icon.mjs";
|
|
4
|
-
import { L as
|
|
5
|
-
import { shouldForwardProp as
|
|
4
|
+
import { L as u } from "./index-SQQQ4dEE.mjs";
|
|
5
|
+
import { shouldForwardProp as x, forwardRef as g } from "./System.mjs";
|
|
6
6
|
import { VariantIcon as w } from "./VariantIcon.mjs";
|
|
7
7
|
import { w as y } from "./wrap-children-DBSD-X5-.mjs";
|
|
8
8
|
import o, { th as b, css as l } from "@xstyled/styled-components";
|
|
9
|
-
const n = o.labelBox.withConfig({ shouldForwardProp:
|
|
9
|
+
const n = o.labelBox.withConfig({ shouldForwardProp: x })(
|
|
10
10
|
({ required: e }) => l`
|
|
11
11
|
position: relative;
|
|
12
12
|
display: flex;
|
|
@@ -22,7 +22,7 @@ const n = o.labelBox.withConfig({ shouldForwardProp: u })(
|
|
|
22
22
|
margin-right: sm;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
&:last-child {
|
|
26
26
|
${e && j};
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -65,7 +65,7 @@ const n = o.labelBox.withConfig({ shouldForwardProp: u })(
|
|
|
65
65
|
...c,
|
|
66
66
|
children: [
|
|
67
67
|
!e && /* @__PURE__ */ t.jsx(w, { icon: p, size: "sm", variant: r }),
|
|
68
|
-
i && h
|
|
68
|
+
i && h ? /* @__PURE__ */ t.jsx(L, { children: s || /* @__PURE__ */ t.jsx(u, { size: "sm" }) }) : null,
|
|
69
69
|
f
|
|
70
70
|
]
|
|
71
71
|
}
|
package/dist/Link.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as s } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
-
import
|
|
3
|
+
import h from "react";
|
|
4
4
|
import "./Icon.mjs";
|
|
5
5
|
import { E as f } from "./index-DvzWKxKE.mjs";
|
|
6
|
-
import { shouldForwardProp as g, forwardRef as
|
|
7
|
-
import
|
|
8
|
-
import { UniversalLink as
|
|
9
|
-
const
|
|
10
|
-
({ isExternal: t, variant: n = "primary" }) =>
|
|
6
|
+
import { shouldForwardProp as g, forwardRef as y } from "./System.mjs";
|
|
7
|
+
import k, { system as $, th as i, typography as w, css as j } from "@xstyled/styled-components";
|
|
8
|
+
import { UniversalLink as E } from "./UniversalLink.mjs";
|
|
9
|
+
const L = k(E).withConfig({ shouldForwardProp: g })(
|
|
10
|
+
({ isExternal: t, variant: n = "primary" }) => j`
|
|
11
11
|
display: inline-flex;
|
|
12
12
|
flex-direction: row;
|
|
13
13
|
align-items: center;
|
|
@@ -15,6 +15,7 @@ const E = y(j).withConfig({ shouldForwardProp: g })(
|
|
|
15
15
|
line-height: 1.5;
|
|
16
16
|
text-decoration: none;
|
|
17
17
|
cursor: pointer;
|
|
18
|
+
${$}
|
|
18
19
|
|
|
19
20
|
> .wui-text {
|
|
20
21
|
margin-right: -2px;
|
|
@@ -25,7 +26,7 @@ const E = y(j).withConfig({ shouldForwardProp: g })(
|
|
|
25
26
|
${i("links.default")};
|
|
26
27
|
${i(`links.${n}.default`)};
|
|
27
28
|
${t && i("links.withExternalLink")};
|
|
28
|
-
${
|
|
29
|
+
${w};
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
&:hover,
|
|
@@ -48,33 +49,33 @@ const E = y(j).withConfig({ shouldForwardProp: g })(
|
|
|
48
49
|
margin-right: xs;
|
|
49
50
|
}
|
|
50
51
|
`
|
|
51
|
-
),
|
|
52
|
-
var n, r,
|
|
52
|
+
), W = (t) => {
|
|
53
|
+
var n, r, e;
|
|
53
54
|
return (
|
|
54
55
|
// <span />
|
|
55
56
|
(t == null ? void 0 : t.type) === "span" || // <Box as="span" />
|
|
56
57
|
((n = t == null ? void 0 : t.props) == null ? void 0 : n.as) === "span" || // <FormattedMessage />
|
|
57
|
-
((r = t == null ? void 0 : t.props) == null ? void 0 : r.tagName) === "span" || ((
|
|
58
|
+
((r = t == null ? void 0 : t.props) == null ? void 0 : r.tagName) === "span" || ((e = t == null ? void 0 : t.props) == null ? void 0 : e["data-wui-link"]) === !0
|
|
58
59
|
);
|
|
59
|
-
}, d = (t) => typeof t == "object" ?
|
|
60
|
+
}, d = (t) => typeof t == "object" ? W(t) : typeof t == "string", m = ({ children: t, isExternal: n }) => /* @__PURE__ */ s.jsxs("span", { className: "wui-text", children: [
|
|
60
61
|
t,
|
|
61
|
-
n
|
|
62
|
-
] }),
|
|
63
|
-
const { children: r, dataTestId:
|
|
62
|
+
n ? /* @__PURE__ */ s.jsx(f, { mb: "-2px", ml: "sm", size: "sm" }) : null
|
|
63
|
+
] }), b = y((t, n) => {
|
|
64
|
+
const { children: r, dataTestId: e, disabled: a, isExternal: o, variant: x = "primary", ...l } = t, c = d(r) ? /* @__PURE__ */ s.jsx(m, { isExternal: o, children: r }) : h.Children.map(r, (p) => d(p) ? /* @__PURE__ */ s.jsx(m, { isExternal: o, children: p }) : p);
|
|
64
65
|
return /* @__PURE__ */ s.jsx(
|
|
65
|
-
|
|
66
|
+
L,
|
|
66
67
|
{
|
|
67
|
-
"data-testid":
|
|
68
|
+
"data-testid": e,
|
|
68
69
|
disabled: a,
|
|
69
|
-
isExternal:
|
|
70
|
+
isExternal: o,
|
|
70
71
|
ref: n,
|
|
71
72
|
variant: x,
|
|
72
|
-
...
|
|
73
|
-
children:
|
|
73
|
+
...l,
|
|
74
|
+
children: c
|
|
74
75
|
}
|
|
75
76
|
);
|
|
76
77
|
});
|
|
77
|
-
|
|
78
|
+
b.displayName = "Link";
|
|
78
79
|
export {
|
|
79
|
-
|
|
80
|
+
b as Link
|
|
80
81
|
};
|
package/dist/Modal.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as o } from "./jsx-runtime-B7I4PJ0H.mjs";
|
|
3
|
-
import a, { css as h, th as l, up as J, system as K, useTheme as
|
|
4
|
-
import
|
|
3
|
+
import a, { css as h, th as l, up as J, system as K, useTheme as w } from "@xstyled/styled-components";
|
|
4
|
+
import F, { useState as L, useMemo as Q, Children as D, useEffect as U, cloneElement as H } from "react";
|
|
5
5
|
import { Shape as X } from "./Shape.mjs";
|
|
6
|
-
import { forwardRef as
|
|
6
|
+
import { forwardRef as c } from "./System.mjs";
|
|
7
7
|
import { Box as $ } from "./Box.mjs";
|
|
8
8
|
import { Text as x } from "./Text.mjs";
|
|
9
9
|
import { StyledSwiper as Y } from "./Swiper.mjs";
|
|
@@ -37,7 +37,7 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
37
37
|
width: 100%;
|
|
38
38
|
height: 100%;
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`, j = a.divBox`
|
|
41
41
|
transition: margin-top 250ms ease-in-out;
|
|
42
42
|
|
|
43
43
|
> img,
|
|
@@ -54,7 +54,7 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
54
54
|
max-width: 1600;
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
`,
|
|
57
|
+
`, nt = a.div`
|
|
58
58
|
${l("modals.default")};
|
|
59
59
|
position: fixed;
|
|
60
60
|
inset: 0;
|
|
@@ -70,20 +70,20 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
70
70
|
${N};
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
${
|
|
73
|
+
${j} {
|
|
74
74
|
margin-top: xl;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
&[data-enter] {
|
|
78
78
|
opacity: 1;
|
|
79
79
|
|
|
80
|
-
${
|
|
80
|
+
${j} {
|
|
81
81
|
margin-top: 0;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
`, z = a(x).attrs({ lines: 2, variant: "h4" })`
|
|
85
85
|
margin: 0;
|
|
86
|
-
`,
|
|
86
|
+
`, v = "4rem", b = "6rem", st = a.divBox`
|
|
87
87
|
display: flex;
|
|
88
88
|
flex-direction: column;
|
|
89
89
|
border-radius: xxl;
|
|
@@ -92,24 +92,24 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
92
92
|
> img {
|
|
93
93
|
width: auto;
|
|
94
94
|
max-width: fit-content;
|
|
95
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
95
|
+
max-height: calc(100vh - 2 * 5rem - ${v});
|
|
96
96
|
flex-shrink: 0;
|
|
97
97
|
|
|
98
98
|
@media (min-width: md) {
|
|
99
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
99
|
+
max-height: calc(100vh - 2 * 5rem - ${b});
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
${T} {
|
|
104
104
|
background-color: neutral-90;
|
|
105
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
105
|
+
max-height: calc(100vh - 2 * 5rem - ${v});
|
|
106
106
|
|
|
107
107
|
@media (min-width: md) {
|
|
108
|
-
max-height: calc(100vh - 2 * 5rem - ${
|
|
108
|
+
max-height: calc(100vh - 2 * 5rem - ${b});
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
`, at =
|
|
112
|
-
({ children: t, customContent: e, subtitle: r, title:
|
|
111
|
+
`, at = c(
|
|
112
|
+
({ children: t, customContent: e, subtitle: r, title: n }, d) => /* @__PURE__ */ o.jsxs(st, { ref: d, children: [
|
|
113
113
|
t,
|
|
114
114
|
/* @__PURE__ */ o.jsxs(
|
|
115
115
|
$,
|
|
@@ -119,14 +119,14 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
119
119
|
flexDirection: "column",
|
|
120
120
|
flexShrink: 0,
|
|
121
121
|
gap: "xxs",
|
|
122
|
-
h: { _:
|
|
122
|
+
h: { _: v, md: b },
|
|
123
123
|
justifyContent: "center",
|
|
124
124
|
px: { _: "md", md: "xl" },
|
|
125
125
|
w: "100%",
|
|
126
126
|
children: [
|
|
127
127
|
e,
|
|
128
|
-
!e && r
|
|
129
|
-
!e &&
|
|
128
|
+
!e && r ? /* @__PURE__ */ o.jsx(x, { variant: "subtitle-sm", children: r }) : null,
|
|
129
|
+
!e && n ? /* @__PURE__ */ o.jsx(z, { children: n }) : null
|
|
130
130
|
]
|
|
131
131
|
}
|
|
132
132
|
)
|
|
@@ -190,13 +190,13 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
190
190
|
`
|
|
191
191
|
), dt = a.sectionBox`
|
|
192
192
|
${l("modals.body")};
|
|
193
|
-
`,
|
|
193
|
+
`, ct = a.headerBox`
|
|
194
194
|
position: sticky;
|
|
195
195
|
top: 0;
|
|
196
196
|
flex-shrink: 0;
|
|
197
197
|
z-index: 1;
|
|
198
198
|
${l("modals.header")};
|
|
199
|
-
`,
|
|
199
|
+
`, mt = a(x)`
|
|
200
200
|
${l(".modals.header.subtitle")};
|
|
201
201
|
margin-bottom: 0;
|
|
202
202
|
`, ut = a.footerBox`
|
|
@@ -224,7 +224,7 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
${K}
|
|
227
|
-
`, _ =
|
|
227
|
+
`, _ = c(
|
|
228
228
|
({ hideOnInteractOutside: t, ...e }, r) => /* @__PURE__ */ o.jsx(
|
|
229
229
|
I,
|
|
230
230
|
{
|
|
@@ -242,14 +242,14 @@ const E = "calc(100vw - 2 * 2rem);", W = "calc(100vw - 2 * 1rem);", M = "calc(10
|
|
|
242
242
|
)
|
|
243
243
|
);
|
|
244
244
|
_.displayName = "Backdrop";
|
|
245
|
-
const ft = ({ children: t }) => /* @__PURE__ */ o.jsx(T, { children: /* @__PURE__ */ o.jsx($, { h: "100%", margin: "0 auto", style: { aspectRatio: 16 / 9 }, children: t }) }), gt = Object.assign(
|
|
245
|
+
const ft = ({ children: t }) => /* @__PURE__ */ o.jsx(T, { children: /* @__PURE__ */ o.jsx($, { h: "100%", margin: "0 auto", style: { aspectRatio: 16 / 9 }, children: t }) }), gt = Object.assign(nt, {
|
|
246
246
|
AssetWithTitle: at,
|
|
247
247
|
Backdrop: _,
|
|
248
|
-
Content:
|
|
248
|
+
Content: j,
|
|
249
249
|
Iframe: ft,
|
|
250
250
|
Title: z
|
|
251
251
|
}), A = ({ isOnHeader: t, ...e }) => {
|
|
252
|
-
const r =
|
|
252
|
+
const r = w();
|
|
253
253
|
return /* @__PURE__ */ o.jsx(
|
|
254
254
|
S,
|
|
255
255
|
{
|
|
@@ -266,108 +266,108 @@ const ft = ({ children: t }) => /* @__PURE__ */ o.jsx(T, { children: /* @__PURE_
|
|
|
266
266
|
)
|
|
267
267
|
}
|
|
268
268
|
);
|
|
269
|
-
}, O =
|
|
270
|
-
({ children: t, store: e, withClosingButton: r = !0, ...
|
|
271
|
-
const { borderWidths: u, space:
|
|
272
|
-
() =>
|
|
273
|
-
if (
|
|
274
|
-
const g =
|
|
269
|
+
}, O = c(
|
|
270
|
+
({ children: t, store: e, withClosingButton: r = !0, ...n }, d) => {
|
|
271
|
+
const { borderWidths: u, space: m } = w(), [y, p] = L(!1), f = e.useState("contentElement"), B = e.useState("open"), i = Q(
|
|
272
|
+
() => D.map(t, (s) => {
|
|
273
|
+
if (F.isValidElement(s)) {
|
|
274
|
+
const g = s.type;
|
|
275
275
|
return g.displayName ?? g.name ?? "";
|
|
276
276
|
}
|
|
277
277
|
return "";
|
|
278
278
|
}),
|
|
279
279
|
[t]
|
|
280
|
-
), q = !(i != null && i.includes("Header")) && r, G = (
|
|
280
|
+
), q = !(i != null && i.includes("Header")) && r, G = (s) => s === "Header" ? {
|
|
281
281
|
// if the Modal have a Body but not a Footer || have a Footer but not a Body
|
|
282
|
-
pb: i != null && i.includes("Body") && !i.includes("Footer") || i != null && i.includes("Footer") && !i.includes("Body") ?
|
|
283
|
-
} :
|
|
284
|
-
pb: i != null && i.includes("Footer") ?
|
|
285
|
-
pr: i != null && i.includes("Header") ?
|
|
286
|
-
} :
|
|
282
|
+
pb: i != null && i.includes("Body") && !i.includes("Footer") || i != null && i.includes("Footer") && !i.includes("Body") ? m.lg : m.xxl
|
|
283
|
+
} : s === "Body" ? {
|
|
284
|
+
pb: i != null && i.includes("Footer") ? m.lg : null,
|
|
285
|
+
pr: i != null && i.includes("Header") ? m.xxl : null
|
|
286
|
+
} : s === "Footer" ? {
|
|
287
287
|
borderWidth: y ? u.sm : "0",
|
|
288
|
-
pt: i != null && i.includes("Header") || i != null && i.includes("Body") ? null :
|
|
288
|
+
pt: i != null && i.includes("Header") || i != null && i.includes("Body") ? null : m.lg
|
|
289
289
|
} : {};
|
|
290
290
|
return U(() => {
|
|
291
|
-
|
|
292
|
-
}, [e,
|
|
291
|
+
B ? f && p(f.scrollHeight > f.offsetHeight) : p(!1);
|
|
292
|
+
}, [e, B, f]), /* @__PURE__ */ o.jsxs($, { ref: d, ...n, children: [
|
|
293
293
|
q ? /* @__PURE__ */ o.jsx(A, {}) : null,
|
|
294
|
-
|
|
295
|
-
var
|
|
296
|
-
if (!
|
|
297
|
-
const g = ((
|
|
298
|
-
return H(
|
|
294
|
+
D.map(t, (s) => {
|
|
295
|
+
var k, C;
|
|
296
|
+
if (!s) return null;
|
|
297
|
+
const g = ((k = s == null ? void 0 : s.type) == null ? void 0 : k.displayName) || ((C = s == null ? void 0 : s.type) == null ? void 0 : C.name);
|
|
298
|
+
return H(s, {
|
|
299
299
|
...G(g),
|
|
300
|
-
...
|
|
300
|
+
...s.props
|
|
301
301
|
});
|
|
302
302
|
})
|
|
303
|
-
] })
|
|
303
|
+
] });
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
306
|
O.displayName = "Content";
|
|
307
|
-
const R =
|
|
308
|
-
t
|
|
309
|
-
e
|
|
307
|
+
const R = c(({ children: t, information: e, ...r }, n) => /* @__PURE__ */ o.jsxs(ut, { ref: n, w: "100%", ...r, children: [
|
|
308
|
+
t ? /* @__PURE__ */ o.jsx(xt, { children: t }) : null,
|
|
309
|
+
e ? /* @__PURE__ */ o.jsxs(ht, { children: [
|
|
310
310
|
/* @__PURE__ */ o.jsx(x, { color: "neutral-90", fontWeight: "bold", variant: "subtitle-sm", children: e.title }),
|
|
311
311
|
/* @__PURE__ */ o.jsx(x, { color: "neutral-90", mb: "0", mt: "md", variant: "sm", children: e.subtitle })
|
|
312
|
-
] })
|
|
312
|
+
] }) : null
|
|
313
313
|
] }));
|
|
314
314
|
R.displayName = "Footer";
|
|
315
|
-
const V =
|
|
315
|
+
const V = c(({ icon: t, subtitle: e, title: r, ...n }, d) => /* @__PURE__ */ o.jsxs(ct, { ref: d, textAlign: t ? "center" : null, w: "100%", ...n, children: [
|
|
316
316
|
/* @__PURE__ */ o.jsx(A, { isOnHeader: !0 }),
|
|
317
317
|
t,
|
|
318
318
|
/* @__PURE__ */ o.jsx(x, { mb: e ? "lg" : 0, mt: t ? "xl" : 0, variant: "h4", children: r }),
|
|
319
|
-
e
|
|
319
|
+
e ? /* @__PURE__ */ o.jsx(mt, { children: e }) : null
|
|
320
320
|
] }));
|
|
321
321
|
V.displayName = "Header";
|
|
322
322
|
function zt(t) {
|
|
323
|
-
const { onClose: e, setOpen: r, ...
|
|
323
|
+
const { onClose: e, setOpen: r, ...n } = t || {};
|
|
324
324
|
return rt({
|
|
325
325
|
animated: !0,
|
|
326
326
|
setOpen: (u) => {
|
|
327
327
|
!u && e && e(), r == null || r(u);
|
|
328
328
|
},
|
|
329
|
-
...
|
|
329
|
+
...n
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
|
-
const $t =
|
|
333
|
-
({ backdrop: t, hideOnInteractOutside: e, ...r },
|
|
332
|
+
const $t = c(
|
|
333
|
+
({ backdrop: t, hideOnInteractOutside: e, ...r }, n) => t === !0 ? /* @__PURE__ */ o.jsx(I, { hideOnInteractOutside: e, ref: n, ...r }) : F.isValidElement(t) ? H(t, {
|
|
334
334
|
hideOnInteractOutside: e,
|
|
335
|
-
ref:
|
|
335
|
+
ref: n,
|
|
336
336
|
...r
|
|
337
337
|
}) : null
|
|
338
|
-
), yt =
|
|
338
|
+
), yt = c(
|
|
339
339
|
({
|
|
340
340
|
ariaLabel: t,
|
|
341
341
|
/** for render property */
|
|
342
342
|
as: e = lt,
|
|
343
343
|
backdrop: r = !0,
|
|
344
|
-
children:
|
|
344
|
+
children: n,
|
|
345
345
|
hideOnInteractOutside: d = !0,
|
|
346
346
|
size: u = "lg",
|
|
347
|
-
store:
|
|
347
|
+
store: m,
|
|
348
348
|
...y
|
|
349
349
|
}, p) => /* @__PURE__ */ o.jsx(
|
|
350
350
|
ot,
|
|
351
351
|
{
|
|
352
352
|
"aria-label": t,
|
|
353
|
-
backdrop: r && /* @__PURE__ */ o.jsx($t, { backdrop: r, hideOnInteractOutside: d }),
|
|
353
|
+
backdrop: !!r && /* @__PURE__ */ o.jsx($t, { backdrop: r, hideOnInteractOutside: d }),
|
|
354
354
|
hideOnInteractOutside: d,
|
|
355
355
|
ref: p,
|
|
356
356
|
render: /* @__PURE__ */ o.jsx(e, { size: u }),
|
|
357
|
-
store:
|
|
357
|
+
store: m,
|
|
358
358
|
...y,
|
|
359
|
-
children:
|
|
359
|
+
children: n
|
|
360
360
|
}
|
|
361
361
|
)
|
|
362
|
-
), P =
|
|
362
|
+
), P = c((t, e) => /* @__PURE__ */ o.jsx(dt, { ref: e, ...t }));
|
|
363
363
|
P.displayName = "Body";
|
|
364
364
|
const jt = (t) => {
|
|
365
|
-
const { modals: e } =
|
|
365
|
+
const { modals: e } = w();
|
|
366
366
|
return /* @__PURE__ */ o.jsx("div", { children: /* @__PURE__ */ o.jsx(X, { ...e.cover, ...t }) });
|
|
367
|
-
}, vt =
|
|
367
|
+
}, vt = c(({ as: t, store: e, ...r }, n) => /* @__PURE__ */ o.jsx(
|
|
368
368
|
it,
|
|
369
369
|
{
|
|
370
|
-
ref:
|
|
370
|
+
ref: n,
|
|
371
371
|
render: t ? (d) => /* @__PURE__ */ o.jsx(t, { ...d }) : void 0,
|
|
372
372
|
store: e,
|
|
373
373
|
...r
|
package/dist/PasswordInput.mjs
CHANGED
|
@@ -16,7 +16,7 @@ const f = ({
|
|
|
16
16
|
{
|
|
17
17
|
"aria-controls": "password",
|
|
18
18
|
"aria-expanded": `${!s}`,
|
|
19
|
-
dataTestId: o
|
|
19
|
+
dataTestId: o ? `${o}-action` : void 0,
|
|
20
20
|
onClick: r,
|
|
21
21
|
shape: "circle",
|
|
22
22
|
size: "xs",
|
|
@@ -26,8 +26,8 @@ const f = ({
|
|
|
26
26
|
}
|
|
27
27
|
), w = x(
|
|
28
28
|
({ dataTestId: o, title: s, ...r }, e) => {
|
|
29
|
-
const [n,
|
|
30
|
-
|
|
29
|
+
const [n, p] = c("password"), i = n === "password", a = () => {
|
|
30
|
+
p(i ? "text" : "password");
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ t.jsx(
|
|
33
33
|
m,
|
|
@@ -38,8 +38,8 @@ const f = ({
|
|
|
38
38
|
f,
|
|
39
39
|
{
|
|
40
40
|
dataTestId: o,
|
|
41
|
-
isHidden:
|
|
42
|
-
onClick:
|
|
41
|
+
isHidden: i,
|
|
42
|
+
onClick: a,
|
|
43
43
|
title: s
|
|
44
44
|
}
|
|
45
45
|
),
|
package/dist/Picker.mjs
CHANGED
|
@@ -15,25 +15,25 @@ const h = k(b).withConfig({ shouldForwardProp: j })`
|
|
|
15
15
|
|
|
16
16
|
${y};
|
|
17
17
|
`, F = n(
|
|
18
|
-
({ dataTestId: s, label: m, name: t, onChange: e, options: p, required:
|
|
18
|
+
({ dataTestId: s, label: m, name: t, onChange: e, options: p, required: d, value: l, ...a }, c) => {
|
|
19
19
|
const f = w({ defaultValue: l }), x = (r) => {
|
|
20
20
|
r.stopPropagation(), e == null || e(r);
|
|
21
21
|
};
|
|
22
22
|
return /* @__PURE__ */ o.jsx(
|
|
23
23
|
R,
|
|
24
24
|
{
|
|
25
|
-
...
|
|
25
|
+
...a,
|
|
26
26
|
as: P,
|
|
27
27
|
dataTestId: s,
|
|
28
28
|
mb: 0,
|
|
29
|
-
ref:
|
|
30
|
-
required:
|
|
29
|
+
ref: c,
|
|
30
|
+
required: d,
|
|
31
31
|
store: f,
|
|
32
32
|
children: /* @__PURE__ */ o.jsx(u, { display: "flex", flexWrap: "wrap", children: p.map(({ element: r, value: i }) => /* @__PURE__ */ o.jsxs(
|
|
33
33
|
$,
|
|
34
34
|
{
|
|
35
35
|
checkableField: !0,
|
|
36
|
-
dataTestId: s
|
|
36
|
+
dataTestId: s ? `${s}-item-${t}-${i}` : void 0,
|
|
37
37
|
onClick: x,
|
|
38
38
|
children: [
|
|
39
39
|
/* @__PURE__ */ o.jsx(h, { name: t, value: i }),
|
package/dist/Popover.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { Box as h } from "./Box.mjs";
|
|
|
5
5
|
import { Button as x } from "./Button.mjs";
|
|
6
6
|
import "./Icon.mjs";
|
|
7
7
|
import { C as j } from "./index-BaLGEKs7.mjs";
|
|
8
|
-
import i, { th as p, css as l, system as
|
|
8
|
+
import i, { th as p, css as l, system as u } from "@xstyled/styled-components";
|
|
9
9
|
import { P, a as d } from "./QYJ6MIDR-DJ-vUdAM.mjs";
|
|
10
10
|
import { P as $, H as C, a as w, u as H, b as B } from "./BYC7LY2E-CWSI38FM.mjs";
|
|
11
11
|
const T = i(P)`
|
|
@@ -16,7 +16,7 @@ const T = i(P)`
|
|
|
16
16
|
`
|
|
17
17
|
), v = i.div`
|
|
18
18
|
${p("popovers.content")};
|
|
19
|
-
`,
|
|
19
|
+
`, m = i.h6`
|
|
20
20
|
margin: 0;
|
|
21
21
|
${p("popovers.title")};
|
|
22
22
|
`, f = i($)(
|
|
@@ -25,7 +25,7 @@ const T = i(P)`
|
|
|
25
25
|
outline: none;
|
|
26
26
|
opacity: 0;
|
|
27
27
|
transition: opacity 150ms ease-in-out;
|
|
28
|
-
${
|
|
28
|
+
${u};
|
|
29
29
|
|
|
30
30
|
/* on open popover for animation */
|
|
31
31
|
&[data-enter] {
|
|
@@ -33,17 +33,17 @@ const T = i(P)`
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
${t && l`
|
|
36
|
-
${
|
|
36
|
+
${m} {
|
|
37
37
|
padding-right: 50;
|
|
38
38
|
}
|
|
39
39
|
`}
|
|
40
40
|
`
|
|
41
41
|
);
|
|
42
42
|
i(d)`
|
|
43
|
-
${
|
|
43
|
+
${u};
|
|
44
44
|
`;
|
|
45
45
|
const y = i(C)`
|
|
46
|
-
${
|
|
46
|
+
${u};
|
|
47
47
|
`, Z = {
|
|
48
48
|
bottom: "rotateZ(360deg)",
|
|
49
49
|
left: "rotateZ(90deg)",
|
|
@@ -62,7 +62,7 @@ const y = i(C)`
|
|
|
62
62
|
return /* @__PURE__ */ e.jsxs(h, { position: "relative", children: [
|
|
63
63
|
/* @__PURE__ */ e.jsx(A, { store: o }),
|
|
64
64
|
t,
|
|
65
|
-
s
|
|
65
|
+
s ? /* @__PURE__ */ e.jsx(
|
|
66
66
|
x,
|
|
67
67
|
{
|
|
68
68
|
flex: "0 0 auto",
|
|
@@ -76,7 +76,7 @@ const y = i(C)`
|
|
|
76
76
|
variant: "secondary",
|
|
77
77
|
children: /* @__PURE__ */ e.jsx(j, {})
|
|
78
78
|
}
|
|
79
|
-
)
|
|
79
|
+
) : null
|
|
80
80
|
] });
|
|
81
81
|
}, L = c(
|
|
82
82
|
({ as: t, store: r, ...o }, n) => /* @__PURE__ */ e.jsx(
|
|
@@ -97,7 +97,7 @@ const y = i(C)`
|
|
|
97
97
|
}
|
|
98
98
|
), J = Object.assign(k, {
|
|
99
99
|
Content: v,
|
|
100
|
-
Title:
|
|
100
|
+
Title: m,
|
|
101
101
|
Trigger: L
|
|
102
102
|
}), z = c(
|
|
103
103
|
({ children: t, onClose: r, store: o, ...n }, s) => {
|
|
@@ -116,7 +116,7 @@ const y = i(C)`
|
|
|
116
116
|
}
|
|
117
117
|
), K = Object.assign(z, {
|
|
118
118
|
Content: v,
|
|
119
|
-
Title:
|
|
119
|
+
Title: m,
|
|
120
120
|
Trigger: R
|
|
121
121
|
}), N = ({
|
|
122
122
|
animated: t = 150,
|