@alixpartners/ui-components 2.5.6 → 2.6.0

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 (109) hide show
  1. package/dist/RichTextEditor-JH6YBGiw.js +541 -0
  2. package/dist/{ToastProvider-D5LImZ-Q.js → ToastProvider-DVycF0zU.js} +26 -26
  3. package/dist/assets/CorusHeader.css +1 -1
  4. package/dist/assets/Tab.css +1 -1
  5. package/dist/assets/Tag.css +1 -1
  6. package/dist/assets/ap-icons-types.d.ts +1 -1
  7. package/dist/assets/ap-icons.d.ts +1 -1
  8. package/dist/assets/main.css +1 -1
  9. package/dist/components/Banner/Banner.d.ts +1 -1
  10. package/dist/components/Banner/Banner.test.js +1 -1
  11. package/dist/components/Button/Button.d.ts +1 -1
  12. package/dist/components/Button/Button.test.js +2 -2
  13. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  14. package/dist/components/Checkbox/Checkbox.js +3 -3
  15. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  16. package/dist/components/CorusHeader/CorusHeader.d.ts +1 -1
  17. package/dist/components/CorusHeader/CorusHeader.js +45 -44
  18. package/dist/components/CorusHeader/CorusHeader.types.d.ts +1 -0
  19. package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
  20. package/dist/components/CorusHeader/DropdownMenu.d.ts +2 -1
  21. package/dist/components/CorusHeader/DropdownMenu.js +6 -5
  22. package/dist/components/CorusHeader/MegaMenuContent.d.ts +2 -1
  23. package/dist/components/CorusHeader/MegaMenuContent.js +11 -10
  24. package/dist/components/CorusHeader/UserProfileIcon.d.ts +1 -1
  25. package/dist/components/Creatable/Creatable.d.ts +1 -1
  26. package/dist/components/Creatable/Creatable.js +1 -1
  27. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  28. package/dist/components/Datepicker/Datepicker.js +1 -1
  29. package/dist/components/Datepicker/Datepicker.test.js +1 -1
  30. package/dist/components/Dialog/Dialog.d.ts +1 -1
  31. package/dist/components/Dialog/Dialog.js +188 -214
  32. package/dist/components/Dialog/Dialog.test.js +1 -1
  33. package/dist/components/DragAndDrop/DragAndDrop.d.ts +1 -1
  34. package/dist/components/DragAndDrop/DragAndDrop.test.js +2 -2
  35. package/dist/components/Dropdown/Dropdown.d.ts +3 -1
  36. package/dist/components/Dropdown/Dropdown.js +179 -172
  37. package/dist/components/FilePicker/FilePicker.d.ts +9 -9
  38. package/dist/components/FilePicker/FilePicker.test.js +2 -2
  39. package/dist/components/Ghost/Ghost.d.ts +1 -1
  40. package/dist/components/Ghost/Ghost.test.js +1 -1
  41. package/dist/components/Icon/Icon.d.ts +1 -1
  42. package/dist/components/Icons/IconsGallery.d.ts +1 -1
  43. package/dist/components/Icons/IconsGallery.js +1 -1
  44. package/dist/components/Illustration/Illustration.d.ts +1 -1
  45. package/dist/components/Illustration/Illustration.test.js +1 -1
  46. package/dist/components/Input/Input.test.js +1 -1
  47. package/dist/components/Logo/Logo.d.ts +1 -1
  48. package/dist/components/Logos/LogosGallery.d.ts +1 -1
  49. package/dist/components/NavBar/NavBar.d.ts +1 -1
  50. package/dist/components/NavBar/NavBar.js +1 -1
  51. package/dist/components/Radio/Radio.d.ts +1 -1
  52. package/dist/components/Radio/Radio.js +9 -9
  53. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  54. package/dist/components/RadioGroup/RadioGroup.js +11 -11
  55. package/dist/components/RadioGroup/RadioGroup.test.js +1 -1
  56. package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  57. package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
  58. package/dist/components/RichTextEditor/RichTextEditor.test.js +2 -2
  59. package/dist/components/Search/Search.d.ts +1 -1
  60. package/dist/components/Search/Search.test.js +1 -1
  61. package/dist/components/Spinner/Spinner.d.ts +1 -1
  62. package/dist/components/SplitButton/SplitButton.d.ts +1 -1
  63. package/dist/components/SplitButton/SplitButton.js +3 -3
  64. package/dist/components/SplitButton/SplitButton.test.js +1 -1
  65. package/dist/components/Tab/Tab.d.ts +5 -1
  66. package/dist/components/Tab/Tab.js +28 -24
  67. package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
  68. package/dist/components/Tag/Tag.d.ts +1 -1
  69. package/dist/components/Tag/Tag.js +1 -1
  70. package/dist/components/Tag/Tag.test.js +1 -1
  71. package/dist/components/TagsFields/TagsFields.d.ts +1 -1
  72. package/dist/components/TagsFields/TagsFields.js +1 -1
  73. package/dist/components/Textarea/Textarea.d.ts +1 -1
  74. package/dist/components/Textarea/Textarea.test.js +1 -1
  75. package/dist/components/Toast/Toast.test.js +1 -1
  76. package/dist/components/ToastProvider/ToastProvider.d.ts +2 -1
  77. package/dist/components/ToastProvider/ToastProvider.js +1 -1
  78. package/dist/components/ToastProvider/ToastProvider.test.js +4 -4
  79. package/dist/components/Toggle/Toggle.d.ts +1 -1
  80. package/dist/components/Toggle/Toggle.js +211 -126
  81. package/dist/components/Toggle/Toggle.test.js +1 -1
  82. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  83. package/dist/components/Tooltip/Tooltip.js +60 -61
  84. package/dist/{index-C2s_VtSb.js → index-6DGSlWJb.js} +3 -3
  85. package/dist/{index-Nyh2Wa71.js → index-6j3vTf--.js} +5 -5
  86. package/dist/index-B4szHVNJ.js +248 -0
  87. package/dist/{index-CFqDEbIR.js → index-BVZdJVFB.js} +192 -191
  88. package/dist/index-Bq1FiX6B.js +93 -0
  89. package/dist/index-CE9NpYQR.js +604 -0
  90. package/dist/index-CHy8gqvu.js +353 -0
  91. package/dist/index-CarlZuEo.js +1610 -0
  92. package/dist/{index-CCFDXH-J.js → index-CcsZYEYy.js} +29 -28
  93. package/dist/index-DH9SO8qV.js +221 -0
  94. package/dist/{index-D_L0ncPJ.js → index-IR8HlW5P.js} +4 -4
  95. package/dist/{index-DkTDHhag.js → index-banDzeKa.js} +1 -1
  96. package/dist/index-kgC_DL6e.js +216 -0
  97. package/dist/main.js +3 -3
  98. package/dist/storybook-docs-page.d.ts +1 -1
  99. package/dist/{useToast-Cz5MGKnw.js → useToast-CpwrYPvx.js} +1 -1
  100. package/dist/{vi.bdSIJ99Y-017e_Pkz.js → vi.bdSIJ99Y-DWCVXj6K.js} +3 -3
  101. package/package.json +1 -1
  102. package/dist/RichTextEditor-cvtLFe4t.js +0 -443
  103. package/dist/index-C8H9A55g.js +0 -222
  104. package/dist/index-CCnm5-ML.js +0 -230
  105. package/dist/index-CfIcUHKK.js +0 -70
  106. package/dist/index-ChQc_Cm6.js +0 -1544
  107. package/dist/index-CmGGeUr0.js +0 -142
  108. package/dist/index-Ii4UOx3H.js +0 -599
  109. package/dist/index-z_kiwVc3.js +0 -237
@@ -1,11 +1,11 @@
1
1
  import * as i from "react";
2
- import { u as G, d as O, P as _, c as P, b as H, e as K } from "./index-z_kiwVc3.js";
3
- import { P as $, D as j } from "./index-CmGGeUr0.js";
4
- import { h as U, R as V, u as W, F as Z } from "./index-CFqDEbIR.js";
5
- import { u as q } from "./index-C2s_VtSb.js";
6
- import { R as z, A as x, c as w, C as B, a as J } from "./index-ChQc_Cm6.js";
7
- import { P as E } from "./index-CfIcUHKK.js";
8
- import { jsx as p } from "react/jsx-runtime";
2
+ import { u as G, a as O, P as _, c as P, b as H, e as K } from "./index-B4szHVNJ.js";
3
+ import { P as $, D as j } from "./index-kgC_DL6e.js";
4
+ import { h as U, R as V, u as W, F as Z } from "./index-BVZdJVFB.js";
5
+ import { u as q } from "./index-6DGSlWJb.js";
6
+ import { R as z, A as x, c as w, C as B, a as J } from "./index-CarlZuEo.js";
7
+ import { P as E } from "./index-Bq1FiX6B.js";
8
+ import { jsx as u } from "react/jsx-runtime";
9
9
  var m = "Popover", [b] = H(m, [
10
10
  w
11
11
  ]), g = w(), [Q, d] = b(m), F = (e) => {
@@ -16,18 +16,18 @@ var m = "Popover", [b] = H(m, [
16
16
  defaultOpen: o,
17
17
  onOpenChange: r,
18
18
  modal: s = !1
19
- } = e, c = g(n), u = i.useRef(null), [l, h] = i.useState(!1), [C, f] = G({
19
+ } = e, c = g(n), p = i.useRef(null), [l, h] = i.useState(!1), [C, f] = G({
20
20
  prop: a,
21
21
  defaultProp: o ?? !1,
22
22
  onChange: r,
23
23
  caller: m
24
24
  });
25
- return /* @__PURE__ */ p(z, { ...c, children: /* @__PURE__ */ p(
25
+ return /* @__PURE__ */ u(z, { ...c, children: /* @__PURE__ */ u(
26
26
  Q,
27
27
  {
28
28
  scope: n,
29
29
  contentId: q(),
30
- triggerRef: u,
30
+ triggerRef: p,
31
31
  open: C,
32
32
  onOpenChange: f,
33
33
  onOpenToggle: i.useCallback(() => f((R) => !R), [f]),
@@ -43,26 +43,26 @@ F.displayName = m;
43
43
  var N = "PopoverAnchor", S = i.forwardRef(
44
44
  (e, n) => {
45
45
  const { __scopePopover: t, ...a } = e, o = d(N, t), r = g(t), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = o;
46
- return i.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ p(x, { ...r, ...a, ref: n });
46
+ return i.useEffect(() => (s(), () => c()), [s, c]), /* @__PURE__ */ u(x, { ...r, ...a, ref: n });
47
47
  }
48
48
  );
49
49
  S.displayName = N;
50
50
  var y = "PopoverTrigger", D = i.forwardRef(
51
51
  (e, n) => {
52
- const { __scopePopover: t, ...a } = e, o = d(y, t), r = g(t), s = O(n, o.triggerRef), c = /* @__PURE__ */ p(
52
+ const { __scopePopover: t, ...a } = e, o = d(y, t), r = g(t), s = O(n, o.triggerRef), c = /* @__PURE__ */ u(
53
53
  _.button,
54
54
  {
55
55
  type: "button",
56
56
  "aria-haspopup": "dialog",
57
57
  "aria-expanded": o.open,
58
- "aria-controls": o.contentId,
58
+ "aria-controls": o.open ? o.contentId : void 0,
59
59
  "data-state": L(o.open),
60
60
  ...a,
61
61
  ref: s,
62
62
  onClick: P(e.onClick, o.onOpenToggle)
63
63
  }
64
64
  );
65
- return o.hasCustomAnchor ? c : /* @__PURE__ */ p(x, { asChild: !0, ...r, children: c });
65
+ return o.hasCustomAnchor ? c : /* @__PURE__ */ u(x, { asChild: !0, ...r, children: c });
66
66
  }
67
67
  );
68
68
  D.displayName = y;
@@ -70,13 +70,13 @@ var A = "PopoverPortal", [X, Y] = b(A, {
70
70
  forceMount: void 0
71
71
  }), M = (e) => {
72
72
  const { __scopePopover: n, forceMount: t, children: a, container: o } = e, r = d(A, n);
73
- return /* @__PURE__ */ p(X, { scope: n, forceMount: t, children: /* @__PURE__ */ p(E, { present: t || r.open, children: /* @__PURE__ */ p($, { asChild: !0, container: o, children: a }) }) });
73
+ return /* @__PURE__ */ u(X, { scope: n, forceMount: t, children: /* @__PURE__ */ u(E, { present: t || r.open, children: /* @__PURE__ */ u($, { asChild: !0, container: o, children: a }) }) });
74
74
  };
75
75
  M.displayName = A;
76
76
  var v = "PopoverContent", T = i.forwardRef(
77
77
  (e, n) => {
78
78
  const t = Y(v, e.__scopePopover), { forceMount: a = t.forceMount, ...o } = e, r = d(v, e.__scopePopover);
79
- return /* @__PURE__ */ p(E, { present: a || r.open, children: r.modal ? /* @__PURE__ */ p(oe, { ...o, ref: n }) : /* @__PURE__ */ p(re, { ...o, ref: n }) });
79
+ return /* @__PURE__ */ u(E, { present: a || r.open, children: r.modal ? /* @__PURE__ */ u(oe, { ...o, ref: n }) : /* @__PURE__ */ u(re, { ...o, ref: n }) });
80
80
  }
81
81
  );
82
82
  T.displayName = v;
@@ -86,7 +86,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
86
86
  return i.useEffect(() => {
87
87
  const s = a.current;
88
88
  if (s) return U(s);
89
- }, []), /* @__PURE__ */ p(V, { as: ee, allowPinchZoom: !0, children: /* @__PURE__ */ p(
89
+ }, []), /* @__PURE__ */ u(V, { as: ee, allowPinchZoom: !0, children: /* @__PURE__ */ u(
90
90
  k,
91
91
  {
92
92
  ...e,
@@ -100,7 +100,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
100
100
  onPointerDownOutside: P(
101
101
  e.onPointerDownOutside,
102
102
  (s) => {
103
- const c = s.detail.originalEvent, u = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || u;
103
+ const c = s.detail.originalEvent, p = c.button === 0 && c.ctrlKey === !0, l = c.button === 2 || p;
104
104
  r.current = l;
105
105
  },
106
106
  { checkForDefaultPrevented: !1 }
@@ -116,7 +116,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
116
116
  ), re = i.forwardRef(
117
117
  (e, n) => {
118
118
  const t = d(v, e.__scopePopover), a = i.useRef(!1), o = i.useRef(!1);
119
- return /* @__PURE__ */ p(
119
+ return /* @__PURE__ */ u(
120
120
  k,
121
121
  {
122
122
  ...e,
@@ -128,8 +128,8 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
128
128
  (s = e.onCloseAutoFocus) == null || s.call(e, r), r.defaultPrevented || (a.current || (c = t.triggerRef.current) == null || c.focus(), r.preventDefault()), a.current = !1, o.current = !1;
129
129
  },
130
130
  onInteractOutside: (r) => {
131
- var u, l;
132
- (u = e.onInteractOutside) == null || u.call(e, r), r.defaultPrevented || (a.current = !0, r.detail.originalEvent.type === "pointerdown" && (o.current = !0));
131
+ var p, l;
132
+ (p = e.onInteractOutside) == null || p.call(e, r), r.defaultPrevented || (a.current = !0, r.detail.originalEvent.type === "pointerdown" && (o.current = !0));
133
133
  const s = r.target;
134
134
  ((l = t.triggerRef.current) == null ? void 0 : l.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && o.current && r.preventDefault();
135
135
  }
@@ -145,12 +145,12 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
145
145
  onCloseAutoFocus: r,
146
146
  disableOutsidePointerEvents: s,
147
147
  onEscapeKeyDown: c,
148
- onPointerDownOutside: u,
148
+ onPointerDownOutside: p,
149
149
  onFocusOutside: l,
150
150
  onInteractOutside: h,
151
151
  ...C
152
152
  } = e, f = d(v, t), R = g(t);
153
- return W(), /* @__PURE__ */ p(
153
+ return W(), /* @__PURE__ */ u(
154
154
  Z,
155
155
  {
156
156
  asChild: !0,
@@ -158,17 +158,18 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
158
158
  trapped: a,
159
159
  onMountAutoFocus: o,
160
160
  onUnmountAutoFocus: r,
161
- children: /* @__PURE__ */ p(
161
+ children: /* @__PURE__ */ u(
162
162
  j,
163
163
  {
164
164
  asChild: !0,
165
165
  disableOutsidePointerEvents: s,
166
166
  onInteractOutside: h,
167
167
  onEscapeKeyDown: c,
168
- onPointerDownOutside: u,
168
+ onPointerDownOutside: p,
169
169
  onFocusOutside: l,
170
170
  onDismiss: () => f.onOpenChange(!1),
171
- children: /* @__PURE__ */ p(
171
+ deferPointerDownOutside: !0,
172
+ children: /* @__PURE__ */ u(
172
173
  B,
173
174
  {
174
175
  "data-state": L(f.open),
@@ -195,7 +196,7 @@ var ee = K("PopoverContent.RemoveScroll"), oe = i.forwardRef(
195
196
  ), I = "PopoverClose", te = i.forwardRef(
196
197
  (e, n) => {
197
198
  const { __scopePopover: t, ...a } = e, o = d(I, t);
198
- return /* @__PURE__ */ p(
199
+ return /* @__PURE__ */ u(
199
200
  _.button,
200
201
  {
201
202
  type: "button",
@@ -210,7 +211,7 @@ te.displayName = I;
210
211
  var ne = "PopoverArrow", ae = i.forwardRef(
211
212
  (e, n) => {
212
213
  const { __scopePopover: t, ...a } = e, o = g(t);
213
- return /* @__PURE__ */ p(J, { ...o, ...a, ref: n });
214
+ return /* @__PURE__ */ u(J, { ...o, ...a, ref: n });
214
215
  }
215
216
  );
216
217
  ae.displayName = ne;
@@ -0,0 +1,221 @@
1
+ import * as o from "react";
2
+ import { b as G, a as N, e as O, P as L, c as w, u as z } from "./index-B4szHVNJ.js";
3
+ import { jsx as m } from "react/jsx-runtime";
4
+ import { u as $, a as J } from "./index-6DGSlWJb.js";
5
+ function Q(e) {
6
+ const n = e + "CollectionProvider", [u, c] = G(n), [A, v] = u(
7
+ n,
8
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
9
+ ), I = (f) => {
10
+ const { scope: t, children: i } = f, d = o.useRef(null), r = o.useRef(/* @__PURE__ */ new Map()).current;
11
+ return /* @__PURE__ */ m(A, { scope: t, itemMap: r, collectionRef: d, children: i });
12
+ };
13
+ I.displayName = n;
14
+ const C = e + "CollectionSlot", _ = O(C), p = o.forwardRef(
15
+ (f, t) => {
16
+ const { scope: i, children: d } = f, r = v(C, i), s = N(t, r.collectionRef);
17
+ return /* @__PURE__ */ m(_, { ref: s, children: d });
18
+ }
19
+ );
20
+ p.displayName = C;
21
+ const a = e + "CollectionItemSlot", R = "data-radix-collection-item", g = O(a), b = o.forwardRef(
22
+ (f, t) => {
23
+ const { scope: i, children: d, ...r } = f, s = o.useRef(null), E = N(t, s), T = v(a, i);
24
+ return o.useEffect(() => (T.itemMap.set(s, { ref: s, ...r }), () => void T.itemMap.delete(s))), /* @__PURE__ */ m(g, { [R]: "", ref: E, children: d });
25
+ }
26
+ );
27
+ b.displayName = a;
28
+ function F(f) {
29
+ const t = v(e + "CollectionConsumer", f);
30
+ return o.useCallback(() => {
31
+ const d = t.collectionRef.current;
32
+ if (!d) return [];
33
+ const r = Array.from(d.querySelectorAll(`[${R}]`));
34
+ return Array.from(t.itemMap.values()).sort(
35
+ (T, x) => r.indexOf(T.ref.current) - r.indexOf(x.ref.current)
36
+ );
37
+ }, [t.collectionRef, t.itemMap]);
38
+ }
39
+ return [
40
+ { Provider: I, Slot: p, ItemSlot: b },
41
+ F,
42
+ c
43
+ ];
44
+ }
45
+ var W = o.createContext(void 0);
46
+ function X(e) {
47
+ const n = o.useContext(W);
48
+ return e || n || "ltr";
49
+ }
50
+ var M = "rovingFocusGroup.onEntryFocus", Z = { bubbles: !1, cancelable: !0 }, h = "RovingFocusGroup", [P, K, ee] = Q(h), [te, me] = G(
51
+ h,
52
+ [ee]
53
+ ), [oe, ne] = te(h), k = o.forwardRef(
54
+ (e, n) => /* @__PURE__ */ m(P.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ m(P.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ m(re, { ...e, ref: n }) }) })
55
+ );
56
+ k.displayName = h;
57
+ var re = o.forwardRef((e, n) => {
58
+ const {
59
+ __scopeRovingFocusGroup: u,
60
+ orientation: c,
61
+ loop: A = !1,
62
+ dir: v,
63
+ currentTabStopId: I,
64
+ defaultCurrentTabStopId: C,
65
+ onCurrentTabStopIdChange: _,
66
+ onEntryFocus: p,
67
+ preventScrollOnEntryFocus: a = !1,
68
+ ...R
69
+ } = e, g = o.useRef(null), b = N(n, g), F = X(v), [f, t] = z({
70
+ prop: I,
71
+ defaultProp: C ?? null,
72
+ onChange: _,
73
+ caller: h
74
+ }), [i, d] = o.useState(!1), r = J(p), s = K(u), E = o.useRef(!1), [T, x] = o.useState(0);
75
+ return o.useEffect(() => {
76
+ const l = g.current;
77
+ if (l)
78
+ return l.addEventListener(M, r), () => l.removeEventListener(M, r);
79
+ }, [r]), /* @__PURE__ */ m(
80
+ oe,
81
+ {
82
+ scope: u,
83
+ orientation: c,
84
+ dir: F,
85
+ loop: A,
86
+ currentTabStopId: f,
87
+ onItemFocus: o.useCallback(
88
+ (l) => t(l),
89
+ [t]
90
+ ),
91
+ onItemShiftTab: o.useCallback(() => d(!0), []),
92
+ onFocusableItemAdd: o.useCallback(
93
+ () => x((l) => l + 1),
94
+ []
95
+ ),
96
+ onFocusableItemRemove: o.useCallback(
97
+ () => x((l) => l - 1),
98
+ []
99
+ ),
100
+ children: /* @__PURE__ */ m(
101
+ L.div,
102
+ {
103
+ tabIndex: i || T === 0 ? -1 : 0,
104
+ "data-orientation": c,
105
+ ...R,
106
+ ref: b,
107
+ style: { outline: "none", ...e.style },
108
+ onMouseDown: w(e.onMouseDown, () => {
109
+ E.current = !0;
110
+ }),
111
+ onFocus: w(e.onFocus, (l) => {
112
+ const Y = !E.current;
113
+ if (l.target === l.currentTarget && Y && !i) {
114
+ const D = new CustomEvent(M, Z);
115
+ if (l.currentTarget.dispatchEvent(D), !D.defaultPrevented) {
116
+ const y = s().filter((S) => S.focusable), H = y.find((S) => S.active), j = y.find((S) => S.id === f), q = [H, j, ...y].filter(
117
+ Boolean
118
+ ).map((S) => S.ref.current);
119
+ V(q, a);
120
+ }
121
+ }
122
+ E.current = !1;
123
+ }),
124
+ onBlur: w(e.onBlur, () => d(!1))
125
+ }
126
+ )
127
+ }
128
+ );
129
+ }), U = "RovingFocusGroupItem", B = o.forwardRef(
130
+ (e, n) => {
131
+ const {
132
+ __scopeRovingFocusGroup: u,
133
+ focusable: c = !0,
134
+ active: A = !1,
135
+ tabStopId: v,
136
+ children: I,
137
+ ...C
138
+ } = e, _ = $(), p = v || _, a = ne(U, u), R = a.currentTabStopId === p, g = K(u), { onFocusableItemAdd: b, onFocusableItemRemove: F, currentTabStopId: f } = a;
139
+ return o.useEffect(() => {
140
+ if (c)
141
+ return b(), () => F();
142
+ }, [c, b, F]), /* @__PURE__ */ m(
143
+ P.ItemSlot,
144
+ {
145
+ scope: u,
146
+ id: p,
147
+ focusable: c,
148
+ active: A,
149
+ children: /* @__PURE__ */ m(
150
+ L.span,
151
+ {
152
+ tabIndex: R ? 0 : -1,
153
+ "data-orientation": a.orientation,
154
+ ...C,
155
+ ref: n,
156
+ onMouseDown: w(e.onMouseDown, (t) => {
157
+ c ? a.onItemFocus(p) : t.preventDefault();
158
+ }),
159
+ onFocus: w(e.onFocus, () => a.onItemFocus(p)),
160
+ onKeyDown: w(e.onKeyDown, (t) => {
161
+ if (t.key === "Tab" && t.shiftKey) {
162
+ a.onItemShiftTab();
163
+ return;
164
+ }
165
+ if (t.target !== t.currentTarget) return;
166
+ const i = ae(t, a.orientation, a.dir);
167
+ if (i !== void 0) {
168
+ if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
169
+ t.preventDefault();
170
+ let r = g().filter((s) => s.focusable).map((s) => s.ref.current);
171
+ if (i === "last") r.reverse();
172
+ else if (i === "prev" || i === "next") {
173
+ i === "prev" && r.reverse();
174
+ const s = r.indexOf(t.currentTarget);
175
+ r = a.loop ? ie(r, s + 1) : r.slice(s + 1);
176
+ }
177
+ setTimeout(() => V(r));
178
+ }
179
+ }),
180
+ children: typeof I == "function" ? I({ isCurrentTabStop: R, hasTabStop: f != null }) : I
181
+ }
182
+ )
183
+ }
184
+ );
185
+ }
186
+ );
187
+ B.displayName = U;
188
+ var ce = {
189
+ ArrowLeft: "prev",
190
+ ArrowUp: "prev",
191
+ ArrowRight: "next",
192
+ ArrowDown: "next",
193
+ PageUp: "first",
194
+ Home: "first",
195
+ PageDown: "last",
196
+ End: "last"
197
+ };
198
+ function se(e, n) {
199
+ return n !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
200
+ }
201
+ function ae(e, n, u) {
202
+ const c = se(e.key, u);
203
+ if (!(n === "vertical" && ["ArrowLeft", "ArrowRight"].includes(c)) && !(n === "horizontal" && ["ArrowUp", "ArrowDown"].includes(c)))
204
+ return ce[c];
205
+ }
206
+ function V(e, n = !1) {
207
+ const u = document.activeElement;
208
+ for (const c of e)
209
+ if (c === u || (c.focus({ preventScroll: n }), document.activeElement !== u)) return;
210
+ }
211
+ function ie(e, n) {
212
+ return e.map((u, c) => e[(n + c) % e.length]);
213
+ }
214
+ var pe = k, Ie = B;
215
+ export {
216
+ Ie as I,
217
+ pe as R,
218
+ Q as a,
219
+ me as c,
220
+ X as u
221
+ };
@@ -1,8 +1,8 @@
1
1
  import * as t from "react";
2
- import { u as H, R as $, I as j, c as T, a as z } from "./index-C8H9A55g.js";
3
- import { u as W, P as O, d as X, c as g, b as Y } from "./index-z_kiwVc3.js";
4
- import { u as C } from "./index-C2s_VtSb.js";
5
- import { R as q, A as J, P as Q, C as Z, I as ee, c as re, G as ae, L as ne, a as oe, b as te, d as ue, e as se, S as ie, f as ce, g as le, h as de } from "./index-Ii4UOx3H.js";
2
+ import { u as H, R as $, I as j, c as T, a as z } from "./index-DH9SO8qV.js";
3
+ import { u as W, P as O, a as X, c as g, b as Y } from "./index-B4szHVNJ.js";
4
+ import { u as C } from "./index-6DGSlWJb.js";
5
+ import { R as q, A as J, P as Q, C as Z, I as ee, c as re, G as ae, L as ne, a as oe, b as te, d as ue, e as se, S as ie, f as ce, g as le, h as de } from "./index-CE9NpYQR.js";
6
6
  import { jsx as u } from "react/jsx-runtime";
7
7
  var _ = "Menubar", [x, pe, be] = z(_), [D] = Y(_, [
8
8
  be,
@@ -1,4 +1,4 @@
1
- import { e as H } from "./vi.bdSIJ99Y-017e_Pkz.js";
1
+ import { a as H } from "./vi.bdSIJ99Y-DWCVXj6K.js";
2
2
  function a(e, t, n) {
3
3
  return e.namespaceURI && e.namespaceURI !== "http://www.w3.org/1999/xhtml" || (t = Array.isArray(t) ? t : [
4
4
  t
@@ -0,0 +1,216 @@
1
+ import * as t from "react";
2
+ import { a as F, P as g, c as C, f as U, d as z } from "./index-B4szHVNJ.js";
3
+ import { a as I } from "./index-6DGSlWJb.js";
4
+ import { jsx as T } from "react/jsx-runtime";
5
+ import * as H from "react-dom";
6
+ function K(n, r = globalThis == null ? void 0 : globalThis.document) {
7
+ const e = I(n);
8
+ t.useEffect(() => {
9
+ const o = (i) => {
10
+ i.key === "Escape" && e(i);
11
+ };
12
+ return r.addEventListener("keydown", o, { capture: !0 }), () => r.removeEventListener("keydown", o, { capture: !0 });
13
+ }, [e, r]);
14
+ }
15
+ var j = "DismissableLayer", S = "dismissableLayer.update", X = "dismissableLayer.pointerDownOutside", Y = "dismissableLayer.focusOutside", A, N = t.createContext({
16
+ layers: /* @__PURE__ */ new Set(),
17
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
18
+ branches: /* @__PURE__ */ new Set(),
19
+ // Outside elements that belong to a layer's own dismiss affordance (eg, a
20
+ // dialog overlay). Pressing them should dismiss the layer regardless of
21
+ // whether or not they stop propagation.
22
+ //
23
+ // See https://github.com/radix-ui/primitives/issues/3346
24
+ dismissableSurfaces: /* @__PURE__ */ new Set()
25
+ }), q = t.forwardRef(
26
+ (n, r) => {
27
+ const {
28
+ disableOutsidePointerEvents: e = !1,
29
+ deferPointerDownOutside: o = !1,
30
+ onEscapeKeyDown: i,
31
+ onPointerDownOutside: a,
32
+ onFocusOutside: v,
33
+ onInteractOutside: f,
34
+ onDismiss: l,
35
+ ...b
36
+ } = n, s = t.useContext(N), [d, L] = t.useState(null), E = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, D] = t.useState({}), P = F(r, (u) => L(u)), y = Array.from(s.layers), [O] = [...s.layersWithOutsidePointerEventsDisabled].slice(-1), c = y.indexOf(O), m = d ? y.indexOf(d) : -1, w = s.layersWithOutsidePointerEventsDisabled.size > 0, p = m >= c, B = t.useRef(!1), M = Q(
37
+ (u) => {
38
+ const h = u.target;
39
+ if (!(h instanceof Node))
40
+ return;
41
+ const k = [...s.branches].some(
42
+ (R) => R.contains(h)
43
+ );
44
+ !p || k || (a == null || a(u), f == null || f(u), u.defaultPrevented || l == null || l());
45
+ },
46
+ {
47
+ ownerDocument: E,
48
+ deferPointerDownOutside: o,
49
+ isDeferredPointerDownOutsideRef: B,
50
+ dismissableSurfaces: s.dismissableSurfaces
51
+ }
52
+ ), x = V((u) => {
53
+ if (o && B.current)
54
+ return;
55
+ const h = u.target;
56
+ [...s.branches].some((R) => R.contains(h)) || (v == null || v(u), f == null || f(u), u.defaultPrevented || l == null || l());
57
+ }, E);
58
+ return K((u) => {
59
+ m === s.layers.size - 1 && (i == null || i(u), !u.defaultPrevented && l && (u.preventDefault(), l()));
60
+ }, E), t.useEffect(() => {
61
+ if (d)
62
+ return e && (s.layersWithOutsidePointerEventsDisabled.size === 0 && (A = E.body.style.pointerEvents, E.body.style.pointerEvents = "none"), s.layersWithOutsidePointerEventsDisabled.add(d)), s.layers.add(d), W(), () => {
63
+ e && (s.layersWithOutsidePointerEventsDisabled.delete(d), s.layersWithOutsidePointerEventsDisabled.size === 0 && (E.body.style.pointerEvents = A));
64
+ };
65
+ }, [d, E, e, s]), t.useEffect(() => () => {
66
+ d && (s.layers.delete(d), s.layersWithOutsidePointerEventsDisabled.delete(d), W());
67
+ }, [d, s]), t.useEffect(() => {
68
+ const u = () => D({});
69
+ return document.addEventListener(S, u), () => document.removeEventListener(S, u);
70
+ }, []), /* @__PURE__ */ T(
71
+ g.div,
72
+ {
73
+ ...b,
74
+ ref: P,
75
+ style: {
76
+ pointerEvents: w ? p ? "auto" : "none" : void 0,
77
+ ...n.style
78
+ },
79
+ onFocusCapture: C(n.onFocusCapture, x.onFocusCapture),
80
+ onBlurCapture: C(n.onBlurCapture, x.onBlurCapture),
81
+ onPointerDownCapture: C(
82
+ n.onPointerDownCapture,
83
+ M.onPointerDownCapture
84
+ )
85
+ }
86
+ );
87
+ }
88
+ );
89
+ q.displayName = j;
90
+ var G = "DismissableLayerBranch", J = t.forwardRef((n, r) => {
91
+ const e = t.useContext(N), o = t.useRef(null), i = F(r, o);
92
+ return t.useEffect(() => {
93
+ const a = o.current;
94
+ if (a)
95
+ return e.branches.add(a), () => {
96
+ e.branches.delete(a);
97
+ };
98
+ }, [e.branches]), /* @__PURE__ */ T(g.div, { ...n, ref: i });
99
+ });
100
+ J.displayName = G;
101
+ function se() {
102
+ const n = t.useContext(N), [r, e] = t.useState(null);
103
+ return t.useEffect(() => {
104
+ if (r)
105
+ return n.dismissableSurfaces.add(r), () => {
106
+ n.dismissableSurfaces.delete(r);
107
+ };
108
+ }, [r, n.dismissableSurfaces]), e;
109
+ }
110
+ function Q(n, r) {
111
+ const {
112
+ ownerDocument: e = globalThis == null ? void 0 : globalThis.document,
113
+ deferPointerDownOutside: o = !1,
114
+ isDeferredPointerDownOutsideRef: i,
115
+ dismissableSurfaces: a
116
+ } = r, v = I(n), f = t.useRef(!1), l = t.useRef(!1), b = t.useRef(/* @__PURE__ */ new Map()), s = t.useRef(() => {
117
+ });
118
+ return t.useEffect(() => {
119
+ function d() {
120
+ l.current = !1, i.current = !1, b.current.clear();
121
+ }
122
+ function L() {
123
+ return Array.from(b.current.values()).some(Boolean);
124
+ }
125
+ function E(c) {
126
+ if (!l.current)
127
+ return;
128
+ const m = c.target;
129
+ m instanceof Node && [...a].some((p) => p.contains(m)) || b.current.set(c.type, !0), c.type === "click" && window.setTimeout(() => {
130
+ l.current && s.current();
131
+ }, 0);
132
+ }
133
+ function D(c) {
134
+ l.current && b.current.set(c.type, !1);
135
+ }
136
+ const P = (c) => {
137
+ if (c.target && !f.current) {
138
+ let m = function() {
139
+ e.removeEventListener("click", s.current);
140
+ const p = L();
141
+ d(), p || _(
142
+ X,
143
+ v,
144
+ w,
145
+ { discrete: !0 }
146
+ );
147
+ };
148
+ const w = { originalEvent: c };
149
+ l.current = !0, i.current = o && c.button === 0, b.current.clear(), !o || c.button !== 0 ? m() : (e.removeEventListener("click", s.current), s.current = m, e.addEventListener("click", s.current, { once: !0 }));
150
+ } else
151
+ e.removeEventListener("click", s.current), d();
152
+ f.current = !1;
153
+ }, y = [
154
+ "pointerup",
155
+ "mousedown",
156
+ "mouseup",
157
+ "touchstart",
158
+ "touchend",
159
+ "click"
160
+ ];
161
+ for (const c of y)
162
+ e.addEventListener(c, E, !0), e.addEventListener(c, D);
163
+ const O = window.setTimeout(() => {
164
+ e.addEventListener("pointerdown", P);
165
+ }, 0);
166
+ return () => {
167
+ window.clearTimeout(O), e.removeEventListener("pointerdown", P), e.removeEventListener("click", s.current);
168
+ for (const c of y)
169
+ e.removeEventListener(c, E, !0), e.removeEventListener(c, D);
170
+ };
171
+ }, [
172
+ e,
173
+ v,
174
+ o,
175
+ i,
176
+ a
177
+ ]), {
178
+ // ensures we check React component tree (not just DOM tree)
179
+ onPointerDownCapture: () => f.current = !0
180
+ };
181
+ }
182
+ function V(n, r = globalThis == null ? void 0 : globalThis.document) {
183
+ const e = I(n), o = t.useRef(!1);
184
+ return t.useEffect(() => {
185
+ const i = (a) => {
186
+ a.target && !o.current && _(Y, e, { originalEvent: a }, {
187
+ discrete: !1
188
+ });
189
+ };
190
+ return r.addEventListener("focusin", i), () => r.removeEventListener("focusin", i);
191
+ }, [r, e]), {
192
+ onFocusCapture: () => o.current = !0,
193
+ onBlurCapture: () => o.current = !1
194
+ };
195
+ }
196
+ function W() {
197
+ const n = new CustomEvent(S);
198
+ document.dispatchEvent(n);
199
+ }
200
+ function _(n, r, e, { discrete: o }) {
201
+ const i = e.originalEvent.target, a = new CustomEvent(n, { bubbles: !1, cancelable: !0, detail: e });
202
+ r && i.addEventListener(n, r, { once: !0 }), o ? U(i, a) : i.dispatchEvent(a);
203
+ }
204
+ var Z = "Portal", $ = t.forwardRef((n, r) => {
205
+ var f;
206
+ const { container: e, ...o } = n, [i, a] = t.useState(!1);
207
+ z(() => a(!0), []);
208
+ const v = e || i && ((f = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : f.body);
209
+ return v ? H.createPortal(/* @__PURE__ */ T(g.div, { ...o, ref: r }), v) : null;
210
+ });
211
+ $.displayName = Z;
212
+ export {
213
+ q as D,
214
+ $ as P,
215
+ se as u
216
+ };
package/dist/main.js CHANGED
@@ -12,10 +12,10 @@ import { default as B } from "./components/Dropdown/Dropdown.js";
12
12
  import { default as R, useFilePickerContext as v } from "./components/FilePicker/FilePicker.js";
13
13
  import { default as I } from "./components/Search/Search.js";
14
14
  import { default as S } from "./components/Datepicker/Datepicker.js";
15
- import { R as N } from "./RichTextEditor-cvtLFe4t.js";
15
+ import { R as N } from "./RichTextEditor-JH6YBGiw.js";
16
16
  import { default as w } from "./components/Toast/Toast.js";
17
- import { T as E } from "./ToastProvider-D5LImZ-Q.js";
18
- import { u as L } from "./useToast-Cz5MGKnw.js";
17
+ import { T as E } from "./ToastProvider-DVycF0zU.js";
18
+ import { u as L } from "./useToast-CpwrYPvx.js";
19
19
  import { default as q } from "./components/Creatable/Creatable.js";
20
20
  import { default as z } from "./components/SplitButton/SplitButton.js";
21
21
  import { default as K } from "./components/DragAndDrop/DragAndDrop.js";
@@ -1,5 +1,5 @@
1
1
  type StorybookDocsPageProps = {
2
2
  includePrimaryStory?: boolean;
3
3
  };
4
- declare const storybookDocsPage: ({ includePrimaryStory }: StorybookDocsPageProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const storybookDocsPage: ({ includePrimaryStory }: StorybookDocsPageProps) => import("react").JSX.Element;
5
5
  export default storybookDocsPage;
@@ -1,5 +1,5 @@
1
1
  import { useContext as o } from "react";
2
- import { a as r } from "./ToastProvider-D5LImZ-Q.js";
2
+ import { a as r } from "./ToastProvider-DVycF0zU.js";
3
3
  function n() {
4
4
  const t = o(r);
5
5
  if (!t)
@@ -23395,11 +23395,11 @@ function Or(e) {
23395
23395
  return (o == null ? void 0 : o.file) || "";
23396
23396
  }
23397
23397
  export {
23398
- HM as a,
23398
+ je as a,
23399
23399
  VM as b,
23400
- Lr as c,
23400
+ HM as c,
23401
23401
  WM as d,
23402
- je as e,
23402
+ Lr as e,
23403
23403
  Xe as f,
23404
23404
  cM as g,
23405
23405
  zM as i,