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.
Files changed (135) hide show
  1. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  2. package/dist/{4I4MLMKD-z3Xm3qCo.js → 4I4MLMKD-BO6Lcy7s.js} +17 -17
  3. package/dist/Accordion.js +19 -17
  4. package/dist/Alert.css +1 -1
  5. package/dist/Alert.js +93 -87
  6. package/dist/AspectRatio.js +1 -0
  7. package/dist/Avatar.js +13 -11
  8. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  9. package/dist/Badge.js +1 -0
  10. package/dist/Breadcrumb.js +76 -71
  11. package/dist/Button.js +8 -6
  12. package/dist/ButtonGroup.js +6 -4
  13. package/dist/Card.css +1 -1
  14. package/dist/Card.js +68 -15
  15. package/dist/Checkbox.js +30 -29
  16. package/dist/CloseButton.js +7 -5
  17. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  18. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  19. package/dist/DatePicker.js +82 -78
  20. package/dist/DateTimePicker.js +22 -21
  21. package/dist/Drawer.js +101 -80
  22. package/dist/DropdownMenu.css +1 -1
  23. package/dist/DropdownMenu.js +889 -462
  24. package/dist/Field.js +1 -0
  25. package/dist/FieldGroup.js +9 -7
  26. package/dist/FileDrop.js +184 -176
  27. package/dist/FileUpload.js +43 -40
  28. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  29. package/dist/Hint.js +9 -7
  30. package/dist/Icon.js +6 -4
  31. package/dist/InputText.js +30 -28
  32. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  33. package/dist/Label.js +9 -7
  34. package/dist/Link.js +25 -21
  35. package/dist/Loader.js +12 -10
  36. package/dist/Logo.js +21 -13
  37. package/dist/Modal.js +145 -114
  38. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  39. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  40. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  41. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  42. package/dist/Pagination.js +39 -37
  43. package/dist/PasswordInput.js +20 -17
  44. package/dist/Popover.js +89 -72
  45. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  46. package/dist/Radio.js +20 -19
  47. package/dist/RadioGroup.js +29 -27
  48. package/dist/RadioTab.js +2 -1
  49. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  50. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  51. package/dist/Search.css +1 -1
  52. package/dist/Search.js +62 -60
  53. package/dist/Select.css +1 -1
  54. package/dist/Select.js +204 -202
  55. package/dist/Slider.js +66 -61
  56. package/dist/Stepper.js +34 -27
  57. package/dist/StickyNote.css +1 -0
  58. package/dist/StickyNote.js +49 -0
  59. package/dist/Swiper.js +52 -50
  60. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  61. package/dist/Table.js +34 -21
  62. package/dist/Tabs.js +161 -152
  63. package/dist/Tag.css +1 -1
  64. package/dist/Tag.js +66 -61
  65. package/dist/Text.js +4 -2
  66. package/dist/Textarea.js +10 -8
  67. package/dist/TimePicker.js +22 -21
  68. package/dist/Toast.js +186 -177
  69. package/dist/Toggle.js +16 -14
  70. package/dist/Tooltip.js +29 -27
  71. package/dist/VariantIcon.js +7 -5
  72. package/dist/VisuallyHidden.js +8 -6
  73. package/dist/WelcomeLoader.js +3 -2
  74. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  75. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  76. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  77. package/dist/theme.css +1 -1
  78. package/dist/theme.js +1 -0
  79. package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
  80. package/dist/types/components/Alert/components/Title.d.ts +5 -0
  81. package/dist/types/components/Alert/index.d.ts +7 -3
  82. package/dist/types/components/Alert/types.d.ts +3 -9
  83. package/dist/types/components/Card/Body.d.ts +2 -3
  84. package/dist/types/components/Card/Footer.d.ts +6 -0
  85. package/dist/types/components/Card/Header.d.ts +5 -0
  86. package/dist/types/components/Card/index.d.ts +7 -8
  87. package/dist/types/components/Card/types.d.ts +16 -3
  88. package/dist/types/components/Checkbox/index.d.ts +1 -2
  89. package/dist/types/components/Checkbox/types.d.ts +3 -1
  90. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  91. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  92. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  93. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  94. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  95. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  96. package/dist/types/components/Drawer/index.d.ts +12 -3
  97. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  98. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  99. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  100. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  101. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  102. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  103. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  104. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  105. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  106. package/dist/types/components/Loader/index.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  108. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  109. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  110. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  111. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  112. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  113. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  114. package/dist/types/components/Modal/index.d.ts +16 -4
  115. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  116. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  117. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  118. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  119. package/dist/types/components/Stepper/index.d.ts +8 -2
  120. package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
  121. package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
  122. package/dist/types/components/StickyNote/index.d.ts +11 -0
  123. package/dist/types/components/StickyNote/index.test.d.ts +1 -0
  124. package/dist/types/components/StickyNote/types.d.ts +15 -0
  125. package/dist/types/components/Swiper/index.d.ts +4 -1
  126. package/dist/types/components/Table/index.d.ts +20 -5
  127. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  128. package/dist/types/components/Tag/types.d.ts +4 -2
  129. package/dist/types/components/Toast/index.d.ts +4 -1
  130. package/dist/types/theme/types.d.ts +233 -218
  131. package/dist/utils.js +1 -0
  132. package/package.json +2 -2
  133. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  134. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  135. 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 O, a as E, P as z } from "./Y67KZUMI-BDyUNSJw.js";
3
- import { u as _ } from "./RTNCFSKZ-LcIdBwa8.js";
4
- import { c as b, _ as g, i as A, w as H, d as x, a as p, p as W, r as T, L, M as j, v as I, f as w, b as k, u as U, x as B } from "./OE2EFRVA-DkdhQLJL.js";
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-CjFLRObi.js";
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 L(() => {
16
+ return j(() => {
17
17
  if (!e) return;
18
- const s = j(e).getComputedStyle(e);
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 = O();
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 = H(), c = K(e), V = X(i, c) || "none", f = (c == null ? void 0 : c.getPropertyValue("background-color")) || "none", [N, S] = C(() => {
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 y = c.getPropertyValue(`border-${i}-width`);
58
- return y ? [Math.ceil(Number.parseFloat(y)), !1] : [0, !1];
59
- }, [s, c, i]), R = N * 2 * (P / r), $ = J[i], M = C(
60
- () => /* @__PURE__ */ l("svg", { display: "block", viewBox: "0 0 30 30", children: /* @__PURE__ */ Z("g", { transform: $, children: [
61
- !S && // When using the CSS border property, set the fill color to match
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
- [$, S, f, d]
87
+ [S, y, f, d]
88
88
  );
89
89
  return a = x(p({
90
- children: M,
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 = I(
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(z, { value: e, children: i }),
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 { jsxs as i, jsx as o } from "react/jsx-runtime";
3
- import { D as d } from "./NMGNQVTG-BgAqqGOq.js";
4
- import { D as a } from "./T22PY7TE-CzEDuEn1.js";
5
- import { u as b } from "./T22PY7TE-CzEDuEn1.js";
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 _ } from "./Icon.js";
8
- import { Text as p } from "./Text.js";
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", w = "_disclosure_1ugpw_23", v = {
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: w,
14
+ disclosure: N,
14
15
  "disclosure-content": "_disclosure-content_1ugpw_48",
15
16
  "content-child": "_content-child_1ugpw_63"
16
- }, s = h(v), z = u(
17
- ({ children: t, className: n, dataTestId: c, store: r, title: e, ...l }, m) => /* @__PURE__ */ i("div", { className: s("root", n), ref: m, ...l, children: [
18
- /* @__PURE__ */ i(
19
- d,
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: r,
24
+ store: i,
24
25
  children: [
25
- /* @__PURE__ */ o(p, { as: "h5", variant: "heading-sm-strong", children: e }),
26
- /* @__PURE__ */ o("div", { className: s("icon"), children: /* @__PURE__ */ o(_, { name: "arrow-right", size: "sm" }) })
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: r,
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
- z as Accordion,
44
+ w as Accordion,
43
45
  b as useAccordion
44
46
  };
package/dist/Alert.css CHANGED
@@ -1 +1 @@
1
- @layer components{._root_1kb4k_2{position:relative;display:flex;align-items:flex-start;width:100%;border-radius:var(--border-radius-md);border:var(--border-width-xs) solid;padding:var(--padding);max-width:var(--maxWidth, max-content);background-color:var(--backgroundColor, var(--color-background-neutral-inverse-fixed));border-color:var(--borderColor, var(--color-background-neutral-subtlest));color:var(--color, var(--color-background-neutral-secondary))}._size-sm_1kb4k_16{--padding: var(--border-radius-xl)}._size-md_1kb4k_19{--padding: var(--border-radius-2xl)}._variant-ai_1kb4k_22{--backgroundColor: var(--color-violet-10);--borderColor: var(--color-violet-10);--color: var(--color-violet-90)}._variant-beige_1kb4k_27{--backgroundColor: var(--color-background-warm-primary);--borderColor: var(--color-background-warm-primary);--color: var(--color-border-warm-stronger)}._variant-danger_1kb4k_32{--backgroundColor: var(--color-background-danger-minimal);--borderColor: var(--color-background-danger-minimal);--color: var(--color-icon-danger-primary)}._variant-info_1kb4k_37{--backgroundColor: var(--color-background-accent-blue-minimal);--borderColor: var(--color-background-accent-blue-minimal);--color: var(--color-icon-accent-blue-primary)}._variant-success_1kb4k_42{--backgroundColor: var(--color-green-10);--borderColor: var(--color-green-10);--color: var(--color-icon-accent-green-primary)}._variant-warning_1kb4k_47{--backgroundColor: var(--color-background-warning-minimal);--borderColor: var(--color-background-warning-minimal);--color: var(--color-icon-warning-primary)}._full-width_1kb4k_52{--maxWidth: 100%}._icon_1kb4k_55._size-sm_1kb4k_16 svg{margin-top:1px}._icon_1kb4k_55._size-sm_1kb4k_16 ._content_1kb4k_58{margin-left:var(--border-radius-lg)}._icon_1kb4k_55._size-md_1kb4k_19 svg{margin-top:-3px}._icon_1kb4k_55._size-md_1kb4k_19 ._content_1kb4k_58{margin-left:var(--border-radius-xl)}._content_1kb4k_58{display:flex;gap:var(--border-radius-lg);flex-direction:column;justify-content:space-between;align-items:flex-start;flex:1}._content-text_1kb4k_76{flex:1}._content-actions_1kb4k_79{display:flex;align-items:center;gap:var(--border-radius-md)}._variant-icon_1kb4k_84{align-self:start}._title_1kb4k_88{font-weight:var(--font-weight-medium);margin-bottom:var(--titleMarginBottom)}._title-size-sm_1kb4k_93{--titleMarginBottom: var(--border-radius-sm)}._title-size-md_1kb4k_96{--titleMarginBottom: var(--border-radius-md)}._title-close-button_1kb4k_99{margin-right:var(--border-radius-2xl)}._close-button_1kb4k_103{position:absolute;right:var(--border-radius-md);top:var(--border-radius-md)}}
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 { jsxs as p, jsx as i } from "react/jsx-runtime";
3
- import I, { forwardRef as l, Children as v, cloneElement as _ } from "react";
4
- import { Button as d } from "./Button.js";
5
- import { CloseButton as S } from "./CloseButton.js";
6
- import { Text as y } from "./Text.js";
7
- import { VariantIcon as T } from "./VariantIcon.js";
8
- import { c as V } from "./index-PAaZGbyz.js";
9
- const $ = "_root_1kb4k_2", E = "_icon_1kb4k_55", R = "_content_1kb4k_58", O = "_title_1kb4k_88", q = {
10
- root: $,
11
- "size-sm": "_size-sm_1kb4k_16",
12
- "size-md": "_size-md_1kb4k_19",
13
- "variant-ai": "_variant-ai_1kb4k_22",
14
- "variant-beige": "_variant-beige_1kb4k_27",
15
- "variant-danger": "_variant-danger_1kb4k_32",
16
- "variant-info": "_variant-info_1kb4k_37",
17
- "variant-success": "_variant-success_1kb4k_42",
18
- "variant-warning": "_variant-warning_1kb4k_47",
19
- "full-width": "_full-width_1kb4k_52",
20
- icon: E,
21
- content: R,
22
- "content-text": "_content-text_1kb4k_76",
23
- "content-actions": "_content-actions_1kb4k_79",
24
- "variant-icon": "_variant-icon_1kb4k_84",
25
- title: O,
26
- "title-size-sm": "_title-size-sm_1kb4k_93",
27
- "title-size-md": "_title-size-md_1kb4k_96",
28
- "title-close-button": "_title-close-button_1kb4k_99",
29
- "close-button": "_close-button_1kb4k_103"
30
- }, s = V(q), D = l(
31
- ({ children: o, className: e, cta: n, handleClose: a, hideIcon: x, isFullWidth: A, size: r = "sm", variant: c, ...B }, z) => {
32
- const h = c === "beige" ? void 0 : c, k = c === "ai", m = !x, j = v.toArray(o).map((t) => t.type === g ? _(t, { hasCloseButton: !!a, variant: r }) : t), u = (t) => {
33
- var f;
34
- if (t) {
35
- if (t.type === w)
36
- return _(t, {
37
- size: r,
38
- variant: k ? "primary-ai" : void 0
39
- });
40
- if (t.type === N)
41
- return _(t, {
42
- size: r,
43
- variant: k ? "primary-ai" : void 0
44
- });
45
- if ((f = t.props) != null && f.children)
46
- return _(t, {
47
- ...t.props,
48
- children: v.map(
49
- t.props.children,
50
- (C) => u(C)
51
- )
52
- });
53
- }
54
- return t;
55
- }, b = I.isValidElement(n) ? u(n) : n;
56
- return /* @__PURE__ */ p(
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: s(
67
+ className: a(
60
68
  "root",
61
- A && "full-width",
62
- r && `size-${r}`,
63
- c && `variant-${c}`,
64
- m && "icon",
65
- e
69
+ $ && "full-width",
70
+ `size-${c}`,
71
+ s && `variant-${s}`,
72
+ o
66
73
  ),
67
- ref: z,
68
- ...B,
74
+ ref: T,
75
+ ...k,
69
76
  children: [
70
- !!a && /* @__PURE__ */ i(S, { className: "close-button", onClick: a, size: "sm" }),
71
- m ? /* @__PURE__ */ i(T, { className: s("variant-icon"), size: r, variant: h }) : null,
72
- /* @__PURE__ */ p("div", { className: s("content"), children: [
73
- /* @__PURE__ */ i(y, { as: "div", className: s("content-text"), children: j }),
74
- !!b && /* @__PURE__ */ i("div", { className: s("content-actions"), children: b })
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
- ), w = l(
81
- ({ variant: o = "secondary", ...e }, n) => /* @__PURE__ */ i(d, { className: "shrink-0 w-fit", ref: n, ...e, variant: o })
82
- ), N = l(
83
- ({ variant: o = "tertiary", ...e }, n) => /* @__PURE__ */ i(d, { className: "shrink-0 w-fit", ref: n, ...e, variant: o })
84
- ), g = ({ children: o, hasCloseButton: e, variant: n, ...a }) => /* @__PURE__ */ i(
85
- y,
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
- P as Alert,
100
- g as AlertTitle
105
+ K as Alert,
106
+ z as ICON
101
107
  };
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import './AspectRatio.css';
2
3
  import { jsx as i } from "react/jsx-runtime";
3
4
  import { c } from "./index-PAaZGbyz.js";
4
5
  import { f as e } from "./forwardRefWithAs-8eP3ZN15.js";
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 [r, a] = o.split(" ");
31
- return e === "xs" || e === "sm" ? r.charAt(0).toUpperCase() : a ? `${r.charAt(0).toUpperCase()}${a.charAt(0).toUpperCase()}` : r.substring(0, 2).toUpperCase();
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
- }, U = g(
48
- ({ className: o, getInitials: e = k, name: r, size: a = "md", src: s }, i) => {
49
- const c = x(r), t = !s && !r;
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": r,
54
+ "aria-label": a,
54
55
  className: l(
55
56
  "root",
56
- `size-${a}`,
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[a] }) : null,
65
- s ? /* @__PURE__ */ n("img", { alt: r, src: s }) : null,
66
- !s && r ? /* @__PURE__ */ n(m, { as: "span", className: l("initials"), variant: f[a], children: e(r, a) }) : null
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
- U as Avatar
75
+ v as Avatar
74
76
  };