@alixpartners/ui-components 2.5.7 → 2.6.1

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 (112) 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/Dialog.css +1 -1
  6. package/dist/assets/Tab.css +1 -1
  7. package/dist/assets/Tag.css +1 -1
  8. package/dist/assets/ap-icons-types.d.ts +1 -1
  9. package/dist/assets/ap-icons.d.ts +1 -1
  10. package/dist/assets/main.css +1 -1
  11. package/dist/components/Banner/Banner.d.ts +1 -1
  12. package/dist/components/Banner/Banner.test.js +1 -1
  13. package/dist/components/Button/Button.d.ts +1 -1
  14. package/dist/components/Button/Button.test.js +2 -2
  15. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  16. package/dist/components/Checkbox/Checkbox.js +3 -3
  17. package/dist/components/Checkbox/Checkbox.test.js +1 -1
  18. package/dist/components/CorusHeader/CorusHeader.d.ts +1 -1
  19. package/dist/components/CorusHeader/CorusHeader.js +45 -44
  20. package/dist/components/CorusHeader/CorusHeader.types.d.ts +1 -0
  21. package/dist/components/CorusHeader/DropdownItemContent.d.ts +1 -1
  22. package/dist/components/CorusHeader/DropdownMenu.d.ts +2 -1
  23. package/dist/components/CorusHeader/DropdownMenu.js +6 -5
  24. package/dist/components/CorusHeader/MegaMenuContent.d.ts +2 -1
  25. package/dist/components/CorusHeader/MegaMenuContent.js +11 -10
  26. package/dist/components/CorusHeader/UserProfileIcon.d.ts +1 -1
  27. package/dist/components/Creatable/Creatable.d.ts +1 -1
  28. package/dist/components/Creatable/Creatable.js +1 -1
  29. package/dist/components/Datepicker/Datepicker.d.ts +1 -1
  30. package/dist/components/Datepicker/Datepicker.js +1 -1
  31. package/dist/components/Datepicker/Datepicker.test.js +1 -1
  32. package/dist/components/Dialog/Dialog.d.ts +8 -2
  33. package/dist/components/Dialog/Dialog.js +183 -203
  34. package/dist/components/Dialog/Dialog.test.js +227 -202
  35. package/dist/components/DragAndDrop/DragAndDrop.d.ts +1 -1
  36. package/dist/components/DragAndDrop/DragAndDrop.test.js +2 -2
  37. package/dist/components/Dropdown/Dropdown.d.ts +3 -1
  38. package/dist/components/Dropdown/Dropdown.js +179 -172
  39. package/dist/components/FilePicker/FilePicker.d.ts +9 -9
  40. package/dist/components/FilePicker/FilePicker.test.js +2 -2
  41. package/dist/components/Ghost/Ghost.d.ts +1 -1
  42. package/dist/components/Ghost/Ghost.test.js +1 -1
  43. package/dist/components/Icon/Icon.d.ts +1 -1
  44. package/dist/components/Icons/IconsGallery.d.ts +1 -1
  45. package/dist/components/Icons/IconsGallery.js +1 -1
  46. package/dist/components/Illustration/Illustration.d.ts +1 -1
  47. package/dist/components/Illustration/Illustration.test.js +1 -1
  48. package/dist/components/Input/Input.test.js +1 -1
  49. package/dist/components/Logo/Logo.d.ts +1 -1
  50. package/dist/components/Logos/LogosGallery.d.ts +1 -1
  51. package/dist/components/NavBar/NavBar.d.ts +1 -1
  52. package/dist/components/NavBar/NavBar.js +1 -1
  53. package/dist/components/Radio/Radio.d.ts +1 -1
  54. package/dist/components/Radio/Radio.js +9 -9
  55. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  56. package/dist/components/RadioGroup/RadioGroup.js +11 -11
  57. package/dist/components/RadioGroup/RadioGroup.test.js +1 -1
  58. package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
  59. package/dist/components/RichTextEditor/RichTextEditor.js +2 -2
  60. package/dist/components/RichTextEditor/RichTextEditor.test.js +2 -2
  61. package/dist/components/Search/Search.d.ts +1 -1
  62. package/dist/components/Search/Search.test.js +1 -1
  63. package/dist/components/Spinner/Spinner.d.ts +1 -1
  64. package/dist/components/SplitButton/SplitButton.d.ts +1 -1
  65. package/dist/components/SplitButton/SplitButton.js +3 -3
  66. package/dist/components/SplitButton/SplitButton.test.js +1 -1
  67. package/dist/components/Tab/Tab.d.ts +5 -1
  68. package/dist/components/Tab/Tab.js +28 -24
  69. package/dist/components/TabNavigation/TabNavigation.d.ts +1 -1
  70. package/dist/components/Tag/Tag.d.ts +1 -1
  71. package/dist/components/Tag/Tag.js +1 -1
  72. package/dist/components/Tag/Tag.test.js +1 -1
  73. package/dist/components/TagsFields/TagsFields.d.ts +1 -1
  74. package/dist/components/TagsFields/TagsFields.js +1 -1
  75. package/dist/components/Textarea/Textarea.d.ts +1 -1
  76. package/dist/components/Textarea/Textarea.test.js +1 -1
  77. package/dist/components/Toast/Toast.test.js +1 -1
  78. package/dist/components/ToastProvider/ToastProvider.d.ts +2 -1
  79. package/dist/components/ToastProvider/ToastProvider.js +1 -1
  80. package/dist/components/ToastProvider/ToastProvider.test.js +4 -4
  81. package/dist/components/Toggle/Toggle.d.ts +1 -1
  82. package/dist/components/Toggle/Toggle.js +211 -126
  83. package/dist/components/Toggle/Toggle.test.js +1 -1
  84. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  85. package/dist/components/Tooltip/Tooltip.js +60 -61
  86. package/dist/{index-C2s_VtSb.js → index-6DGSlWJb.js} +3 -3
  87. package/dist/{index-Nyh2Wa71.js → index-6j3vTf--.js} +5 -5
  88. package/dist/index-B4szHVNJ.js +248 -0
  89. package/dist/{index-CFqDEbIR.js → index-BVZdJVFB.js} +192 -191
  90. package/dist/index-Bq1FiX6B.js +93 -0
  91. package/dist/index-CE9NpYQR.js +604 -0
  92. package/dist/index-CHy8gqvu.js +353 -0
  93. package/dist/index-CarlZuEo.js +1610 -0
  94. package/dist/{index-CCFDXH-J.js → index-CcsZYEYy.js} +29 -28
  95. package/dist/index-DH9SO8qV.js +221 -0
  96. package/dist/{index-D_L0ncPJ.js → index-IR8HlW5P.js} +4 -4
  97. package/dist/{index-DkTDHhag.js → index-banDzeKa.js} +1 -1
  98. package/dist/index-kgC_DL6e.js +216 -0
  99. package/dist/main.js +3 -3
  100. package/dist/storybook-docs-page.d.ts +1 -1
  101. package/dist/{useToast-Cz5MGKnw.js → useToast-CpwrYPvx.js} +1 -1
  102. package/dist/{vi.bdSIJ99Y-017e_Pkz.js → vi.bdSIJ99Y-DWCVXj6K.js} +3 -3
  103. package/dist/web.config +8 -8
  104. package/package.json +94 -94
  105. package/dist/RichTextEditor-kTQEDSL0.js +0 -477
  106. package/dist/index-C8H9A55g.js +0 -222
  107. package/dist/index-CCnm5-ML.js +0 -230
  108. package/dist/index-CfIcUHKK.js +0 -70
  109. package/dist/index-ChQc_Cm6.js +0 -1544
  110. package/dist/index-CmGGeUr0.js +0 -142
  111. package/dist/index-Ii4UOx3H.js +0 -599
  112. package/dist/index-z_kiwVc3.js +0 -237
@@ -1,122 +1,123 @@
1
- import { jsx as r, jsxs as m, Fragment as W } from "react/jsx-runtime";
2
- import * as l from "react";
3
- import { useState as he } from "react";
4
- import k from "../Button/Button.js";
5
- import Re from "../Icon/Icon.js";
6
- import { u as ye, d as O, P as h, c as v, b as Ne, e as Ee, f as Ie } from "../../index-z_kiwVc3.js";
7
- import { u as C } from "../../index-C2s_VtSb.js";
8
- import { P as Pe, D as be } from "../../index-CmGGeUr0.js";
9
- import { R as Ce, h as Oe, u as Ae, F as xe } from "../../index-CFqDEbIR.js";
10
- import { P as A } from "../../index-CfIcUHKK.js";
11
- import '../../assets/Dialog.css';var N = "Dialog", [G] = Ne(N), [Te, d] = G(N), L = (e) => {
1
+ import { jsx as i, Fragment as he, jsxs as D } from "react/jsx-runtime";
2
+ import * as s from "react";
3
+ import { useState as Re } from "react";
4
+ import { u as ye, a as C, P as h, c as v, b as Pe, e as be } from "../../index-B4szHVNJ.js";
5
+ import { u as E } from "../../index-6DGSlWJb.js";
6
+ import { P as Oe, u as Ne, D as Ie } from "../../index-kgC_DL6e.js";
7
+ import { R as Ee, h as Ce, u as xe, F as Ae } from "../../index-BVZdJVFB.js";
8
+ import { P as x } from "../../index-Bq1FiX6B.js";
9
+ import { c as we } from "../../clsx-OuTLNxxd.js";
10
+ import S from "../Button/Button.js";
11
+ import Me from "../Icon/Icon.js";
12
+ import '../../assets/Dialog.css';var P = "Dialog", [k] = Pe(P), [Fe, u] = k(P), L = (e) => {
12
13
  const {
13
- __scopeDialog: a,
14
- children: i,
14
+ __scopeDialog: l,
15
+ children: r,
15
16
  open: t,
16
- defaultOpen: n,
17
+ defaultOpen: a,
17
18
  onOpenChange: o,
18
- modal: s = !0
19
- } = e, c = l.useRef(null), u = l.useRef(null), [f, D] = ye({
19
+ modal: n = !0
20
+ } = e, c = s.useRef(null), g = s.useRef(null), [_, m] = ye({
20
21
  prop: t,
21
- defaultProp: n ?? !1,
22
+ defaultProp: a ?? !1,
22
23
  onChange: o,
23
- caller: N
24
+ caller: P
24
25
  });
25
- return /* @__PURE__ */ r(
26
- Te,
26
+ return /* @__PURE__ */ i(
27
+ Fe,
27
28
  {
28
- scope: a,
29
+ scope: l,
29
30
  triggerRef: c,
30
- contentRef: u,
31
- contentId: C(),
32
- titleId: C(),
33
- descriptionId: C(),
34
- open: f,
35
- onOpenChange: D,
36
- onOpenToggle: l.useCallback(() => D((E) => !E), [D]),
37
- modal: s,
38
- children: i
31
+ contentRef: g,
32
+ contentId: E(),
33
+ titleId: E(),
34
+ descriptionId: E(),
35
+ open: _,
36
+ onOpenChange: m,
37
+ onOpenToggle: s.useCallback(() => m((b) => !b), [m]),
38
+ modal: n,
39
+ children: r
39
40
  }
40
41
  );
41
42
  };
42
- L.displayName = N;
43
- var $ = "DialogTrigger", z = l.forwardRef(
44
- (e, a) => {
45
- const { __scopeDialog: i, ...t } = e, n = d($, i), o = O(a, n.triggerRef);
46
- return /* @__PURE__ */ r(
43
+ L.displayName = P;
44
+ var G = "DialogTrigger", j = s.forwardRef(
45
+ (e, l) => {
46
+ const { __scopeDialog: r, ...t } = e, a = u(G, r), o = C(l, a.triggerRef);
47
+ return /* @__PURE__ */ i(
47
48
  h.button,
48
49
  {
49
50
  type: "button",
50
51
  "aria-haspopup": "dialog",
51
- "aria-expanded": n.open,
52
- "aria-controls": n.contentId,
53
- "data-state": M(n.open),
52
+ "aria-expanded": a.open,
53
+ "aria-controls": a.open ? a.contentId : void 0,
54
+ "data-state": w(a.open),
54
55
  ...t,
55
56
  ref: o,
56
- onClick: v(e.onClick, n.onOpenToggle)
57
+ onClick: v(e.onClick, a.onOpenToggle)
57
58
  }
58
59
  );
59
60
  }
60
61
  );
61
- z.displayName = $;
62
- var x = "DialogPortal", [Me, B] = G(x, {
62
+ j.displayName = G;
63
+ var A = "DialogPortal", [Te, z] = k(A, {
63
64
  forceMount: void 0
64
65
  }), K = (e) => {
65
- const { __scopeDialog: a, forceMount: i, children: t, container: n } = e, o = d(x, a);
66
- return /* @__PURE__ */ r(Me, { scope: a, forceMount: i, children: l.Children.map(t, (s) => /* @__PURE__ */ r(A, { present: i || o.open, children: /* @__PURE__ */ r(Pe, { asChild: !0, container: n, children: s }) })) });
66
+ const { __scopeDialog: l, forceMount: r, children: t, container: a } = e, o = u(A, l);
67
+ return /* @__PURE__ */ i(Te, { scope: l, forceMount: r, children: s.Children.map(t, (n) => /* @__PURE__ */ i(x, { present: r || o.open, children: /* @__PURE__ */ i(Oe, { asChild: !0, container: a, children: n }) })) });
67
68
  };
68
- K.displayName = x;
69
- var y = "DialogOverlay", j = l.forwardRef(
70
- (e, a) => {
71
- const i = B(y, e.__scopeDialog), { forceMount: t = i.forceMount, ...n } = e, o = d(y, e.__scopeDialog);
72
- return o.modal ? /* @__PURE__ */ r(A, { present: t || o.open, children: /* @__PURE__ */ r(Fe, { ...n, ref: a }) }) : null;
69
+ K.displayName = A;
70
+ var y = "DialogOverlay", H = s.forwardRef(
71
+ (e, l) => {
72
+ const r = z(y, e.__scopeDialog), { forceMount: t = r.forceMount, ...a } = e, o = u(y, e.__scopeDialog);
73
+ return o.modal ? /* @__PURE__ */ i(x, { present: t || o.open, children: /* @__PURE__ */ i(ke, { ...a, ref: l }) }) : null;
73
74
  }
74
75
  );
75
- j.displayName = y;
76
- var we = Ee("DialogOverlay.RemoveScroll"), Fe = l.forwardRef(
77
- (e, a) => {
78
- const { __scopeDialog: i, ...t } = e, n = d(y, i);
76
+ H.displayName = y;
77
+ var Se = be("DialogOverlay.RemoveScroll"), ke = s.forwardRef(
78
+ (e, l) => {
79
+ const { __scopeDialog: r, ...t } = e, a = u(y, r), o = Ne(), n = C(l, o);
79
80
  return (
80
81
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
81
82
  // ie. when `Overlay` and `Content` are siblings
82
- /* @__PURE__ */ r(Ce, { as: we, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ r(
83
+ /* @__PURE__ */ i(Ee, { as: Se, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ i(
83
84
  h.div,
84
85
  {
85
- "data-state": M(n.open),
86
+ "data-state": w(a.open),
86
87
  ...t,
87
- ref: a,
88
+ ref: n,
88
89
  style: { pointerEvents: "auto", ...t.style }
89
90
  }
90
91
  ) })
91
92
  );
92
93
  }
93
- ), _ = "DialogContent", H = l.forwardRef(
94
- (e, a) => {
95
- const i = B(_, e.__scopeDialog), { forceMount: t = i.forceMount, ...n } = e, o = d(_, e.__scopeDialog);
96
- return /* @__PURE__ */ r(A, { present: t || o.open, children: o.modal ? /* @__PURE__ */ r(Se, { ...n, ref: a }) : /* @__PURE__ */ r(We, { ...n, ref: a }) });
94
+ ), p = "DialogContent", J = s.forwardRef(
95
+ (e, l) => {
96
+ const r = z(p, e.__scopeDialog), { forceMount: t = r.forceMount, ...a } = e, o = u(p, e.__scopeDialog);
97
+ return /* @__PURE__ */ i(x, { present: t || o.open, children: o.modal ? /* @__PURE__ */ i(Le, { ...a, ref: l }) : /* @__PURE__ */ i(Ge, { ...a, ref: l }) });
97
98
  }
98
99
  );
99
- H.displayName = _;
100
- var Se = l.forwardRef(
101
- (e, a) => {
102
- const i = d(_, e.__scopeDialog), t = l.useRef(null), n = O(a, i.contentRef, t);
103
- return l.useEffect(() => {
100
+ J.displayName = p;
101
+ var Le = s.forwardRef(
102
+ (e, l) => {
103
+ const r = u(p, e.__scopeDialog), t = s.useRef(null), a = C(l, r.contentRef, t);
104
+ return s.useEffect(() => {
104
105
  const o = t.current;
105
- if (o) return Oe(o);
106
- }, []), /* @__PURE__ */ r(
107
- V,
106
+ if (o) return Ce(o);
107
+ }, []), /* @__PURE__ */ i(
108
+ B,
108
109
  {
109
110
  ...e,
110
- ref: n,
111
- trapFocus: i.open,
112
- disableOutsidePointerEvents: !0,
111
+ ref: a,
112
+ trapFocus: r.open,
113
+ disableOutsidePointerEvents: r.open,
113
114
  onCloseAutoFocus: v(e.onCloseAutoFocus, (o) => {
114
- var s;
115
- o.preventDefault(), (s = i.triggerRef.current) == null || s.focus();
115
+ var n;
116
+ o.preventDefault(), (n = r.triggerRef.current) == null || n.focus();
116
117
  }),
117
118
  onPointerDownOutside: v(e.onPointerDownOutside, (o) => {
118
- const s = o.detail.originalEvent, c = s.button === 0 && s.ctrlKey === !0;
119
- (s.button === 2 || c) && o.preventDefault();
119
+ const n = o.detail.originalEvent, c = n.button === 0 && n.ctrlKey === !0;
120
+ (n.button === 2 || c) && o.preventDefault();
120
121
  }),
121
122
  onFocusOutside: v(
122
123
  e.onFocusOutside,
@@ -125,185 +126,164 @@ var Se = l.forwardRef(
125
126
  }
126
127
  );
127
128
  }
128
- ), We = l.forwardRef(
129
- (e, a) => {
130
- const i = d(_, e.__scopeDialog), t = l.useRef(!1), n = l.useRef(!1);
131
- return /* @__PURE__ */ r(
132
- V,
129
+ ), Ge = s.forwardRef(
130
+ (e, l) => {
131
+ const r = u(p, e.__scopeDialog), t = s.useRef(!1), a = s.useRef(!1);
132
+ return /* @__PURE__ */ i(
133
+ B,
133
134
  {
134
135
  ...e,
135
- ref: a,
136
+ ref: l,
136
137
  trapFocus: !1,
137
138
  disableOutsidePointerEvents: !1,
138
139
  onCloseAutoFocus: (o) => {
139
- var s, c;
140
- (s = e.onCloseAutoFocus) == null || s.call(e, o), o.defaultPrevented || (t.current || (c = i.triggerRef.current) == null || c.focus(), o.preventDefault()), t.current = !1, n.current = !1;
140
+ var n, c;
141
+ (n = e.onCloseAutoFocus) == null || n.call(e, o), o.defaultPrevented || (t.current || (c = r.triggerRef.current) == null || c.focus(), o.preventDefault()), t.current = !1, a.current = !1;
141
142
  },
142
143
  onInteractOutside: (o) => {
143
- var u, f;
144
- (u = e.onInteractOutside) == null || u.call(e, o), o.defaultPrevented || (t.current = !0, o.detail.originalEvent.type === "pointerdown" && (n.current = !0));
145
- const s = o.target;
146
- ((f = i.triggerRef.current) == null ? void 0 : f.contains(s)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && n.current && o.preventDefault();
144
+ var g, _;
145
+ (g = e.onInteractOutside) == null || g.call(e, o), o.defaultPrevented || (t.current = !0, o.detail.originalEvent.type === "pointerdown" && (a.current = !0));
146
+ const n = o.target;
147
+ ((_ = r.triggerRef.current) == null ? void 0 : _.contains(n)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && a.current && o.preventDefault();
147
148
  }
148
149
  }
149
150
  );
150
151
  }
151
- ), V = l.forwardRef(
152
- (e, a) => {
153
- const { __scopeDialog: i, trapFocus: t, onOpenAutoFocus: n, onCloseAutoFocus: o, ...s } = e, c = d(_, i), u = l.useRef(null), f = O(a, u);
154
- return Ae(), /* @__PURE__ */ m(W, { children: [
155
- /* @__PURE__ */ r(
156
- xe,
157
- {
158
- asChild: !0,
159
- loop: !0,
160
- trapped: t,
161
- onMountAutoFocus: n,
162
- onUnmountAutoFocus: o,
163
- children: /* @__PURE__ */ r(
164
- be,
165
- {
166
- role: "dialog",
167
- id: c.contentId,
168
- "aria-describedby": c.descriptionId,
169
- "aria-labelledby": c.titleId,
170
- "data-state": M(c.open),
171
- ...s,
172
- ref: f,
173
- onDismiss: () => c.onOpenChange(!1)
174
- }
175
- )
176
- }
177
- ),
178
- /* @__PURE__ */ m(W, { children: [
179
- /* @__PURE__ */ r(ke, { titleId: c.titleId }),
180
- /* @__PURE__ */ r(Le, { contentRef: u, descriptionId: c.descriptionId })
181
- ] })
182
- ] });
152
+ ), B = s.forwardRef(
153
+ (e, l) => {
154
+ const { __scopeDialog: r, trapFocus: t, onOpenAutoFocus: a, onCloseAutoFocus: o, ...n } = e, c = u(p, r);
155
+ return xe(), /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i(
156
+ Ae,
157
+ {
158
+ asChild: !0,
159
+ loop: !0,
160
+ trapped: t,
161
+ onMountAutoFocus: a,
162
+ onUnmountAutoFocus: o,
163
+ children: /* @__PURE__ */ i(
164
+ Ie,
165
+ {
166
+ role: "dialog",
167
+ id: c.contentId,
168
+ "aria-describedby": c.descriptionId,
169
+ "aria-labelledby": c.titleId,
170
+ "data-state": w(c.open),
171
+ ...n,
172
+ ref: l,
173
+ deferPointerDownOutside: !0,
174
+ onDismiss: () => c.onOpenChange(!1)
175
+ }
176
+ )
177
+ }
178
+ ) });
183
179
  }
184
- ), T = "DialogTitle", q = l.forwardRef(
185
- (e, a) => {
186
- const { __scopeDialog: i, ...t } = e, n = d(T, i);
187
- return /* @__PURE__ */ r(h.h2, { id: n.titleId, ...t, ref: a });
180
+ ), Q = "DialogTitle", U = s.forwardRef(
181
+ (e, l) => {
182
+ const { __scopeDialog: r, ...t } = e, a = u(Q, r);
183
+ return /* @__PURE__ */ i(h.h2, { id: a.titleId, ...t, ref: l });
188
184
  }
189
185
  );
190
- q.displayName = T;
191
- var J = "DialogDescription", Q = l.forwardRef(
192
- (e, a) => {
193
- const { __scopeDialog: i, ...t } = e, n = d(J, i);
194
- return /* @__PURE__ */ r(h.p, { id: n.descriptionId, ...t, ref: a });
186
+ U.displayName = Q;
187
+ var V = "DialogDescription", Y = s.forwardRef(
188
+ (e, l) => {
189
+ const { __scopeDialog: r, ...t } = e, a = u(V, r);
190
+ return /* @__PURE__ */ i(h.p, { id: a.descriptionId, ...t, ref: l });
195
191
  }
196
192
  );
197
- Q.displayName = J;
198
- var U = "DialogClose", Y = l.forwardRef(
199
- (e, a) => {
200
- const { __scopeDialog: i, ...t } = e, n = d(U, i);
201
- return /* @__PURE__ */ r(
193
+ Y.displayName = V;
194
+ var Z = "DialogClose", $ = s.forwardRef(
195
+ (e, l) => {
196
+ const { __scopeDialog: r, ...t } = e, a = u(Z, r);
197
+ return /* @__PURE__ */ i(
202
198
  h.button,
203
199
  {
204
200
  type: "button",
205
201
  ...t,
206
- ref: a,
207
- onClick: v(e.onClick, () => n.onOpenChange(!1))
202
+ ref: l,
203
+ onClick: v(e.onClick, () => a.onOpenChange(!1))
208
204
  }
209
205
  );
210
206
  }
211
207
  );
212
- Y.displayName = U;
213
- function M(e) {
208
+ $.displayName = Z;
209
+ function w(e) {
214
210
  return e ? "open" : "closed";
215
211
  }
216
- var Z = "DialogTitleWarning", [nt, X] = Ie(Z, {
217
- contentName: _,
218
- titleName: T,
219
- docsSlug: "dialog"
220
- }), ke = ({ titleId: e }) => {
221
- const a = X(Z), i = `\`${a.contentName}\` requires a \`${a.titleName}\` for the component to be accessible for screen reader users.
222
-
223
- If you want to hide the \`${a.titleName}\`, you can wrap it with our VisuallyHidden component.
224
-
225
- For more information, see https://radix-ui.com/primitives/docs/components/${a.docsSlug}`;
226
- return l.useEffect(() => {
227
- e && (document.getElementById(e) || console.error(i));
228
- }, [i, e]), null;
229
- }, Ge = "DialogDescriptionWarning", Le = ({ contentRef: e, descriptionId: a }) => {
230
- const t = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${X(Ge).contentName}}.`;
231
- return l.useEffect(() => {
232
- var o;
233
- const n = (o = e.current) == null ? void 0 : o.getAttribute("aria-describedby");
234
- a && n && (document.getElementById(a) || console.warn(t));
235
- }, [t, e, a]), null;
236
- }, $e = L, ze = z, Be = K, Ke = j, je = H, He = q, Ve = Q, qe = Y;
237
- const Je = "Dialog-module__dialog___r4ljx", g = {
212
+ const je = "Dialog-module__dialog___r4ljx", d = {
238
213
  "dialog-overlay": "Dialog-module__dialog-overlay___mgT2B",
239
- dialog: Je,
214
+ dialog: je,
215
+ "dialog-width-auto": "Dialog-module__dialog-width-auto___96jJl",
216
+ "dialog-scrollable": "Dialog-module__dialog-scrollable___1ch32",
240
217
  "dialog-illustration": "Dialog-module__dialog-illustration___IHiQl",
218
+ "dialog-buttons": "Dialog-module__dialog-buttons___x-v2M",
241
219
  "dialog-content": "Dialog-module__dialog-content___3hOGc",
242
- "dialog-title": "Dialog-module__dialog-title___KACAJ",
243
220
  "dialog-description": "Dialog-module__dialog-description___hL8fm",
244
- "dialog-buttons": "Dialog-module__dialog-buttons___x-v2M",
221
+ "dialog-title": "Dialog-module__dialog-title___KACAJ",
245
222
  "dialog-close-button": "Dialog-module__dialog-close-button___-PzEz",
246
223
  "dialog-close-button-icon": "Dialog-module__dialog-close-button-icon___BeGg2"
247
224
  };
248
- function rt({
225
+ function $e({
249
226
  children: e,
250
- isOpen: a,
251
- defaultOpen: i = !1,
227
+ isOpen: l,
228
+ defaultOpen: r = !1,
252
229
  onClose: t,
253
- onOpenChange: n,
230
+ onOpenChange: a,
254
231
  showCloseButton: o,
255
- closeOnOverlayClick: s = !0,
232
+ closeOnOverlayClick: n = !0,
256
233
  closeOnEscape: c = !0,
257
- modal: u = !0,
258
- container: f,
259
- title: D,
260
- description: E,
261
- illustrationSrc: w,
234
+ modal: g = !0,
235
+ container: _,
236
+ title: m,
237
+ description: b,
238
+ descriptionScrollable: q,
239
+ widthAuto: W,
240
+ illustrationSrc: M,
262
241
  confirmButtonText: F,
263
- cancelButtonText: S,
242
+ confirmButtonDisabled: X,
243
+ cancelButtonText: T,
264
244
  confirmButtonType: ee = "primary",
265
- cancelButtonType: te = "primary",
266
- confirmButtonVariant: oe = "default",
245
+ cancelButtonType: oe = "primary",
246
+ confirmButtonVariant: te = "default",
267
247
  cancelButtonVariant: ae = "cancel",
268
- confirmButtonSize: ne = "md",
248
+ confirmButtonSize: ie = "md",
269
249
  cancelButtonSize: re = "md",
270
- confirmButtonIcon: ie,
271
- cancelButtonIcon: le,
272
- onConfirm: I,
273
- onCancel: P,
250
+ confirmButtonIcon: le,
251
+ cancelButtonIcon: ne,
252
+ onConfirm: O,
253
+ onCancel: N,
274
254
  className: se,
275
255
  ...ce
276
256
  }) {
277
- const [de, b] = he(i), R = a !== void 0, ue = R ? a : de, ge = o !== void 0 ? o : t !== void 0, fe = (p) => {
278
- R || b(p), n == null || n(p), p || t == null || t();
279
- }, pe = (p) => {
280
- c || p.preventDefault();
281
- }, me = (p) => {
282
- s || p.preventDefault();
283
- }, _e = () => {
284
- I == null || I(), R || b(!1), t == null || t();
257
+ const [de, I] = Re(r), R = l !== void 0, ue = R ? l : de, ge = o !== void 0 ? o : t !== void 0, fe = (f) => {
258
+ R || I(f), a == null || a(f), f || t == null || t();
259
+ }, _e = (f) => {
260
+ c || f.preventDefault();
261
+ }, pe = (f) => {
262
+ n || f.preventDefault();
263
+ }, me = () => {
264
+ O == null || O(), R || I(!1), t == null || t();
285
265
  }, De = () => {
286
- P == null || P(), R || b(!1), t == null || t();
287
- }, ve = /* @__PURE__ */ m($e, { open: ue, onOpenChange: fe, modal: u, children: [
288
- e && /* @__PURE__ */ r(ze, { asChild: !0, children: /* @__PURE__ */ r("div", { children: e }) }),
289
- /* @__PURE__ */ m(Be, { container: f, children: [
290
- /* @__PURE__ */ r(Ke, { className: g["dialog-overlay"] }),
291
- /* @__PURE__ */ m(je, { className: g.dialog, onEscapeKeyDown: pe, onInteractOutside: me, children: [
292
- ge && /* @__PURE__ */ r(qe, { className: g["dialog-close-button"], "aria-label": "Close dialog", children: /* @__PURE__ */ r(Re, { className: g["dialog-close-button-icon"], icon: "ap-icon-close" }) }),
293
- w && /* @__PURE__ */ r("div", { className: g["dialog-illustration"], children: /* @__PURE__ */ r("img", { src: w, alt: "Dialog illustration" }) }),
294
- /* @__PURE__ */ m("div", { className: g["dialog-content"], children: [
295
- /* @__PURE__ */ r(He, { className: g["dialog-title"], children: D }),
296
- /* @__PURE__ */ r(Ve, { asChild: !0, children: /* @__PURE__ */ r("div", { className: g["dialog-description"], children: E }) })
266
+ N == null || N(), R || I(!1), t == null || t();
267
+ }, ve = /* @__PURE__ */ D(L, { open: ue, onOpenChange: fe, modal: g, children: [
268
+ e && /* @__PURE__ */ i(j, { asChild: !0, children: /* @__PURE__ */ i("div", { children: e }) }),
269
+ /* @__PURE__ */ D(K, { container: _, children: [
270
+ /* @__PURE__ */ i(H, { className: d["dialog-overlay"] }),
271
+ /* @__PURE__ */ D(J, { className: we(d.dialog, q && d["dialog-scrollable"], W && d["dialog-width-auto"]), onEscapeKeyDown: _e, onInteractOutside: pe, children: [
272
+ ge && /* @__PURE__ */ i($, { className: d["dialog-close-button"], "aria-label": "Close dialog", children: /* @__PURE__ */ i(Me, { className: d["dialog-close-button-icon"], icon: "ap-icon-close" }) }),
273
+ M && /* @__PURE__ */ i("div", { className: d["dialog-illustration"], children: /* @__PURE__ */ i("img", { src: M, alt: "Dialog illustration" }) }),
274
+ /* @__PURE__ */ D("div", { className: d["dialog-content"], children: [
275
+ /* @__PURE__ */ i(U, { className: d["dialog-title"], children: m }),
276
+ /* @__PURE__ */ i(Y, { asChild: !0, children: /* @__PURE__ */ i("div", { className: d["dialog-description"], children: b }) })
297
277
  ] }),
298
- /* @__PURE__ */ m("div", { className: g["dialog-buttons"], children: [
299
- S && /* @__PURE__ */ r(k, { type: te, variant: ae, size: re, onClick: De, icon: le, children: S }),
300
- F && /* @__PURE__ */ r(k, { type: ee, variant: oe, size: ne, onClick: _e, icon: ie, children: F })
278
+ /* @__PURE__ */ D("div", { className: d["dialog-buttons"], children: [
279
+ T && /* @__PURE__ */ i(S, { type: oe, variant: ae, size: re, onClick: De, icon: ne, children: T }),
280
+ F && /* @__PURE__ */ i(S, { type: ee, variant: te, size: ie, onClick: me, icon: le, disabled: X, children: F })
301
281
  ] })
302
282
  ] })
303
283
  ] })
304
284
  ] });
305
- return /* @__PURE__ */ r("div", { className: se, ...ce, children: ve });
285
+ return /* @__PURE__ */ i("div", { className: se, ...ce, children: ve });
306
286
  }
307
287
  export {
308
- rt as default
288
+ $e as default
309
289
  };