welcome-ui 10.0.0-alpha.12 → 10.0.0-alpha.14
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 +34 -34
- package/dist/Field.js +7 -7
- package/dist/FileDrop.js +308 -294
- package/dist/Modal.js +1 -1
- package/dist/StickyNote.css +1 -1
- package/dist/StickyNote.js +52 -38
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.js +107 -107
- package/dist/types/components/Alert/components/Buttons.d.ts +2 -2
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/FileDrop/components/Message.d.ts +1 -1
- package/dist/types/components/FileDrop/types.d.ts +5 -0
- package/dist/types/components/StickyNote/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/Alert.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Alert.css';
|
|
3
3
|
import { jsx as i, jsxs as l } from "react/jsx-runtime";
|
|
4
|
-
import p, { forwardRef as
|
|
5
|
-
import { CloseButton as
|
|
4
|
+
import p, { forwardRef as E, Children as f, cloneElement as m } from "react";
|
|
5
|
+
import { CloseButton as R } from "./CloseButton.js";
|
|
6
6
|
import { Icon as V } from "./Icon.js";
|
|
7
|
-
import { Text as
|
|
8
|
-
import { c as
|
|
7
|
+
import { Text as A } from "./Text.js";
|
|
8
|
+
import { c as b } from "./index-PAaZGbyz.js";
|
|
9
9
|
import { Button as h } from "./Button.js";
|
|
10
|
+
import { f as x } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
10
11
|
const I = "_root_8fyu4_2", O = "_content_8fyu4_21", B = {
|
|
11
12
|
root: I,
|
|
12
13
|
"size-md": "_size-md_8fyu4_18",
|
|
@@ -30,65 +31,64 @@ const I = "_root_8fyu4_2", O = "_content_8fyu4_21", B = {
|
|
|
30
31
|
"icon-wrapper-info": "_icon-wrapper-info_8fyu4_119",
|
|
31
32
|
"icon-wrapper-warning": "_icon-wrapper-warning_8fyu4_125",
|
|
32
33
|
"icon-wrapper-ai": "_icon-wrapper-ai_8fyu4_129"
|
|
33
|
-
},
|
|
34
|
+
}, y = x(
|
|
34
35
|
({ variant: t = "primary", ...o }, n) => /* @__PURE__ */ i(h, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
|
|
35
|
-
)
|
|
36
|
-
w.displayName = "Alert.Button";
|
|
37
|
-
const d = y(
|
|
36
|
+
), w = x(
|
|
38
37
|
({ variant: t = "secondary", ...o }, n) => /* @__PURE__ */ i(h, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
|
|
39
38
|
);
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
y.displayName = "Alert.Button";
|
|
40
|
+
w.displayName = "Alert.SecondaryButton";
|
|
41
|
+
const z = b(B), _ = ({ children: t, hasCloseButton: o, ...n }) => /* @__PURE__ */ i(A, { as: "span", className: z(o && "title-close-button"), ...n, children: t });
|
|
42
42
|
_.displayName = "Alert.Title";
|
|
43
|
-
const a =
|
|
43
|
+
const a = b(B), F = {
|
|
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
|
-
({ children: t, className: o, cta: n, handleClose: u, isFullWidth: k, size:
|
|
52
|
-
const S =
|
|
53
|
-
|
|
50
|
+
}, $ = E(
|
|
51
|
+
({ children: t, className: o, cta: n, handleClose: u, isFullWidth: k, size: s = "md", variant: c = "brand", ...T }, C) => {
|
|
52
|
+
const S = c === "ai", d = f.toArray(t).some((e) => p.isValidElement(e) ? e.type === _ : !1), g = /* @__PURE__ */ i("div", { className: a("icon-wrapper", `icon-wrapper-${c}`), children: /* @__PURE__ */ i(V, { name: F[c] }) }), j = f.toArray(t).map((e) => e.type === _ ? /* @__PURE__ */ l("div", { className: a("title-with-icon"), children: [
|
|
53
|
+
g,
|
|
54
54
|
m(e, {
|
|
55
55
|
hasCloseButton: !!u,
|
|
56
|
-
variant: `body-${
|
|
56
|
+
variant: `body-${s}-strong`
|
|
57
57
|
})
|
|
58
|
-
] }) : e),
|
|
59
|
-
size:
|
|
58
|
+
] }) : e), v = (e) => f.toArray(e).flatMap((r) => p.isValidElement(r) && r.type === p.Fragment ? v(r.props.children) : r.type === y ? m(r, {
|
|
59
|
+
size: s,
|
|
60
60
|
variant: S ? "primary-ai" : void 0
|
|
61
|
-
}) : r.type ===
|
|
62
|
-
size:
|
|
63
|
-
}) : r),
|
|
61
|
+
}) : r.type === w ? m(r, {
|
|
62
|
+
size: s
|
|
63
|
+
}) : r), N = !!n && v(n);
|
|
64
64
|
return /* @__PURE__ */ l(
|
|
65
65
|
"div",
|
|
66
66
|
{
|
|
67
67
|
className: a(
|
|
68
68
|
"root",
|
|
69
69
|
k && "full-width",
|
|
70
|
-
`size-${
|
|
71
|
-
|
|
70
|
+
`size-${s}`,
|
|
71
|
+
c && `variant-${c}`,
|
|
72
72
|
o
|
|
73
73
|
),
|
|
74
74
|
ref: C,
|
|
75
75
|
...T,
|
|
76
76
|
children: [
|
|
77
|
-
!!u && /* @__PURE__ */ i(
|
|
77
|
+
!!u && /* @__PURE__ */ i(R, { className: a("close-button"), onClick: u }),
|
|
78
78
|
/* @__PURE__ */ l("div", { className: a("content"), children: [
|
|
79
79
|
/* @__PURE__ */ l(
|
|
80
|
-
|
|
80
|
+
A,
|
|
81
81
|
{
|
|
82
82
|
as: "div",
|
|
83
|
-
className: a("content-text", !
|
|
84
|
-
variant: `body-${
|
|
83
|
+
className: a("content-text", !d && "without-title"),
|
|
84
|
+
variant: `body-${s}`,
|
|
85
85
|
children: [
|
|
86
|
-
!
|
|
86
|
+
!d && g,
|
|
87
87
|
j
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
!!
|
|
91
|
+
!!N && /* @__PURE__ */ i("div", { className: a("content-actions"), children: N })
|
|
92
92
|
] })
|
|
93
93
|
]
|
|
94
94
|
}
|
|
@@ -96,12 +96,12 @@ const a = x(B), z = {
|
|
|
96
96
|
}
|
|
97
97
|
);
|
|
98
98
|
$.displayName = "Alert";
|
|
99
|
-
const
|
|
100
|
-
Button:
|
|
101
|
-
SecondaryButton:
|
|
99
|
+
const L = Object.assign($, {
|
|
100
|
+
Button: y,
|
|
101
|
+
SecondaryButton: w,
|
|
102
102
|
Title: _
|
|
103
103
|
});
|
|
104
104
|
export {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
L as Alert,
|
|
106
|
+
F as ICON
|
|
107
107
|
};
|
package/dist/Field.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Field.css';
|
|
3
|
-
import {
|
|
3
|
+
import { jsxs as C, jsx as m } from "react/jsx-runtime";
|
|
4
4
|
import { createContext as L, useMemo as q, useId as A, useContext as M } from "react";
|
|
5
5
|
import { Hint as R } from "./Hint.js";
|
|
6
6
|
import { Label as S } from "./Label.js";
|
|
@@ -30,7 +30,7 @@ const O = W((e, s) => {
|
|
|
30
30
|
children: y,
|
|
31
31
|
className: I,
|
|
32
32
|
disabled: o,
|
|
33
|
-
error:
|
|
33
|
+
error: _,
|
|
34
34
|
hideLabel: j,
|
|
35
35
|
hint: p,
|
|
36
36
|
hintProps: n,
|
|
@@ -39,10 +39,10 @@ const O = W((e, s) => {
|
|
|
39
39
|
label: w,
|
|
40
40
|
labelProps: t,
|
|
41
41
|
required: d,
|
|
42
|
-
success:
|
|
42
|
+
success: h,
|
|
43
43
|
warning: v,
|
|
44
44
|
...N
|
|
45
|
-
} = e, i =
|
|
45
|
+
} = e, i = _ ? "danger" : h ? "success" : v ? "warning" : void 0, l = _ ?? v ?? h ?? p, a = f(t == null ? void 0 : t.id), r = f(n == null ? void 0 : n.id), c = f(D), F = q(
|
|
46
46
|
() => ({
|
|
47
47
|
getInputProps(u) {
|
|
48
48
|
const H = [u["aria-describedby"], l && r].filter(Boolean).join(" ") || void 0, B = [u["aria-labelledby"], a].filter(Boolean).join(" ");
|
|
@@ -62,7 +62,7 @@ const O = W((e, s) => {
|
|
|
62
62
|
}),
|
|
63
63
|
[r, a, i, l, o, c, d]
|
|
64
64
|
);
|
|
65
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ C("div", { ref: s, ...N, className: b("root", g && "inline", I), children: [
|
|
66
66
|
/* @__PURE__ */ m(
|
|
67
67
|
S,
|
|
68
68
|
{
|
|
@@ -76,9 +76,9 @@ const O = W((e, s) => {
|
|
|
76
76
|
children: w
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
y,
|
|
79
|
+
/* @__PURE__ */ m(x.Provider, { value: F, children: y }),
|
|
80
80
|
l ? /* @__PURE__ */ m(R, { className: b("hint"), id: r, variant: i, ...n, children: l }) : null
|
|
81
|
-
] })
|
|
81
|
+
] });
|
|
82
82
|
});
|
|
83
83
|
O.displayName = "Field";
|
|
84
84
|
export {
|