@arc-ui/components 11.24.2 → 11.26.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 (67) hide show
  1. package/dist/Button/Button.cjs.js +1 -1
  2. package/dist/Button/Button.esm.js +1 -1
  3. package/dist/DatePicker/DatePicker.cjs.js +1276 -22
  4. package/dist/DatePicker/DatePicker.esm.js +1245 -10
  5. package/dist/InformationCard/InformationCard.cjs.js +1 -1
  6. package/dist/InformationCard/InformationCard.esm.js +1 -1
  7. package/dist/Modal/Modal.cjs.js +438 -225
  8. package/dist/Modal/Modal.esm.js +420 -225
  9. package/dist/PaginationSimple/PaginationSimple.cjs.js +23 -2
  10. package/dist/PaginationSimple/PaginationSimple.esm.js +23 -2
  11. package/dist/Select/Select.cjs.js +1514 -1065
  12. package/dist/Select/Select.esm.js +1496 -1066
  13. package/dist/SiteHeader/SiteHeader.cjs.js +2 -2
  14. package/dist/SiteHeader/SiteHeader.esm.js +2 -2
  15. package/dist/SiteHeaderV2/SiteHeaderV2.cjs.js +2 -2
  16. package/dist/SiteHeaderV2/SiteHeaderV2.esm.js +2 -2
  17. package/dist/Tabs/Tabs.cjs.js +4 -6
  18. package/dist/Tabs/Tabs.esm.js +4 -6
  19. package/dist/TextArea/TextArea.cjs.js +10 -13
  20. package/dist/TextArea/TextArea.esm.js +10 -13
  21. package/dist/Toast/Toast.cjs.js +4 -6
  22. package/dist/Toast/Toast.esm.js +4 -6
  23. package/dist/UniversalHeader/UniversalHeader.cjs.js +2 -2
  24. package/dist/UniversalHeader/UniversalHeader.esm.js +2 -2
  25. package/dist/_shared/cjs/{Button-6ba21d3b.js → Button-5b28f0ce.js} +3 -3
  26. package/dist/_shared/cjs/{SiteHeader.rehydrator-9d8f3dad.js → SiteHeader.rehydrator-8fa9d174.js} +1 -1
  27. package/dist/_shared/cjs/{SiteHeaderV2-ce1c8737.js → SiteHeaderV2-ca2f13a8.js} +1 -1
  28. package/dist/_shared/cjs/{Tabs-bc9fac46.js → Tabs-89455281.js} +19 -15
  29. package/dist/_shared/cjs/{Toast-26207fef.js → Toast-c760c89d.js} +32 -14
  30. package/dist/_shared/cjs/{UniversalHeader-b8389447.js → UniversalHeader-73e154eb.js} +6 -2
  31. package/dist/_shared/cjs/component-4979b2e7.js +409 -0
  32. package/dist/_shared/cjs/{index-77ab5c6a.js → floating-ui.react-dom-08b8b87c.js} +12 -284
  33. package/dist/_shared/cjs/index-1efbba95.js +1252 -0
  34. package/dist/_shared/cjs/{index-74004a9c.js → index-4edec793.js} +1 -1
  35. package/dist/_shared/cjs/{index-dd1d18ea.js → index-7641213c.js} +127 -2
  36. package/dist/_shared/cjs/{index-9f99d686.js → index-af744fa9.js} +1 -1
  37. package/dist/_shared/cjs/{index-6eb396a3.js → index-fb0cad18.js} +1 -1
  38. package/dist/_shared/esm/{Button-a7d134c6.js → Button-5b48b7ce.js} +3 -3
  39. package/dist/_shared/esm/{SiteHeader.rehydrator-2ec02ee7.js → SiteHeader.rehydrator-8f3c5d6e.js} +1 -1
  40. package/dist/_shared/esm/{SiteHeaderV2-a7c1b1cb.js → SiteHeaderV2-cb081752.js} +1 -1
  41. package/dist/_shared/esm/{Tabs-9485cab6.js → Tabs-959e885d.js} +10 -6
  42. package/dist/_shared/esm/{Toast-fcbfc194.js → Toast-a590067d.js} +25 -7
  43. package/dist/_shared/esm/{UniversalHeader-80c7313f.js → UniversalHeader-96bfbacc.js} +6 -2
  44. package/dist/_shared/esm/component-d7b471ff.js +382 -0
  45. package/dist/_shared/esm/{index-b84a20c6.js → floating-ui.react-dom-1bb71aae.js} +4 -281
  46. package/dist/_shared/esm/{index-7b531fa7.js → index-0ae23b06.js} +126 -2
  47. package/dist/_shared/esm/index-307f1bbc.js +1212 -0
  48. package/dist/_shared/esm/{index-044da8d0.js → index-9e54cc7d.js} +1 -1
  49. package/dist/_shared/esm/{index-efa9be1a.js → index-af7b6e55.js} +1 -1
  50. package/dist/_shared/esm/{index-2cfab9f2.js → index-ebe72f34.js} +1 -1
  51. package/dist/index.es.js +3608 -2938
  52. package/dist/index.es.js.map +1 -1
  53. package/dist/index.js +3591 -2921
  54. package/dist/index.js.map +1 -1
  55. package/dist/styles.css +2 -2
  56. package/dist/types/components/Button/Button.d.ts +12 -0
  57. package/dist/types/components/PaginationSimple/PaginationSimple.d.ts +28 -0
  58. package/dist/types/components/UniversalHeader/UniversalHeader.d.ts +4 -0
  59. package/package.json +3 -3
  60. package/dist/_shared/cjs/Combination-9974f2e2.js +0 -1330
  61. package/dist/_shared/cjs/index-a31e64a9.js +0 -27
  62. package/dist/_shared/cjs/index-d38f1bd0.js +0 -131
  63. package/dist/_shared/cjs/index-dcfdd5da.js +0 -11
  64. package/dist/_shared/esm/Combination-e9f7e64e.js +0 -1301
  65. package/dist/_shared/esm/index-25a5b393.js +0 -25
  66. package/dist/_shared/esm/index-a624de47.js +0 -9
  67. package/dist/_shared/esm/index-ca72c9d5.js +0 -129
@@ -4,21 +4,18 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var filterDataAttrs = require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
6
6
  var React = require('react');
7
- var index$3 = require('../_shared/cjs/index-9947ac13.js');
7
+ var index$1 = require('../_shared/cjs/index-9947ac13.js');
8
8
  var BtIconCrossAlt2Px_esm = require('../_shared/cjs/BtIconCrossAlt2Px.esm-1452b14b.js');
9
- var _extends = require('../_shared/cjs/extends-8c5e4b48.js');
10
- var index = require('../_shared/cjs/index-dd1d18ea.js');
11
- var index$1 = require('../_shared/cjs/index-6eb396a3.js');
12
- var Combination = require('../_shared/cjs/Combination-9974f2e2.js');
13
- var index$2 = require('../_shared/cjs/index-d38f1bd0.js');
9
+ var index = require('../_shared/cjs/index-1efbba95.js');
10
+ var jsxRuntime = require('react/jsx-runtime');
14
11
  var Icon = require('../_shared/cjs/Icon-b46897a3.js');
15
12
  var Base = require('../_shared/cjs/Base-4676f12e.js');
16
13
  var Heading = require('../_shared/cjs/Heading-27cba320.js');
17
- var Button = require('../_shared/cjs/Button-6ba21d3b.js');
14
+ var Button = require('../_shared/cjs/Button-5b28f0ce.js');
18
15
  var Text = require('../_shared/cjs/Text-606ca3a2.js');
19
16
  var VerticalSpace = require('../_shared/cjs/VerticalSpace-dc53bb70.js');
20
17
  require('react-dom');
21
- require('../_shared/cjs/index-74004a9c.js');
18
+ require('../_shared/cjs/component-4979b2e7.js');
22
19
  require('../_shared/cjs/suffix-modifier-64dcd338.js');
23
20
  require('../_shared/cjs/Surface-038db6e1.js');
24
21
  require('../_shared/cjs/BtIconChevronLeftMid.esm-0aaa6770.js');
@@ -26,234 +23,450 @@ require('../_shared/cjs/BtIconChevronRightMid.esm-d01ebbd4.js');
26
23
 
27
24
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
28
25
 
26
+ function _interopNamespace(e) {
27
+ if (e && e.__esModule) return e;
28
+ var n = Object.create(null);
29
+ if (e) {
30
+ Object.keys(e).forEach(function (k) {
31
+ if (k !== 'default') {
32
+ var d = Object.getOwnPropertyDescriptor(e, k);
33
+ Object.defineProperty(n, k, d.get ? d : {
34
+ enumerable: true,
35
+ get: function () { return e[k]; }
36
+ });
37
+ }
38
+ });
39
+ }
40
+ n["default"] = e;
41
+ return Object.freeze(n);
42
+ }
43
+
44
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
45
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
30
46
 
31
- /* -------------------------------------------------------------------------------------------------
32
- * Dialog
33
- * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DIALOG_NAME = 'Dialog';
34
- const [$5d3850c4d0b4e6c7$var$createDialogContext, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41] = index.$c512c27ab02ef895$export$50c7b4e9d9f19c1($5d3850c4d0b4e6c7$var$DIALOG_NAME);
35
- const [$5d3850c4d0b4e6c7$var$DialogProvider, $5d3850c4d0b4e6c7$var$useDialogContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$DIALOG_NAME);
36
- const $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 = (props)=>{
37
- const { __scopeDialog: __scopeDialog , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props;
38
- const triggerRef = React.useRef(null);
39
- const contentRef = React.useRef(null);
40
- const [open = false, setOpen] = index.$71cd76cc60e0454e$export$6f32135080cb4c3({
41
- prop: openProp,
42
- defaultProp: defaultOpen,
43
- onChange: onOpenChange
44
- });
45
- return /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogProvider, {
46
- scope: __scopeDialog,
47
- triggerRef: triggerRef,
48
- contentRef: contentRef,
49
- contentId: index$1.$1746a345f3d73bb7$export$f680877a34711e37(),
50
- titleId: index$1.$1746a345f3d73bb7$export$f680877a34711e37(),
51
- descriptionId: index$1.$1746a345f3d73bb7$export$f680877a34711e37(),
52
- open: open,
53
- onOpenChange: setOpen,
54
- onOpenToggle: React.useCallback(()=>setOpen((prevOpen)=>!prevOpen
55
- )
56
- , [
57
- setOpen
58
- ]),
59
- modal: modal
60
- }, children);
47
+ function useStateMachine(initialState, machine) {
48
+ return React__namespace.useReducer((state, event) => {
49
+ const nextState = machine[state][event];
50
+ return nextState ?? state;
51
+ }, initialState);
52
+ }
53
+
54
+ // packages/react/presence/src/Presence.tsx
55
+ var Presence = (props) => {
56
+ const { present, children } = props;
57
+ const presence = usePresence(present);
58
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React__namespace.Children.only(children);
59
+ const ref = index.useComposedRefs(presence.ref, getElementRef(child));
60
+ const forceMount = typeof children === "function";
61
+ return forceMount || presence.isPresent ? React__namespace.cloneElement(child, { ref }) : null;
61
62
  };
62
- /* -------------------------------------------------------------------------------------------------
63
- * DialogPortal
64
- * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$PORTAL_NAME = 'DialogPortal';
65
- const [$5d3850c4d0b4e6c7$var$PortalProvider, $5d3850c4d0b4e6c7$var$usePortalContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, {
66
- forceMount: undefined
67
- });
68
- const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props)=>{
69
- const { __scopeDialog: __scopeDialog , forceMount: forceMount , children: children , container: container } = props;
70
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
71
- return /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$PortalProvider, {
72
- scope: __scopeDialog,
73
- forceMount: forceMount
74
- }, React.Children.map(children, (child)=>/*#__PURE__*/ React.createElement(index$2.$921a889cee6df7e8$export$99c2b779aa4e8b8b, {
75
- present: forceMount || context.open
76
- }, /*#__PURE__*/ React.createElement(Combination.$f1701beae083dbae$export$602eac185826482c, {
77
- asChild: true,
78
- container: container
79
- }, child))
80
- ));
63
+ Presence.displayName = "Presence";
64
+ function usePresence(present) {
65
+ const [node, setNode] = React__namespace.useState();
66
+ const stylesRef = React__namespace.useRef({});
67
+ const prevPresentRef = React__namespace.useRef(present);
68
+ const prevAnimationNameRef = React__namespace.useRef("none");
69
+ const initialState = present ? "mounted" : "unmounted";
70
+ const [state, send] = useStateMachine(initialState, {
71
+ mounted: {
72
+ UNMOUNT: "unmounted",
73
+ ANIMATION_OUT: "unmountSuspended"
74
+ },
75
+ unmountSuspended: {
76
+ MOUNT: "mounted",
77
+ ANIMATION_END: "unmounted"
78
+ },
79
+ unmounted: {
80
+ MOUNT: "mounted"
81
+ }
82
+ });
83
+ React__namespace.useEffect(() => {
84
+ const currentAnimationName = getAnimationName(stylesRef.current);
85
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
86
+ }, [state]);
87
+ index.useLayoutEffect2(() => {
88
+ const styles = stylesRef.current;
89
+ const wasPresent = prevPresentRef.current;
90
+ const hasPresentChanged = wasPresent !== present;
91
+ if (hasPresentChanged) {
92
+ const prevAnimationName = prevAnimationNameRef.current;
93
+ const currentAnimationName = getAnimationName(styles);
94
+ if (present) {
95
+ send("MOUNT");
96
+ } else if (currentAnimationName === "none" || styles?.display === "none") {
97
+ send("UNMOUNT");
98
+ } else {
99
+ const isAnimating = prevAnimationName !== currentAnimationName;
100
+ if (wasPresent && isAnimating) {
101
+ send("ANIMATION_OUT");
102
+ } else {
103
+ send("UNMOUNT");
104
+ }
105
+ }
106
+ prevPresentRef.current = present;
107
+ }
108
+ }, [present, send]);
109
+ index.useLayoutEffect2(() => {
110
+ if (node) {
111
+ let timeoutId;
112
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
113
+ const handleAnimationEnd = (event) => {
114
+ const currentAnimationName = getAnimationName(stylesRef.current);
115
+ const isCurrentAnimation = currentAnimationName.includes(event.animationName);
116
+ if (event.target === node && isCurrentAnimation) {
117
+ send("ANIMATION_END");
118
+ if (!prevPresentRef.current) {
119
+ const currentFillMode = node.style.animationFillMode;
120
+ node.style.animationFillMode = "forwards";
121
+ timeoutId = ownerWindow.setTimeout(() => {
122
+ if (node.style.animationFillMode === "forwards") {
123
+ node.style.animationFillMode = currentFillMode;
124
+ }
125
+ });
126
+ }
127
+ }
128
+ };
129
+ const handleAnimationStart = (event) => {
130
+ if (event.target === node) {
131
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
132
+ }
133
+ };
134
+ node.addEventListener("animationstart", handleAnimationStart);
135
+ node.addEventListener("animationcancel", handleAnimationEnd);
136
+ node.addEventListener("animationend", handleAnimationEnd);
137
+ return () => {
138
+ ownerWindow.clearTimeout(timeoutId);
139
+ node.removeEventListener("animationstart", handleAnimationStart);
140
+ node.removeEventListener("animationcancel", handleAnimationEnd);
141
+ node.removeEventListener("animationend", handleAnimationEnd);
142
+ };
143
+ } else {
144
+ send("ANIMATION_END");
145
+ }
146
+ }, [node, send]);
147
+ return {
148
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
149
+ ref: React__namespace.useCallback((node2) => {
150
+ if (node2) stylesRef.current = getComputedStyle(node2);
151
+ setNode(node2);
152
+ }, [])
153
+ };
154
+ }
155
+ function getAnimationName(styles) {
156
+ return styles?.animationName || "none";
157
+ }
158
+ function getElementRef(element) {
159
+ let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
160
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
161
+ if (mayWarn) {
162
+ return element.ref;
163
+ }
164
+ getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
165
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
166
+ if (mayWarn) {
167
+ return element.props.ref;
168
+ }
169
+ return element.props.ref || element.ref;
170
+ }
171
+
172
+ var DIALOG_NAME = "Dialog";
173
+ var [createDialogContext, createDialogScope] = index.createContextScope(DIALOG_NAME);
174
+ var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
175
+ var Dialog = (props) => {
176
+ const {
177
+ __scopeDialog,
178
+ children,
179
+ open: openProp,
180
+ defaultOpen,
181
+ onOpenChange,
182
+ modal = true
183
+ } = props;
184
+ const triggerRef = React__namespace.useRef(null);
185
+ const contentRef = React__namespace.useRef(null);
186
+ const [open = false, setOpen] = index.useControllableState({
187
+ prop: openProp,
188
+ defaultProp: defaultOpen,
189
+ onChange: onOpenChange
190
+ });
191
+ return /* @__PURE__ */ jsxRuntime.jsx(
192
+ DialogProvider,
193
+ {
194
+ scope: __scopeDialog,
195
+ triggerRef,
196
+ contentRef,
197
+ contentId: index.useId(),
198
+ titleId: index.useId(),
199
+ descriptionId: index.useId(),
200
+ open,
201
+ onOpenChange: setOpen,
202
+ onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
203
+ modal,
204
+ children
205
+ }
206
+ );
81
207
  };
82
- /* -------------------------------------------------------------------------------------------------
83
- * DialogOverlay
84
- * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$OVERLAY_NAME = 'DialogOverlay';
85
- const $5d3850c4d0b4e6c7$export$bd1d06c79be19e17 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
86
- const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
87
- const { forceMount: forceMount = portalContext.forceMount , ...overlayProps } = props;
88
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
89
- return context.modal ? /*#__PURE__*/ React.createElement(index$2.$921a889cee6df7e8$export$99c2b779aa4e8b8b, {
90
- present: forceMount || context.open
91
- }, /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogOverlayImpl, _extends._extends({}, overlayProps, {
92
- ref: forwardedRef
93
- }))) : null;
208
+ Dialog.displayName = DIALOG_NAME;
209
+ var TRIGGER_NAME = "DialogTrigger";
210
+ var DialogTrigger = React__namespace.forwardRef(
211
+ (props, forwardedRef) => {
212
+ const { __scopeDialog, ...triggerProps } = props;
213
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
214
+ const composedTriggerRef = index.useComposedRefs(forwardedRef, context.triggerRef);
215
+ return /* @__PURE__ */ jsxRuntime.jsx(
216
+ index.Primitive.button,
217
+ {
218
+ type: "button",
219
+ "aria-haspopup": "dialog",
220
+ "aria-expanded": context.open,
221
+ "aria-controls": context.contentId,
222
+ "data-state": getState(context.open),
223
+ ...triggerProps,
224
+ ref: composedTriggerRef,
225
+ onClick: index.composeEventHandlers(props.onClick, context.onOpenToggle)
226
+ }
227
+ );
228
+ }
229
+ );
230
+ DialogTrigger.displayName = TRIGGER_NAME;
231
+ var PORTAL_NAME = "DialogPortal";
232
+ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
233
+ forceMount: void 0
94
234
  });
95
- const $5d3850c4d0b4e6c7$var$DialogOverlayImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
96
- const { __scopeDialog: __scopeDialog , ...overlayProps } = props;
97
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, __scopeDialog);
98
- return(/*#__PURE__*/ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
99
- // ie. when `Overlay` and `Content` are siblings
100
- React.createElement(Combination.$01b9c$RemoveScroll, {
101
- as: index.$5e63c961fc1ce211$export$8c6ed5c666ac1360,
102
- allowPinchZoom: true,
103
- shards: [
104
- context.contentRef
105
- ]
106
- }, /*#__PURE__*/ React.createElement(index.$8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends._extends({
107
- "data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
108
- }, overlayProps, {
109
- ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
110
- ,
111
- style: {
112
- pointerEvents: 'auto',
113
- ...overlayProps.style
235
+ var DialogPortal = (props) => {
236
+ const { __scopeDialog, forceMount, children, container } = props;
237
+ const context = useDialogContext(PORTAL_NAME, __scopeDialog);
238
+ return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React__namespace.Children.map(children, (child) => /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(index.Portal, { asChild: true, container, children: child }) })) });
239
+ };
240
+ DialogPortal.displayName = PORTAL_NAME;
241
+ var OVERLAY_NAME = "DialogOverlay";
242
+ var DialogOverlay = React__namespace.forwardRef(
243
+ (props, forwardedRef) => {
244
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
245
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
246
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
247
+ return context.modal ? /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
248
+ }
249
+ );
250
+ DialogOverlay.displayName = OVERLAY_NAME;
251
+ var DialogOverlayImpl = React__namespace.forwardRef(
252
+ (props, forwardedRef) => {
253
+ const { __scopeDialog, ...overlayProps } = props;
254
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
255
+ return (
256
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
257
+ // ie. when `Overlay` and `Content` are siblings
258
+ /* @__PURE__ */ jsxRuntime.jsx(index.RemoveScroll, { as: index.Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
259
+ index.Primitive.div,
260
+ {
261
+ "data-state": getState(context.open),
262
+ ...overlayProps,
263
+ ref: forwardedRef,
264
+ style: { pointerEvents: "auto", ...overlayProps.style }
114
265
  }
115
- }))));
116
- });
117
- /* -------------------------------------------------------------------------------------------------
118
- * DialogContent
119
- * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CONTENT_NAME = 'DialogContent';
120
- const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
121
- const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
122
- const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;
123
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
124
- return /*#__PURE__*/ React.createElement(index$2.$921a889cee6df7e8$export$99c2b779aa4e8b8b, {
125
- present: forceMount || context.open
126
- }, context.modal ? /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogContentModal, _extends._extends({}, contentProps, {
127
- ref: forwardedRef
128
- })) : /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogContentNonModal, _extends._extends({}, contentProps, {
129
- ref: forwardedRef
130
- })));
131
- });
132
- /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentModal = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
133
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
134
- const contentRef = React.useRef(null);
135
- const composedRefs = index.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
136
- React.useEffect(()=>{
137
- const content = contentRef.current;
138
- if (content) return Combination.hideOthers(content);
266
+ ) })
267
+ );
268
+ }
269
+ );
270
+ var CONTENT_NAME = "DialogContent";
271
+ var DialogContent = React__namespace.forwardRef(
272
+ (props, forwardedRef) => {
273
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
274
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
275
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
276
+ return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsxRuntime.jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
277
+ }
278
+ );
279
+ DialogContent.displayName = CONTENT_NAME;
280
+ var DialogContentModal = React__namespace.forwardRef(
281
+ (props, forwardedRef) => {
282
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
283
+ const contentRef = React__namespace.useRef(null);
284
+ const composedRefs = index.useComposedRefs(forwardedRef, context.contentRef, contentRef);
285
+ React__namespace.useEffect(() => {
286
+ const content = contentRef.current;
287
+ if (content) return index.hideOthers(content);
139
288
  }, []);
140
- return /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends._extends({}, props, {
141
- ref: composedRefs // we make sure focus isn't trapped once `DialogContent` has been closed
142
- ,
289
+ return /* @__PURE__ */ jsxRuntime.jsx(
290
+ DialogContentImpl,
291
+ {
292
+ ...props,
293
+ ref: composedRefs,
143
294
  trapFocus: context.open,
144
295
  disableOutsidePointerEvents: true,
145
- onCloseAutoFocus: index.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onCloseAutoFocus, (event)=>{
146
- var _context$triggerRef$c;
147
- event.preventDefault();
148
- (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
296
+ onCloseAutoFocus: index.composeEventHandlers(props.onCloseAutoFocus, (event) => {
297
+ event.preventDefault();
298
+ context.triggerRef.current?.focus();
149
299
  }),
150
- onPointerDownOutside: index.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event)=>{
151
- const originalEvent = event.detail.originalEvent;
152
- const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
153
- const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because
154
- // it is effectively as if we right-clicked the `Overlay`.
155
- if (isRightClick) event.preventDefault();
156
- }) // When focus is trapped, a `focusout` event may still happen.
157
- ,
158
- onFocusOutside: index.$e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event)=>event.preventDefault()
300
+ onPointerDownOutside: index.composeEventHandlers(props.onPointerDownOutside, (event) => {
301
+ const originalEvent = event.detail.originalEvent;
302
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
303
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
304
+ if (isRightClick) event.preventDefault();
305
+ }),
306
+ onFocusOutside: index.composeEventHandlers(
307
+ props.onFocusOutside,
308
+ (event) => event.preventDefault()
159
309
  )
160
- }));
161
- });
162
- /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentNonModal = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
163
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
164
- const hasInteractedOutsideRef = React.useRef(false);
165
- const hasPointerDownOutsideRef = React.useRef(false);
166
- return /*#__PURE__*/ React.createElement($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends._extends({}, props, {
310
+ }
311
+ );
312
+ }
313
+ );
314
+ var DialogContentNonModal = React__namespace.forwardRef(
315
+ (props, forwardedRef) => {
316
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
317
+ const hasInteractedOutsideRef = React__namespace.useRef(false);
318
+ const hasPointerDownOutsideRef = React__namespace.useRef(false);
319
+ return /* @__PURE__ */ jsxRuntime.jsx(
320
+ DialogContentImpl,
321
+ {
322
+ ...props,
167
323
  ref: forwardedRef,
168
324
  trapFocus: false,
169
325
  disableOutsidePointerEvents: false,
170
- onCloseAutoFocus: (event)=>{
171
- var _props$onCloseAutoFoc;
172
- (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);
173
- if (!event.defaultPrevented) {
174
- var _context$triggerRef$c2;
175
- if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus
176
- event.preventDefault();
177
- }
178
- hasInteractedOutsideRef.current = false;
179
- hasPointerDownOutsideRef.current = false;
326
+ onCloseAutoFocus: (event) => {
327
+ props.onCloseAutoFocus?.(event);
328
+ if (!event.defaultPrevented) {
329
+ if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
330
+ event.preventDefault();
331
+ }
332
+ hasInteractedOutsideRef.current = false;
333
+ hasPointerDownOutsideRef.current = false;
180
334
  },
181
- onInteractOutside: (event)=>{
182
- var _props$onInteractOuts, _context$triggerRef$c3;
183
- (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);
184
- if (!event.defaultPrevented) {
185
- hasInteractedOutsideRef.current = true;
186
- if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;
187
- } // Prevent dismissing when clicking the trigger.
188
- // As the trigger is already setup to close, without doing so would
189
- // cause it to close and immediately open.
190
- const target = event.target;
191
- const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);
192
- if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked
193
- // we will get the pointer down outside event on the trigger, but then a subsequent
194
- // focus outside event on the container, we ignore any focus outside event when we've
195
- // already had a pointer down outside event.
196
- if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();
335
+ onInteractOutside: (event) => {
336
+ props.onInteractOutside?.(event);
337
+ if (!event.defaultPrevented) {
338
+ hasInteractedOutsideRef.current = true;
339
+ if (event.detail.originalEvent.type === "pointerdown") {
340
+ hasPointerDownOutsideRef.current = true;
341
+ }
342
+ }
343
+ const target = event.target;
344
+ const targetIsTrigger = context.triggerRef.current?.contains(target);
345
+ if (targetIsTrigger) event.preventDefault();
346
+ if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
347
+ event.preventDefault();
348
+ }
197
349
  }
198
- }));
199
- });
200
- /* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentImpl = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
201
- const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props;
202
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, __scopeDialog);
203
- const contentRef = React.useRef(null);
204
- const composedRefs = index.$6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be
205
- // the last element in the DOM (beacuse of the `Portal`)
206
- Combination.$3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
207
- return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(Combination.$d3863c46a17e8a28$export$20e40289641fbbb6, {
208
- asChild: true,
209
- loop: true,
210
- trapped: trapFocus,
211
- onMountAutoFocus: onOpenAutoFocus,
212
- onUnmountAutoFocus: onCloseAutoFocus
213
- }, /*#__PURE__*/ React.createElement(Combination.$5cb92bef7577960e$export$177fb62ff3ec1f22, _extends._extends({
214
- role: "dialog",
215
- id: context.contentId,
216
- "aria-describedby": context.descriptionId,
217
- "aria-labelledby": context.titleId,
218
- "data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
219
- }, contentProps, {
220
- ref: composedRefs,
221
- onDismiss: ()=>context.onOpenChange(false)
222
- }))), false);
223
- });
224
- /* -------------------------------------------------------------------------------------------------
225
- * DialogTitle
226
- * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TITLE_NAME = 'DialogTitle';
227
- const $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
228
- const { __scopeDialog: __scopeDialog , ...titleProps } = props;
229
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TITLE_NAME, __scopeDialog);
230
- return /*#__PURE__*/ React.createElement(index.$8927f6f2acc4f386$export$250ffa63cdc0d034.h2, _extends._extends({
231
- id: context.titleId
232
- }, titleProps, {
233
- ref: forwardedRef
234
- }));
235
- });
236
- /* -------------------------------------------------------------------------------------------------
237
- * DialogDescription
238
- * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME = 'DialogDescription';
239
- const $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
240
- const { __scopeDialog: __scopeDialog , ...descriptionProps } = props;
241
- const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$DESCRIPTION_NAME, __scopeDialog);
242
- return /*#__PURE__*/ React.createElement(index.$8927f6f2acc4f386$export$250ffa63cdc0d034.p, _extends._extends({
243
- id: context.descriptionId
244
- }, descriptionProps, {
245
- ref: forwardedRef
246
- }));
247
- });
248
- /* -----------------------------------------------------------------------------------------------*/ function $5d3850c4d0b4e6c7$var$getState(open) {
249
- return open ? 'open' : 'closed';
350
+ }
351
+ );
352
+ }
353
+ );
354
+ var DialogContentImpl = React__namespace.forwardRef(
355
+ (props, forwardedRef) => {
356
+ const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
357
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
358
+ const contentRef = React__namespace.useRef(null);
359
+ const composedRefs = index.useComposedRefs(forwardedRef, contentRef);
360
+ index.useFocusGuards();
361
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
362
+ /* @__PURE__ */ jsxRuntime.jsx(
363
+ index.FocusScope,
364
+ {
365
+ asChild: true,
366
+ loop: true,
367
+ trapped: trapFocus,
368
+ onMountAutoFocus: onOpenAutoFocus,
369
+ onUnmountAutoFocus: onCloseAutoFocus,
370
+ children: /* @__PURE__ */ jsxRuntime.jsx(
371
+ index.DismissableLayer,
372
+ {
373
+ role: "dialog",
374
+ id: context.contentId,
375
+ "aria-describedby": context.descriptionId,
376
+ "aria-labelledby": context.titleId,
377
+ "data-state": getState(context.open),
378
+ ...contentProps,
379
+ ref: composedRefs,
380
+ onDismiss: () => context.onOpenChange(false)
381
+ }
382
+ )
383
+ }
384
+ ),
385
+ /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
386
+ /* @__PURE__ */ jsxRuntime.jsx(TitleWarning, { titleId: context.titleId }),
387
+ /* @__PURE__ */ jsxRuntime.jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
388
+ ] })
389
+ ] });
390
+ }
391
+ );
392
+ var TITLE_NAME = "DialogTitle";
393
+ var DialogTitle = React__namespace.forwardRef(
394
+ (props, forwardedRef) => {
395
+ const { __scopeDialog, ...titleProps } = props;
396
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
397
+ return /* @__PURE__ */ jsxRuntime.jsx(index.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
398
+ }
399
+ );
400
+ DialogTitle.displayName = TITLE_NAME;
401
+ var DESCRIPTION_NAME = "DialogDescription";
402
+ var DialogDescription = React__namespace.forwardRef(
403
+ (props, forwardedRef) => {
404
+ const { __scopeDialog, ...descriptionProps } = props;
405
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
406
+ return /* @__PURE__ */ jsxRuntime.jsx(index.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
407
+ }
408
+ );
409
+ DialogDescription.displayName = DESCRIPTION_NAME;
410
+ var CLOSE_NAME = "DialogClose";
411
+ var DialogClose = React__namespace.forwardRef(
412
+ (props, forwardedRef) => {
413
+ const { __scopeDialog, ...closeProps } = props;
414
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
415
+ return /* @__PURE__ */ jsxRuntime.jsx(
416
+ index.Primitive.button,
417
+ {
418
+ type: "button",
419
+ ...closeProps,
420
+ ref: forwardedRef,
421
+ onClick: index.composeEventHandlers(props.onClick, () => context.onOpenChange(false))
422
+ }
423
+ );
424
+ }
425
+ );
426
+ DialogClose.displayName = CLOSE_NAME;
427
+ function getState(open) {
428
+ return open ? "open" : "closed";
250
429
  }
251
- const $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 = $5d3850c4d0b4e6c7$export$3ddf2d174ce01153;
252
- const $5d3850c4d0b4e6c7$export$602eac185826482c = $5d3850c4d0b4e6c7$export$dad7c95542bacce0;
253
- const $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff = $5d3850c4d0b4e6c7$export$bd1d06c79be19e17;
254
- const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d9565de1e068cf;
255
- const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = $5d3850c4d0b4e6c7$export$16f7638e4a34b909;
256
- const $5d3850c4d0b4e6c7$export$393edc798c47379d = $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5;
430
+ var TITLE_WARNING_NAME = "DialogTitleWarning";
431
+ var [WarningProvider, useWarningContext] = index.createContext2(TITLE_WARNING_NAME, {
432
+ contentName: CONTENT_NAME,
433
+ titleName: TITLE_NAME,
434
+ docsSlug: "dialog"
435
+ });
436
+ var TitleWarning = ({ titleId }) => {
437
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
438
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
439
+
440
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
441
+
442
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
443
+ React__namespace.useEffect(() => {
444
+ if (titleId) {
445
+ const hasTitle = document.getElementById(titleId);
446
+ if (!hasTitle) console.error(MESSAGE);
447
+ }
448
+ }, [MESSAGE, titleId]);
449
+ return null;
450
+ };
451
+ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
452
+ var DescriptionWarning = ({ contentRef, descriptionId }) => {
453
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
454
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
455
+ React__namespace.useEffect(() => {
456
+ const describedById = contentRef.current?.getAttribute("aria-describedby");
457
+ if (descriptionId && describedById) {
458
+ const hasDescription = document.getElementById(descriptionId);
459
+ if (!hasDescription) console.warn(MESSAGE);
460
+ }
461
+ }, [MESSAGE, contentRef, descriptionId]);
462
+ return null;
463
+ };
464
+ var Root = Dialog;
465
+ var Portal = DialogPortal;
466
+ var Overlay = DialogOverlay;
467
+ var Content = DialogContent;
468
+ var Title = DialogTitle;
469
+ var Description = DialogDescription;
257
470
 
258
471
  /** Use `Modal` to display information that needs immediate action from a user. */
259
472
  var Modal = function (_a) {
@@ -277,19 +490,19 @@ var Modal = function (_a) {
277
490
  onRequestClose();
278
491
  }
279
492
  };
280
- return (React__default["default"].createElement($5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9, { open: isOpen },
281
- React__default["default"].createElement($5d3850c4d0b4e6c7$export$602eac185826482c, { container: arcRootElement || undefined },
282
- React__default["default"].createElement($5d3850c4d0b4e6c7$export$c6fdb837b070b4ff, { className: "arc-Modal-overlay" },
283
- React__default["default"].createElement($5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2, filterDataAttrs.__assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, "aria-modal": "true", className: index$3.classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
493
+ return (React__default["default"].createElement(Root, { open: isOpen },
494
+ React__default["default"].createElement(Portal, { container: arcRootElement || undefined },
495
+ React__default["default"].createElement(Overlay, { className: "arc-Modal-overlay" },
496
+ React__default["default"].createElement(Content, filterDataAttrs.__assign({}, ariaProps, { role: role, onOpenAutoFocus: setTriggerElement, onCloseAutoFocus: focusTriggerElement, onEscapeKeyDown: closeModal, onInteractOutside: closeModal, "aria-modal": "true", className: index$1.classNames("arc-Modal-dialog", "arc-Modal-dialog--".concat(size), {
284
497
  "arc-Modal-dialog--maxHeightWindow": isContentScrollable
285
498
  }) }, filterDataAttrs.filterDataAttrs(props)),
286
499
  React__default["default"].createElement("div", { className: "arc-Modal-section" },
287
- React__default["default"].createElement($5d3850c4d0b4e6c7$export$f99233281efd08a0, { asChild: true },
500
+ React__default["default"].createElement(Title, { asChild: true },
288
501
  React__default["default"].createElement(Heading.Heading, { level: "1", size: "m" }, title))),
289
502
  React__default["default"].createElement(VerticalSpace.VerticalSpace, { size: "12" }),
290
503
  hasContent && (React__default["default"].createElement("div", { className: "arc-Modal-content" },
291
504
  React__default["default"].createElement("div", { className: "arc-Modal-section" },
292
- description && (React__default["default"].createElement($5d3850c4d0b4e6c7$export$393edc798c47379d, { asChild: true },
505
+ description && (React__default["default"].createElement(Description, { asChild: true },
293
506
  React__default["default"].createElement(Text.Text, null, description))),
294
507
  description && children && (React__default["default"].createElement(VerticalSpace.VerticalSpace, { "data-testid": "arc-modal-vertical-space", size: "20" })),
295
508
  children))),