welcome-ui 9.0.4 → 9.0.6
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 +17 -17
- package/dist/Avatar.js +1 -1
- package/dist/types/components/Avatar/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/Alert.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as q, jsx as
|
|
2
|
+
import { jsxs as q, jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import C, { forwardRef as l, Children as d, cloneElement as _ } from "react";
|
|
4
4
|
import { Button as y } from "./Button.js";
|
|
5
5
|
import { CloseButton as I } from "./CloseButton.js";
|
|
@@ -27,19 +27,19 @@ const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", R = "_
|
|
|
27
27
|
"title-size-md": "_title-size-md_1c0qe_96",
|
|
28
28
|
"title-close-button": "_title-close-button_1c0qe_99",
|
|
29
29
|
"close-button": "_close-button_1c0qe_103"
|
|
30
|
-
},
|
|
31
|
-
({ children: n, className: o, cta: e, handleClose: s, hideIcon: g, isFullWidth: A, size:
|
|
32
|
-
const h = a === "beige" ? void 0 : a, m = a === "ai", u = !g, j = d.toArray(n).map((t) => t.type === x ? _(t, { hasCloseButton: !!s, variant:
|
|
30
|
+
}, i = T(O), D = l(
|
|
31
|
+
({ children: n, className: o, cta: e, handleClose: s, hideIcon: g, isFullWidth: A, size: r = "sm", variant: a, ...B }, z) => {
|
|
32
|
+
const h = a === "beige" ? void 0 : a, m = a === "ai", u = !g, j = d.toArray(n).map((t) => t.type === x ? _(t, { hasCloseButton: !!s, variant: r }) : t), f = (t) => {
|
|
33
33
|
var v;
|
|
34
34
|
if (t) {
|
|
35
35
|
if (t.type === w)
|
|
36
36
|
return _(t, {
|
|
37
|
-
size:
|
|
37
|
+
size: r,
|
|
38
38
|
variant: m ? "primary-ai" : void 0
|
|
39
39
|
});
|
|
40
40
|
if (t.type === N)
|
|
41
41
|
return _(t, {
|
|
42
|
-
size:
|
|
42
|
+
size: r,
|
|
43
43
|
variant: m ? "tertiary-ai" : void 0
|
|
44
44
|
});
|
|
45
45
|
if ((v = t.props) != null && v.children)
|
|
@@ -56,10 +56,10 @@ const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", R = "_
|
|
|
56
56
|
return /* @__PURE__ */ q(
|
|
57
57
|
"div",
|
|
58
58
|
{
|
|
59
|
-
className:
|
|
59
|
+
className: i(
|
|
60
60
|
"root",
|
|
61
61
|
A && "full-width",
|
|
62
|
-
|
|
62
|
+
r && `size-${r}`,
|
|
63
63
|
a && `variant-${a}`,
|
|
64
64
|
u && "icon",
|
|
65
65
|
o
|
|
@@ -67,25 +67,25 @@ const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", R = "_
|
|
|
67
67
|
ref: z,
|
|
68
68
|
...B,
|
|
69
69
|
children: [
|
|
70
|
-
!!s && /* @__PURE__ */
|
|
71
|
-
u ? /* @__PURE__ */
|
|
72
|
-
/* @__PURE__ */ q("div", { className:
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
!!p && /* @__PURE__ */
|
|
70
|
+
!!s && /* @__PURE__ */ c(I, { className: i("close-button"), onClick: s, size: "xs" }),
|
|
71
|
+
u ? /* @__PURE__ */ c(S, { className: i("variant-icon"), size: r, variant: h }) : null,
|
|
72
|
+
/* @__PURE__ */ q("div", { className: i("content"), children: [
|
|
73
|
+
/* @__PURE__ */ c(b, { as: "div", className: i("content-text"), children: j }),
|
|
74
|
+
!!p && /* @__PURE__ */ c("div", { className: i("content-actions"), children: p })
|
|
75
75
|
] })
|
|
76
76
|
]
|
|
77
77
|
}
|
|
78
78
|
);
|
|
79
79
|
}
|
|
80
80
|
), w = l(
|
|
81
|
-
({ variant: n = "secondary", ...o }, e) => /* @__PURE__ */
|
|
81
|
+
({ variant: n = "secondary", ...o }, e) => /* @__PURE__ */ c(y, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
|
|
82
82
|
), N = l(
|
|
83
|
-
({ variant: n = "tertiary", ...o }, e) => /* @__PURE__ */
|
|
84
|
-
), x = ({ children: n, hasCloseButton: o, variant: e, ...s }) => /* @__PURE__ */
|
|
83
|
+
({ variant: n = "tertiary", ...o }, e) => /* @__PURE__ */ c(y, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
|
|
84
|
+
), x = ({ children: n, hasCloseButton: o, variant: e, ...s }) => /* @__PURE__ */ c(
|
|
85
85
|
b,
|
|
86
86
|
{
|
|
87
87
|
as: "span",
|
|
88
|
-
className:
|
|
88
|
+
className: i("title", `title-size-${e}`, o && "title-close-button"),
|
|
89
89
|
variant: e,
|
|
90
90
|
...s,
|
|
91
91
|
children: n
|
package/dist/Avatar.js
CHANGED
|
@@ -20,7 +20,7 @@ function g(e = "") {
|
|
|
20
20
|
const [o, r] = e.split(" ");
|
|
21
21
|
return o && r ? `${o.charAt(0).toUpperCase()}${r.charAt(0).toUpperCase()}` : o.substring(0, 2).toUpperCase();
|
|
22
22
|
}
|
|
23
|
-
const m = (e) => {
|
|
23
|
+
const m = (e = "") => {
|
|
24
24
|
const o = e.length % t.length;
|
|
25
25
|
return t[o];
|
|
26
26
|
}, z = _(u), t = [
|