welcome-ui 10.0.0-alpha.3 → 10.0.0-alpha.5
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/2W3RN7C5-DMC82gDP.js +61 -0
- package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
- package/dist/Accordion.js +19 -17
- package/dist/Alert.css +1 -1
- package/dist/Alert.js +93 -87
- package/dist/AspectRatio.js +1 -0
- package/dist/Avatar.js +13 -11
- package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
- package/dist/Badge.js +1 -0
- package/dist/Breadcrumb.js +76 -71
- package/dist/Button.js +8 -6
- package/dist/ButtonGroup.js +6 -4
- package/dist/Card.css +1 -1
- package/dist/Card.js +68 -15
- package/dist/Checkbox.js +30 -29
- package/dist/CloseButton.js +7 -5
- package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
- package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
- package/dist/DatePicker.js +82 -78
- package/dist/DateTimePicker.js +22 -21
- package/dist/Drawer.js +101 -80
- package/dist/DropdownMenu.css +1 -1
- package/dist/DropdownMenu.js +889 -462
- package/dist/Field.js +1 -0
- package/dist/FieldGroup.js +9 -7
- package/dist/FileDrop.js +184 -176
- package/dist/FileUpload.js +43 -40
- package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
- package/dist/Hint.js +9 -7
- package/dist/Icon.js +6 -4
- package/dist/InputText.js +30 -28
- package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
- package/dist/Label.js +9 -7
- package/dist/Link.js +25 -21
- package/dist/Loader.js +12 -10
- package/dist/Logo.js +21 -13
- package/dist/Modal.js +145 -114
- package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
- package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
- package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
- package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
- package/dist/Pagination.js +39 -37
- package/dist/PasswordInput.js +20 -17
- package/dist/Popover.js +89 -72
- package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
- package/dist/Radio.js +20 -19
- package/dist/RadioGroup.js +29 -27
- package/dist/RadioTab.js +2 -1
- package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
- package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
- package/dist/Search.css +1 -1
- package/dist/Search.js +62 -60
- package/dist/Select.css +1 -1
- package/dist/Select.js +204 -202
- package/dist/Slider.js +66 -61
- package/dist/Stepper.js +34 -27
- package/dist/StickyNote.css +1 -0
- package/dist/StickyNote.js +49 -0
- package/dist/Swiper.js +52 -50
- package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
- package/dist/Table.js +34 -21
- package/dist/Tabs.js +161 -152
- package/dist/Tag.css +1 -1
- package/dist/Tag.js +66 -61
- package/dist/Text.js +4 -2
- package/dist/Textarea.js +10 -8
- package/dist/TimePicker.js +22 -21
- package/dist/Toast.js +186 -177
- package/dist/Toggle.js +16 -14
- package/dist/Tooltip.js +29 -27
- package/dist/VariantIcon.js +7 -5
- package/dist/VisuallyHidden.js +8 -6
- package/dist/WelcomeLoader.js +3 -2
- package/dist/XCKGTAUF-CJwwVibW.js +25 -0
- package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
- package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
- package/dist/theme.css +1 -1
- package/dist/theme.js +1 -0
- package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
- package/dist/types/components/Alert/components/Title.d.ts +5 -0
- package/dist/types/components/Alert/index.d.ts +7 -3
- package/dist/types/components/Alert/types.d.ts +3 -9
- package/dist/types/components/Card/Body.d.ts +2 -3
- package/dist/types/components/Card/Footer.d.ts +6 -0
- package/dist/types/components/Card/Header.d.ts +5 -0
- package/dist/types/components/Card/index.d.ts +7 -8
- package/dist/types/components/Card/types.d.ts +16 -3
- package/dist/types/components/Checkbox/index.d.ts +1 -2
- package/dist/types/components/Checkbox/types.d.ts +3 -1
- package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
- package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
- package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
- package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
- package/dist/types/components/Drawer/components/Close.d.ts +4 -1
- package/dist/types/components/Drawer/components/Title.d.ts +4 -1
- package/dist/types/components/Drawer/index.d.ts +12 -3
- package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
- package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
- package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
- package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
- package/dist/types/components/DropdownMenu/index.d.ts +11 -0
- package/dist/types/components/DropdownMenu/types.d.ts +26 -5
- package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
- package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
- package/dist/types/components/Loader/index.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
- package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
- package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
- package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
- package/dist/types/components/Modal/Assets/index.d.ts +16 -4
- package/dist/types/components/Modal/components/Close.d.ts +4 -1
- package/dist/types/components/Modal/index.d.ts +16 -4
- package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
- package/dist/types/components/Popover/Arrow.d.ts +4 -1
- package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
- package/dist/types/components/RadioGroup/index.d.ts +4 -1
- package/dist/types/components/Stepper/index.d.ts +8 -2
- package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
- package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
- package/dist/types/components/StickyNote/index.d.ts +11 -0
- package/dist/types/components/StickyNote/index.test.d.ts +1 -0
- package/dist/types/components/StickyNote/types.d.ts +15 -0
- package/dist/types/components/Swiper/index.d.ts +4 -1
- package/dist/types/components/Table/index.d.ts +20 -5
- package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
- package/dist/types/components/Tag/types.d.ts +4 -2
- package/dist/types/components/Toast/index.d.ts +4 -1
- package/dist/types/theme/types.d.ts +233 -218
- package/dist/utils.js +1 -0
- package/package.json +2 -2
- package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
- package/dist/SQZLCNLX-CUlXoT69.js +0 -82
- package/dist/XCKGTAUF-CahZE721.js +0 -25
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { c as I, _ as p, R as d, F as O, P as q, u as _, d as x, v as j, a as T, Z as Y, $ as w, j as H, h as L, a0 as V, a1 as Z, f as $, b as z } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
3
|
+
import { useRef as C, useState as D, useEffect as G } from "react";
|
|
4
|
+
var J = "button";
|
|
5
|
+
function M(a) {
|
|
6
|
+
if (!a.isTrusted) return !1;
|
|
7
|
+
const t = a.currentTarget;
|
|
8
|
+
return a.key === "Enter" ? d(t) || t.tagName === "SUMMARY" || t.tagName === "A" : a.key === " " ? d(t) || t.tagName === "SUMMARY" || t.tagName === "INPUT" || t.tagName === "SELECT" : !1;
|
|
9
|
+
}
|
|
10
|
+
var Q = Symbol("command"), W = I(
|
|
11
|
+
function(t) {
|
|
12
|
+
var i = t, { clickOnEnter: m = !0, clickOnSpace: u = !0 } = i, r = p(i, ["clickOnEnter", "clickOnSpace"]);
|
|
13
|
+
const c = C(null), [R, K] = D(!1);
|
|
14
|
+
G(() => {
|
|
15
|
+
c.current && K(d(c.current));
|
|
16
|
+
}, []);
|
|
17
|
+
const [U, k] = D(!1), f = C(!1), y = O(r), [E, F] = q(r, Q, !0), P = r.onKeyDown, h = _((e) => {
|
|
18
|
+
P == null || P(e);
|
|
19
|
+
const s = e.currentTarget;
|
|
20
|
+
if (e.defaultPrevented || E || y || !H(e) || L(s) || s.isContentEditable) return;
|
|
21
|
+
const o = m && e.key === "Enter", n = u && e.key === " ", b = e.key === "Enter" && !m, l = e.key === " " && !u;
|
|
22
|
+
if (b || l) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (o || n) {
|
|
27
|
+
const g = M(e);
|
|
28
|
+
if (o) {
|
|
29
|
+
if (!g) {
|
|
30
|
+
e.preventDefault();
|
|
31
|
+
const S = e, { view: X } = S, B = p(S, ["view"]), N = () => w(s, B);
|
|
32
|
+
V() ? Z(s, "keyup", N) : queueMicrotask(N);
|
|
33
|
+
}
|
|
34
|
+
} else n && (f.current = !0, g || (e.preventDefault(), k(!0)));
|
|
35
|
+
}
|
|
36
|
+
}), v = r.onKeyUp, A = _((e) => {
|
|
37
|
+
if (v == null || v(e), e.defaultPrevented || E || y || e.metaKey) return;
|
|
38
|
+
const s = u && e.key === " ";
|
|
39
|
+
if (f.current && s && (f.current = !1, !M(e))) {
|
|
40
|
+
e.preventDefault(), k(!1);
|
|
41
|
+
const o = e.currentTarget, n = e, { view: b } = n, l = p(n, ["view"]);
|
|
42
|
+
queueMicrotask(() => w(o, l));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return r = x(T(T({
|
|
46
|
+
"data-active": U || void 0,
|
|
47
|
+
type: R ? "button" : void 0
|
|
48
|
+
}, F), r), {
|
|
49
|
+
ref: j(c, r.ref),
|
|
50
|
+
onKeyDown: h,
|
|
51
|
+
onKeyUp: A
|
|
52
|
+
}), r = Y(r), r;
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
$(function(t) {
|
|
56
|
+
const i = W(t);
|
|
57
|
+
return z(J, i);
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
W as u
|
|
61
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import { c as b, _ as g, i as A,
|
|
2
|
+
import { u as z, a as E, P as H } from "./Y67KZUMI-BwLWwpNF.js";
|
|
3
|
+
import { b as _ } from "./RTNCFSKZ-BywELldk.js";
|
|
4
|
+
import { c as b, _ as g, i as A, l as M, d as x, a as p, v as W, r as T, m as j, O as I, y as L, f as w, b as k, u as U, k as B } from "./OE2EFRVA-Dg1R6gaC.js";
|
|
5
5
|
import { useMemo as C, useState as F } from "react";
|
|
6
6
|
import { jsx as l, jsxs as Z } from "react/jsx-runtime";
|
|
7
|
-
import { u as q } from "./ZTXFEM5L-
|
|
7
|
+
import { u as q } from "./ZTXFEM5L-WGHY_jqg.js";
|
|
8
8
|
var h = "M23 27.8C24.1 29 26.4 30 28 30H30H0H2C3.7 30 5.9 29 7 27.8L14 20.6C14.7 19.8 15.3 19.8 16 20.6L23 27.8Z", G = "div", P = 30, u = P / 2, J = {
|
|
9
9
|
top: `rotate(180 ${u} ${u})`,
|
|
10
10
|
right: `rotate(-90 ${u} ${u})`,
|
|
@@ -13,9 +13,9 @@ var h = "M23 27.8C24.1 29 26.4 30 28 30H30H0H2C3.7 30 5.9 29 7 27.8L14 20.6C14.7
|
|
|
13
13
|
};
|
|
14
14
|
function K(n) {
|
|
15
15
|
const [o, t] = F(), e = _(n, "contentElement");
|
|
16
|
-
return
|
|
16
|
+
return j(() => {
|
|
17
17
|
if (!e) return;
|
|
18
|
-
const s =
|
|
18
|
+
const s = I(e).getComputedStyle(e);
|
|
19
19
|
t(s);
|
|
20
20
|
}, [e]), o;
|
|
21
21
|
}
|
|
@@ -41,7 +41,7 @@ var Y = b(
|
|
|
41
41
|
"size",
|
|
42
42
|
"borderWidth"
|
|
43
43
|
]);
|
|
44
|
-
const m =
|
|
44
|
+
const m = z();
|
|
45
45
|
e = e || m, A(
|
|
46
46
|
e,
|
|
47
47
|
process.env.NODE_ENV !== "production" && "PopoverArrow must be wrapped in a Popover component."
|
|
@@ -49,16 +49,16 @@ var Y = b(
|
|
|
49
49
|
const i = _(
|
|
50
50
|
e,
|
|
51
51
|
(v) => v.currentPlacement.split("-")[0]
|
|
52
|
-
), d =
|
|
52
|
+
), d = M(), c = K(e), V = X(i, c) || "none", f = (c == null ? void 0 : c.getPropertyValue("background-color")) || "none", [N, y] = C(() => {
|
|
53
53
|
if (s != null) return [s, !1];
|
|
54
54
|
if (!c) return [0, !1];
|
|
55
55
|
const v = Q(c);
|
|
56
56
|
if (v) return [Number.parseInt(v, 10), !0];
|
|
57
|
-
const
|
|
58
|
-
return
|
|
59
|
-
}, [s, c, i]), R = N * 2 * (P / r),
|
|
60
|
-
() => /* @__PURE__ */ l("svg", { display: "block", viewBox: "0 0 30 30", children: /* @__PURE__ */ Z("g", { transform:
|
|
61
|
-
!
|
|
57
|
+
const $ = c.getPropertyValue(`border-${i}-width`);
|
|
58
|
+
return $ ? [Math.ceil(Number.parseFloat($)), !1] : [0, !1];
|
|
59
|
+
}, [s, c, i]), R = N * 2 * (P / r), S = J[i], O = C(
|
|
60
|
+
() => /* @__PURE__ */ l("svg", { display: "block", viewBox: "0 0 30 30", children: /* @__PURE__ */ Z("g", { transform: S, children: [
|
|
61
|
+
!y && // When using the CSS border property, set the fill color to match
|
|
62
62
|
// the background behind the stroke so transparent strokes match
|
|
63
63
|
// the appearance of borders on HTML elements.
|
|
64
64
|
/* @__PURE__ */ l(
|
|
@@ -84,10 +84,10 @@ var Y = b(
|
|
|
84
84
|
}
|
|
85
85
|
) })
|
|
86
86
|
] }) }),
|
|
87
|
-
[
|
|
87
|
+
[S, y, f, d]
|
|
88
88
|
);
|
|
89
89
|
return a = x(p({
|
|
90
|
-
children:
|
|
90
|
+
children: O,
|
|
91
91
|
"aria-hidden": !0
|
|
92
92
|
}, a), {
|
|
93
93
|
ref: W(e.setArrowElement, a.ref),
|
|
@@ -103,7 +103,7 @@ var Y = b(
|
|
|
103
103
|
}, a.style)
|
|
104
104
|
}), T(a);
|
|
105
105
|
}
|
|
106
|
-
), ce =
|
|
106
|
+
), ce = L(
|
|
107
107
|
w(function(o) {
|
|
108
108
|
const t = Y(o);
|
|
109
109
|
return k(G, t);
|
|
@@ -133,7 +133,7 @@ var re = "button", oe = b(function(o) {
|
|
|
133
133
|
});
|
|
134
134
|
return r = B(
|
|
135
135
|
r,
|
|
136
|
-
(i) => /* @__PURE__ */ l(
|
|
136
|
+
(i) => /* @__PURE__ */ l(H, { value: e, children: i }),
|
|
137
137
|
[e]
|
|
138
138
|
), r = x(p({}, r), {
|
|
139
139
|
onClick: m
|
package/dist/Accordion.js
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { D as
|
|
5
|
-
import {
|
|
2
|
+
import './Accordion.css';
|
|
3
|
+
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
4
|
+
import { D as m } from "./NMGNQVTG-DRO2uXZT.js";
|
|
5
|
+
import { D as a } from "./T22PY7TE-gLuJpoOm.js";
|
|
6
|
+
import { u as b } from "./T22PY7TE-gLuJpoOm.js";
|
|
6
7
|
import { forwardRef as u } from "react";
|
|
7
|
-
import { Icon as
|
|
8
|
-
import { Text as
|
|
8
|
+
import { Icon as p } from "./Icon.js";
|
|
9
|
+
import { Text as _ } from "./Text.js";
|
|
9
10
|
import { c as h } from "./index-PAaZGbyz.js";
|
|
10
|
-
const f = "_root_1ugpw_2", g = "_icon_1ugpw_11",
|
|
11
|
+
const f = "_root_1ugpw_2", g = "_icon_1ugpw_11", N = "_disclosure_1ugpw_23", v = {
|
|
11
12
|
root: f,
|
|
12
13
|
icon: g,
|
|
13
|
-
disclosure:
|
|
14
|
+
disclosure: N,
|
|
14
15
|
"disclosure-content": "_disclosure-content_1ugpw_48",
|
|
15
16
|
"content-child": "_content-child_1ugpw_63"
|
|
16
|
-
}, s = h(v),
|
|
17
|
-
({ children: t, className: n, dataTestId: c, store:
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
|
|
17
|
+
}, s = h(v), w = u(
|
|
18
|
+
({ children: t, className: n, dataTestId: c, store: i, title: e, ...l }, d) => /* @__PURE__ */ r("div", { className: s("root", n), ref: d, ...l, children: [
|
|
19
|
+
/* @__PURE__ */ r(
|
|
20
|
+
m,
|
|
20
21
|
{
|
|
21
22
|
className: s("disclosure"),
|
|
22
23
|
"data-testid": c ? `${c}-title` : void 0,
|
|
23
|
-
store:
|
|
24
|
+
store: i,
|
|
24
25
|
children: [
|
|
25
|
-
/* @__PURE__ */ o(
|
|
26
|
-
/* @__PURE__ */ o("div", { className: s("icon"), children: /* @__PURE__ */ o(
|
|
26
|
+
/* @__PURE__ */ o(_, { as: "h5", variant: "heading-sm-strong", children: e }),
|
|
27
|
+
/* @__PURE__ */ o("div", { className: s("icon"), children: /* @__PURE__ */ o(p, { name: "angle-right", size: "lg" }) })
|
|
27
28
|
]
|
|
28
29
|
}
|
|
29
30
|
),
|
|
@@ -32,13 +33,14 @@ const f = "_root_1ugpw_2", g = "_icon_1ugpw_11", w = "_disclosure_1ugpw_23", v =
|
|
|
32
33
|
{
|
|
33
34
|
className: s("disclosure-content"),
|
|
34
35
|
"data-testid": c ? `${c}-content` : void 0,
|
|
35
|
-
store:
|
|
36
|
+
store: i,
|
|
36
37
|
children: /* @__PURE__ */ o("div", { className: s("content-child"), children: t })
|
|
37
38
|
}
|
|
38
39
|
)
|
|
39
40
|
] })
|
|
40
41
|
);
|
|
42
|
+
w.displayName = "Accordion";
|
|
41
43
|
export {
|
|
42
|
-
|
|
44
|
+
w as Accordion,
|
|
43
45
|
b as useAccordion
|
|
44
46
|
};
|
package/dist/Alert.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.
|
|
1
|
+
@layer components{._root_hm7mj_2{position:relative;display:flex;align-items:flex-start;width:100%;gap:var(--gap, var(--components-dimensions-alert-gap-content-md));border-radius:var(--components-dimensions-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(--components-colors-alert-color-background-brand));border-color:var(--borderColor, var(--components-colors-alert-color-background-brand));color:var(--color, var(--components-colors-alert-color-text-brand-body))}._size-md_hm7mj_18{--padding: var(--components-dimensions-alert-padding-inline-md)}._size-md_hm7mj_18 ._content-actions_hm7mj_21{--gap: var(--components-dimensions-alert-gap-actions-md)}._size-md_hm7mj_18 ._without-title_hm7mj_24 ._icon-wrapper_hm7mj_24{margin-top:-2px}._size-lg_hm7mj_27{--padding: var(--components-dimensions-alert-padding-inline-lg);--gap: var(--components-dimensions-alert-gap-content-lg)}._size-lg_hm7mj_27 ._content-actions_hm7mj_21{--gap: var(--components-dimensions-alert-gap-actions-lg)}._variant-ai_hm7mj_34{--backgroundColor: var(--components-colors-alert-color-background-ai);--borderColor: transparent;background:linear-gradient(var(--components-colors-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_hm7mj_39{--backgroundColor: var(--components-colors-alert-color-background-danger);--borderColor: var(--components-colors-alert-color-background-danger);--color: var(--color-icon-danger-primary)}._variant-info_hm7mj_44{--backgroundColor: var(--components-colors-alert-color-background-information);--borderColor: var(--components-colors-alert-color-background-information);--color: var(--color-icon-accent-blue-primary)}._variant-success_hm7mj_49{--backgroundColor: var(--components-colors-alert-color-background-success);--borderColor: var(--components-colors-alert-color-background-success);--color: var(--color-icon-accent-green-primary)}._variant-warning_hm7mj_54{--backgroundColor: var(--components-colors-alert-color-background-warning);--borderColor: var(--components-colors-alert-color-background-warning);--color: var(--color-icon-warning-primary)}._full-width_hm7mj_59{--maxWidth: 100%}._content_hm7mj_21{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;gap:var(--gap, var(--components-dimensions-alert-gap-content-md))}._content-text_hm7mj_70{display:flex;flex-direction:column;gap:var(--gap, var(--components-dimensions-alert-gap-content-md))}._content-text_hm7mj_70._without-title_hm7mj_24{flex-direction:row}._content-text_hm7mj_70._without-title_hm7mj_24 ._icon-wrapper_hm7mj_24{align-self:flex-start}._content-actions_hm7mj_21{display:flex;align-items:center;gap:var(--gap)}._title-close-button_hm7mj_87{margin-right:var(--spacing-xl)}._title-with-icon_hm7mj_90{display:flex;align-items:center;gap:var(--spacing-sm)}._close-button_hm7mj_96{position:absolute;right:var(--spacing-sm);top:var(--spacing-sm)}._icon-wrapper_hm7mj_24{flex-shrink:0;padding:var(--components-dimensions-alert-icon-padding-block);border-radius:var(--components-dimensions-alert-icon-border-radius);background-color:var(--iconWrapperBackgroundColor, var(--components-colors-alert-icon-color-background-brand));color:var(--iconWrapperColor, var(--components-colors-alert-icon-color-icon-brand))}._icon-wrapper-success_hm7mj_109{--iconWrapperBackgroundColor: var(--components-colors-alert-icon-color-background-success);--iconWrapperColor: var(--components-colors-alert-icon-color-icon-success)}._icon-wrapper-danger_hm7mj_113{--iconWrapperBackgroundColor: var(--components-colors-alert-icon-color-background-danger);--iconWrapperColor: var(--components-colors-alert-icon-color-icon-danger)}._icon-wrapper-info_hm7mj_117{--iconWrapperBackgroundColor: var( --components-colors-alert-icon-color-background-information );--iconWrapperColor: var(--components-colors-alert-icon-color-icon-information)}._icon-wrapper-warning_hm7mj_123{--iconWrapperBackgroundColor: var(--components-colors-alert-icon-color-background-warning);--iconWrapperColor: var(--components-colors-alert-icon-color-icon-warning)}._icon-wrapper-ai_hm7mj_127{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(--components-colors-alert-icon-color-icon-ai)}}
|
package/dist/Alert.js
CHANGED
|
@@ -1,101 +1,107 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { CloseButton as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { c as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"size-md": "_size-
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"variant-
|
|
18
|
-
"variant-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
title:
|
|
26
|
-
"title-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
2
|
+
import './Alert.css';
|
|
3
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
4
|
+
import p, { forwardRef as w, Children as u, cloneElement as h } from "react";
|
|
5
|
+
import { CloseButton as E } from "./CloseButton.js";
|
|
6
|
+
import { Icon as V } from "./Icon.js";
|
|
7
|
+
import { Text as N } from "./Text.js";
|
|
8
|
+
import { c as A } from "./index-PAaZGbyz.js";
|
|
9
|
+
import { Button as b } from "./Button.js";
|
|
10
|
+
const I = "_root_hm7mj_2", O = "_content_hm7mj_21", x = {
|
|
11
|
+
root: I,
|
|
12
|
+
"size-md": "_size-md_hm7mj_18",
|
|
13
|
+
"content-actions": "_content-actions_hm7mj_21",
|
|
14
|
+
"without-title": "_without-title_hm7mj_24",
|
|
15
|
+
"icon-wrapper": "_icon-wrapper_hm7mj_24",
|
|
16
|
+
"size-lg": "_size-lg_hm7mj_27",
|
|
17
|
+
"variant-ai": "_variant-ai_hm7mj_34",
|
|
18
|
+
"variant-danger": "_variant-danger_hm7mj_39",
|
|
19
|
+
"variant-info": "_variant-info_hm7mj_44",
|
|
20
|
+
"variant-success": "_variant-success_hm7mj_49",
|
|
21
|
+
"variant-warning": "_variant-warning_hm7mj_54",
|
|
22
|
+
"full-width": "_full-width_hm7mj_59",
|
|
23
|
+
content: O,
|
|
24
|
+
"content-text": "_content-text_hm7mj_70",
|
|
25
|
+
"title-close-button": "_title-close-button_hm7mj_87",
|
|
26
|
+
"title-with-icon": "_title-with-icon_hm7mj_90",
|
|
27
|
+
"close-button": "_close-button_hm7mj_96",
|
|
28
|
+
"icon-wrapper-success": "_icon-wrapper-success_hm7mj_109",
|
|
29
|
+
"icon-wrapper-danger": "_icon-wrapper-danger_hm7mj_113",
|
|
30
|
+
"icon-wrapper-info": "_icon-wrapper-info_hm7mj_117",
|
|
31
|
+
"icon-wrapper-warning": "_icon-wrapper-warning_hm7mj_123",
|
|
32
|
+
"icon-wrapper-ai": "_icon-wrapper-ai_hm7mj_127"
|
|
33
|
+
}, d = w(
|
|
34
|
+
({ variant: t = "primary", ...o }, n) => /* @__PURE__ */ i(b, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
|
|
35
|
+
);
|
|
36
|
+
d.displayName = "Alert.Button";
|
|
37
|
+
const f = w(
|
|
38
|
+
({ variant: t = "secondary", ...o }, n) => /* @__PURE__ */ i(b, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
|
|
39
|
+
);
|
|
40
|
+
f.displayName = "Alert.SecondaryButton";
|
|
41
|
+
const R = A(x), l = ({ children: t, hasCloseButton: o, ...n }) => /* @__PURE__ */ i(N, { as: "span", className: R(o && "title-close-button"), ...n, children: t });
|
|
42
|
+
l.displayName = "Alert.Title";
|
|
43
|
+
const a = A(x), z = {
|
|
44
|
+
ai: "sparkles",
|
|
45
|
+
brand: "lightbulb-alt",
|
|
46
|
+
danger: "exclamation-octagon",
|
|
47
|
+
info: "info-circle",
|
|
48
|
+
success: "check-circle",
|
|
49
|
+
warning: "exclamation-triangle"
|
|
50
|
+
}, B = w(
|
|
51
|
+
({ children: t, className: o, cta: n, handleClose: _, isFullWidth: $, size: c = "md", variant: s = "brand", ...k }, T) => {
|
|
52
|
+
const C = s === "ai", j = u.toArray(t).some((e) => p.isValidElement(e) ? e.type === l : !1), y = /* @__PURE__ */ i("div", { className: a("icon-wrapper", `icon-wrapper-${s}`), children: /* @__PURE__ */ i(V, { name: z[s] }) }), S = u.toArray(t).map((e) => e.type === l ? /* @__PURE__ */ m("div", { className: a("title-with-icon"), children: [
|
|
53
|
+
y,
|
|
54
|
+
h(e, {
|
|
55
|
+
hasCloseButton: !!_,
|
|
56
|
+
variant: `body-${c}-strong`
|
|
57
|
+
})
|
|
58
|
+
] }) : e), g = (e) => u.toArray(e).flatMap((r) => p.isValidElement(r) && r.type === p.Fragment ? g(r.props.children) : r.type === d ? h(r, {
|
|
59
|
+
size: c,
|
|
60
|
+
variant: C ? "primary-ai" : void 0
|
|
61
|
+
}) : r.type === f ? h(r, {
|
|
62
|
+
size: c
|
|
63
|
+
}) : r), v = !!n && g(n);
|
|
64
|
+
return /* @__PURE__ */ m(
|
|
57
65
|
"div",
|
|
58
66
|
{
|
|
59
|
-
className:
|
|
67
|
+
className: a(
|
|
60
68
|
"root",
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
e
|
|
69
|
+
$ && "full-width",
|
|
70
|
+
`size-${c}`,
|
|
71
|
+
s && `variant-${s}`,
|
|
72
|
+
o
|
|
66
73
|
),
|
|
67
|
-
ref:
|
|
68
|
-
...
|
|
74
|
+
ref: T,
|
|
75
|
+
...k,
|
|
69
76
|
children: [
|
|
70
|
-
!!
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
77
|
+
!!_ && /* @__PURE__ */ i(E, { className: a("close-button"), onClick: _ }),
|
|
78
|
+
/* @__PURE__ */ m("div", { className: a("content"), children: [
|
|
79
|
+
/* @__PURE__ */ m(
|
|
80
|
+
N,
|
|
81
|
+
{
|
|
82
|
+
as: "div",
|
|
83
|
+
className: a("content-text", !j && "without-title"),
|
|
84
|
+
variant: `body-${c}`,
|
|
85
|
+
children: [
|
|
86
|
+
!j && y,
|
|
87
|
+
S
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
!!v && /* @__PURE__ */ i("div", { className: a("content-actions"), children: v })
|
|
75
92
|
] })
|
|
76
93
|
]
|
|
77
94
|
}
|
|
78
95
|
);
|
|
79
96
|
}
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
{
|
|
87
|
-
as: "span",
|
|
88
|
-
className: s("title", `title-size-${n}`, e && "title-close-button"),
|
|
89
|
-
variant: n,
|
|
90
|
-
...a,
|
|
91
|
-
children: o
|
|
92
|
-
}
|
|
93
|
-
), P = Object.assign(D, {
|
|
94
|
-
Button: w,
|
|
95
|
-
SecondaryButton: N,
|
|
96
|
-
Title: g
|
|
97
|
+
);
|
|
98
|
+
B.displayName = "Alert";
|
|
99
|
+
const K = Object.assign(B, {
|
|
100
|
+
Button: d,
|
|
101
|
+
SecondaryButton: f,
|
|
102
|
+
Title: l
|
|
97
103
|
});
|
|
98
104
|
export {
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
K as Alert,
|
|
106
|
+
z as ICON
|
|
101
107
|
};
|
package/dist/AspectRatio.js
CHANGED
package/dist/Avatar.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import './Avatar.css';
|
|
2
3
|
import { jsxs as _, jsx as n } from "react/jsx-runtime";
|
|
3
4
|
import { forwardRef as g } from "react";
|
|
4
5
|
import { Icon as u } from "./Icon.js";
|
|
@@ -27,8 +28,8 @@ const b = "_root_2qaar_2", y = "_placeholder_2qaar_36", h = {
|
|
|
27
28
|
"secondary-violet"
|
|
28
29
|
];
|
|
29
30
|
function k(o = "", e) {
|
|
30
|
-
const [
|
|
31
|
-
return e === "xs" || e === "sm" ?
|
|
31
|
+
const [a, r] = o.split(" ");
|
|
32
|
+
return e === "xs" || e === "sm" ? a.charAt(0).toUpperCase() : r ? `${a.charAt(0).toUpperCase()}${r.charAt(0).toUpperCase()}` : a.substring(0, 2).toUpperCase();
|
|
32
33
|
}
|
|
33
34
|
const x = (o) => {
|
|
34
35
|
if (!o) return;
|
|
@@ -44,16 +45,16 @@ const x = (o) => {
|
|
|
44
45
|
md: "label-xl",
|
|
45
46
|
sm: "label-lg",
|
|
46
47
|
xs: "label-sm-strong"
|
|
47
|
-
},
|
|
48
|
-
({ className: o, getInitials: e = k, name:
|
|
49
|
-
const c = x(
|
|
48
|
+
}, v = g(
|
|
49
|
+
({ className: o, getInitials: e = k, name: a, size: r = "md", src: s }, i) => {
|
|
50
|
+
const c = x(a), t = !s && !a;
|
|
50
51
|
return /* @__PURE__ */ _(
|
|
51
52
|
"div",
|
|
52
53
|
{
|
|
53
|
-
"aria-label":
|
|
54
|
+
"aria-label": a,
|
|
54
55
|
className: l(
|
|
55
56
|
"root",
|
|
56
|
-
`size-${
|
|
57
|
+
`size-${r}`,
|
|
57
58
|
c && `background-${c}`,
|
|
58
59
|
t && "placeholder",
|
|
59
60
|
o
|
|
@@ -61,14 +62,15 @@ const x = (o) => {
|
|
|
61
62
|
ref: i,
|
|
62
63
|
role: "img",
|
|
63
64
|
children: [
|
|
64
|
-
t ? /* @__PURE__ */ n(u, { className: l("placeholder-icon"), name: "user", size: q[
|
|
65
|
-
s ? /* @__PURE__ */ n("img", { alt:
|
|
66
|
-
!s &&
|
|
65
|
+
t ? /* @__PURE__ */ n(u, { className: l("placeholder-icon"), name: "user", size: q[r] }) : null,
|
|
66
|
+
s ? /* @__PURE__ */ n("img", { alt: a, src: s }) : null,
|
|
67
|
+
!s && a ? /* @__PURE__ */ n(m, { as: "span", className: l("initials"), variant: f[r], children: e(a, r) }) : null
|
|
67
68
|
]
|
|
68
69
|
}
|
|
69
70
|
);
|
|
70
71
|
}
|
|
71
72
|
);
|
|
73
|
+
v.displayName = "Avatar";
|
|
72
74
|
export {
|
|
73
|
-
|
|
75
|
+
v as Avatar
|
|
74
76
|
};
|