welcome-ui 10.0.0 → 10.0.1
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/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/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/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
|
};
|