@hanzogui/dialog 8.3.1 → 8.3.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.
- package/dist/cjs/Dialog.js +509 -0
- package/dist/cjs/Dialog.js.map +1 -0
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/Dialog.js +501 -0
- package/dist/esm/Dialog.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/package.json +39 -34
- package/src/index.ts +1 -1
- package/types/Dialog.d.ts +72 -77
- package/types/Dialog.d.ts.map +1 -1
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/dist/cjs/Dialog.cjs +0 -703
- package/dist/cjs/Dialog.native.js +0 -754
- package/dist/cjs/Dialog.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -20
- package/dist/cjs/index.native.js +0 -23
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/esm/Dialog.mjs +0 -654
- package/dist/esm/Dialog.mjs.map +0 -1
- package/dist/esm/Dialog.native.js +0 -702
- package/dist/esm/Dialog.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -2
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -2
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/Dialog.mjs +0 -654
- package/dist/jsx/Dialog.mjs.map +0 -1
- package/dist/jsx/Dialog.native.js +0 -754
- package/dist/jsx/Dialog.native.js.map +0 -1
- package/dist/jsx/index.js +0 -2
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs +0 -2
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/index.native.js +0 -23
- package/dist/jsx/index.native.js.map +0 -1
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DialogWarningProvider = exports.DialogTrigger = exports.DialogTitle = exports.DialogPortal = exports.DialogOverlay = exports.DialogDescription = exports.DialogContent = exports.DialogClose = exports.Dialog = exports.DialogOverlayFrame = exports.DialogPortalFrame = exports.DialogProvider = exports.useDialogContext = exports.DialogContext = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const adapt_1 = require("@hanzogui/adapt");
|
|
7
|
+
const animate_1 = require("@hanzogui/animate");
|
|
8
|
+
const compose_refs_1 = require("@hanzogui/compose-refs");
|
|
9
|
+
const constants_1 = require("@hanzogui/constants");
|
|
10
|
+
const core_1 = require("@hanzogui/core");
|
|
11
|
+
const create_context_1 = require("@hanzogui/create-context");
|
|
12
|
+
const dismissable_1 = require("@hanzogui/dismissable");
|
|
13
|
+
const focus_scope_1 = require("@hanzogui/focus-scope");
|
|
14
|
+
const helpers_1 = require("@hanzogui/helpers");
|
|
15
|
+
const portal_1 = require("@hanzogui/portal");
|
|
16
|
+
const remove_scroll_1 = require("@hanzogui/remove-scroll");
|
|
17
|
+
const controller_1 = require("@hanzogui/sheet/controller");
|
|
18
|
+
const stacks_1 = require("@hanzogui/stacks");
|
|
19
|
+
const text_1 = require("@hanzogui/text");
|
|
20
|
+
const use_controllable_state_1 = require("@hanzogui/use-controllable-state");
|
|
21
|
+
const z_index_stack_1 = require("@hanzogui/z-index-stack");
|
|
22
|
+
const React = tslib_1.__importStar(require("react"));
|
|
23
|
+
exports.DialogContext = (0, core_1.createStyledContext)(
|
|
24
|
+
// since we always provide this we can avoid setting here
|
|
25
|
+
{}, 'Dialog__');
|
|
26
|
+
({ useStyledContext: exports.useDialogContext, Provider: exports.DialogProvider } = exports.DialogContext);
|
|
27
|
+
/**
|
|
28
|
+
* Tracks whether the Sheet adapted from a Dialog has finished its slide-out
|
|
29
|
+
* animation. DialogSheetController owns the state; DialogContent reads it so
|
|
30
|
+
* it can hold adapted children mounted until the sheet is fully off-screen,
|
|
31
|
+
* instead of tearing them down the moment Dialog.open flips false.
|
|
32
|
+
*
|
|
33
|
+
* Default true so the value is "safe to unmount" if no provider is mounted
|
|
34
|
+
* (matches the historical behavior where adapted children unmount immediately
|
|
35
|
+
* on close in native).
|
|
36
|
+
*/
|
|
37
|
+
const DialogAdaptHiddenContext = React.createContext(true);
|
|
38
|
+
/* -------------------------------------------------------------------------------------------------
|
|
39
|
+
* DialogTrigger
|
|
40
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
41
|
+
const DialogTriggerFrame = (0, core_1.styled)(core_1.View, {
|
|
42
|
+
name: 'DialogTrigger',
|
|
43
|
+
});
|
|
44
|
+
const DialogTrigger = DialogTriggerFrame.styleable(function DialogTrigger(props, forwardedRef) {
|
|
45
|
+
const { scope, ...triggerProps } = props;
|
|
46
|
+
const isInsideButton = React.useContext(stacks_1.ButtonNestingContext);
|
|
47
|
+
const context = (0, exports.useDialogContext)(scope);
|
|
48
|
+
const composedTriggerRef = (0, compose_refs_1.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
49
|
+
return ((0, jsx_runtime_1.jsx)(stacks_1.ButtonNestingContext.Provider, { value: true, children: (0, jsx_runtime_1.jsx)(DialogTriggerFrame, { render: isInsideButton ? 'span' : 'button', "aria-haspopup": "dialog", "aria-expanded": context.open, "aria-controls": context.contentId, "data-state": getState(context.open), ...triggerProps, ref: composedTriggerRef, onPress: (0, helpers_1.composeEventHandlers)(props.onPress, context.onOpenToggle) }) }));
|
|
50
|
+
});
|
|
51
|
+
exports.DialogTrigger = DialogTrigger;
|
|
52
|
+
exports.DialogPortalFrame = (0, core_1.styled)(stacks_1.YStack, {
|
|
53
|
+
pointerEvents: 'none',
|
|
54
|
+
render: 'dialog',
|
|
55
|
+
variants: {
|
|
56
|
+
unstyled: {
|
|
57
|
+
false: {
|
|
58
|
+
alignItems: 'center',
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
fullscreen: true,
|
|
61
|
+
'$platform-web': {
|
|
62
|
+
// undo dialog styles
|
|
63
|
+
borderWidth: 0,
|
|
64
|
+
backgroundColor: 'transparent',
|
|
65
|
+
color: 'inherit',
|
|
66
|
+
maxInlineSize: 'none',
|
|
67
|
+
margin: 0,
|
|
68
|
+
width: 'auto',
|
|
69
|
+
height: 'auto',
|
|
70
|
+
// ensure always in frame and right height
|
|
71
|
+
maxHeight: '100vh',
|
|
72
|
+
position: 'fixed',
|
|
73
|
+
// ensure dialog inherits stacking context from portal wrapper
|
|
74
|
+
zIndex: 1,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
defaultVariants: {
|
|
80
|
+
unstyled: process.env.GUI_HEADLESS === '1',
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
const needsRepropagation = (0, portal_1.needsPortalRepropagation)();
|
|
84
|
+
const DialogPortalItem = ({ context, children, }) => {
|
|
85
|
+
const themeName = (0, core_1.useThemeName)();
|
|
86
|
+
const isAdapted = (0, adapt_1.useAdaptIsActive)(context.adaptScope);
|
|
87
|
+
const adaptContext = (0, adapt_1.useAdaptContext)(context.adaptScope);
|
|
88
|
+
let content = (0, jsx_runtime_1.jsx)(core_1.Theme, { name: themeName, children: children });
|
|
89
|
+
// not just adapted - both sheet and portal for modal need it
|
|
90
|
+
if (needsRepropagation) {
|
|
91
|
+
content = ((0, jsx_runtime_1.jsx)(adapt_1.ProvideAdaptContext, { ...adaptContext, children: (0, jsx_runtime_1.jsx)(exports.DialogProvider, { ...context, children: content }) }));
|
|
92
|
+
}
|
|
93
|
+
// until we can use react-native portals natively
|
|
94
|
+
// have to re-propogate context, sketch
|
|
95
|
+
// when adapted we portal to the adapt, when not we portal to root modal if needed
|
|
96
|
+
return isAdapted ? ((0, jsx_runtime_1.jsx)(adapt_1.AdaptPortalContents, { scope: context.adaptScope, children: content })) : context.modal ? ((0, jsx_runtime_1.jsx)(portal_1.PortalItem, { hostName: context.modal ? 'root' : context.adaptScope, children: content })) : (content);
|
|
97
|
+
};
|
|
98
|
+
const DialogPortal = React.forwardRef((props, forwardRef) => {
|
|
99
|
+
const { scope, forceMount, children, ...frameProps } = props;
|
|
100
|
+
const dialogRef = React.useRef(null);
|
|
101
|
+
const ref = (0, compose_refs_1.composeRefs)(dialogRef, forwardRef);
|
|
102
|
+
const context = (0, exports.useDialogContext)(scope);
|
|
103
|
+
const keepMounted = forceMount || context.keepChildrenMounted;
|
|
104
|
+
const isAdapted = (0, adapt_1.useAdaptIsActive)(context.adaptScope);
|
|
105
|
+
const [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);
|
|
106
|
+
if (context.open && isFullyHidden) {
|
|
107
|
+
setIsFullyHidden(false);
|
|
108
|
+
}
|
|
109
|
+
const isVisible = context.open ? true : !isFullyHidden;
|
|
110
|
+
if (constants_1.isWeb) {
|
|
111
|
+
(0, constants_1.useIsomorphicLayoutEffect)(() => {
|
|
112
|
+
const node = dialogRef.current;
|
|
113
|
+
if (!(node instanceof HTMLDialogElement))
|
|
114
|
+
return;
|
|
115
|
+
// optional chaining for JSDOM compatibility (doesn't implement show/close)
|
|
116
|
+
if (isVisible) {
|
|
117
|
+
node.show?.();
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
node.close?.();
|
|
121
|
+
}
|
|
122
|
+
}, [isVisible]);
|
|
123
|
+
}
|
|
124
|
+
const onAnimationCompleteRef = React.useRef(context.onAnimationComplete);
|
|
125
|
+
onAnimationCompleteRef.current = context.onAnimationComplete;
|
|
126
|
+
const handleExitComplete = React.useCallback(() => {
|
|
127
|
+
setIsFullyHidden(true);
|
|
128
|
+
onAnimationCompleteRef.current?.({ open: false });
|
|
129
|
+
}, []);
|
|
130
|
+
React.useEffect(() => {
|
|
131
|
+
if (context.open && !isAdapted && onAnimationCompleteRef.current) {
|
|
132
|
+
const tm = setTimeout(() => {
|
|
133
|
+
onAnimationCompleteRef.current?.({ open: true });
|
|
134
|
+
}, 350);
|
|
135
|
+
return () => clearTimeout(tm);
|
|
136
|
+
}
|
|
137
|
+
}, [context.open, isAdapted]);
|
|
138
|
+
const zIndex = (0, core_1.getExpandedShorthand)('zIndex', props);
|
|
139
|
+
const contents = ((0, jsx_runtime_1.jsx)(z_index_stack_1.StackZIndexContext, { zIndex: (0, portal_1.resolveViewZIndex)(zIndex), children: (0, jsx_runtime_1.jsx)(animate_1.Animate, { type: "presence", present: Boolean(context.open), keepChildrenMounted: Boolean(keepMounted), onExitComplete: handleExitComplete, passThrough: isAdapted, children: children }) }));
|
|
140
|
+
const framedContents = isFullyHidden && !keepMounted && !isAdapted ? null : ((0, jsx_runtime_1.jsx)(core_1.LayoutMeasurementController, { disable: !context.open, children: (0, jsx_runtime_1.jsx)(exports.DialogPortalFrame, { ref: ref, ...(constants_1.isWeb &&
|
|
141
|
+
context.open && {
|
|
142
|
+
'aria-modal': true,
|
|
143
|
+
}), pointerEvents: context.open ? 'auto' : 'none', ...frameProps, className: `_no_backdrop ` + (frameProps.className || ''), children: contents }) }));
|
|
144
|
+
if (constants_1.isWeb) {
|
|
145
|
+
return ((0, jsx_runtime_1.jsx)(portal_1.Portal, { zIndex: zIndex,
|
|
146
|
+
// set to 100000 which ensures dialogs are above most fixed UI (headers, navs)
|
|
147
|
+
// this makes sure its above typical stacking contexts
|
|
148
|
+
stackZIndex: 100000, passThrough: isAdapted, children: (0, jsx_runtime_1.jsx)(PassthroughTheme, { passThrough: isAdapted, children: framedContents }) }));
|
|
149
|
+
}
|
|
150
|
+
return isAdapted ? (framedContents) : ((0, jsx_runtime_1.jsx)(DialogPortalItem, { context: context, children: framedContents }));
|
|
151
|
+
});
|
|
152
|
+
exports.DialogPortal = DialogPortal;
|
|
153
|
+
const PassthroughTheme = ({ children, passThrough, }) => {
|
|
154
|
+
const themeName = (0, core_1.useThemeName)();
|
|
155
|
+
return ((0, jsx_runtime_1.jsx)(core_1.Theme, { passThrough: passThrough, name: themeName, forceClassName: true, children: children }));
|
|
156
|
+
};
|
|
157
|
+
/* -------------------------------------------------------------------------------------------------
|
|
158
|
+
* DialogOverlay
|
|
159
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
160
|
+
const OVERLAY_NAME = 'DialogOverlay';
|
|
161
|
+
/**
|
|
162
|
+
* exported for internal use with extractable()
|
|
163
|
+
*/
|
|
164
|
+
exports.DialogOverlayFrame = (0, core_1.styled)(stacks_1.YStack, {
|
|
165
|
+
name: OVERLAY_NAME,
|
|
166
|
+
zIndex: 1,
|
|
167
|
+
variants: {
|
|
168
|
+
open: {
|
|
169
|
+
true: {
|
|
170
|
+
pointerEvents: 'auto',
|
|
171
|
+
},
|
|
172
|
+
false: {
|
|
173
|
+
pointerEvents: 'none',
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
unstyled: {
|
|
177
|
+
false: {
|
|
178
|
+
fullscreen: true,
|
|
179
|
+
position: 'absolute',
|
|
180
|
+
backgroundColor: '$background',
|
|
181
|
+
pointerEvents: 'auto',
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
defaultVariants: {
|
|
186
|
+
unstyled: process.env.GUI_HEADLESS === '1',
|
|
187
|
+
},
|
|
188
|
+
});
|
|
189
|
+
const DialogOverlay = exports.DialogOverlayFrame.styleable(function DialogOverlay({ scope, ...props }, forwardedRef) {
|
|
190
|
+
const context = (0, exports.useDialogContext)(scope);
|
|
191
|
+
const { forceMount = context.forceMount, ...overlayProps } = props;
|
|
192
|
+
const isAdapted = (0, adapt_1.useAdaptIsActive)(context.adaptScope);
|
|
193
|
+
if (!forceMount) {
|
|
194
|
+
if (!context.modal || isAdapted) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
199
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
200
|
+
return ((0, jsx_runtime_1.jsx)(exports.DialogOverlayFrame, { "data-state": getState(context.open),
|
|
201
|
+
// TODO: this will be apply for v2
|
|
202
|
+
// onPress={() => {
|
|
203
|
+
// // if the overlay is pressed, close the dialog
|
|
204
|
+
// context.onOpenChange(false)
|
|
205
|
+
// }}
|
|
206
|
+
// We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
|
|
207
|
+
pointerEvents: context.open ? 'auto' : 'none', ...overlayProps, ref: forwardedRef }));
|
|
208
|
+
});
|
|
209
|
+
exports.DialogOverlay = DialogOverlay;
|
|
210
|
+
/* -------------------------------------------------------------------------------------------------
|
|
211
|
+
* DialogContent
|
|
212
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
213
|
+
const CONTENT_NAME = 'DialogContent';
|
|
214
|
+
const DialogContentFrame = (0, core_1.styled)(stacks_1.ThemeableStack, {
|
|
215
|
+
name: CONTENT_NAME,
|
|
216
|
+
zIndex: 2,
|
|
217
|
+
variants: {
|
|
218
|
+
size: {
|
|
219
|
+
'...size': (val, extras) => {
|
|
220
|
+
return {};
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
unstyled: {
|
|
224
|
+
false: {
|
|
225
|
+
position: 'relative',
|
|
226
|
+
backgroundColor: '$background',
|
|
227
|
+
borderWidth: 1,
|
|
228
|
+
borderColor: '$borderColor',
|
|
229
|
+
padding: '$true',
|
|
230
|
+
borderRadius: '$true',
|
|
231
|
+
elevate: true,
|
|
232
|
+
// Ensure content receives pointer events (fixes React 19 + display:contents inheritance)
|
|
233
|
+
pointerEvents: 'auto',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
defaultVariants: {
|
|
238
|
+
size: '$true',
|
|
239
|
+
unstyled: process.env.GUI_HEADLESS === '1',
|
|
240
|
+
},
|
|
241
|
+
});
|
|
242
|
+
const DialogContent = DialogContentFrame.styleable(function DialogContent({ scope, ...props }, forwardedRef) {
|
|
243
|
+
const context = (0, exports.useDialogContext)(scope);
|
|
244
|
+
const contents = ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: context.modal ? ((0, jsx_runtime_1.jsx)(DialogContentModal, { context: context, ...props, ref: forwardedRef })) : ((0, jsx_runtime_1.jsx)(DialogContentNonModal, { context: context, ...props, ref: forwardedRef })) }));
|
|
245
|
+
if (!constants_1.isWeb || context.disableRemoveScroll) {
|
|
246
|
+
return contents;
|
|
247
|
+
}
|
|
248
|
+
return ((0, jsx_runtime_1.jsx)(remove_scroll_1.RemoveScroll, { enabled: context.open, children: (0, jsx_runtime_1.jsx)("div", { "data-remove-scroll-container": true, className: "_dsp_contents", children: contents }) }));
|
|
249
|
+
});
|
|
250
|
+
exports.DialogContent = DialogContent;
|
|
251
|
+
const DialogContentModal = React.forwardRef(({ children, context, ...props }, forwardedRef) => {
|
|
252
|
+
const contentRef = React.useRef(null);
|
|
253
|
+
const composedRefs = (0, compose_refs_1.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
254
|
+
return ((0, jsx_runtime_1.jsx)(DialogContentImpl, { ...props, context: context, ref: composedRefs,
|
|
255
|
+
// we make sure focus isn't trapped once `DialogContent` has been closed
|
|
256
|
+
// (closed !== unmounted when animating out)
|
|
257
|
+
trapFocus: context.open, disableOutsidePointerEvents: true, onCloseAutoFocus: (0, helpers_1.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
|
258
|
+
event.preventDefault();
|
|
259
|
+
context.triggerRef.current?.focus();
|
|
260
|
+
}), onPointerDownOutside: (0, helpers_1.composeEventHandlers)(props.onPointerDownOutside, (event) => {
|
|
261
|
+
const originalEvent = event['detail'].originalEvent;
|
|
262
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
263
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
264
|
+
// If the event is a right-click, we shouldn't close because
|
|
265
|
+
// it is effectively as if we right-clicked the `Overlay`.
|
|
266
|
+
if (isRightClick)
|
|
267
|
+
event.preventDefault();
|
|
268
|
+
}),
|
|
269
|
+
// When focus is trapped, a `focusout` event may still happen.
|
|
270
|
+
// We make sure we don't trigger our `onDismiss` in such case.
|
|
271
|
+
onFocusOutside: (0, helpers_1.composeEventHandlers)(props.onFocusOutside, (event) => event.preventDefault()), ...(!props.unstyled && {
|
|
272
|
+
outlineStyle: 'none',
|
|
273
|
+
}), children: children }));
|
|
274
|
+
});
|
|
275
|
+
/* -----------------------------------------------------------------------------------------------*/
|
|
276
|
+
const DialogContentNonModal = React.forwardRef((props, forwardedRef) => {
|
|
277
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
278
|
+
return ((0, jsx_runtime_1.jsx)(DialogContentImpl, { ...props, ref: forwardedRef, trapFocus: false, disableOutsidePointerEvents: false, onCloseAutoFocus: (event) => {
|
|
279
|
+
props.onCloseAutoFocus?.(event);
|
|
280
|
+
if (!event.defaultPrevented) {
|
|
281
|
+
if (!hasInteractedOutsideRef.current) {
|
|
282
|
+
props.context.triggerRef.current?.focus();
|
|
283
|
+
}
|
|
284
|
+
// Always prevent auto focus because we either focus manually or want user agent focus
|
|
285
|
+
event.preventDefault();
|
|
286
|
+
}
|
|
287
|
+
hasInteractedOutsideRef.current = false;
|
|
288
|
+
}, onInteractOutside: (event) => {
|
|
289
|
+
props.onInteractOutside?.(event);
|
|
290
|
+
if (!event.defaultPrevented)
|
|
291
|
+
hasInteractedOutsideRef.current = true;
|
|
292
|
+
// Prevent dismissing when clicking the trigger.
|
|
293
|
+
// As the trigger is already setup to close, without doing so would
|
|
294
|
+
// cause it to close and immediately open.
|
|
295
|
+
//
|
|
296
|
+
// We use `onInteractOutside` as some browsers also
|
|
297
|
+
// focus on pointer down, creating the same issue.
|
|
298
|
+
const target = event.target;
|
|
299
|
+
const trigger = props.context.triggerRef.current;
|
|
300
|
+
if (!(trigger instanceof HTMLElement))
|
|
301
|
+
return;
|
|
302
|
+
const targetIsTrigger = trigger.contains(target);
|
|
303
|
+
if (targetIsTrigger)
|
|
304
|
+
event.preventDefault();
|
|
305
|
+
} }));
|
|
306
|
+
});
|
|
307
|
+
const DialogContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
308
|
+
const { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props;
|
|
309
|
+
const contentRef = React.useRef(null);
|
|
310
|
+
const composedRefs = (0, compose_refs_1.useComposedRefs)(forwardedRef, contentRef);
|
|
311
|
+
const isAdapted = (0, adapt_1.useAdaptIsActive)(context.adaptScope);
|
|
312
|
+
// TODO this will re-parent, ideally we would not change tree structure
|
|
313
|
+
// when adapted, the dialog's content is portaled into the Sheet via
|
|
314
|
+
// Adapt.Contents. hold children mounted until the sheet's slide-out
|
|
315
|
+
// animation is fully complete (DialogAdaptHiddenContext is flipped by
|
|
316
|
+
// DialogSheetController via SheetController.onAnimationComplete), then
|
|
317
|
+
// unmount. opt out with `keepChildrenMounted` if you need the old
|
|
318
|
+
// permanent-mount behavior.
|
|
319
|
+
const isAdaptFullyHidden = React.useContext(DialogAdaptHiddenContext);
|
|
320
|
+
if (isAdapted) {
|
|
321
|
+
if (!context.open && !context.keepChildrenMounted && isAdaptFullyHidden) {
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
return ((0, jsx_runtime_1.jsx)(DialogPortalItem, { context: context, children: contentProps.children }));
|
|
325
|
+
}
|
|
326
|
+
const contents = ((0, jsx_runtime_1.jsx)(DialogContentFrame, { ref: composedRefs, id: context.contentId, role: "dialog", "aria-modal": context.modal, "aria-describedby": context.descriptionId, "aria-labelledby": context.titleId, "data-state": getState(context.open),
|
|
327
|
+
// allow clicking through content during exit animation
|
|
328
|
+
pointerEvents: context.open ? 'auto' : 'none', ...contentProps }));
|
|
329
|
+
if (!constants_1.isWeb) {
|
|
330
|
+
return contents;
|
|
331
|
+
}
|
|
332
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(dismissable_1.Dismissable, { disableOutsidePointerEvents: context.open && disableOutsidePointerEvents, forceUnmount: !context.open, onEscapeKeyDown: onEscapeKeyDown, onPointerDownOutside: onPointerDownOutside, onFocusOutside: onFocusOutside, onInteractOutside: onInteractOutside, onDismiss: () => context?.onOpenChange?.(false), children: (0, jsx_runtime_1.jsx)(focus_scope_1.FocusScope, { loop: true, enabled: context.open, trapped: trapFocus, onMountAutoFocus: onOpenAutoFocus, forceUnmount: !context.open, onUnmountAutoFocus: onCloseAutoFocus, children: contents }) }), process.env.NODE_ENV === 'development' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(TitleWarning, { titleId: context.titleId }), (0, jsx_runtime_1.jsx)(DescriptionWarning, { contentRef: contentRef, descriptionId: context.descriptionId })] }))] }));
|
|
333
|
+
});
|
|
334
|
+
/* -------------------------------------------------------------------------------------------------
|
|
335
|
+
* DialogTitle
|
|
336
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
337
|
+
const DialogTitleFrame = (0, core_1.styled)(text_1.H2, {
|
|
338
|
+
name: 'DialogTitle',
|
|
339
|
+
});
|
|
340
|
+
const DialogTitle = DialogTitleFrame.styleable(function DialogTitle(props, forwardedRef) {
|
|
341
|
+
const { scope, ...titleProps } = props;
|
|
342
|
+
const context = (0, exports.useDialogContext)(scope);
|
|
343
|
+
return (0, jsx_runtime_1.jsx)(DialogTitleFrame, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
344
|
+
});
|
|
345
|
+
exports.DialogTitle = DialogTitle;
|
|
346
|
+
/* -------------------------------------------------------------------------------------------------
|
|
347
|
+
* DialogDescription
|
|
348
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
349
|
+
const DialogDescriptionFrame = (0, core_1.styled)(text_1.Paragraph, {
|
|
350
|
+
name: 'DialogDescription',
|
|
351
|
+
});
|
|
352
|
+
const DialogDescription = DialogDescriptionFrame.styleable(function DialogDescription(props, forwardedRef) {
|
|
353
|
+
const { scope, ...descriptionProps } = props;
|
|
354
|
+
const context = (0, exports.useDialogContext)(scope);
|
|
355
|
+
return ((0, jsx_runtime_1.jsx)(DialogDescriptionFrame, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef }));
|
|
356
|
+
});
|
|
357
|
+
exports.DialogDescription = DialogDescription;
|
|
358
|
+
/* -------------------------------------------------------------------------------------------------
|
|
359
|
+
* DialogClose
|
|
360
|
+
* -----------------------------------------------------------------------------------------------*/
|
|
361
|
+
const CLOSE_NAME = 'DialogClose';
|
|
362
|
+
const DialogCloseFrame = (0, core_1.styled)(core_1.View, {
|
|
363
|
+
name: CLOSE_NAME,
|
|
364
|
+
render: 'button',
|
|
365
|
+
});
|
|
366
|
+
const DialogClose = DialogCloseFrame.styleable((props, forwardedRef) => {
|
|
367
|
+
const { scope, displayWhenAdapted, ...closeProps } = props;
|
|
368
|
+
const context = (0, exports.useDialogContext)(scope);
|
|
369
|
+
const isAdapted = (0, adapt_1.useAdaptIsActive)(context.adaptScope);
|
|
370
|
+
const isInsideButton = React.useContext(stacks_1.ButtonNestingContext);
|
|
371
|
+
if (isAdapted && !displayWhenAdapted) {
|
|
372
|
+
return null;
|
|
373
|
+
}
|
|
374
|
+
return ((0, jsx_runtime_1.jsx)(DialogCloseFrame, { "aria-label": "Dialog Close", render: isInsideButton ? 'span' : 'button', ...closeProps, ref: forwardedRef, onPress: (0, helpers_1.composeEventHandlers)(props.onPress, () => {
|
|
375
|
+
context.onOpenChange(false);
|
|
376
|
+
}) }));
|
|
377
|
+
});
|
|
378
|
+
exports.DialogClose = DialogClose;
|
|
379
|
+
/* -----------------------------------------------------------------------------------------------*/
|
|
380
|
+
function getState(open) {
|
|
381
|
+
return open ? 'open' : 'closed';
|
|
382
|
+
}
|
|
383
|
+
const TITLE_WARNING_NAME = 'DialogTitleWarning';
|
|
384
|
+
const [DialogWarningProvider, useWarningContext] = (0, create_context_1.createContext)(TITLE_WARNING_NAME, {
|
|
385
|
+
contentName: CONTENT_NAME,
|
|
386
|
+
titleName: 'DialogTitle',
|
|
387
|
+
docsSlug: 'dialog',
|
|
388
|
+
});
|
|
389
|
+
exports.DialogWarningProvider = DialogWarningProvider;
|
|
390
|
+
const TitleWarning = ({ titleId }) => {
|
|
391
|
+
if (process.env.NODE_ENV === 'development') {
|
|
392
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
393
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` wants a \`${titleWarningContext.titleName}\` to be accessible. If you want to hide the \`${titleWarningContext.titleName}\`, wrap it with <VisuallyHidden />.`;
|
|
394
|
+
React.useEffect(() => {
|
|
395
|
+
if (!constants_1.isWeb)
|
|
396
|
+
return;
|
|
397
|
+
if (titleId) {
|
|
398
|
+
const hasTitle = document.getElementById(titleId);
|
|
399
|
+
if (!hasTitle) {
|
|
400
|
+
console.warn(MESSAGE);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}, [MESSAGE, titleId]);
|
|
404
|
+
}
|
|
405
|
+
return null;
|
|
406
|
+
};
|
|
407
|
+
const DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';
|
|
408
|
+
const DescriptionWarning = ({ contentRef, descriptionId, }) => {
|
|
409
|
+
if (process.env.NODE_ENV === 'development') {
|
|
410
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
411
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
412
|
+
React.useEffect(() => {
|
|
413
|
+
if (!constants_1.isWeb)
|
|
414
|
+
return;
|
|
415
|
+
const contentNode = contentRef.current;
|
|
416
|
+
if (!(contentNode instanceof HTMLElement)) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const describedById = contentNode.getAttribute('aria-describedby');
|
|
420
|
+
// if we have an id and the user hasn't set aria-describedby={undefined}
|
|
421
|
+
if (descriptionId && describedById) {
|
|
422
|
+
const hasDescription = document.getElementById(descriptionId);
|
|
423
|
+
if (!hasDescription) {
|
|
424
|
+
console.warn(MESSAGE);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
|
428
|
+
}
|
|
429
|
+
return null;
|
|
430
|
+
};
|
|
431
|
+
const Dialog = (0, helpers_1.withStaticProperties)(React.forwardRef(function Dialog(props, ref) {
|
|
432
|
+
const { scope = '', children, open: openProp, defaultOpen = false, onOpenChange, modal = true, keepChildrenMounted, disableRemoveScroll = false, onAnimationComplete, } = props;
|
|
433
|
+
const baseId = React.useId();
|
|
434
|
+
const dialogId = `Dialog-${scope}-${baseId}`;
|
|
435
|
+
const contentId = `${dialogId}-content`;
|
|
436
|
+
const titleId = `${dialogId}-title`;
|
|
437
|
+
const descriptionId = `${dialogId}-description`;
|
|
438
|
+
const triggerRef = React.useRef(null);
|
|
439
|
+
const contentRef = React.useRef(null);
|
|
440
|
+
const [open, setOpen] = (0, use_controllable_state_1.useControllableState)({
|
|
441
|
+
prop: openProp,
|
|
442
|
+
defaultProp: defaultOpen,
|
|
443
|
+
onChange: onOpenChange,
|
|
444
|
+
});
|
|
445
|
+
const onOpenToggle = React.useCallback(() => {
|
|
446
|
+
setOpen((prevOpen) => !prevOpen);
|
|
447
|
+
}, [setOpen]);
|
|
448
|
+
const adaptScope = `DialogAdapt${scope}`;
|
|
449
|
+
const context = {
|
|
450
|
+
dialogScope: scope,
|
|
451
|
+
adaptScope,
|
|
452
|
+
triggerRef,
|
|
453
|
+
contentRef,
|
|
454
|
+
contentId,
|
|
455
|
+
titleId,
|
|
456
|
+
descriptionId,
|
|
457
|
+
open,
|
|
458
|
+
onOpenChange: setOpen,
|
|
459
|
+
onOpenToggle,
|
|
460
|
+
modal,
|
|
461
|
+
keepChildrenMounted,
|
|
462
|
+
disableRemoveScroll,
|
|
463
|
+
onAnimationComplete,
|
|
464
|
+
};
|
|
465
|
+
React.useImperativeHandle(ref, () => ({
|
|
466
|
+
open: setOpen,
|
|
467
|
+
}), [setOpen]);
|
|
468
|
+
return ((0, jsx_runtime_1.jsx)(adapt_1.AdaptParent, { scope: adaptScope, portal: {
|
|
469
|
+
forwardProps: props,
|
|
470
|
+
}, children: (0, jsx_runtime_1.jsx)(exports.DialogProvider, { scope: scope, ...context, children: (0, jsx_runtime_1.jsx)(DialogSheetController, { onOpenChange: setOpen, scope: scope, children: children }) }) }));
|
|
471
|
+
}), {
|
|
472
|
+
Trigger: DialogTrigger,
|
|
473
|
+
Portal: DialogPortal,
|
|
474
|
+
Overlay: DialogOverlay,
|
|
475
|
+
Content: DialogContent,
|
|
476
|
+
Title: DialogTitle,
|
|
477
|
+
Description: DialogDescription,
|
|
478
|
+
Close: DialogClose,
|
|
479
|
+
FocusScope: focus_scope_1.FocusScopeController,
|
|
480
|
+
Adapt: adapt_1.Adapt,
|
|
481
|
+
});
|
|
482
|
+
exports.Dialog = Dialog;
|
|
483
|
+
const getAdaptScope = (dialogScope) => `DialogAdapt${dialogScope}`;
|
|
484
|
+
const DialogSheetController = (props) => {
|
|
485
|
+
const context = (0, exports.useDialogContext)(props.scope);
|
|
486
|
+
const isAdapted = (0, adapt_1.useAdaptIsActive)(context.adaptScope);
|
|
487
|
+
// tracks whether the adapted Sheet has finished its slide-out animation.
|
|
488
|
+
// starts true (= safe to unmount) when the dialog is closed; flips to
|
|
489
|
+
// false the moment the dialog opens; flips back to true when the sheet
|
|
490
|
+
// signals onAnimationComplete with open=false (i.e. slide-out finished).
|
|
491
|
+
const [isAdaptFullyHidden, setIsAdaptFullyHidden] = React.useState(!context.open);
|
|
492
|
+
// mirror context.open into the hidden flag during render — an opening
|
|
493
|
+
// dialog must immediately mark its children as not-hidden so they render
|
|
494
|
+
// for the enter animation.
|
|
495
|
+
if (context.open && isAdaptFullyHidden) {
|
|
496
|
+
setIsAdaptFullyHidden(false);
|
|
497
|
+
}
|
|
498
|
+
const handleSheetAnimationComplete = React.useCallback(({ open }) => {
|
|
499
|
+
if (!open) {
|
|
500
|
+
setIsAdaptFullyHidden(true);
|
|
501
|
+
}
|
|
502
|
+
}, []);
|
|
503
|
+
return ((0, jsx_runtime_1.jsx)(controller_1.SheetController, { onOpenChange: (val) => {
|
|
504
|
+
if (isAdapted) {
|
|
505
|
+
props.onOpenChange?.(val);
|
|
506
|
+
}
|
|
507
|
+
}, onAnimationComplete: handleSheetAnimationComplete, open: context.open, hidden: !isAdapted, children: (0, jsx_runtime_1.jsx)(DialogAdaptHiddenContext.Provider, { value: isAdaptFullyHidden, children: props.children }) }));
|
|
508
|
+
};
|
|
509
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../src/Dialog.tsx"],"names":[],"mappings":";;;;;AAAA,2CAOwB;AACxB,+CAA2C;AAC3C,yDAAqE;AACrE,mDAAsE;AAEtE,yCAQuB;AACvB,6DAAwD;AAExD,uDAAmD;AAEnD,uDAAwE;AACxE,+CAA8E;AAC9E,6CAKyB;AACzB,2DAAsD;AACtD,2DAA4D;AAE5D,6CAA+E;AAC/E,yCAA8C;AAC9C,6EAAuE;AACvE,2DAA4D;AAC5D,MAAY,KAAK,0CAAa;AAmDjB,QAAA,aAAa,GAAG,IAAA,0BAAmB;AAC9C,yDAAyD;AACzD,EAAwB,EACxB,UAAU,CACX,CAAA;AAED,CAAa,EAAE,gBAAgB,EAAE,QAAA,gBAAgB,EAAE,QAAQ,EAAE,QAAA,cAAc,EAAE,GAC3E,QAAA,aAAa,EAAA;AAEf;;;;;;;;;GASG;AACH,MAAM,wBAAwB,GAAG,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAA;AAE1D;;oGAEoG;AAEpG,MAAM,kBAAkB,GAAG,IAAA,aAAM,EAAC,WAAI,EAAE;IACtC,IAAI,EAAE,eAAe;CACtB,CAAC,CAAA;AAIF,MAAM,aAAa,GAAG,kBAAkB,CAAC,SAAS,CAChD,SAAS,aAAa,CAAC,KAAK,EAAE,YAAY;IACxC,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,GAAG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