@alixpartners/ui-components 2.6.0 → 2.6.2

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 (100) hide show
  1. package/dist/{RichTextEditor-JH6YBGiw.js → RichTextEditor-xCakhho7.js} +1 -1
  2. package/dist/{ToastProvider-DVycF0zU.js → ToastProvider-D5LImZ-Q.js} +26 -26
  3. package/dist/assets/Dialog.css +1 -1
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/Banner/Banner.test.js +1 -1
  6. package/dist/components/Button/Button.d.ts +1 -1
  7. package/dist/components/Button/Button.test.js +2 -2
  8. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  9. package/dist/components/Checkbox/Checkbox.js +3 -3
  10. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  11. package/dist/components/CorusHeader/CorusHeader.d.ts +1 -1
  12. package/dist/components/CorusHeader/CorusHeader.js +1 -1
  13. package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
  14. package/dist/components/CorusHeader/DropdownItemContent.js +5 -5
  15. package/dist/components/CorusHeader/DropdownMenu.d.ts +1 -1
  16. package/dist/components/CorusHeader/DropdownMenu.js +1 -1
  17. package/dist/components/CorusHeader/MegaMenuContent.d.ts +1 -1
  18. package/dist/components/CorusHeader/MegaMenuContent.js +14 -14
  19. package/dist/components/CorusHeader/UserProfileIcon.d.ts +1 -1
  20. package/dist/components/Creatable/Creatable.d.ts +1 -1
  21. package/dist/components/Creatable/Creatable.js +1 -1
  22. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  23. package/dist/components/Datepicker/Datepicker.js +1 -1
  24. package/dist/components/Datepicker/Datepicker.test.js +1 -1
  25. package/dist/components/Dialog/Dialog.d.ts +8 -2
  26. package/dist/components/Dialog/Dialog.js +227 -195
  27. package/dist/components/Dialog/Dialog.test.js +227 -202
  28. package/dist/components/DragAndDrop/DragAndDrop.d.ts +1 -1
  29. package/dist/components/DragAndDrop/DragAndDrop.test.js +2 -2
  30. package/dist/components/Dropdown/Dropdown.d.ts +1 -1
  31. package/dist/components/Dropdown/Dropdown.js +1 -1
  32. package/dist/components/FilePicker/FilePicker.d.ts +9 -9
  33. package/dist/components/FilePicker/FilePicker.test.js +2 -2
  34. package/dist/components/Ghost/Ghost.d.ts +1 -1
  35. package/dist/components/Ghost/Ghost.test.js +1 -1
  36. package/dist/components/Icon/Icon.d.ts +1 -1
  37. package/dist/components/Icons/IconsGallery.d.ts +1 -1
  38. package/dist/components/Illustration/Illustration.d.ts +1 -1
  39. package/dist/components/Illustration/Illustration.test.js +1 -1
  40. package/dist/components/Input/Input.test.js +1 -1
  41. package/dist/components/Logo/Logo.d.ts +1 -1
  42. package/dist/components/Logos/LogosGallery.d.ts +1 -1
  43. package/dist/components/NavBar/NavBar.d.ts +1 -1
  44. package/dist/components/NavBar/NavBar.js +1 -1
  45. package/dist/components/Radio/Radio.d.ts +1 -1
  46. package/dist/components/Radio/Radio.js +9 -9
  47. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  48. package/dist/components/RadioGroup/RadioGroup.js +11 -11
  49. package/dist/components/RadioGroup/RadioGroup.test.js +1 -1
  50. package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  51. package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
  52. package/dist/components/RichTextEditor/RichTextEditor.test.js +2 -2
  53. package/dist/components/Search/Search.d.ts +1 -1
  54. package/dist/components/Search/Search.test.js +1 -1
  55. package/dist/components/Spinner/Spinner.d.ts +1 -1
  56. package/dist/components/SplitButton/SplitButton.d.ts +1 -1
  57. package/dist/components/SplitButton/SplitButton.js +3 -3
  58. package/dist/components/SplitButton/SplitButton.test.js +1 -1
  59. package/dist/components/Tab/Tab.d.ts +1 -1
  60. package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
  61. package/dist/components/Tag/Tag.d.ts +1 -1
  62. package/dist/components/Tag/Tag.test.js +1 -1
  63. package/dist/components/TagsFields/TagsFields.d.ts +1 -1
  64. package/dist/components/TagsFields/TagsFields.js +1 -1
  65. package/dist/components/Textarea/Textarea.d.ts +1 -1
  66. package/dist/components/Textarea/Textarea.test.js +1 -1
  67. package/dist/components/Toast/Toast.test.js +1 -1
  68. package/dist/components/ToastProvider/ToastProvider.d.ts +1 -2
  69. package/dist/components/ToastProvider/ToastProvider.js +1 -1
  70. package/dist/components/ToastProvider/ToastProvider.test.js +4 -4
  71. package/dist/components/Toggle/Toggle.d.ts +1 -1
  72. package/dist/components/Toggle/Toggle.js +126 -211
  73. package/dist/components/Toggle/Toggle.test.js +1 -1
  74. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  75. package/dist/components/Tooltip/Tooltip.js +61 -60
  76. package/dist/{index-6DGSlWJb.js → index-C2s_VtSb.js} +3 -3
  77. package/dist/index-C8H9A55g.js +222 -0
  78. package/dist/{index-CcsZYEYy.js → index-CCFDXH-J.js} +28 -29
  79. package/dist/index-CCnm5-ML.js +230 -0
  80. package/dist/{index-BVZdJVFB.js → index-CFqDEbIR.js} +191 -192
  81. package/dist/index-CfIcUHKK.js +70 -0
  82. package/dist/index-ChQc_Cm6.js +1544 -0
  83. package/dist/index-CmGGeUr0.js +142 -0
  84. package/dist/{index-IR8HlW5P.js → index-D_L0ncPJ.js} +4 -4
  85. package/dist/{index-banDzeKa.js → index-DkTDHhag.js} +1 -1
  86. package/dist/index-Ii4UOx3H.js +599 -0
  87. package/dist/{index-6j3vTf--.js → index-Nyh2Wa71.js} +5 -5
  88. package/dist/index-z_kiwVc3.js +237 -0
  89. package/dist/main.js +3 -3
  90. package/dist/storybook-docs-page.d.ts +1 -1
  91. package/dist/{useToast-CpwrYPvx.js → useToast-Cz5MGKnw.js} +1 -1
  92. package/dist/{vi.bdSIJ99Y-DWCVXj6K.js → vi.bdSIJ99Y-017e_Pkz.js} +3 -3
  93. package/package.json +1 -1
  94. package/dist/index-B4szHVNJ.js +0 -248
  95. package/dist/index-Bq1FiX6B.js +0 -93
  96. package/dist/index-CE9NpYQR.js +0 -604
  97. package/dist/index-CHy8gqvu.js +0 -353
  98. package/dist/index-CarlZuEo.js +0 -1610
  99. package/dist/index-DH9SO8qV.js +0 -221
  100. package/dist/index-kgC_DL6e.js +0 -216
@@ -0,0 +1,142 @@
1
+ import * as i from "react";
2
+ import { d as T, P as b, c as h, i as I, h as M } from "./index-z_kiwVc3.js";
3
+ import { a as m } from "./index-C2s_VtSb.js";
4
+ import { jsx as P } from "react/jsx-runtime";
5
+ import U from "react-dom";
6
+ function z(r, e = globalThis == null ? void 0 : globalThis.document) {
7
+ const s = m(r);
8
+ i.useEffect(() => {
9
+ const n = (t) => {
10
+ t.key === "Escape" && s(t);
11
+ };
12
+ return e.addEventListener("keydown", n, { capture: !0 }), () => e.removeEventListener("keydown", n, { capture: !0 });
13
+ }, [s, e]);
14
+ }
15
+ var H = "DismissableLayer", p = "dismissableLayer.update", K = "dismissableLayer.pointerDownOutside", j = "dismissableLayer.focusOutside", g, B = i.createContext({
16
+ layers: /* @__PURE__ */ new Set(),
17
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
18
+ branches: /* @__PURE__ */ new Set()
19
+ }), X = i.forwardRef(
20
+ (r, e) => {
21
+ const {
22
+ disableOutsidePointerEvents: s = !1,
23
+ onEscapeKeyDown: n,
24
+ onPointerDownOutside: t,
25
+ onFocusOutside: o,
26
+ onInteractOutside: l,
27
+ onDismiss: u,
28
+ ...E
29
+ } = r, c = i.useContext(B), [d, S] = i.useState(null), f = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, A] = i.useState({}), N = T(e, (a) => S(a)), D = Array.from(c.layers), [F] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), W = D.indexOf(F), L = d ? D.indexOf(d) : -1, _ = c.layersWithOutsidePointerEventsDisabled.size > 0, C = L >= W, k = G((a) => {
30
+ const v = a.target, R = [...c.branches].some((y) => y.contains(v));
31
+ !C || R || (t == null || t(a), l == null || l(a), a.defaultPrevented || u == null || u());
32
+ }, f), O = J((a) => {
33
+ const v = a.target;
34
+ [...c.branches].some((y) => y.contains(v)) || (o == null || o(a), l == null || l(a), a.defaultPrevented || u == null || u());
35
+ }, f);
36
+ return z((a) => {
37
+ L === c.layers.size - 1 && (n == null || n(a), !a.defaultPrevented && u && (a.preventDefault(), u()));
38
+ }, f), i.useEffect(() => {
39
+ if (d)
40
+ return s && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (g = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), w(), () => {
41
+ s && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = g);
42
+ };
43
+ }, [d, f, s, c]), i.useEffect(() => () => {
44
+ d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), w());
45
+ }, [d, c]), i.useEffect(() => {
46
+ const a = () => A({});
47
+ return document.addEventListener(p, a), () => document.removeEventListener(p, a);
48
+ }, []), /* @__PURE__ */ P(
49
+ b.div,
50
+ {
51
+ ...E,
52
+ ref: N,
53
+ style: {
54
+ pointerEvents: _ ? C ? "auto" : "none" : void 0,
55
+ ...r.style
56
+ },
57
+ onFocusCapture: h(r.onFocusCapture, O.onFocusCapture),
58
+ onBlurCapture: h(r.onBlurCapture, O.onBlurCapture),
59
+ onPointerDownCapture: h(
60
+ r.onPointerDownCapture,
61
+ k.onPointerDownCapture
62
+ )
63
+ }
64
+ );
65
+ }
66
+ );
67
+ X.displayName = H;
68
+ var Y = "DismissableLayerBranch", q = i.forwardRef((r, e) => {
69
+ const s = i.useContext(B), n = i.useRef(null), t = T(e, n);
70
+ return i.useEffect(() => {
71
+ const o = n.current;
72
+ if (o)
73
+ return s.branches.add(o), () => {
74
+ s.branches.delete(o);
75
+ };
76
+ }, [s.branches]), /* @__PURE__ */ P(b.div, { ...r, ref: t });
77
+ });
78
+ q.displayName = Y;
79
+ function G(r, e = globalThis == null ? void 0 : globalThis.document) {
80
+ const s = m(r), n = i.useRef(!1), t = i.useRef(() => {
81
+ });
82
+ return i.useEffect(() => {
83
+ const o = (u) => {
84
+ if (u.target && !n.current) {
85
+ let E = function() {
86
+ x(
87
+ K,
88
+ s,
89
+ c,
90
+ { discrete: !0 }
91
+ );
92
+ };
93
+ const c = { originalEvent: u };
94
+ u.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = E, e.addEventListener("click", t.current, { once: !0 })) : E();
95
+ } else
96
+ e.removeEventListener("click", t.current);
97
+ n.current = !1;
98
+ }, l = window.setTimeout(() => {
99
+ e.addEventListener("pointerdown", o);
100
+ }, 0);
101
+ return () => {
102
+ window.clearTimeout(l), e.removeEventListener("pointerdown", o), e.removeEventListener("click", t.current);
103
+ };
104
+ }, [e, s]), {
105
+ // ensures we check React component tree (not just DOM tree)
106
+ onPointerDownCapture: () => n.current = !0
107
+ };
108
+ }
109
+ function J(r, e = globalThis == null ? void 0 : globalThis.document) {
110
+ const s = m(r), n = i.useRef(!1);
111
+ return i.useEffect(() => {
112
+ const t = (o) => {
113
+ o.target && !n.current && x(j, s, { originalEvent: o }, {
114
+ discrete: !1
115
+ });
116
+ };
117
+ return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
118
+ }, [e, s]), {
119
+ onFocusCapture: () => n.current = !0,
120
+ onBlurCapture: () => n.current = !1
121
+ };
122
+ }
123
+ function w() {
124
+ const r = new CustomEvent(p);
125
+ document.dispatchEvent(r);
126
+ }
127
+ function x(r, e, s, { discrete: n }) {
128
+ const t = s.originalEvent.target, o = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: s });
129
+ e && t.addEventListener(r, e, { once: !0 }), n ? I(t, o) : t.dispatchEvent(o);
130
+ }
131
+ var Q = "Portal", V = i.forwardRef((r, e) => {
132
+ var u;
133
+ const { container: s, ...n } = r, [t, o] = i.useState(!1);
134
+ M(() => o(!0), []);
135
+ const l = s || t && ((u = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : u.body);
136
+ return l ? U.createPortal(/* @__PURE__ */ P(b.div, { ...n, ref: e }), l) : null;
137
+ });
138
+ V.displayName = Q;
139
+ export {
140
+ X as D,
141
+ V as P
142
+ };
@@ -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-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";
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";
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 { a as H } from "./vi.bdSIJ99Y-DWCVXj6K.js";
1
+ import { e as H } from "./vi.bdSIJ99Y-017e_Pkz.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