welcome-ui 9.0.10 → 9.0.12
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 +40 -39
- package/dist/Card.js +11 -10
- package/dist/Field.js +4 -4
- package/dist/Modal.js +1 -1
- package/dist/types/components/Alert/index.d.ts +2 -2
- package/dist/types/components/Card/index.d.ts +4 -4
- package/package.json +1 -1
package/dist/Alert.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import C, { forwardRef as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import { Text as
|
|
2
|
+
import { jsxs as v, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import C, { forwardRef as I, Children as q, cloneElement as _ } from "react";
|
|
4
|
+
import { Button as d } from "./Button.js";
|
|
5
|
+
import { CloseButton as R } from "./CloseButton.js";
|
|
6
|
+
import { Text as w } from "./Text.js";
|
|
7
7
|
import { VariantIcon as S } from "./VariantIcon.js";
|
|
8
8
|
import { c as T } from "./index-PAaZGbyz.js";
|
|
9
|
-
|
|
9
|
+
import { f as y } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
10
|
+
const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", O = "_title_1c0qe_88", W = {
|
|
10
11
|
root: V,
|
|
11
12
|
"size-sm": "_size-sm_1c0qe_16",
|
|
12
13
|
"size-md": "_size-md_1c0qe_19",
|
|
@@ -22,80 +23,80 @@ const V = "_root_1c0qe_2", $ = "_icon_1c0qe_55", E = "_content_1c0qe_58", R = "_
|
|
|
22
23
|
"content-text": "_content-text_1c0qe_76",
|
|
23
24
|
"content-actions": "_content-actions_1c0qe_79",
|
|
24
25
|
"variant-icon": "_variant-icon_1c0qe_84",
|
|
25
|
-
title:
|
|
26
|
+
title: O,
|
|
26
27
|
"title-size-sm": "_title-size-sm_1c0qe_93",
|
|
27
28
|
"title-size-md": "_title-size-md_1c0qe_96",
|
|
28
29
|
"title-close-button": "_title-close-button_1c0qe_99",
|
|
29
30
|
"close-button": "_close-button_1c0qe_103"
|
|
30
|
-
}, i = T(
|
|
31
|
-
({ children: n, className: o, cta: e, handleClose:
|
|
32
|
-
const h = a === "beige" ? void 0 : a,
|
|
33
|
-
var
|
|
31
|
+
}, i = T(W), D = I(
|
|
32
|
+
({ children: n, className: o, cta: e, handleClose: c, hideIcon: A, isFullWidth: g, size: s = "sm", variant: a, ...B }, z) => {
|
|
33
|
+
const h = a === "beige" ? void 0 : a, l = a === "ai", m = !A, j = q.toArray(n).map((t) => t.type === x ? _(t, { hasCloseButton: !!c, variant: s }) : t), u = (t) => {
|
|
34
|
+
var p;
|
|
34
35
|
if (t) {
|
|
35
|
-
if (t.type ===
|
|
36
|
+
if (t.type === b)
|
|
36
37
|
return _(t, {
|
|
37
|
-
size:
|
|
38
|
-
variant:
|
|
38
|
+
size: s,
|
|
39
|
+
variant: l ? "primary-ai" : void 0
|
|
39
40
|
});
|
|
40
41
|
if (t.type === N)
|
|
41
42
|
return _(t, {
|
|
42
|
-
size:
|
|
43
|
-
variant:
|
|
43
|
+
size: s,
|
|
44
|
+
variant: l ? "tertiary-ai" : void 0
|
|
44
45
|
});
|
|
45
|
-
if ((
|
|
46
|
+
if ((p = t.props) != null && p.children)
|
|
46
47
|
return _(t, {
|
|
47
48
|
...t.props,
|
|
48
|
-
children:
|
|
49
|
+
children: q.map(
|
|
49
50
|
t.props.children,
|
|
50
|
-
(k) =>
|
|
51
|
+
(k) => u(k)
|
|
51
52
|
)
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
55
|
return t;
|
|
55
|
-
},
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
}, f = C.isValidElement(e) ? u(e) : e;
|
|
57
|
+
return /* @__PURE__ */ v(
|
|
57
58
|
"div",
|
|
58
59
|
{
|
|
59
60
|
className: i(
|
|
60
61
|
"root",
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
g && "full-width",
|
|
63
|
+
s && `size-${s}`,
|
|
63
64
|
a && `variant-${a}`,
|
|
64
|
-
|
|
65
|
+
m && "icon",
|
|
65
66
|
o
|
|
66
67
|
),
|
|
67
68
|
ref: z,
|
|
68
69
|
...B,
|
|
69
70
|
children: [
|
|
70
|
-
!!
|
|
71
|
-
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
!!
|
|
71
|
+
!!c && /* @__PURE__ */ r(R, { className: i("close-button"), onClick: c, size: "xs" }),
|
|
72
|
+
m ? /* @__PURE__ */ r(S, { className: i("variant-icon"), size: s, variant: h }) : null,
|
|
73
|
+
/* @__PURE__ */ v("div", { className: i("content"), children: [
|
|
74
|
+
/* @__PURE__ */ r(w, { as: "div", className: i("content-text"), children: j }),
|
|
75
|
+
!!f && /* @__PURE__ */ r("div", { className: i("content-actions"), children: f })
|
|
75
76
|
] })
|
|
76
77
|
]
|
|
77
78
|
}
|
|
78
79
|
);
|
|
79
80
|
}
|
|
80
|
-
),
|
|
81
|
-
({ variant: n = "secondary", ...o }, e) => /* @__PURE__ */
|
|
82
|
-
), N =
|
|
83
|
-
({ variant: n = "tertiary", ...o }, e) => /* @__PURE__ */
|
|
84
|
-
), x = ({ children: n, hasCloseButton: o, variant: e, ...
|
|
85
|
-
|
|
81
|
+
), b = y(
|
|
82
|
+
({ variant: n = "secondary", ...o }, e) => /* @__PURE__ */ r(d, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
|
|
83
|
+
), N = y(
|
|
84
|
+
({ variant: n = "tertiary", ...o }, e) => /* @__PURE__ */ r(d, { className: "shrink-0 w-fit", ref: e, ...o, variant: n })
|
|
85
|
+
), x = ({ children: n, hasCloseButton: o, variant: e, ...c }) => /* @__PURE__ */ r(
|
|
86
|
+
w,
|
|
86
87
|
{
|
|
87
88
|
as: "span",
|
|
88
89
|
className: i("title", `title-size-${e}`, o && "title-close-button"),
|
|
89
90
|
variant: e,
|
|
90
|
-
...
|
|
91
|
+
...c,
|
|
91
92
|
children: n
|
|
92
93
|
}
|
|
93
|
-
),
|
|
94
|
-
Button:
|
|
94
|
+
), Q = Object.assign(D, {
|
|
95
|
+
Button: b,
|
|
95
96
|
SecondaryButton: N,
|
|
96
97
|
Title: x
|
|
97
98
|
});
|
|
98
99
|
export {
|
|
99
|
-
|
|
100
|
+
Q as Alert,
|
|
100
101
|
x as AlertTitle
|
|
101
102
|
};
|
package/dist/Card.js
CHANGED
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
import { jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import { forwardRef as n } from "react";
|
|
4
4
|
import { c as d } from "./index-PAaZGbyz.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
),
|
|
13
|
-
|
|
5
|
+
import { f as m } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
6
|
+
const i = "_root_10ds1_2", f = "_body_10ds1_13", e = {
|
|
7
|
+
root: i,
|
|
8
|
+
body: f
|
|
9
|
+
}, l = d(e), p = n(
|
|
10
|
+
({ children: o, className: r, ...s }, t) => /* @__PURE__ */ c("div", { className: l("body", r), ref: t, ...s, children: o })
|
|
11
|
+
), y = n(({ alt: o, src: r, ...s }, t) => /* @__PURE__ */ c("div", { ref: t, ...s, children: /* @__PURE__ */ c("img", { alt: o, src: r }) })), _ = d(e), b = m(
|
|
12
|
+
({ as: o = "div", children: r, className: s, ...t }, a) => /* @__PURE__ */ c(o, { className: _("root", s), ref: a, ...t, children: r })
|
|
13
|
+
), N = Object.assign(b, {
|
|
14
|
+
Body: p,
|
|
14
15
|
Cover: y
|
|
15
16
|
});
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
N as Card,
|
|
18
19
|
b as CardComponent
|
|
19
20
|
};
|
package/dist/Field.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsxs as L, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import { createContext as q, useMemo as w, useId as A, useContext as M } from "react";
|
|
4
4
|
import { Hint as R } from "./Hint.js";
|
|
5
5
|
import { Label as S } from "./Label.js";
|
|
@@ -62,7 +62,7 @@ const Q = W((e, d) => {
|
|
|
62
62
|
}),
|
|
63
63
|
[s, a, i, l, c, m, u]
|
|
64
64
|
);
|
|
65
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ L("div", { ref: d, ...H, className: o("root", N && "inline", I), children: [
|
|
66
66
|
/* @__PURE__ */ r(
|
|
67
67
|
S,
|
|
68
68
|
{
|
|
@@ -76,9 +76,9 @@ const Q = W((e, d) => {
|
|
|
76
76
|
children: F
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
/* @__PURE__ */ r("div", { className: o("input"), children: y }),
|
|
79
|
+
/* @__PURE__ */ r(p.Provider, { value: j, children: /* @__PURE__ */ r("div", { className: o("input"), children: y }) }),
|
|
80
80
|
l ? /* @__PURE__ */ r(R, { className: o("hint"), id: s, variant: i, ...t, children: l }) : null
|
|
81
|
-
] })
|
|
81
|
+
] });
|
|
82
82
|
});
|
|
83
83
|
Q.displayName = "Field";
|
|
84
84
|
export {
|
package/dist/Modal.js
CHANGED
|
@@ -95,7 +95,7 @@ const R = "_root_1vbnu_3", W = "_hideOnInteractOutside_1vbnu_19", F = "_dialog_1
|
|
|
95
95
|
({ children: t, className: e, withClosingButton: o = !0, ...r }, a) => /* @__PURE__ */ d(
|
|
96
96
|
"div",
|
|
97
97
|
{
|
|
98
|
-
className:
|
|
98
|
+
className: ht("content", o && "with-close-button", e),
|
|
99
99
|
ref: a,
|
|
100
100
|
...r,
|
|
101
101
|
children: [
|
|
@@ -3,7 +3,7 @@ import { ButtonProps } from '../Button/types';
|
|
|
3
3
|
import { AlertProps, AlertTitleProps } from './types';
|
|
4
4
|
export declare const AlertTitle: ({ children, hasCloseButton, variant, ...rest }: AlertTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare const Alert: React.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
6
|
-
Button:
|
|
7
|
-
SecondaryButton:
|
|
6
|
+
Button: import('../../utils').FunctionComponentWithAs<"button", Omit<ButtonProps, "size">>;
|
|
7
|
+
SecondaryButton: import('../../utils').FunctionComponentWithAs<"button", Omit<ButtonProps, "size">>;
|
|
8
8
|
Title: ({ children, hasCloseButton, variant, ...rest }: AlertTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const CardComponent: import('
|
|
1
|
+
export declare const CardComponent: import('../../utils').FunctionComponentWithAs<"div", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
2
|
ref?: import('react').Ref<HTMLDivElement>;
|
|
3
|
-
}
|
|
4
|
-
export declare const Card: import('
|
|
3
|
+
}>;
|
|
4
|
+
export declare const Card: import('../../utils').FunctionComponentWithAs<"div", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
5
|
ref?: import('react').Ref<HTMLDivElement>;
|
|
6
|
-
}
|
|
6
|
+
}> & {
|
|
7
7
|
Body: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
8
|
ref?: import('react').Ref<HTMLDivElement>;
|
|
9
9
|
}, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|