welcome-ui 10.0.0 → 10.0.2
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/Alert.js +33 -23
- package/dist/Field.css +1 -1
- package/dist/Field.js +41 -41
- package/dist/Icon.js +221 -218
- package/dist/Select.js +336 -317
- package/dist/Swiper.js +179 -179
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.js +17 -15
- package/dist/Toast.css +1 -1
- package/dist/Toast.js +154 -155
- package/dist/Window.css +1 -1
- package/dist/Window.js +57 -57
- package/dist/scss/striped-background.scss +10 -0
- package/dist/theme.css +1 -1
- package/dist/types/components/Alert/types.d.ts +2 -0
- package/dist/types/components/Icon/icons.d.ts +2 -2
- package/dist/types/components/Toast/index.d.ts +4 -0
- package/dist/types/theme/generated/variables.d.ts +179 -179
- package/package.json +2 -2
package/dist/Alert.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Alert.css';
|
|
3
3
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
4
|
-
import m, { forwardRef as
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import { Icon as
|
|
4
|
+
import m, { forwardRef as R, Children as g, cloneElement as u } from "react";
|
|
5
|
+
import { CloseButton as V } from "./CloseButton.js";
|
|
6
|
+
import { Icon as I } from "./Icon.js";
|
|
7
7
|
import { Text as A } from "./Text.js";
|
|
8
8
|
import { c as b } from "./index-PAaZGbyz.js";
|
|
9
9
|
import { Button as h } from "./Button.js";
|
|
10
10
|
import { f as x } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
11
|
-
const
|
|
12
|
-
root:
|
|
11
|
+
const O = "_root_3i41g_2", z = "_content_3i41g_21", B = {
|
|
12
|
+
root: O,
|
|
13
13
|
"size-md": "_size-md_3i41g_18",
|
|
14
14
|
"content-actions": "_content-actions_3i41g_21",
|
|
15
15
|
"without-title": "_without-title_3i41g_24",
|
|
@@ -21,7 +21,7 @@ const I = "_root_3i41g_2", O = "_content_3i41g_21", B = {
|
|
|
21
21
|
"variant-success": "_variant-success_3i41g_49",
|
|
22
22
|
"variant-warning": "_variant-warning_3i41g_54",
|
|
23
23
|
"full-width": "_full-width_3i41g_59",
|
|
24
|
-
content:
|
|
24
|
+
content: z,
|
|
25
25
|
"content-text": "_content-text_3i41g_71",
|
|
26
26
|
"title-close-button": "_title-close-button_3i41g_88",
|
|
27
27
|
"title-with-icon": "_title-with-icon_3i41g_91",
|
|
@@ -32,49 +32,59 @@ const I = "_root_3i41g_2", O = "_content_3i41g_21", B = {
|
|
|
32
32
|
"icon-wrapper-warning": "_icon-wrapper-warning_3i41g_125",
|
|
33
33
|
"icon-wrapper-ai": "_icon-wrapper-ai_3i41g_129"
|
|
34
34
|
}, f = x(
|
|
35
|
-
({ variant: n = "primary", ...r },
|
|
35
|
+
({ variant: n = "primary", ...r }, e) => /* @__PURE__ */ a(h, { className: "shrink-0 w-fit", ref: e, variant: n, ...r })
|
|
36
36
|
), w = x(
|
|
37
|
-
({ variant: n = "secondary", ...r },
|
|
37
|
+
({ variant: n = "secondary", ...r }, e) => /* @__PURE__ */ a(h, { className: "shrink-0 w-fit", ref: e, variant: n, ...r })
|
|
38
38
|
);
|
|
39
39
|
f.displayName = "Alert.Button";
|
|
40
40
|
w.displayName = "Alert.SecondaryButton";
|
|
41
|
-
const
|
|
41
|
+
const F = b(B), _ = ({ children: n, hasCloseButton: r, ...e }) => /* @__PURE__ */ a(A, { as: "span", className: F(r && "title-close-button"), ...e, children: n });
|
|
42
42
|
_.displayName = "Alert.Title";
|
|
43
|
-
const o = b(B),
|
|
43
|
+
const o = b(B), M = {
|
|
44
44
|
ai: "sparkles",
|
|
45
45
|
brand: "lightbulb-alt",
|
|
46
46
|
danger: "exclamation-octagon",
|
|
47
47
|
info: "info-circle",
|
|
48
48
|
success: "check-circle",
|
|
49
49
|
warning: "exclamation-triangle"
|
|
50
|
-
}, $ =
|
|
51
|
-
({
|
|
52
|
-
|
|
50
|
+
}, $ = R(
|
|
51
|
+
({
|
|
52
|
+
children: n,
|
|
53
|
+
className: r,
|
|
54
|
+
cta: e,
|
|
55
|
+
handleClose: p,
|
|
56
|
+
icon: k,
|
|
57
|
+
isFullWidth: T,
|
|
58
|
+
size: s = "md",
|
|
59
|
+
variant: c = "brand",
|
|
60
|
+
...C
|
|
61
|
+
}, E) => {
|
|
62
|
+
const S = c === "ai", d = g.toArray(n).some((i) => m.isValidElement(i) ? i.type === _ : !1), y = /* @__PURE__ */ a("div", { className: o("icon-wrapper", `icon-wrapper-${c}`), children: /* @__PURE__ */ a(I, { name: k || M[c] }) }), j = g.toArray(n).map((i, t) => i.type === _ ? /* @__PURE__ */ l("div", { className: o("title-with-icon"), children: [
|
|
53
63
|
y,
|
|
54
|
-
u(
|
|
64
|
+
u(i, {
|
|
55
65
|
hasCloseButton: !!p,
|
|
56
66
|
variant: `body-${s}-strong`
|
|
57
67
|
})
|
|
58
|
-
] }, `alert-title-${t}`) :
|
|
68
|
+
] }, `alert-title-${t}`) : i), v = (i) => g.toArray(i).flatMap((t) => m.isValidElement(t) && t.type === m.Fragment ? v(t.props.children) : t.type === f ? u(t, {
|
|
59
69
|
size: s,
|
|
60
70
|
variant: S ? "primary-ai" : void 0
|
|
61
71
|
}) : t.type === w ? u(t, {
|
|
62
72
|
size: s
|
|
63
|
-
}) : t), N = !!
|
|
73
|
+
}) : t), N = !!e && v(e);
|
|
64
74
|
return /* @__PURE__ */ l(
|
|
65
75
|
"div",
|
|
66
76
|
{
|
|
67
77
|
className: o(
|
|
68
78
|
"root",
|
|
69
|
-
|
|
79
|
+
T && "full-width",
|
|
70
80
|
`size-${s}`,
|
|
71
81
|
c && `variant-${c}`,
|
|
72
82
|
r
|
|
73
83
|
),
|
|
74
|
-
ref:
|
|
75
|
-
...
|
|
84
|
+
ref: E,
|
|
85
|
+
...C,
|
|
76
86
|
children: [
|
|
77
|
-
!!p && /* @__PURE__ */ a(
|
|
87
|
+
!!p && /* @__PURE__ */ a(V, { className: o("close-button"), onClick: p }),
|
|
78
88
|
/* @__PURE__ */ l("div", { className: o("content"), children: [
|
|
79
89
|
/* @__PURE__ */ l(
|
|
80
90
|
A,
|
|
@@ -96,12 +106,12 @@ const o = b(B), F = {
|
|
|
96
106
|
}
|
|
97
107
|
);
|
|
98
108
|
$.displayName = "Alert";
|
|
99
|
-
const
|
|
109
|
+
const P = Object.assign($, {
|
|
100
110
|
Button: f,
|
|
101
111
|
SecondaryButton: w,
|
|
102
112
|
Title: _
|
|
103
113
|
});
|
|
104
114
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
115
|
+
P as Alert,
|
|
116
|
+
M as ICON
|
|
107
117
|
};
|
package/dist/Field.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_1sq1k_2{display:grid;grid-template-areas:"label" "input";width:100%;height:fit-content}._root_1sq1k_2:has(._label_1sq1k_8):has(._hint_1sq1k_8){grid-template-areas:"label" "input" "hint"}._root_1sq1k_2:not(:has(._label_1sq1k_8)):has(._hint_1sq1k_8){grid-template-areas:"input" "hint"}._root_1sq1k_2:not(._inline_1sq1k_14) ._hint_1sq1k_8{margin-top:var(--field-gap-assistive)}._root_1sq1k_2:not(._inline_1sq1k_14) ._label_1sq1k_8{margin-bottom:var(--field-gap-label)}._root_1sq1k_2 .field-input{align-self:center;grid-area:input}._root_1sq1k_2 .field-input.date-picker-wrapper{justify-self:start}._inline_1sq1k_14{grid-template-areas:"input label";grid-template-columns:min-content 1fr;height:fit-content;grid-row-gap:var(--field-gap-assistive);grid-column-gap:var(--field-gap-label)}._inline_1sq1k_14:has(._label_1sq1k_8):has(._hint_1sq1k_8){grid-template-areas:"input label" ". hint"}._inline_1sq1k_14:not(:has(._label_1sq1k_8)):has(._hint_1sq1k_8){grid-template-areas:"input ." ". hint"}._label_1sq1k_8{grid-area:label}._hint_1sq1k_8{grid-area:hint}._hint-max-length_1sq1k_46{justify-self:end}._visuallyHidden_1sq1k_49{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;white-space:nowrap!important}}
|
package/dist/Field.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Field.css';
|
|
3
|
-
import { jsxs as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { Hint as
|
|
6
|
-
import { Label as
|
|
7
|
-
import { c as
|
|
8
|
-
import { f as
|
|
9
|
-
const
|
|
10
|
-
root:
|
|
3
|
+
import { jsxs as w, jsx as b } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as C, useMemo as $, useId as A, useContext as L } from "react";
|
|
5
|
+
import { Hint as M } from "./Hint.js";
|
|
6
|
+
import { Label as R } from "./Label.js";
|
|
7
|
+
import { c as S } from "./index-PAaZGbyz.js";
|
|
8
|
+
import { f as T } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
9
|
+
const W = "_root_1sq1k_2", z = "_label_1sq1k_8", E = "_hint_1sq1k_8", G = "_inline_1sq1k_14", J = "_visuallyHidden_1sq1k_49", K = {
|
|
10
|
+
root: W,
|
|
11
11
|
label: z,
|
|
12
12
|
hint: E,
|
|
13
13
|
inline: G,
|
|
14
|
-
"hint-max-length": "_hint-max-
|
|
14
|
+
"hint-max-length": "_hint-max-length_1sq1k_46",
|
|
15
15
|
visuallyHidden: J
|
|
16
|
-
},
|
|
17
|
-
getInputProps: (
|
|
16
|
+
}, h = S(K), y = C({
|
|
17
|
+
getInputProps: (i) => i,
|
|
18
18
|
hintID: "",
|
|
19
19
|
labelID: "",
|
|
20
20
|
variant: void 0
|
|
21
21
|
});
|
|
22
|
-
function
|
|
23
|
-
const
|
|
24
|
-
return
|
|
22
|
+
function _(i) {
|
|
23
|
+
const o = A();
|
|
24
|
+
return i || o;
|
|
25
25
|
}
|
|
26
26
|
function P() {
|
|
27
|
-
return
|
|
27
|
+
return L(y);
|
|
28
28
|
}
|
|
29
|
-
const O =
|
|
29
|
+
const O = T((i, o) => {
|
|
30
30
|
const {
|
|
31
31
|
children: I,
|
|
32
32
|
className: p,
|
|
33
33
|
disabled: d,
|
|
34
|
-
error:
|
|
34
|
+
error: f,
|
|
35
35
|
hideLabel: g,
|
|
36
36
|
hint: D,
|
|
37
37
|
hintProps: t,
|
|
38
38
|
id: N,
|
|
39
|
-
inline:
|
|
40
|
-
label:
|
|
39
|
+
inline: q,
|
|
40
|
+
label: F,
|
|
41
41
|
labelProps: a,
|
|
42
42
|
maxLength: e,
|
|
43
43
|
required: c,
|
|
44
44
|
success: v,
|
|
45
45
|
warning: x,
|
|
46
|
-
...
|
|
47
|
-
} =
|
|
46
|
+
...k
|
|
47
|
+
} = i, n = 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), r = _(a == null ? void 0 : a.id), s = _(t == null ? void 0 : t.id), m = _(N), H = $(
|
|
48
48
|
() => ({
|
|
49
49
|
getInputProps(u) {
|
|
50
|
-
const
|
|
50
|
+
const j = [u["aria-describedby"], l && s].filter(Boolean).join(" ") || void 0, B = [u["aria-labelledby"], r].filter(Boolean).join(" ");
|
|
51
51
|
return {
|
|
52
52
|
...u,
|
|
53
|
-
"aria-describedby":
|
|
54
|
-
"aria-invalid":
|
|
55
|
-
"aria-labelledby":
|
|
53
|
+
"aria-describedby": j,
|
|
54
|
+
"aria-invalid": n === "danger" ? !0 : void 0,
|
|
55
|
+
"aria-labelledby": B,
|
|
56
56
|
disabled: d,
|
|
57
57
|
id: m,
|
|
58
58
|
/**
|
|
@@ -62,33 +62,33 @@ const O = W((n, s) => {
|
|
|
62
62
|
required: c
|
|
63
63
|
};
|
|
64
64
|
},
|
|
65
|
-
hintID:
|
|
65
|
+
hintID: s,
|
|
66
66
|
labelID: r,
|
|
67
|
-
variant:
|
|
67
|
+
variant: n
|
|
68
68
|
}),
|
|
69
|
-
[
|
|
69
|
+
[s, r, n, l, d, m, e == null ? void 0 : e.max, c]
|
|
70
70
|
);
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
|
|
71
|
+
return /* @__PURE__ */ w("div", { ref: o, ...k, className: h("root", q && "inline", p), children: [
|
|
72
|
+
/* @__PURE__ */ b(
|
|
73
|
+
R,
|
|
74
74
|
{
|
|
75
|
-
className:
|
|
75
|
+
className: h("label", g && "visuallyHidden"),
|
|
76
76
|
disabled: d,
|
|
77
77
|
htmlFor: m,
|
|
78
78
|
id: r,
|
|
79
79
|
required: c,
|
|
80
|
-
variant:
|
|
80
|
+
variant: n,
|
|
81
81
|
...a,
|
|
82
|
-
children:
|
|
82
|
+
children: F
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
l ? /* @__PURE__ */
|
|
87
|
-
|
|
85
|
+
/* @__PURE__ */ b(y.Provider, { value: H, children: I }),
|
|
86
|
+
l ? /* @__PURE__ */ b(
|
|
87
|
+
M,
|
|
88
88
|
{
|
|
89
|
-
className:
|
|
90
|
-
id:
|
|
91
|
-
variant:
|
|
89
|
+
className: h("hint", !!e && "hint-max-length"),
|
|
90
|
+
id: s,
|
|
91
|
+
variant: n,
|
|
92
92
|
...t,
|
|
93
93
|
children: l
|
|
94
94
|
}
|
|
@@ -99,6 +99,6 @@ O.displayName = "Field";
|
|
|
99
99
|
export {
|
|
100
100
|
O as Field,
|
|
101
101
|
y as FieldContext,
|
|
102
|
-
|
|
102
|
+
_ as useDefaultID,
|
|
103
103
|
P as useField
|
|
104
104
|
};
|