@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
@@ -1,244 +1,159 @@
1
- import { jsx as i, jsxs as T, Fragment as K } from "react/jsx-runtime";
2
- import * as f from "react";
3
- import { useId as U, useEffect as z, useState as G } from "react";
4
- import { c as L } from "../../clsx-OuTLNxxd.js";
5
- import { P, u as O, a as E, c as W, b as X } from "../../index-B4szHVNJ.js";
6
- import { u as Y } from "../../index-BZPx6jYI.js";
7
- import { u as J } from "../../index-6j3vTf--.js";
8
- import '../../assets/Toggle.css';var C = "Switch", [Q] = X(C), [V, R] = Q(C);
9
- function Z(e) {
10
- const {
11
- __scopeSwitch: r,
12
- checked: c,
13
- children: a,
14
- defaultChecked: t,
15
- disabled: s,
16
- form: n,
17
- name: l,
18
- onCheckedChange: u,
19
- required: h,
20
- value: d = "on",
21
- // @ts-expect-error
22
- internal_do_not_use_render: p
23
- } = e, [o, m] = O({
24
- prop: c,
25
- defaultProp: t ?? !1,
26
- onChange: u,
27
- caller: C
28
- }), [b, _] = f.useState(null), [g, S] = f.useState(null), k = f.useRef(!1), v = b ? !!n || !!b.closest("form") : (
29
- // We set this to true by default so that events bubble to forms without JS (SSR)
30
- !0
31
- ), y = {
32
- checked: o,
33
- setChecked: m,
34
- disabled: s,
35
- control: b,
36
- setControl: _,
37
- name: l,
38
- form: n,
39
- value: d,
40
- hasConsumerStoppedPropagationRef: k,
41
- required: h,
42
- defaultChecked: t,
43
- isFormControl: v,
44
- bubbleInput: g,
45
- setBubbleInput: S
46
- };
47
- return /* @__PURE__ */ i(V, { scope: r, ...y, children: $(p) ? p(y) : a });
48
- }
49
- var N = "SwitchTrigger", x = f.forwardRef(
50
- ({ __scopeSwitch: e, onClick: r, ...c }, a) => {
51
- const {
52
- value: t,
53
- disabled: s,
54
- checked: n,
55
- required: l,
56
- setControl: u,
57
- setChecked: h,
58
- hasConsumerStoppedPropagationRef: d,
59
- isFormControl: p,
60
- bubbleInput: o
61
- } = R(N, e), m = E(a, u);
62
- return /* @__PURE__ */ i(
63
- P.button,
64
- {
65
- type: "button",
66
- role: "switch",
67
- "aria-checked": n,
68
- "aria-required": l,
69
- "data-state": j(n),
70
- "data-disabled": s ? "" : void 0,
71
- disabled: s,
72
- value: t,
73
- ...c,
74
- ref: m,
75
- onClick: W(r, (b) => {
76
- h((_) => !_), o && p && (d.current = b.isPropagationStopped(), d.current || b.stopPropagation());
77
- })
78
- }
79
- );
80
- }
81
- );
82
- x.displayName = N;
83
- var B = f.forwardRef(
84
- (e, r) => {
1
+ import { jsxs as k, jsx as d } from "react/jsx-runtime";
2
+ import * as m from "react";
3
+ import { useId as D, useEffect as M, useState as j } from "react";
4
+ import { c as F } from "../../clsx-OuTLNxxd.js";
5
+ import { d as y, u as H, P, c as K, b as A } from "../../index-z_kiwVc3.js";
6
+ import { u as U } from "../../index-BZPx6jYI.js";
7
+ import { u as q } from "../../index-Nyh2Wa71.js";
8
+ import '../../assets/Toggle.css';var v = "Switch", [z] = A(v), [L, O] = z(v), T = m.forwardRef(
9
+ (r, c) => {
85
10
  const {
86
- __scopeSwitch: c,
87
- name: a,
88
- checked: t,
89
- defaultChecked: s,
90
- required: n,
91
- disabled: l,
92
- value: u,
11
+ __scopeSwitch: e,
12
+ name: n,
13
+ checked: o,
14
+ defaultChecked: p,
15
+ required: s,
16
+ disabled: a,
17
+ value: i = "on",
93
18
  onCheckedChange: h,
94
- form: d,
95
- ...p
96
- } = e;
97
- return /* @__PURE__ */ i(
98
- Z,
99
- {
100
- __scopeSwitch: c,
101
- checked: t,
102
- defaultChecked: s,
103
- disabled: l,
104
- required: n,
105
- onCheckedChange: h,
106
- name: a,
107
- form: d,
108
- value: u,
109
- internal_do_not_use_render: ({ isFormControl: o }) => /* @__PURE__ */ T(K, { children: [
110
- /* @__PURE__ */ i(
111
- x,
112
- {
113
- ...p,
114
- ref: r,
115
- __scopeSwitch: c
116
- }
117
- ),
118
- o && /* @__PURE__ */ i(
119
- q,
120
- {
121
- __scopeSwitch: c
122
- }
123
- )
124
- ] })
125
- }
126
- );
19
+ form: l,
20
+ ..._
21
+ } = r, [t, u] = m.useState(null), S = y(c, (w) => u(w)), C = m.useRef(!1), g = t ? l || !!t.closest("form") : !0, [b, I] = H({
22
+ prop: o,
23
+ defaultProp: p ?? !1,
24
+ onChange: h,
25
+ caller: v
26
+ });
27
+ return /* @__PURE__ */ k(L, { scope: e, checked: b, disabled: a, children: [
28
+ /* @__PURE__ */ d(
29
+ P.button,
30
+ {
31
+ type: "button",
32
+ role: "switch",
33
+ "aria-checked": b,
34
+ "aria-required": s,
35
+ "data-state": R(b),
36
+ "data-disabled": a ? "" : void 0,
37
+ disabled: a,
38
+ value: i,
39
+ ..._,
40
+ ref: S,
41
+ onClick: K(r.onClick, (w) => {
42
+ I((B) => !B), g && (C.current = w.isPropagationStopped(), C.current || w.stopPropagation());
43
+ })
44
+ }
45
+ ),
46
+ g && /* @__PURE__ */ d(
47
+ x,
48
+ {
49
+ control: t,
50
+ bubbles: !C.current,
51
+ name: n,
52
+ value: i,
53
+ checked: b,
54
+ required: s,
55
+ disabled: a,
56
+ form: l,
57
+ style: { transform: "translateX(-100%)" }
58
+ }
59
+ )
60
+ ] });
127
61
  }
128
62
  );
129
- B.displayName = C;
130
- var F = "SwitchThumb", M = f.forwardRef(
131
- (e, r) => {
132
- const { __scopeSwitch: c, ...a } = e, t = R(F, c);
133
- return /* @__PURE__ */ i(
63
+ T.displayName = v;
64
+ var E = "SwitchThumb", N = m.forwardRef(
65
+ (r, c) => {
66
+ const { __scopeSwitch: e, ...n } = r, o = O(E, e);
67
+ return /* @__PURE__ */ d(
134
68
  P.span,
135
69
  {
136
- "data-state": j(t.checked),
137
- "data-disabled": t.disabled ? "" : void 0,
138
- ...a,
139
- ref: r
70
+ "data-state": R(o.checked),
71
+ "data-disabled": o.disabled ? "" : void 0,
72
+ ...n,
73
+ ref: c
140
74
  }
141
75
  );
142
76
  }
143
77
  );
144
- M.displayName = F;
145
- var D = "SwitchBubbleInput", q = f.forwardRef(
146
- ({ __scopeSwitch: e, ...r }, c) => {
147
- const {
148
- control: a,
149
- hasConsumerStoppedPropagationRef: t,
150
- checked: s,
151
- defaultChecked: n,
152
- required: l,
153
- disabled: u,
154
- name: h,
155
- value: d,
156
- form: p,
157
- bubbleInput: o,
158
- setBubbleInput: m
159
- } = R(D, e), b = E(c, m), _ = Y(s), g = J(a);
160
- f.useEffect(() => {
161
- const k = o;
162
- if (!k) return;
163
- const v = window.HTMLInputElement.prototype, I = Object.getOwnPropertyDescriptor(
164
- v,
78
+ N.displayName = E;
79
+ var W = "SwitchBubbleInput", x = m.forwardRef(
80
+ ({
81
+ __scopeSwitch: r,
82
+ control: c,
83
+ checked: e,
84
+ bubbles: n = !0,
85
+ ...o
86
+ }, p) => {
87
+ const s = m.useRef(null), a = y(s, p), i = U(e), h = q(c);
88
+ return m.useEffect(() => {
89
+ const l = s.current;
90
+ if (!l) return;
91
+ const _ = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(
92
+ _,
165
93
  "checked"
166
- ).set, A = !t.current;
167
- if (_ !== s && I) {
168
- const H = new Event("click", { bubbles: A });
169
- I.call(k, s), k.dispatchEvent(H);
94
+ ).set;
95
+ if (i !== e && u) {
96
+ const S = new Event("click", { bubbles: n });
97
+ u.call(l, e), l.dispatchEvent(S);
170
98
  }
171
- }, [o, _, s, t]);
172
- const S = f.useRef(s);
173
- return /* @__PURE__ */ i(
174
- P.input,
99
+ }, [i, e, n]), /* @__PURE__ */ d(
100
+ "input",
175
101
  {
176
102
  type: "checkbox",
177
103
  "aria-hidden": !0,
178
- defaultChecked: n ?? S.current,
179
- required: l,
180
- disabled: u,
181
- name: h,
182
- value: d,
183
- form: p,
184
- ...r,
104
+ defaultChecked: e,
105
+ ...o,
185
106
  tabIndex: -1,
186
- ref: b,
107
+ ref: a,
187
108
  style: {
188
- ...r.style,
189
- ...g,
109
+ ...o.style,
110
+ ...h,
190
111
  position: "absolute",
191
112
  pointerEvents: "none",
192
113
  opacity: 0,
193
- margin: 0,
194
- // We transform because the input is absolutely positioned but we have
195
- // rendered it **after** the button. This pulls it back to sit on top
196
- // of the button.
197
- transform: "translateX(-100%)"
114
+ margin: 0
198
115
  }
199
116
  }
200
117
  );
201
118
  }
202
119
  );
203
- q.displayName = D;
204
- function $(e) {
205
- return typeof e == "function";
206
- }
207
- function j(e) {
208
- return e ? "checked" : "unchecked";
120
+ x.displayName = W;
121
+ function R(r) {
122
+ return r ? "checked" : "unchecked";
209
123
  }
210
- const ee = "Toggle-module__wrapper___rjhvi", te = "Toggle-module__root___mhwY4", oe = "Toggle-module__thumb___mWKFb", re = "Toggle-module__label___DMfcr", ce = "Toggle-module__disabled___sxlCk", w = {
211
- wrapper: ee,
212
- root: te,
213
- thumb: oe,
214
- label: re,
215
- disabled: ce
124
+ var X = T, Y = N;
125
+ const G = "Toggle-module__wrapper___rjhvi", J = "Toggle-module__root___mhwY4", Q = "Toggle-module__thumb___mWKFb", V = "Toggle-module__label___DMfcr", Z = "Toggle-module__disabled___sxlCk", f = {
126
+ wrapper: G,
127
+ root: J,
128
+ thumb: Q,
129
+ label: V,
130
+ disabled: Z
216
131
  };
217
- function ue({
218
- label: e,
219
- checked: r = !1,
220
- disabled: c = !1,
221
- labelPosition: a = "left",
222
- onChange: t,
223
- className: s,
224
- ...n
132
+ function ae({
133
+ label: r,
134
+ checked: c = !1,
135
+ disabled: e = !1,
136
+ labelPosition: n = "left",
137
+ onChange: o,
138
+ className: p,
139
+ ...s
225
140
  }) {
226
- const l = U();
227
- z(() => {
228
- h(r);
229
- }, [r]);
230
- const [u, h] = G(r), d = (o) => {
231
- h(o), t == null || t(o);
232
- }, p = (o) => {
233
- var m;
234
- (o.key === "Enter" || o.key === " ") && (o.preventDefault(), d(!u)), (m = n.onKeyDown) == null || m.call(n, o);
141
+ const a = D();
142
+ M(() => {
143
+ h(c);
144
+ }, [c]);
145
+ const [i, h] = j(c), l = (t) => {
146
+ h(t), o == null || o(t);
147
+ }, _ = (t) => {
148
+ var u;
149
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), l(!i)), (u = s.onKeyDown) == null || u.call(s, t);
235
150
  };
236
- return /* @__PURE__ */ T("div", { className: L(w.wrapper, c && w.disabled, s), children: [
237
- a === "left" && /* @__PURE__ */ i("label", { className: w.label, htmlFor: l, children: e }),
238
- /* @__PURE__ */ i(B, { className: w.root, checked: u, disabled: c, onCheckedChange: d, id: l, onKeyDown: p, ...n, children: /* @__PURE__ */ i(M, { className: w.thumb }) }),
239
- a === "right" && /* @__PURE__ */ i("label", { className: w.label, htmlFor: l, children: e })
151
+ return /* @__PURE__ */ k("div", { className: F(f.wrapper, e && f.disabled, p), children: [
152
+ n === "left" && /* @__PURE__ */ d("label", { className: f.label, htmlFor: a, children: r }),
153
+ /* @__PURE__ */ d(X, { className: f.root, checked: i, disabled: e, onCheckedChange: l, id: a, onKeyDown: _, ...s, children: /* @__PURE__ */ d(Y, { className: f.thumb }) }),
154
+ n === "right" && /* @__PURE__ */ d("label", { className: f.label, htmlFor: a, children: r })
240
155
  ] });
241
156
  }
242
157
  export {
243
- ue as default
158
+ ae as default
244
159
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { d, i as n, r as g, g as t, s as l, v as b, f as r } from "../../vi.bdSIJ99Y-DWCVXj6K.js";
2
+ import { d, i as n, r as g, g as t, s as l, v as b, f as r } from "../../vi.bdSIJ99Y-017e_Pkz.js";
3
3
  import a from "./Toggle.js";
4
4
  d("Toggle", () => {
5
5
  d("Rendering", () => {
@@ -33,4 +33,4 @@ export type TooltipProps = {
33
33
  * @param {() => void} [props.onClose] - Callback fired when the tooltip is closed (only available for 'md' size)
34
34
  * @returns {JSX.Element} The rendered Tooltip component
35
35
  */
36
- export default function Tooltip({ children, content, disabled, size, theme, tipSide, tipAlignment, keepVisible, startVisible, onClose, className, }: TooltipProps): import("react").JSX.Element;
36
+ export default function Tooltip({ children, content, disabled, size, theme, tipSide, tipAlignment, keepVisible, startVisible, onClose, className, }: TooltipProps): import("react/jsx-runtime").JSX.Element;