welcome-ui 10.0.0-alpha.4 → 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 (127) 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.js +40 -31
  5. package/dist/AspectRatio.js +1 -0
  6. package/dist/Avatar.js +13 -11
  7. package/dist/{B7UTNDHN-BDa2-8JK.js → B7UTNDHN-BghjolIs.js} +30 -30
  8. package/dist/Badge.js +1 -0
  9. package/dist/Breadcrumb.js +76 -71
  10. package/dist/Button.js +8 -6
  11. package/dist/ButtonGroup.js +6 -4
  12. package/dist/Card.css +1 -1
  13. package/dist/Card.js +68 -15
  14. package/dist/Checkbox.js +30 -29
  15. package/dist/CloseButton.js +7 -5
  16. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  17. package/dist/{DSAASPLT-C-2xDjIv.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  18. package/dist/DatePicker.js +82 -78
  19. package/dist/DateTimePicker.js +22 -21
  20. package/dist/Drawer.js +101 -80
  21. package/dist/DropdownMenu.css +1 -1
  22. package/dist/DropdownMenu.js +889 -462
  23. package/dist/Field.js +1 -0
  24. package/dist/FieldGroup.js +9 -7
  25. package/dist/FileDrop.js +184 -176
  26. package/dist/FileUpload.js +43 -40
  27. package/dist/{GVVKDT6A-C66-lr0B.js → GVVKDT6A-CF9ejW_c.js} +103 -103
  28. package/dist/Hint.js +9 -7
  29. package/dist/Icon.js +6 -4
  30. package/dist/InputText.js +30 -28
  31. package/dist/{KPUWHTQJ-Byij2al4.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  32. package/dist/Label.js +9 -7
  33. package/dist/Link.js +25 -21
  34. package/dist/Loader.js +12 -10
  35. package/dist/Logo.js +21 -13
  36. package/dist/Modal.js +145 -114
  37. package/dist/{NI3IVY7K-DpF3td-7.js → NI3IVY7K-Dy240mkD.js} +160 -160
  38. package/dist/{NMGNQVTG-BgAqqGOq.js → NMGNQVTG-DRO2uXZT.js} +6 -6
  39. package/dist/{OE2EFRVA-DkdhQLJL.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  40. package/dist/{OLVWQA7U-wHytlFYu.js → OLVWQA7U-Dia3UUnG.js} +36 -36
  41. package/dist/Pagination.js +39 -37
  42. package/dist/PasswordInput.js +20 -17
  43. package/dist/Popover.js +89 -72
  44. package/dist/{RTNCFSKZ-LcIdBwa8.js → RTNCFSKZ-BywELldk.js} +42 -42
  45. package/dist/Radio.js +20 -19
  46. package/dist/RadioGroup.js +29 -27
  47. package/dist/RadioTab.js +2 -1
  48. package/dist/{SBSPVDDI-BoxPz2JY.js → SBSPVDDI-CmtnvvUX.js} +46 -46
  49. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  50. package/dist/Search.css +1 -1
  51. package/dist/Search.js +62 -60
  52. package/dist/Select.css +1 -1
  53. package/dist/Select.js +204 -202
  54. package/dist/Slider.js +66 -61
  55. package/dist/Stepper.js +34 -27
  56. package/dist/StickyNote.js +30 -23
  57. package/dist/Swiper.js +52 -50
  58. package/dist/{T22PY7TE-CzEDuEn1.js → T22PY7TE-gLuJpoOm.js} +46 -46
  59. package/dist/Table.js +34 -21
  60. package/dist/Tabs.js +161 -152
  61. package/dist/Tag.css +1 -1
  62. package/dist/Tag.js +70 -65
  63. package/dist/Text.js +4 -2
  64. package/dist/Textarea.js +10 -8
  65. package/dist/TimePicker.js +22 -21
  66. package/dist/Toast.js +186 -177
  67. package/dist/Toggle.js +16 -14
  68. package/dist/Tooltip.js +29 -27
  69. package/dist/VariantIcon.js +7 -5
  70. package/dist/VisuallyHidden.js +8 -6
  71. package/dist/WelcomeLoader.js +3 -2
  72. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  73. package/dist/{Y67KZUMI-BDyUNSJw.js → Y67KZUMI-BwLWwpNF.js} +2 -2
  74. package/dist/{ZTXFEM5L-CjFLRObi.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  75. package/dist/theme.js +1 -0
  76. package/dist/types/components/Alert/components/Title.d.ts +4 -1
  77. package/dist/types/components/Alert/index.d.ts +4 -1
  78. package/dist/types/components/Card/Body.d.ts +2 -3
  79. package/dist/types/components/Card/Footer.d.ts +6 -0
  80. package/dist/types/components/Card/Header.d.ts +5 -0
  81. package/dist/types/components/Card/index.d.ts +7 -8
  82. package/dist/types/components/Card/types.d.ts +16 -3
  83. package/dist/types/components/Checkbox/index.d.ts +1 -2
  84. package/dist/types/components/Checkbox/types.d.ts +3 -1
  85. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  86. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  87. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  88. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  89. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  90. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  91. package/dist/types/components/Drawer/index.d.ts +12 -3
  92. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  93. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  94. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  95. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  96. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  97. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  98. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  99. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  100. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  101. package/dist/types/components/Loader/index.d.ts +4 -1
  102. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  103. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  104. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  105. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  106. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  107. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  108. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  109. package/dist/types/components/Modal/index.d.ts +16 -4
  110. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  111. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  112. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  113. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  114. package/dist/types/components/Stepper/index.d.ts +8 -2
  115. package/dist/types/components/StickyNote/components/Button.d.ts +4 -1
  116. package/dist/types/components/StickyNote/components/Title.d.ts +4 -1
  117. package/dist/types/components/StickyNote/index.d.ts +8 -2
  118. package/dist/types/components/Swiper/index.d.ts +4 -1
  119. package/dist/types/components/Table/index.d.ts +20 -5
  120. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  121. package/dist/types/components/Tag/types.d.ts +4 -2
  122. package/dist/types/components/Toast/index.d.ts +4 -1
  123. package/dist/utils.js +1 -0
  124. package/package.json +2 -2
  125. package/dist/2W3RN7C5-uG7eBeTQ.js +0 -61
  126. package/dist/SQZLCNLX-CUlXoT69.js +0 -82
  127. 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.js CHANGED
@@ -1,13 +1,14 @@
1
1
  "use client";
2
+ import './Alert.css';
2
3
  import { jsx as i, jsxs as m } from "react/jsx-runtime";
3
- import l, { forwardRef as w, Children as p, cloneElement as u } from "react";
4
+ import p, { forwardRef as w, Children as u, cloneElement as h } from "react";
4
5
  import { CloseButton as E } from "./CloseButton.js";
5
- import { Icon as S } from "./Icon.js";
6
- import { Text as v } from "./Text.js";
7
- import { c as y } from "./index-PAaZGbyz.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";
8
9
  import { Button as b } from "./Button.js";
9
- const V = "_root_hm7mj_2", I = "_content_hm7mj_21", N = {
10
- root: V,
10
+ const I = "_root_hm7mj_2", O = "_content_hm7mj_21", x = {
11
+ root: I,
11
12
  "size-md": "_size-md_hm7mj_18",
12
13
  "content-actions": "_content-actions_hm7mj_21",
13
14
  "without-title": "_without-title_hm7mj_24",
@@ -19,7 +20,7 @@ const V = "_root_hm7mj_2", I = "_content_hm7mj_21", N = {
19
20
  "variant-success": "_variant-success_hm7mj_49",
20
21
  "variant-warning": "_variant-warning_hm7mj_54",
21
22
  "full-width": "_full-width_hm7mj_59",
22
- content: I,
23
+ content: O,
23
24
  "content-text": "_content-text_hm7mj_70",
24
25
  "title-close-button": "_title-close-button_hm7mj_87",
25
26
  "title-with-icon": "_title-with-icon_hm7mj_90",
@@ -29,70 +30,78 @@ const V = "_root_hm7mj_2", I = "_content_hm7mj_21", N = {
29
30
  "icon-wrapper-info": "_icon-wrapper-info_hm7mj_117",
30
31
  "icon-wrapper-warning": "_icon-wrapper-warning_hm7mj_123",
31
32
  "icon-wrapper-ai": "_icon-wrapper-ai_hm7mj_127"
32
- }, x = w(
33
+ }, d = w(
33
34
  ({ variant: t = "primary", ...o }, n) => /* @__PURE__ */ i(b, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
34
- ), A = w(
35
+ );
36
+ d.displayName = "Alert.Button";
37
+ const f = w(
35
38
  ({ variant: t = "secondary", ...o }, n) => /* @__PURE__ */ i(b, { className: "shrink-0 w-fit", ref: n, variant: t, ...o })
36
- ), O = y(N), h = ({ children: t, hasCloseButton: o, ...n }) => /* @__PURE__ */ i(v, { as: "span", className: O(o && "title-close-button"), ...n, children: t }), a = y(N), R = {
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 = {
37
44
  ai: "sparkles",
38
45
  brand: "lightbulb-alt",
39
46
  danger: "exclamation-octagon",
40
47
  info: "info-circle",
41
48
  success: "check-circle",
42
49
  warning: "exclamation-triangle"
43
- }, z = w(
44
- ({ children: t, className: o, cta: n, handleClose: _, isFullWidth: B, size: c = "md", variant: s = "brand", ...$ }, k) => {
45
- const C = s === "ai", f = p.toArray(t).some((r) => l.isValidElement(r) ? r.type === h : !1), j = /* @__PURE__ */ i("div", { className: a("icon-wrapper", `icon-wrapper-${s}`), children: /* @__PURE__ */ i(S, { name: R[s] }) }), T = p.toArray(t).map((r) => r.type === h ? /* @__PURE__ */ m("div", { className: a("title-with-icon"), children: [
46
- j,
47
- u(r, {
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, {
48
55
  hasCloseButton: !!_,
49
56
  variant: `body-${c}-strong`
50
57
  })
51
- ] }) : r), d = (r) => p.toArray(r).flatMap((e) => l.isValidElement(e) && e.type === l.Fragment ? d(e.props.children) : e.type === x ? u(e, {
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, {
52
59
  size: c,
53
60
  variant: C ? "primary-ai" : void 0
54
- }) : e.type === A ? u(e, {
61
+ }) : r.type === f ? h(r, {
55
62
  size: c
56
- }) : e), g = !!n && d(n);
63
+ }) : r), v = !!n && g(n);
57
64
  return /* @__PURE__ */ m(
58
65
  "div",
59
66
  {
60
67
  className: a(
61
68
  "root",
62
- B && "full-width",
69
+ $ && "full-width",
63
70
  `size-${c}`,
64
71
  s && `variant-${s}`,
65
72
  o
66
73
  ),
67
- ref: k,
68
- ...$,
74
+ ref: T,
75
+ ...k,
69
76
  children: [
70
77
  !!_ && /* @__PURE__ */ i(E, { className: a("close-button"), onClick: _ }),
71
78
  /* @__PURE__ */ m("div", { className: a("content"), children: [
72
79
  /* @__PURE__ */ m(
73
- v,
80
+ N,
74
81
  {
75
82
  as: "div",
76
- className: a("content-text", !f && "without-title"),
83
+ className: a("content-text", !j && "without-title"),
77
84
  variant: `body-${c}`,
78
85
  children: [
79
- !f && j,
80
- T
86
+ !j && y,
87
+ S
81
88
  ]
82
89
  }
83
90
  ),
84
- !!g && /* @__PURE__ */ i("div", { className: a("content-actions"), children: g })
91
+ !!v && /* @__PURE__ */ i("div", { className: a("content-actions"), children: v })
85
92
  ] })
86
93
  ]
87
94
  }
88
95
  );
89
96
  }
90
- ), K = Object.assign(z, {
91
- Button: x,
92
- SecondaryButton: A,
93
- Title: h
97
+ );
98
+ B.displayName = "Alert";
99
+ const K = Object.assign(B, {
100
+ Button: d,
101
+ SecondaryButton: f,
102
+ Title: l
94
103
  });
95
104
  export {
96
105
  K as Alert,
97
- R as ICON
106
+ z as ICON
98
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
  };
@@ -1,13 +1,13 @@
1
1
  "use client";
2
- import { H as S, G as C, T as Q, I as L, s as X, g as Z, K as p } from "./OE2EFRVA-DkdhQLJL.js";
3
- import { t as ee, c as O, s as R, i as te, f as G, d as h, a as ne } from "./RTNCFSKZ-LcIdBwa8.js";
2
+ import { z as S, A as R, V as Q, B as L, s as X, g as Z, C as p } from "./OE2EFRVA-Dg1R6gaC.js";
3
+ import { t as ee, c as z, s as M, i as te, f as U, a as h, d as ne } from "./RTNCFSKZ-BywELldk.js";
4
4
  function re(t) {
5
5
  const i = [];
6
6
  for (const e of t)
7
7
  i.push(...e);
8
8
  return i;
9
9
  }
10
- function U(t) {
10
+ function $(t) {
11
11
  return t.slice().reverse();
12
12
  }
13
13
  function ie(t) {
@@ -35,16 +35,16 @@ function oe(t = {}) {
35
35
  ), s = new Map(o.map((r) => [r.id, r])), a = {
36
36
  items: o,
37
37
  renderedItems: S(e == null ? void 0 : e.renderedItems, [])
38
- }, d = se(t.store), u = O(
38
+ }, d = se(t.store), u = z(
39
39
  { items: o, renderedItems: a.renderedItems },
40
40
  d
41
- ), n = O(a, t.store), b = (r) => {
41
+ ), n = z(a, t.store), b = (r) => {
42
42
  const l = X(r, (c) => c.element);
43
43
  u.setState("renderedItems", l), n.setState("renderedItems", l);
44
44
  };
45
- R(n, () => te(u)), R(u, () => G(u, ["items"], (r) => {
45
+ M(n, () => te(u)), M(u, () => U(u, ["items"], (r) => {
46
46
  n.setState("items", r.items);
47
- })), R(u, () => G(u, ["renderedItems"], (r) => {
47
+ })), M(u, () => U(u, ["renderedItems"], (r) => {
48
48
  let l = !0, c = requestAnimationFrame(() => {
49
49
  const { renderedItems: m } = n.getState();
50
50
  r.renderedItems !== m && b(r.renderedItems);
@@ -90,7 +90,7 @@ function oe(t = {}) {
90
90
  (l) => u.setState("items", l),
91
91
  !0
92
92
  );
93
- return C(L({}, n), {
93
+ return R(L({}, n), {
94
94
  registerItem: P,
95
95
  renderItem: (r) => Q(
96
96
  P(r),
@@ -122,7 +122,7 @@ function _(t, i) {
122
122
  function de(t, i) {
123
123
  return t.filter((e) => i ? !e.disabled && e.id !== i : !e.disabled);
124
124
  }
125
- function $(t, i) {
125
+ function G(t, i) {
126
126
  return t.filter((e) => e.rowId === i);
127
127
  }
128
128
  function ce(t, i, e = !1) {
@@ -133,7 +133,7 @@ function ce(t, i, e = !1) {
133
133
  ...t.slice(0, o)
134
134
  ];
135
135
  }
136
- function H(t) {
136
+ function Y(t) {
137
137
  const i = [];
138
138
  for (const e of t) {
139
139
  const o = i.find((s) => {
@@ -144,7 +144,7 @@ function H(t) {
144
144
  }
145
145
  return i;
146
146
  }
147
- function K(t) {
147
+ function j(t) {
148
148
  let i = 0;
149
149
  for (const { length: e } of t)
150
150
  e > i && (i = e);
@@ -158,7 +158,7 @@ function ue(t) {
158
158
  };
159
159
  }
160
160
  function fe(t, i, e) {
161
- const o = K(t);
161
+ const o = j(t);
162
162
  for (const s of t)
163
163
  for (let a = 0; a < o; a += 1) {
164
164
  const d = s[a];
@@ -170,11 +170,11 @@ function fe(t, i, e) {
170
170
  return t;
171
171
  }
172
172
  function me(t) {
173
- const i = H(t), e = K(i), o = [];
173
+ const i = Y(t), e = j(i), o = [];
174
174
  for (let s = 0; s < e; s += 1)
175
175
  for (const a of i) {
176
176
  const d = a[s];
177
- d && o.push(C(L({}, d), {
177
+ d && o.push(R(L({}, d), {
178
178
  // If there's no rowId, it means that it's not a grid composite, but
179
179
  // a single row instead. So, instead of verticalizing it, that is,
180
180
  // assigning a different rowId based on the column index, we keep it
@@ -191,7 +191,7 @@ function Se(t = {}) {
191
191
  t.activeId,
192
192
  e == null ? void 0 : e.activeId,
193
193
  t.defaultActiveId
194
- ), a = C(L({}, o.getState()), {
194
+ ), a = R(L({}, o.getState()), {
195
195
  id: S(
196
196
  t.id,
197
197
  e == null ? void 0 : e.id,
@@ -219,8 +219,8 @@ function Se(t = {}) {
219
219
  focusLoop: S(t.focusLoop, e == null ? void 0 : e.focusLoop, !1),
220
220
  focusWrap: S(t.focusWrap, e == null ? void 0 : e.focusWrap, !1),
221
221
  focusShift: S(t.focusShift, e == null ? void 0 : e.focusShift, !1)
222
- }), d = O(a, o, t.store);
223
- R(
222
+ }), d = z(a, o, t.store);
223
+ M(
224
224
  d,
225
225
  () => ne(d, ["renderedItems", "activeId"], (n) => {
226
226
  d.setState("activeId", (b) => {
@@ -240,27 +240,27 @@ function Se(t = {}) {
240
240
  includesBaseElement: m = r.includesBaseElement,
241
241
  renderedItems: w = r.renderedItems,
242
242
  rtl: x = r.rtl
243
- } = b, y = n === "up" || n === "down", z = n === "next" || n === "down", Y = z ? x && !y : !x || y, j = g && !l;
243
+ } = b, y = n === "up" || n === "down", O = n === "next" || n === "down", H = O ? x && !y : !x || y, J = g && !l;
244
244
  let v = y ? re(
245
- fe(H(w), c, j)
245
+ fe(Y(w), c, J)
246
246
  ) : w;
247
- if (v = Y ? U(v) : v, v = y ? me(v) : v, c == null)
247
+ if (v = H ? $(v) : v, v = y ? me(v) : v, c == null)
248
248
  return (E = _(v)) == null ? void 0 : E.id;
249
- const M = v.find((I) => I.id === c);
250
- if (!M)
249
+ const C = v.find((I) => I.id === c);
250
+ if (!C)
251
251
  return (P = _(v)) == null ? void 0 : P.id;
252
- const D = v.some((I) => I.rowId), J = v.indexOf(M), N = v.slice(J + 1), W = $(N, M.rowId);
252
+ const D = v.some((I) => I.rowId), K = v.indexOf(C), N = v.slice(K + 1), W = G(N, C.rowId);
253
253
  if (l) {
254
254
  const I = de(W, c), B = I.slice(l)[0] || // If we can't find an item, just return the last one.
255
255
  I[I.length - 1];
256
256
  return B == null ? void 0 : B.id;
257
257
  }
258
- const T = F && (y ? F !== "horizontal" : F !== "vertical"), V = D && f && (y ? f !== "horizontal" : f !== "vertical"), A = z ? (!D || y) && T && m : y ? m : !1;
259
- if (T) {
260
- const I = V && !A ? v : $(v, M.rowId), B = ce(I, c, A), q = _(B, c);
258
+ const V = F && (y ? F !== "horizontal" : F !== "vertical"), T = D && f && (y ? f !== "horizontal" : f !== "vertical"), A = O ? (!D || y) && V && m : y ? m : !1;
259
+ if (V) {
260
+ const I = T && !A ? v : G(v, C.rowId), B = ce(I, c, A), q = _(B, c);
261
261
  return q == null ? void 0 : q.id;
262
262
  }
263
- if (V) {
263
+ if (T) {
264
264
  const I = _(
265
265
  // We can use nextItems, which contains all the next items, including
266
266
  // items from other rows, to wrap between rows. However, if there is a
@@ -276,7 +276,7 @@ function Se(t = {}) {
276
276
  const k = _(W, c);
277
277
  return !k && A ? null : k == null ? void 0 : k.id;
278
278
  };
279
- return C(L(L({}, o), d), {
279
+ return R(L(L({}, o), d), {
280
280
  setBaseElement: (n) => d.setState("baseElement", n),
281
281
  setActiveId: (n) => d.setState("activeId", n),
282
282
  move: (n) => {
@@ -288,7 +288,7 @@ function Se(t = {}) {
288
288
  },
289
289
  last: () => {
290
290
  var n;
291
- return (n = _(U(d.getState().renderedItems))) == null ? void 0 : n.id;
291
+ return (n = _($(d.getState().renderedItems))) == null ? void 0 : n.id;
292
292
  },
293
293
  next: (n) => (n !== void 0 && typeof n == "number" && (n = { skip: n }), u("next", n)),
294
294
  previous: (n) => (n !== void 0 && typeof n == "number" && (n = { skip: n }), u("previous", n)),
@@ -303,6 +303,6 @@ export {
303
303
  oe as a,
304
304
  Se as c,
305
305
  re as f,
306
- U as r,
306
+ $ as r,
307
307
  ge as u
308
308
  };
package/dist/Badge.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use client";
2
+ import './Badge.css';
2
3
  import { jsx as t } from "react/jsx-runtime";
3
4
  import { forwardRef as g } from "react";
4
5
  import { Text as d } from "./Text.js";