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