welcome-ui 10.7.0 → 10.7.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.css +1 -1
- package/dist/Alert.js +50 -50
- package/package.json +1 -1
package/dist/Alert.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_csad4_2{position:relative;display:flex;align-items:flex-start;width:100%;gap:var(--gap, var(--alert-gap-content-md));border-radius:var(--alert-border-radius);border-width:var(--border-width-sm);border-style:solid;padding:var(--padding);max-width:var(--maxWidth, max-content);background-color:var(--backgroundColor, var(--alert-color-background-brand));border-color:var(--borderColor, var(--alert-color-background-brand));color:var(--color, var(--alert-color-text-brand-body))}._size-md_csad4_18{--padding: var(--alert-padding-inline-md);--iconOffset: 2px}._size-md_csad4_18 ._content-actions_csad4_22{--gap: var(--alert-gap-actions-md)}._size-md_csad4_18 ._without-title_csad4_25 ._icon-wrapper_csad4_25{margin-top:calc(-1 * var(--iconOffset))}._size-md_csad4_18 ._content_csad4_22:has(>._without-title_csad4_25){margin-top:calc(-1 * var(--iconOffset));padding-top:var(--iconOffset)}._size-lg_csad4_32{--padding: var(--alert-padding-inline-lg);--gap: var(--alert-gap-content-lg)}._size-lg_csad4_32 ._content-actions_csad4_22{--gap: var(--alert-gap-actions-lg)}._variant-ai_csad4_39{--backgroundColor: var(--alert-color-background-ai);--borderColor: transparent;background:linear-gradient(var(--alert-color-background-ai) 0 0) padding-box,linear-gradient(90deg,var(--color-green-30) 0%,var(--color-teal-40) 20%,var(--color-blue-40) 40%,var(--color-violet-40) 60%,var(--color-pink-40) 80%,var(--color-red-orange-40) 100%) border-box}._variant-danger_csad4_44{--backgroundColor: var(--alert-color-background-danger);--borderColor: var(--alert-color-background-danger);--color: var(--color-icon-danger-primary)}._variant-info_csad4_49{--backgroundColor: var(--alert-color-background-information);--borderColor: var(--alert-color-background-information);--color: var(--color-icon-accent-blue-primary)}._variant-success_csad4_54{--backgroundColor: var(--alert-color-background-success);--borderColor: var(--alert-color-background-success);--color: var(--color-icon-accent-green-primary)}._variant-warning_csad4_59{--backgroundColor: var(--alert-color-background-warning);--borderColor: var(--alert-color-background-warning);--color: var(--color-icon-warning-primary)}._full-width_csad4_64{--maxWidth: 100%}._content_csad4_22{overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:var(--gap, var(--alert-gap-content-md))}._content-text_csad4_76{display:flex;flex-direction:column;gap:var(--gap, var(--alert-gap-content-md))}._content-text_csad4_76._without-title_csad4_25{flex-direction:row}._content-text_csad4_76._without-title_csad4_25 ._icon-wrapper_csad4_25{align-self:flex-start}._content-actions_csad4_22{display:flex;align-items:center;gap:var(--gap)}._title-close-button_csad4_93{margin-right:var(--spacing-xl)}._title-with-icon_csad4_96{display:flex;align-items:center;gap:var(--spacing-sm)}._close-button_csad4_102{position:absolute;right:var(--spacing-sm);top:var(--spacing-sm)}._icon-wrapper_csad4_25{display:flex;flex-shrink:0;padding:var(--alert-icon-padding-block);border-radius:var(--alert-icon-border-radius);background-color:var(--iconWrapperBackgroundColor, var(--alert-icon-color-background-brand));color:var(--iconWrapperColor, var(--alert-icon-color-icon-brand))}._icon-wrapper-success_csad4_116{--iconWrapperBackgroundColor: var(--alert-icon-color-background-success);--iconWrapperColor: var(--alert-icon-color-icon-success)}._icon-wrapper-danger_csad4_120{--iconWrapperBackgroundColor: var(--alert-icon-color-background-danger);--iconWrapperColor: var(--alert-icon-color-icon-danger)}._icon-wrapper-info_csad4_124{--iconWrapperBackgroundColor: var(--alert-icon-color-background-information);--iconWrapperColor: var(--alert-icon-color-icon-information)}._icon-wrapper-warning_csad4_128{--iconWrapperBackgroundColor: var(--alert-icon-color-background-warning);--iconWrapperColor: var(--alert-icon-color-icon-warning)}._icon-wrapper-ai_csad4_132{background:conic-gradient(from 30deg at 50% 50%,var(--color-green-30) 0deg,var(--color-blue-40) 25.96deg,var(--color-violet-40) 51.92deg,var(--color-pink-40) 76.15deg,var(--color-red-orange-40) 110.77deg,var(--color-pink-40) 162.69deg,var(--color-violet-40) 209.42deg,var(--color-blue-40) 254.42deg,var(--color-teal-40) 306.35deg,var(--color-green-30) 360deg);--iconWrapperColor: var(--alert-icon-color-icon-ai)}._alert-buttons_csad4_137{flex-shrink:0;width:fit-content}}
|
package/dist/Alert.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import './Alert.css';
|
|
3
|
-
import { jsx as
|
|
4
|
-
import
|
|
3
|
+
import { jsx as s, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import d, { forwardRef as V, Children as m, cloneElement as u } from "react";
|
|
5
5
|
import { CloseButton as I } from "./CloseButton.js";
|
|
6
6
|
import { Icon as O } from "./Icon.js";
|
|
7
7
|
import { Text as x } from "./Text.js";
|
|
8
8
|
import { c as f } from "./index-B6iGEm-i.js";
|
|
9
9
|
import { Button as h } from "./Button.js";
|
|
10
10
|
import { f as B } from "./forwardRefWithAs-8eP3ZN15.js";
|
|
11
|
-
const z = "
|
|
11
|
+
const z = "_root_csad4_2", F = "_content_csad4_22", w = {
|
|
12
12
|
root: z,
|
|
13
|
-
"size-md": "_size-
|
|
14
|
-
"content-actions": "_content-
|
|
15
|
-
"without-title": "_without-
|
|
16
|
-
"icon-wrapper": "_icon-
|
|
17
|
-
"size-lg": "_size-lg_s4so0_27",
|
|
18
|
-
"variant-ai": "_variant-ai_s4so0_34",
|
|
19
|
-
"variant-danger": "_variant-danger_s4so0_39",
|
|
20
|
-
"variant-info": "_variant-info_s4so0_44",
|
|
21
|
-
"variant-success": "_variant-success_s4so0_49",
|
|
22
|
-
"variant-warning": "_variant-warning_s4so0_54",
|
|
23
|
-
"full-width": "_full-width_s4so0_59",
|
|
13
|
+
"size-md": "_size-md_csad4_18",
|
|
14
|
+
"content-actions": "_content-actions_csad4_22",
|
|
15
|
+
"without-title": "_without-title_csad4_25",
|
|
16
|
+
"icon-wrapper": "_icon-wrapper_csad4_25",
|
|
24
17
|
content: F,
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
18
|
+
"size-lg": "_size-lg_csad4_32",
|
|
19
|
+
"variant-ai": "_variant-ai_csad4_39",
|
|
20
|
+
"variant-danger": "_variant-danger_csad4_44",
|
|
21
|
+
"variant-info": "_variant-info_csad4_49",
|
|
22
|
+
"variant-success": "_variant-success_csad4_54",
|
|
23
|
+
"variant-warning": "_variant-warning_csad4_59",
|
|
24
|
+
"full-width": "_full-width_csad4_64",
|
|
25
|
+
"content-text": "_content-text_csad4_76",
|
|
26
|
+
"title-close-button": "_title-close-button_csad4_93",
|
|
27
|
+
"title-with-icon": "_title-with-icon_csad4_96",
|
|
28
|
+
"close-button": "_close-button_csad4_102",
|
|
29
|
+
"icon-wrapper-success": "_icon-wrapper-success_csad4_116",
|
|
30
|
+
"icon-wrapper-danger": "_icon-wrapper-danger_csad4_120",
|
|
31
|
+
"icon-wrapper-info": "_icon-wrapper-info_csad4_124",
|
|
32
|
+
"icon-wrapper-warning": "_icon-wrapper-warning_csad4_128",
|
|
33
|
+
"icon-wrapper-ai": "_icon-wrapper-ai_csad4_132",
|
|
34
|
+
"alert-buttons": "_alert-buttons_csad4_137"
|
|
35
35
|
}, $ = f(w), y = B(
|
|
36
|
-
({ variant:
|
|
36
|
+
({ variant: n = "primary", ...r }, a) => /* @__PURE__ */ s(h, { className: $("alert-buttons"), ref: a, variant: n, ...r })
|
|
37
37
|
), g = B(
|
|
38
|
-
({ variant:
|
|
38
|
+
({ variant: n = "secondary", ...r }, a) => /* @__PURE__ */ s(h, { className: $("alert-buttons"), ref: a, variant: n, ...r })
|
|
39
39
|
);
|
|
40
40
|
y.displayName = "Alert.Button";
|
|
41
41
|
g.displayName = "Alert.SecondaryButton";
|
|
42
|
-
const M = f(w), _ = ({ children:
|
|
42
|
+
const M = f(w), _ = ({ children: n, hasCloseButton: r, ...a }) => /* @__PURE__ */ s(x, { as: "span", className: M(r && "title-close-button"), ...a, children: n });
|
|
43
43
|
_.displayName = "Alert.Title";
|
|
44
|
-
const
|
|
44
|
+
const o = f(w), W = {
|
|
45
45
|
ai: "sparkles",
|
|
46
46
|
brand: "lightbulb-alt",
|
|
47
47
|
danger: "exclamation-octagon",
|
|
@@ -50,56 +50,56 @@ const r = f(w), W = {
|
|
|
50
50
|
warning: "exclamation-triangle"
|
|
51
51
|
}, C = V(
|
|
52
52
|
({
|
|
53
|
-
children:
|
|
54
|
-
className:
|
|
55
|
-
cta:
|
|
53
|
+
children: n,
|
|
54
|
+
className: r,
|
|
55
|
+
cta: a,
|
|
56
56
|
handleClose: p,
|
|
57
57
|
icon: T,
|
|
58
58
|
isFullWidth: E,
|
|
59
|
-
size:
|
|
60
|
-
variant:
|
|
59
|
+
size: c = "md",
|
|
60
|
+
variant: i = "brand",
|
|
61
61
|
...S
|
|
62
62
|
}, j) => {
|
|
63
|
-
const k =
|
|
63
|
+
const k = i === "ai", b = m.toArray(n).some((e) => d.isValidElement(e) ? e.type === _ : !1), v = /* @__PURE__ */ s("div", { className: o("icon-wrapper", `icon-wrapper-${i}`), children: /* @__PURE__ */ s(O, { name: T || W[i] }) }), R = m.toArray(n).map((e, t) => e.type === _ ? /* @__PURE__ */ l("div", { className: o("title-with-icon"), children: [
|
|
64
64
|
v,
|
|
65
|
-
|
|
65
|
+
u(e, {
|
|
66
66
|
hasCloseButton: !!p,
|
|
67
|
-
variant: `body-${
|
|
67
|
+
variant: `body-${c}-strong`
|
|
68
68
|
})
|
|
69
|
-
] }, `alert-title-${t}`) :
|
|
70
|
-
size:
|
|
69
|
+
] }, `alert-title-${t}`) : e), N = (e) => m.toArray(e).flatMap((t) => d.isValidElement(t) && t.type === d.Fragment ? N(t.props.children) : t.type === y ? u(t, {
|
|
70
|
+
size: c,
|
|
71
71
|
variant: k ? "primary-ai" : void 0
|
|
72
|
-
}) : t.type === g ?
|
|
73
|
-
size:
|
|
74
|
-
}) : t), A = !!
|
|
72
|
+
}) : t.type === g ? u(t, {
|
|
73
|
+
size: c
|
|
74
|
+
}) : t), A = !!a && N(a);
|
|
75
75
|
return /* @__PURE__ */ l(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
|
-
className:
|
|
78
|
+
className: o(
|
|
79
79
|
"root",
|
|
80
80
|
E && "full-width",
|
|
81
|
-
`size-${
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
`size-${c}`,
|
|
82
|
+
i && `variant-${i}`,
|
|
83
|
+
r
|
|
84
84
|
),
|
|
85
85
|
ref: j,
|
|
86
86
|
...S,
|
|
87
87
|
children: [
|
|
88
|
-
!!p && /* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */ l("div", { className:
|
|
88
|
+
!!p && /* @__PURE__ */ s(I, { className: o("close-button"), onClick: p }),
|
|
89
|
+
/* @__PURE__ */ l("div", { className: o("content"), children: [
|
|
90
90
|
/* @__PURE__ */ l(
|
|
91
91
|
x,
|
|
92
92
|
{
|
|
93
93
|
as: "div",
|
|
94
|
-
className:
|
|
95
|
-
variant: `body-${
|
|
94
|
+
className: o("content-text", !b && "without-title"),
|
|
95
|
+
variant: `body-${c}`,
|
|
96
96
|
children: [
|
|
97
97
|
!b && v,
|
|
98
98
|
R
|
|
99
99
|
]
|
|
100
100
|
}
|
|
101
101
|
),
|
|
102
|
-
!!A && /* @__PURE__ */
|
|
102
|
+
!!A && /* @__PURE__ */ s("div", { className: o("content-actions"), children: A })
|
|
103
103
|
] })
|
|
104
104
|
]
|
|
105
105
|
}
|