@alixpartners/ui-components 2.5.7 → 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 (111) hide show
  1. package/README.md +97 -97
  2. package/dist/RichTextEditor-JH6YBGiw.js +541 -0
  3. package/dist/{ToastProvider-D5LImZ-Q.js → ToastProvider-DVycF0zU.js} +26 -26
  4. package/dist/assets/CorusHeader.css +1 -1
  5. package/dist/assets/Tab.css +1 -1
  6. package/dist/assets/Tag.css +1 -1
  7. package/dist/assets/ap-icons-types.d.ts +1 -1
  8. package/dist/assets/ap-icons.d.ts +1 -1
  9. package/dist/assets/main.css +1 -1
  10. package/dist/components/Banner/Banner.d.ts +1 -1
  11. package/dist/components/Banner/Banner.test.js +1 -1
  12. package/dist/components/Button/Button.d.ts +1 -1
  13. package/dist/components/Button/Button.test.js +2 -2
  14. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  15. package/dist/components/Checkbox/Checkbox.js +3 -3
  16. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  17. package/dist/components/CorusHeader/CorusHeader.d.ts +1 -1
  18. package/dist/components/CorusHeader/CorusHeader.js +45 -44
  19. package/dist/components/CorusHeader/CorusHeader.types.d.ts +1 -0
  20. package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
  21. package/dist/components/CorusHeader/DropdownMenu.d.ts +2 -1
  22. package/dist/components/CorusHeader/DropdownMenu.js +6 -5
  23. package/dist/components/CorusHeader/MegaMenuContent.d.ts +2 -1
  24. package/dist/components/CorusHeader/MegaMenuContent.js +11 -10
  25. package/dist/components/CorusHeader/UserProfileIcon.d.ts +1 -1
  26. package/dist/components/Creatable/Creatable.d.ts +1 -1
  27. package/dist/components/Creatable/Creatable.js +1 -1
  28. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  29. package/dist/components/Datepicker/Datepicker.js +1 -1
  30. package/dist/components/Datepicker/Datepicker.test.js +1 -1
  31. package/dist/components/Dialog/Dialog.d.ts +1 -1
  32. package/dist/components/Dialog/Dialog.js +188 -214
  33. package/dist/components/Dialog/Dialog.test.js +1 -1
  34. package/dist/components/DragAndDrop/DragAndDrop.d.ts +1 -1
  35. package/dist/components/DragAndDrop/DragAndDrop.test.js +2 -2
  36. package/dist/components/Dropdown/Dropdown.d.ts +3 -1
  37. package/dist/components/Dropdown/Dropdown.js +179 -172
  38. package/dist/components/FilePicker/FilePicker.d.ts +9 -9
  39. package/dist/components/FilePicker/FilePicker.test.js +2 -2
  40. package/dist/components/Ghost/Ghost.d.ts +1 -1
  41. package/dist/components/Ghost/Ghost.test.js +1 -1
  42. package/dist/components/Icon/Icon.d.ts +1 -1
  43. package/dist/components/Icons/IconsGallery.d.ts +1 -1
  44. package/dist/components/Icons/IconsGallery.js +1 -1
  45. package/dist/components/Illustration/Illustration.d.ts +1 -1
  46. package/dist/components/Illustration/Illustration.test.js +1 -1
  47. package/dist/components/Input/Input.test.js +1 -1
  48. package/dist/components/Logo/Logo.d.ts +1 -1
  49. package/dist/components/Logos/LogosGallery.d.ts +1 -1
  50. package/dist/components/NavBar/NavBar.d.ts +1 -1
  51. package/dist/components/NavBar/NavBar.js +1 -1
  52. package/dist/components/Radio/Radio.d.ts +1 -1
  53. package/dist/components/Radio/Radio.js +9 -9
  54. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  55. package/dist/components/RadioGroup/RadioGroup.js +11 -11
  56. package/dist/components/RadioGroup/RadioGroup.test.js +1 -1
  57. package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  58. package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
  59. package/dist/components/RichTextEditor/RichTextEditor.test.js +2 -2
  60. package/dist/components/Search/Search.d.ts +1 -1
  61. package/dist/components/Search/Search.test.js +1 -1
  62. package/dist/components/Spinner/Spinner.d.ts +1 -1
  63. package/dist/components/SplitButton/SplitButton.d.ts +1 -1
  64. package/dist/components/SplitButton/SplitButton.js +3 -3
  65. package/dist/components/SplitButton/SplitButton.test.js +1 -1
  66. package/dist/components/Tab/Tab.d.ts +5 -1
  67. package/dist/components/Tab/Tab.js +28 -24
  68. package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
  69. package/dist/components/Tag/Tag.d.ts +1 -1
  70. package/dist/components/Tag/Tag.js +1 -1
  71. package/dist/components/Tag/Tag.test.js +1 -1
  72. package/dist/components/TagsFields/TagsFields.d.ts +1 -1
  73. package/dist/components/TagsFields/TagsFields.js +1 -1
  74. package/dist/components/Textarea/Textarea.d.ts +1 -1
  75. package/dist/components/Textarea/Textarea.test.js +1 -1
  76. package/dist/components/Toast/Toast.test.js +1 -1
  77. package/dist/components/ToastProvider/ToastProvider.d.ts +2 -1
  78. package/dist/components/ToastProvider/ToastProvider.js +1 -1
  79. package/dist/components/ToastProvider/ToastProvider.test.js +4 -4
  80. package/dist/components/Toggle/Toggle.d.ts +1 -1
  81. package/dist/components/Toggle/Toggle.js +211 -126
  82. package/dist/components/Toggle/Toggle.test.js +1 -1
  83. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  84. package/dist/components/Tooltip/Tooltip.js +60 -61
  85. package/dist/{index-C2s_VtSb.js → index-6DGSlWJb.js} +3 -3
  86. package/dist/{index-Nyh2Wa71.js → index-6j3vTf--.js} +5 -5
  87. package/dist/index-B4szHVNJ.js +248 -0
  88. package/dist/{index-CFqDEbIR.js → index-BVZdJVFB.js} +192 -191
  89. package/dist/index-Bq1FiX6B.js +93 -0
  90. package/dist/index-CE9NpYQR.js +604 -0
  91. package/dist/index-CHy8gqvu.js +353 -0
  92. package/dist/index-CarlZuEo.js +1610 -0
  93. package/dist/{index-CCFDXH-J.js → index-CcsZYEYy.js} +29 -28
  94. package/dist/index-DH9SO8qV.js +221 -0
  95. package/dist/{index-D_L0ncPJ.js → index-IR8HlW5P.js} +4 -4
  96. package/dist/{index-DkTDHhag.js → index-banDzeKa.js} +1 -1
  97. package/dist/index-kgC_DL6e.js +216 -0
  98. package/dist/main.js +3 -3
  99. package/dist/storybook-docs-page.d.ts +1 -1
  100. package/dist/{useToast-Cz5MGKnw.js → useToast-CpwrYPvx.js} +1 -1
  101. package/dist/{vi.bdSIJ99Y-017e_Pkz.js → vi.bdSIJ99Y-DWCVXj6K.js} +3 -3
  102. package/dist/web.config +8 -8
  103. package/package.json +94 -94
  104. package/dist/RichTextEditor-kTQEDSL0.js +0 -477
  105. package/dist/index-C8H9A55g.js +0 -222
  106. package/dist/index-CCnm5-ML.js +0 -230
  107. package/dist/index-CfIcUHKK.js +0 -70
  108. package/dist/index-ChQc_Cm6.js +0 -1544
  109. package/dist/index-CmGGeUr0.js +0 -142
  110. package/dist/index-Ii4UOx3H.js +0 -599
  111. package/dist/index-z_kiwVc3.js +0 -237
@@ -1,237 +0,0 @@
1
- import * as c from "react";
2
- import * as w from "react-dom";
3
- import { jsx as m, Fragment as E } from "react/jsx-runtime";
4
- function h(t, e) {
5
- if (typeof t == "function")
6
- return t(e);
7
- t != null && (t.current = e);
8
- }
9
- function b(...t) {
10
- return (e) => {
11
- let o = !1;
12
- const s = t.map((n) => {
13
- const r = h(n, e);
14
- return !o && typeof r == "function" && (o = !0), r;
15
- });
16
- if (o)
17
- return () => {
18
- for (let n = 0; n < s.length; n++) {
19
- const r = s[n];
20
- typeof r == "function" ? r() : h(t[n], null);
21
- }
22
- };
23
- };
24
- }
25
- function A(...t) {
26
- return c.useCallback(b(...t), t);
27
- }
28
- // @__NO_SIDE_EFFECTS__
29
- function R(t) {
30
- const e = /* @__PURE__ */ $(t), o = c.forwardRef((s, n) => {
31
- const { children: r, ...i } = s, u = c.Children.toArray(r), l = u.find(g);
32
- if (l) {
33
- const a = l.props.children, d = u.map((f) => f === l ? c.Children.count(a) > 1 ? c.Children.only(null) : c.isValidElement(a) ? a.props.children : null : f);
34
- return /* @__PURE__ */ m(e, { ...i, ref: n, children: c.isValidElement(a) ? c.cloneElement(a, void 0, d) : null });
35
- }
36
- return /* @__PURE__ */ m(e, { ...i, ref: n, children: r });
37
- });
38
- return o.displayName = `${t}.Slot`, o;
39
- }
40
- // @__NO_SIDE_EFFECTS__
41
- function $(t) {
42
- const e = c.forwardRef((o, s) => {
43
- const { children: n, ...r } = o;
44
- if (c.isValidElement(n)) {
45
- const i = N(n), u = _(r, n.props);
46
- return n.type !== c.Fragment && (u.ref = s ? b(s, i) : i), c.cloneElement(n, u);
47
- }
48
- return c.Children.count(n) > 1 ? c.Children.only(null) : null;
49
- });
50
- return e.displayName = `${t}.SlotClone`, e;
51
- }
52
- var x = Symbol("radix.slottable");
53
- // @__NO_SIDE_EFFECTS__
54
- function F(t) {
55
- const e = ({ children: o }) => /* @__PURE__ */ m(E, { children: o });
56
- return e.displayName = `${t}.Slottable`, e.__radixId = x, e;
57
- }
58
- function g(t) {
59
- return c.isValidElement(t) && typeof t.type == "function" && "__radixId" in t.type && t.type.__radixId === x;
60
- }
61
- function _(t, e) {
62
- const o = { ...e };
63
- for (const s in e) {
64
- const n = t[s], r = e[s];
65
- /^on[A-Z]/.test(s) ? n && r ? o[s] = (...u) => {
66
- const l = r(...u);
67
- return n(...u), l;
68
- } : n && (o[s] = n) : s === "style" ? o[s] = { ...n, ...r } : s === "className" && (o[s] = [n, r].filter(Boolean).join(" "));
69
- }
70
- return { ...t, ...o };
71
- }
72
- function N(t) {
73
- var s, n;
74
- let e = (s = Object.getOwnPropertyDescriptor(t.props, "ref")) == null ? void 0 : s.get, o = e && "isReactWarning" in e && e.isReactWarning;
75
- return o ? t.ref : (e = (n = Object.getOwnPropertyDescriptor(t, "ref")) == null ? void 0 : n.get, o = e && "isReactWarning" in e && e.isReactWarning, o ? t.props.ref : t.props.ref || t.ref);
76
- }
77
- var O = [
78
- "a",
79
- "button",
80
- "div",
81
- "form",
82
- "h2",
83
- "h3",
84
- "img",
85
- "input",
86
- "label",
87
- "li",
88
- "nav",
89
- "ol",
90
- "p",
91
- "select",
92
- "span",
93
- "svg",
94
- "ul"
95
- ], L = O.reduce((t, e) => {
96
- const o = /* @__PURE__ */ R(`Primitive.${e}`), s = c.forwardRef((n, r) => {
97
- const { asChild: i, ...u } = n, l = i ? o : e;
98
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ m(l, { ...u, ref: r });
99
- });
100
- return s.displayName = `Primitive.${e}`, { ...t, [e]: s };
101
- }, {});
102
- function T(t, e) {
103
- t && w.flushSync(() => t.dispatchEvent(e));
104
- }
105
- function k(t, e) {
106
- const o = c.createContext(e), s = (r) => {
107
- const { children: i, ...u } = r, l = c.useMemo(() => u, Object.values(u));
108
- return /* @__PURE__ */ m(o.Provider, { value: l, children: i });
109
- };
110
- s.displayName = t + "Provider";
111
- function n(r) {
112
- const i = c.useContext(o);
113
- if (i) return i;
114
- if (e !== void 0) return e;
115
- throw new Error(`\`${r}\` must be used within \`${t}\``);
116
- }
117
- return [s, n];
118
- }
119
- function B(t, e = []) {
120
- let o = [];
121
- function s(r, i) {
122
- const u = c.createContext(i), l = o.length;
123
- o = [...o, i];
124
- const a = (f) => {
125
- var C;
126
- const { scope: p, children: S, ...v } = f, y = ((C = p == null ? void 0 : p[t]) == null ? void 0 : C[l]) || u, P = c.useMemo(() => v, Object.values(v));
127
- return /* @__PURE__ */ m(y.Provider, { value: P, children: S });
128
- };
129
- a.displayName = r + "Provider";
130
- function d(f, p) {
131
- var y;
132
- const S = ((y = p == null ? void 0 : p[t]) == null ? void 0 : y[l]) || u, v = c.useContext(S);
133
- if (v) return v;
134
- if (i !== void 0) return i;
135
- throw new Error(`\`${f}\` must be used within \`${r}\``);
136
- }
137
- return [a, d];
138
- }
139
- const n = () => {
140
- const r = o.map((i) => c.createContext(i));
141
- return function(u) {
142
- const l = (u == null ? void 0 : u[t]) || r;
143
- return c.useMemo(
144
- () => ({ [`__scope${t}`]: { ...u, [t]: l } }),
145
- [u, l]
146
- );
147
- };
148
- };
149
- return n.scopeName = t, [s, I(n, ...e)];
150
- }
151
- function I(...t) {
152
- const e = t[0];
153
- if (t.length === 1) return e;
154
- const o = () => {
155
- const s = t.map((n) => ({
156
- useScope: n(),
157
- scopeName: n.scopeName
158
- }));
159
- return function(r) {
160
- const i = s.reduce((u, { useScope: l, scopeName: a }) => {
161
- const f = l(r)[`__scope${a}`];
162
- return { ...u, ...f };
163
- }, {});
164
- return c.useMemo(() => ({ [`__scope${e.scopeName}`]: i }), [i]);
165
- };
166
- };
167
- return o.scopeName = e.scopeName, o;
168
- }
169
- function U(t, e, { checkForDefaultPrevented: o = !0 } = {}) {
170
- return function(n) {
171
- if (t == null || t(n), o === !1 || !n.defaultPrevented)
172
- return e == null ? void 0 : e(n);
173
- };
174
- }
175
- var D = globalThis != null && globalThis.document ? c.useLayoutEffect : () => {
176
- }, j = c[" useInsertionEffect ".trim().toString()] || D;
177
- function Z({
178
- prop: t,
179
- defaultProp: e,
180
- onChange: o = () => {
181
- },
182
- caller: s
183
- }) {
184
- const [n, r, i] = V({
185
- defaultProp: e,
186
- onChange: o
187
- }), u = t !== void 0, l = u ? t : n;
188
- {
189
- const d = c.useRef(t !== void 0);
190
- c.useEffect(() => {
191
- const f = d.current;
192
- f !== u && console.warn(
193
- `${s} is changing from ${f ? "controlled" : "uncontrolled"} to ${u ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
194
- ), d.current = u;
195
- }, [u, s]);
196
- }
197
- const a = c.useCallback(
198
- (d) => {
199
- var f;
200
- if (u) {
201
- const p = M(d) ? d(t) : d;
202
- p !== t && ((f = i.current) == null || f.call(i, p));
203
- } else
204
- r(d);
205
- },
206
- [u, t, r, i]
207
- );
208
- return [l, a];
209
- }
210
- function V({
211
- defaultProp: t,
212
- onChange: e
213
- }) {
214
- const [o, s] = c.useState(t), n = c.useRef(o), r = c.useRef(e);
215
- return j(() => {
216
- r.current = e;
217
- }, [e]), c.useEffect(() => {
218
- var i;
219
- n.current !== o && ((i = r.current) == null || i.call(r, o), n.current = o);
220
- }, [o, n]), [o, s, r];
221
- }
222
- function M(t) {
223
- return typeof t == "function";
224
- }
225
- export {
226
- L as P,
227
- b as a,
228
- B as b,
229
- U as c,
230
- A as d,
231
- R as e,
232
- k as f,
233
- F as g,
234
- D as h,
235
- T as i,
236
- Z as u
237
- };