@tamagui/dialog 1.0.1-beta.43

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,387 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { AnimatePresence } from "@tamagui/animate-presence";
4
+ import { useComposedRefs } from "@tamagui/compose-refs";
5
+ import {
6
+ Slot,
7
+ Theme,
8
+ composeEventHandlers,
9
+ isWeb,
10
+ styled,
11
+ useId,
12
+ useThemeName,
13
+ withStaticProperties
14
+ } from "@tamagui/core";
15
+ import { createContext, createContextScope } from "@tamagui/create-context";
16
+ import { Dismissable } from "@tamagui/dismissable";
17
+ import { FocusScope } from "@tamagui/focus-scope";
18
+ import { Portal } from "@tamagui/portal";
19
+ import { ThemeableStack, YStack } from "@tamagui/stacks";
20
+ import { H2, Paragraph } from "@tamagui/text";
21
+ import { useControllableState } from "@tamagui/use-controllable-state";
22
+ import * as React from "react";
23
+ import { RemoveScroll } from "react-remove-scroll";
24
+ const DIALOG_NAME = "Dialog";
25
+ const [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
26
+ const [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
27
+ const TRIGGER_NAME = "DialogTrigger";
28
+ const DialogTriggerFrame = styled(YStack, {
29
+ name: TRIGGER_NAME
30
+ });
31
+ const DialogTrigger = React.forwardRef((props, forwardedRef) => {
32
+ const { __scopeDialog, ...triggerProps } = props;
33
+ const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
34
+ const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
35
+ return /* @__PURE__ */ React.createElement(DialogTriggerFrame, {
36
+ tag: "button",
37
+ "aria-haspopup": "dialog",
38
+ "aria-expanded": context.open,
39
+ "aria-controls": context.contentId,
40
+ "data-state": getState(context.open),
41
+ ...triggerProps,
42
+ ref: composedTriggerRef,
43
+ onPress: composeEventHandlers(props.onPress, context.onOpenToggle)
44
+ });
45
+ });
46
+ DialogTrigger.displayName = TRIGGER_NAME;
47
+ const PORTAL_NAME = "DialogPortal";
48
+ const [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
49
+ forceMount: void 0
50
+ });
51
+ const DialogPortal = /* @__PURE__ */ __name((props) => {
52
+ const { __scopeDialog, forceMount, children, ...rest } = props;
53
+ const themeName = useThemeName();
54
+ const context = useDialogContext(PORTAL_NAME, __scopeDialog);
55
+ const isShowing = forceMount || context.open;
56
+ const contents = /* @__PURE__ */ React.createElement(AnimatePresence, null, isShowing ? children : null);
57
+ if (!context.modal) {
58
+ return contents;
59
+ }
60
+ return /* @__PURE__ */ React.createElement(PortalProvider, {
61
+ scope: __scopeDialog,
62
+ forceMount
63
+ }, /* @__PURE__ */ React.createElement(Portal, {
64
+ alignItems: "center",
65
+ justifyContent: "center",
66
+ zIndex: 100,
67
+ pointerEvents: isShowing ? "auto" : "none",
68
+ ...isWeb && {
69
+ maxHeight: "100vh"
70
+ },
71
+ ...rest
72
+ }, /* @__PURE__ */ React.createElement(Theme, {
73
+ name: themeName
74
+ }, contents)));
75
+ }, "DialogPortal");
76
+ DialogPortal.displayName = PORTAL_NAME;
77
+ const OVERLAY_NAME = "DialogOverlay";
78
+ const DialogOverlayFrame = styled(ThemeableStack, {
79
+ name: OVERLAY_NAME,
80
+ pointerEvents: "auto",
81
+ backgrounded: true,
82
+ fullscreen: true
83
+ });
84
+ const DialogOverlay = React.forwardRef((props, forwardedRef) => {
85
+ const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
86
+ const { forceMount = portalContext.forceMount, ...overlayProps } = props;
87
+ const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
88
+ if (!context.modal) {
89
+ return null;
90
+ }
91
+ return /* @__PURE__ */ React.createElement(DialogOverlayImpl, {
92
+ ...overlayProps,
93
+ ref: forwardedRef
94
+ });
95
+ });
96
+ DialogOverlay.displayName = OVERLAY_NAME;
97
+ const DialogOverlayImpl = React.forwardRef((props, forwardedRef) => {
98
+ const { __scopeDialog, ...overlayProps } = props;
99
+ const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
100
+ const content = /* @__PURE__ */ React.createElement(DialogOverlayFrame, {
101
+ "data-state": getState(context.open),
102
+ pointerEvents: "auto",
103
+ ...overlayProps,
104
+ ref: forwardedRef
105
+ });
106
+ if (!isWeb) {
107
+ return content;
108
+ }
109
+ return /* @__PURE__ */ React.createElement(RemoveScroll, {
110
+ as: Slot,
111
+ allowPinchZoom: context.allowPinchZoom,
112
+ shards: [context.contentRef]
113
+ }, content);
114
+ });
115
+ const CONTENT_NAME = "DialogContent";
116
+ const DialogContentFrame = styled(ThemeableStack, {
117
+ name: CONTENT_NAME,
118
+ tag: "dialog",
119
+ pointerEvents: "auto",
120
+ position: "relative",
121
+ backgrounded: true,
122
+ padded: true,
123
+ radiused: true,
124
+ elevate: true,
125
+ variants: {
126
+ size: {
127
+ "...size": (val, extras) => {
128
+ return {};
129
+ }
130
+ }
131
+ },
132
+ defaultVariants: {
133
+ size: "$4"
134
+ }
135
+ });
136
+ const DialogContent = React.forwardRef((props, forwardedRef) => {
137
+ const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
138
+ const { forceMount = portalContext.forceMount, ...contentProps } = props;
139
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
140
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, context.modal ? /* @__PURE__ */ React.createElement(DialogContentModal, {
141
+ ...contentProps,
142
+ ref: forwardedRef
143
+ }) : /* @__PURE__ */ React.createElement(DialogContentNonModal, {
144
+ ...contentProps,
145
+ ref: forwardedRef
146
+ }));
147
+ });
148
+ DialogContent.displayName = CONTENT_NAME;
149
+ const DialogContentModal = React.forwardRef((props, forwardedRef) => {
150
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
151
+ const contentRef = React.useRef(null);
152
+ const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
153
+ return /* @__PURE__ */ React.createElement(DialogContentImpl, {
154
+ ...props,
155
+ ref: composedRefs,
156
+ trapFocus: context.open,
157
+ disableOutsidePointerEvents: true,
158
+ onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
159
+ var _a;
160
+ event.preventDefault();
161
+ (_a = context.triggerRef.current) == null ? void 0 : _a.focus();
162
+ }),
163
+ onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
164
+ const originalEvent = event["detail"].originalEvent;
165
+ const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
166
+ const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
167
+ if (isRightClick)
168
+ event.preventDefault();
169
+ }),
170
+ onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault())
171
+ });
172
+ });
173
+ const DialogContentNonModal = React.forwardRef((props, forwardedRef) => {
174
+ const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
175
+ const hasInteractedOutsideRef = React.useRef(false);
176
+ return /* @__PURE__ */ React.createElement(DialogContentImpl, {
177
+ ...props,
178
+ ref: forwardedRef,
179
+ trapFocus: false,
180
+ disableOutsidePointerEvents: false,
181
+ onCloseAutoFocus: (event) => {
182
+ var _a, _b;
183
+ (_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
184
+ if (!event.defaultPrevented) {
185
+ if (!hasInteractedOutsideRef.current)
186
+ (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
187
+ event.preventDefault();
188
+ }
189
+ hasInteractedOutsideRef.current = false;
190
+ },
191
+ onInteractOutside: (event) => {
192
+ var _a;
193
+ (_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
194
+ if (!event.defaultPrevented)
195
+ hasInteractedOutsideRef.current = true;
196
+ const target = event.target;
197
+ const trigger = context.triggerRef.current;
198
+ if (!(trigger instanceof HTMLElement))
199
+ return;
200
+ const targetIsTrigger = trigger.contains(target);
201
+ if (targetIsTrigger)
202
+ event.preventDefault();
203
+ }
204
+ });
205
+ });
206
+ const DialogContentImpl = React.forwardRef((props, forwardedRef) => {
207
+ const {
208
+ __scopeDialog,
209
+ trapFocus,
210
+ onOpenAutoFocus,
211
+ onCloseAutoFocus,
212
+ disableOutsidePointerEvents,
213
+ onEscapeKeyDown,
214
+ onPointerDownOutside,
215
+ onFocusOutside,
216
+ onInteractOutside,
217
+ ...contentProps
218
+ } = props;
219
+ const context = useDialogContext(CONTENT_NAME, __scopeDialog);
220
+ const contentRef = React.useRef(null);
221
+ const composedRefs = useComposedRefs(forwardedRef, contentRef);
222
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(FocusScope, {
223
+ loop: true,
224
+ trapped: trapFocus,
225
+ onMountAutoFocus: onOpenAutoFocus,
226
+ onUnmountAutoFocus: onCloseAutoFocus
227
+ }, /* @__PURE__ */ React.createElement(Dismissable, {
228
+ disableOutsidePointerEvents,
229
+ onEscapeKeyDown,
230
+ onPointerDownOutside,
231
+ onFocusOutside,
232
+ onInteractOutside,
233
+ ref: composedRefs,
234
+ onDismiss: () => context.onOpenChange(false)
235
+ }, /* @__PURE__ */ React.createElement(DialogContentFrame, {
236
+ id: context.contentId,
237
+ "aria-describedby": context.descriptionId,
238
+ "aria-labelledby": context.titleId,
239
+ "data-state": getState(context.open),
240
+ ...contentProps
241
+ }))), process.env.NODE_ENV !== "production" && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(TitleWarning, {
242
+ titleId: context.titleId
243
+ }), /* @__PURE__ */ React.createElement(DescriptionWarning, {
244
+ contentRef,
245
+ descriptionId: context.descriptionId
246
+ })));
247
+ });
248
+ const TITLE_NAME = "DialogTitle";
249
+ const DialogTitleFrame = styled(H2, {
250
+ name: TITLE_NAME
251
+ });
252
+ const DialogTitle = React.forwardRef((props, forwardedRef) => {
253
+ const { __scopeDialog, ...titleProps } = props;
254
+ const context = useDialogContext(TITLE_NAME, __scopeDialog);
255
+ return /* @__PURE__ */ React.createElement(DialogTitleFrame, {
256
+ id: context.titleId,
257
+ ...titleProps,
258
+ ref: forwardedRef
259
+ });
260
+ });
261
+ DialogTitle.displayName = TITLE_NAME;
262
+ const DialogDescriptionFrame = styled(Paragraph, {
263
+ name: "DialogDescription"
264
+ });
265
+ const DESCRIPTION_NAME = "DialogDescription";
266
+ const DialogDescription = React.forwardRef((props, forwardedRef) => {
267
+ const { __scopeDialog, ...descriptionProps } = props;
268
+ const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
269
+ return /* @__PURE__ */ React.createElement(DialogDescriptionFrame, {
270
+ id: context.descriptionId,
271
+ ...descriptionProps,
272
+ ref: forwardedRef
273
+ });
274
+ });
275
+ DialogDescription.displayName = DESCRIPTION_NAME;
276
+ const CLOSE_NAME = "DialogClose";
277
+ const DialogClose = React.forwardRef((props, forwardedRef) => {
278
+ const { __scopeDialog, ...closeProps } = props;
279
+ const context = useDialogContext(CLOSE_NAME, __scopeDialog);
280
+ return /* @__PURE__ */ React.createElement(YStack, {
281
+ tag: "button",
282
+ ...closeProps,
283
+ ref: forwardedRef,
284
+ onPress: composeEventHandlers(props.onPress, () => context.onOpenChange(false))
285
+ });
286
+ });
287
+ DialogClose.displayName = CLOSE_NAME;
288
+ function getState(open) {
289
+ return open ? "open" : "closed";
290
+ }
291
+ __name(getState, "getState");
292
+ const TITLE_WARNING_NAME = "DialogTitleWarning";
293
+ const [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {
294
+ contentName: CONTENT_NAME,
295
+ titleName: TITLE_NAME,
296
+ docsSlug: "dialog"
297
+ });
298
+ const TitleWarning = /* @__PURE__ */ __name(({ titleId }) => {
299
+ const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
300
+ const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
301
+
302
+ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
303
+
304
+ For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
305
+ React.useEffect(() => {
306
+ if (!isWeb)
307
+ return;
308
+ if (titleId) {
309
+ const hasTitle = document.getElementById(titleId);
310
+ if (!hasTitle)
311
+ throw new Error(MESSAGE);
312
+ }
313
+ }, [MESSAGE, titleId]);
314
+ return null;
315
+ }, "TitleWarning");
316
+ const DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
317
+ const DescriptionWarning = /* @__PURE__ */ __name(({ contentRef, descriptionId }) => {
318
+ const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
319
+ const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
320
+ React.useEffect(() => {
321
+ if (!isWeb)
322
+ return;
323
+ const contentNode = contentRef.current;
324
+ if (!(contentNode instanceof HTMLElement)) {
325
+ return;
326
+ }
327
+ const describedById = contentNode.getAttribute("aria-describedby");
328
+ if (descriptionId && describedById) {
329
+ const hasDescription = document.getElementById(descriptionId);
330
+ if (!hasDescription)
331
+ console.warn(MESSAGE);
332
+ }
333
+ }, [MESSAGE, contentRef, descriptionId]);
334
+ return null;
335
+ }, "DescriptionWarning");
336
+ const Dialog = withStaticProperties(/* @__PURE__ */ __name(function Dialog2(props) {
337
+ const {
338
+ __scopeDialog,
339
+ children,
340
+ open: openProp,
341
+ defaultOpen = false,
342
+ onOpenChange,
343
+ modal = true,
344
+ allowPinchZoom
345
+ } = props;
346
+ const triggerRef = React.useRef(null);
347
+ const contentRef = React.useRef(null);
348
+ const [open = false, setOpen] = useControllableState({
349
+ prop: openProp,
350
+ defaultProp: defaultOpen,
351
+ onChange: onOpenChange
352
+ });
353
+ return /* @__PURE__ */ React.createElement(DialogProvider, {
354
+ scope: __scopeDialog,
355
+ triggerRef,
356
+ contentRef,
357
+ contentId: useId() || "",
358
+ titleId: useId() || "",
359
+ descriptionId: useId() || "",
360
+ open,
361
+ onOpenChange: setOpen,
362
+ onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
363
+ modal,
364
+ allowPinchZoom: allowPinchZoom || false
365
+ }, children);
366
+ }, "Dialog"), {
367
+ Trigger: DialogTrigger,
368
+ Portal: DialogPortal,
369
+ Overlay: DialogOverlay,
370
+ Content: DialogContent,
371
+ Title: DialogTitle,
372
+ Description: DialogDescription,
373
+ Close: DialogClose
374
+ });
375
+ export {
376
+ Dialog,
377
+ DialogClose,
378
+ DialogContent,
379
+ DialogDescription,
380
+ DialogOverlay,
381
+ DialogPortal,
382
+ DialogTitle,
383
+ DialogTrigger,
384
+ WarningProvider,
385
+ createDialogScope
386
+ };
387
+ //# sourceMappingURL=Dialog.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/Dialog.tsx"],
4
+ "sourcesContent": ["import { AnimatePresence } from '@tamagui/animate-presence'\nimport { useComposedRefs } from '@tamagui/compose-refs'\nimport {\n GetProps,\n Slot,\n Theme,\n composeEventHandlers,\n isWeb,\n styled,\n useId,\n useThemeName,\n withStaticProperties,\n} from '@tamagui/core'\nimport { Scope, createContext, createContextScope } from '@tamagui/create-context'\nimport { Dismissable, DismissableProps } from '@tamagui/dismissable'\nimport { FocusScope, FocusScopeProps } from '@tamagui/focus-scope'\nimport { Portal, PortalProps } from '@tamagui/portal'\nimport { ThemeableStack, YStack, YStackProps } from '@tamagui/stacks'\nimport { H2, Paragraph } from '@tamagui/text'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport * as React from 'react'\nimport { View } from 'react-native'\nimport { RemoveScroll } from 'react-remove-scroll'\n// import { hideOthers } from 'aria-hidden';\n\nconst DIALOG_NAME = 'Dialog'\n\ntype ScopedProps<P> = P & { __scopeDialog?: Scope }\ntype TamaguiElement = HTMLElement | View\n\nconst [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME)\n\ntype DialogContextValue = {\n triggerRef: React.RefObject<TamaguiElement>\n contentRef: React.RefObject<TamaguiElement>\n contentId: string\n titleId: string\n descriptionId: string\n open: boolean\n onOpenChange(open: boolean): void\n onOpenToggle(): void\n modal: boolean\n allowPinchZoom: boolean\n // allowPinchZoom: DialogProps['allowPinchZoom'];\n}\n\nconst [DialogProvider, useDialogContext] = createDialogContext<DialogContextValue>(DIALOG_NAME)\n\ntype RemoveScrollProps = React.ComponentProps<typeof RemoveScroll>\n\ninterface DialogProps {\n children?: React.ReactNode\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?(open: boolean): void\n modal?: boolean\n\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: RemoveScrollProps['allowPinchZoom']\n}\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'DialogTrigger'\n\nconst DialogTriggerFrame = styled(YStack, {\n name: TRIGGER_NAME,\n})\n\ninterface DialogTriggerProps extends YStackProps {}\n\nconst DialogTrigger = React.forwardRef<TamaguiElement, DialogTriggerProps>(\n (props: ScopedProps<DialogTriggerProps>, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog)\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef)\n return (\n <DialogTriggerFrame\n tag=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onPress={composeEventHandlers(props.onPress, context.onOpenToggle)}\n />\n )\n }\n)\n\nDialogTrigger.displayName = TRIGGER_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/\n\nconst PORTAL_NAME = 'DialogPortal'\n\ntype PortalContextValue = { forceMount?: true }\nconst [PortalProvider, usePortalContext] = createDialogContext<PortalContextValue>(PORTAL_NAME, {\n forceMount: undefined,\n})\n\ninterface DialogPortalProps extends Omit<PortalProps, 'asChild'> {\n children?: React.ReactNode\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true\n}\n\nconst DialogPortal: React.FC<DialogPortalProps> = (props: ScopedProps<DialogPortalProps>) => {\n const { __scopeDialog, forceMount, children, ...rest } = props\n const themeName = useThemeName()\n const context = useDialogContext(PORTAL_NAME, __scopeDialog)\n const isShowing = forceMount || context.open\n const contents = <AnimatePresence>{isShowing ? children : null}</AnimatePresence>\n if (!context.modal) {\n return contents\n }\n return (\n <PortalProvider scope={__scopeDialog} forceMount={forceMount}>\n <Portal\n alignItems=\"center\"\n justifyContent=\"center\"\n zIndex={100}\n pointerEvents={isShowing ? 'auto' : 'none'}\n {...(isWeb && {\n maxHeight: '100vh',\n })}\n {...rest}\n >\n <Theme name={themeName}>{contents}</Theme>\n </Portal>\n </PortalProvider>\n )\n}\n\nDialogPortal.displayName = PORTAL_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/\n\nconst OVERLAY_NAME = 'DialogOverlay'\n\nconst DialogOverlayFrame = styled(ThemeableStack, {\n name: OVERLAY_NAME,\n pointerEvents: 'auto',\n backgrounded: true,\n fullscreen: true,\n})\n\ninterface DialogOverlayProps extends YStackProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true\n}\n\nconst DialogOverlay = React.forwardRef<TamaguiElement, DialogOverlayProps>(\n (props: ScopedProps<DialogOverlayProps>, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog)\n const { forceMount = portalContext.forceMount, ...overlayProps } = props\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog)\n\n if (!context.modal) {\n return null\n }\n\n // <AnimatePresence>\n return <DialogOverlayImpl {...overlayProps} ref={forwardedRef} />\n // </AnimatePresence>\n }\n)\n\nDialogOverlay.displayName = OVERLAY_NAME\n\ntype DialogOverlayImplProps = GetProps<typeof DialogOverlayFrame>\n\nconst DialogOverlayImpl = React.forwardRef<TamaguiElement, DialogOverlayImplProps>(\n (props: ScopedProps<DialogOverlayImplProps>, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog)\n const content = (\n <DialogOverlayFrame\n data-state={getState(context.open)}\n // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n pointerEvents=\"auto\"\n {...overlayProps}\n ref={forwardedRef}\n />\n )\n\n if (!isWeb) {\n return content\n }\n\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n <RemoveScroll as={Slot} allowPinchZoom={context.allowPinchZoom} shards={[context.contentRef]}>\n {content}\n </RemoveScroll>\n )\n }\n)\n\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'DialogContent'\n\nconst DialogContentFrame = styled(ThemeableStack, {\n name: CONTENT_NAME,\n tag: 'dialog',\n pointerEvents: 'auto',\n position: 'relative',\n backgrounded: true,\n padded: true,\n radiused: true,\n elevate: true,\n\n variants: {\n size: {\n '...size': (val, extras) => {\n return {}\n },\n },\n },\n\n defaultVariants: {\n size: '$4',\n },\n})\n\ntype DialogContentFrameProps = GetProps<typeof DialogContentFrame>\n\ntype DialogContentProps = DialogContentFrameProps & {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries.\n */\n forceMount?: true\n}\n\nconst DialogContent = React.forwardRef<TamaguiElement, DialogContentProps>(\n (props: ScopedProps<DialogContentProps>, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog)\n const { forceMount = portalContext.forceMount, ...contentProps } = props\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog)\n return (\n <>\n {context.modal ? (\n <DialogContentModal {...contentProps} ref={forwardedRef} />\n ) : (\n <DialogContentNonModal {...contentProps} ref={forwardedRef} />\n )}\n </>\n )\n }\n)\n\nDialogContent.displayName = CONTENT_NAME\n\n/* -----------------------------------------------------------------------------------------------*/\n\ninterface DialogContentTypeProps\n extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {}\n\nconst DialogContentModal = React.forwardRef<TamaguiElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog)\n const contentRef = React.useRef<HTMLDivElement>(null)\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef)\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n // React.useEffect(() => {\n // const content = contentRef.current\n // if (content) {\n // console.log('should hide others')\n // // return hideOthers(content)\n // }\n // }, [])\n\n return (\n <DialogContentImpl\n {...props}\n ref={composedRefs}\n // we make sure focus isn't trapped once `DialogContent` has been closed\n // (closed !== unmounted when animating out)\n trapFocus={context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault()\n context.triggerRef.current?.focus()\n })}\n onPointerDownOutside={composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event['detail'].originalEvent\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick\n // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault()\n })}\n // When focus is trapped, a `focusout` event may still happen.\n // We make sure we don't trigger our `onDismiss` in such case.\n onFocusOutside={composeEventHandlers(props.onFocusOutside, (event) =>\n event.preventDefault()\n )}\n />\n )\n }\n)\n\n/* -----------------------------------------------------------------------------------------------*/\n\nconst DialogContentNonModal = React.forwardRef<TamaguiElement, DialogContentTypeProps>(\n (props: ScopedProps<DialogContentTypeProps>, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog)\n const hasInteractedOutsideRef = React.useRef(false)\n\n return (\n <DialogContentImpl\n {...props}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event)\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus()\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault()\n }\n\n hasInteractedOutsideRef.current = false\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event)\n\n if (!event.defaultPrevented) hasInteractedOutsideRef.current = true\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n //\n // We use `onInteractOutside` as some browsers also\n // focus on pointer down, creating the same issue.\n const target = event.target as HTMLElement\n const trigger = context.triggerRef.current\n if (!(trigger instanceof HTMLElement)) return\n const targetIsTrigger = trigger.contains(target)\n if (targetIsTrigger) event.preventDefault()\n }}\n />\n )\n }\n)\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype DialogContentImplProps = DialogContentFrameProps &\n Omit<DismissableProps, 'onDismiss'> & {\n /**\n * When `true`, focus cannot escape the `Content` via keyboard,\n * pointer, or a programmatic focus.\n * @defaultValue false\n */\n trapFocus?: FocusScopeProps['trapped']\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']\n }\n\nconst DialogContentImpl = React.forwardRef<TamaguiElement, DialogContentImplProps>(\n (props: ScopedProps<DialogContentImplProps>, forwardedRef) => {\n const {\n __scopeDialog,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props\n const context = useDialogContext(CONTENT_NAME, __scopeDialog)\n const contentRef = React.useRef<HTMLDivElement>(null)\n const composedRefs = useComposedRefs(forwardedRef, contentRef)\n\n // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (beacuse of the `Portal`)\n // useFocusGuards();\n\n return (\n <>\n <FocusScope\n loop\n trapped={trapFocus}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n <Dismissable\n disableOutsidePointerEvents={disableOutsidePointerEvents}\n onEscapeKeyDown={onEscapeKeyDown}\n onPointerDownOutside={onPointerDownOutside}\n onFocusOutside={onFocusOutside}\n onInteractOutside={onInteractOutside}\n // @ts-ignore\n ref={composedRefs}\n onDismiss={() => context.onOpenChange(false)}\n >\n <DialogContentFrame\n id={context.contentId}\n aria-describedby={context.descriptionId}\n aria-labelledby={context.titleId}\n data-state={getState(context.open)}\n {...contentProps}\n />\n </Dismissable>\n </FocusScope>\n {process.env.NODE_ENV !== 'production' && (\n <>\n <TitleWarning titleId={context.titleId} />\n <DescriptionWarning contentRef={contentRef} descriptionId={context.descriptionId} />\n </>\n )}\n </>\n )\n }\n)\n\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/\n\nconst TITLE_NAME = 'DialogTitle'\nconst DialogTitleFrame = styled(H2, {\n name: TITLE_NAME,\n})\n\ntype DialogTitleProps = GetProps<typeof DialogTitleFrame>\n\nconst DialogTitle = React.forwardRef<TamaguiElement, DialogTitleProps>(\n (props: ScopedProps<DialogTitleProps>, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props\n const context = useDialogContext(TITLE_NAME, __scopeDialog)\n return <DialogTitleFrame id={context.titleId} {...titleProps} ref={forwardedRef} />\n }\n)\n\nDialogTitle.displayName = TITLE_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/\n\nconst DialogDescriptionFrame = styled(Paragraph, {\n name: 'DialogDescription',\n})\n\ntype DialogDescriptionProps = GetProps<typeof DialogDescriptionFrame>\n\nconst DESCRIPTION_NAME = 'DialogDescription'\n\nconst DialogDescription = React.forwardRef<TamaguiElement, DialogDescriptionProps>(\n (props: ScopedProps<DialogDescriptionProps>, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog)\n return (\n <DialogDescriptionFrame id={context.descriptionId} {...descriptionProps} ref={forwardedRef} />\n )\n }\n)\n\nDialogDescription.displayName = DESCRIPTION_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'DialogClose'\n\ntype DialogCloseProps = YStackProps\n\nconst DialogClose = React.forwardRef<TamaguiElement, DialogCloseProps>(\n (props: ScopedProps<DialogCloseProps>, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props\n const context = useDialogContext(CLOSE_NAME, __scopeDialog)\n return (\n <YStack\n tag=\"button\"\n {...closeProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress, () => context.onOpenChange(false))}\n />\n )\n }\n)\n\nDialogClose.displayName = CLOSE_NAME\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed'\n}\n\nconst TITLE_WARNING_NAME = 'DialogTitleWarning'\n\nconst [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: 'dialog',\n})\n\ntype TitleWarningProps = { titleId?: string }\n\nconst TitleWarning: React.FC<TitleWarningProps> = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME)\n\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`\n\n React.useEffect(() => {\n if (!isWeb) return\n if (titleId) {\n const hasTitle = document.getElementById(titleId)\n if (!hasTitle) throw new Error(MESSAGE)\n }\n }, [MESSAGE, titleId])\n\n return null\n}\n\nconst DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning'\n\ntype DescriptionWarningProps = {\n contentRef: React.RefObject<TamaguiElement>\n descriptionId?: string\n}\n\nconst DescriptionWarning: React.FC<DescriptionWarningProps> = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME)\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`\n\n React.useEffect(() => {\n if (!isWeb) return\n const contentNode = contentRef.current\n if (!(contentNode instanceof HTMLElement)) {\n return\n }\n const describedById = contentNode.getAttribute('aria-describedby')\n // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId)\n if (!hasDescription) console.warn(MESSAGE)\n }\n }, [MESSAGE, contentRef, descriptionId])\n\n return null\n}\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/\n\nconst Dialog = withStaticProperties(\n function Dialog(props: ScopedProps<DialogProps>) {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n modal = true,\n allowPinchZoom,\n } = props\n const triggerRef = React.useRef<HTMLButtonElement>(null)\n const contentRef = React.useRef<TamaguiElement>(null)\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n })\n\n return (\n <DialogProvider\n scope={__scopeDialog}\n triggerRef={triggerRef}\n contentRef={contentRef}\n contentId={useId() || ''}\n titleId={useId() || ''}\n descriptionId={useId() || ''}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n modal={modal}\n allowPinchZoom={allowPinchZoom || false}\n >\n {children}\n </DialogProvider>\n )\n },\n {\n Trigger: DialogTrigger,\n Portal: DialogPortal,\n Overlay: DialogOverlay,\n Content: DialogContent,\n Title: DialogTitle,\n Description: DialogDescription,\n Close: DialogClose,\n }\n)\n\nexport {\n createDialogScope,\n //\n Dialog,\n DialogTrigger,\n DialogPortal,\n DialogOverlay,\n DialogContent,\n DialogTitle,\n DialogDescription,\n DialogClose,\n //\n WarningProvider,\n}\nexport type {\n DialogProps,\n DialogTriggerProps,\n DialogPortalProps,\n DialogOverlayProps,\n DialogContentProps,\n DialogTitleProps,\n DialogDescriptionProps,\n DialogCloseProps,\n}\n"],
5
+ "mappings": ";;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAGA,MAAM,cAAc;AAKpB,MAAM,CAAC,qBAAqB,qBAAqB,mBAAmB,WAAW;AAgB/E,MAAM,CAAC,gBAAgB,oBAAoB,oBAAwC,WAAW;AAqB9F,MAAM,eAAe;AAErB,MAAM,qBAAqB,OAAO,QAAQ;AAAA,EACxC,MAAM;AACR,CAAC;AAID,MAAM,gBAAgB,MAAM,WAC1B,CAAC,OAAwC,iBAAiB;AACxD,QAAM,EAAE,kBAAkB,iBAAiB;AAC3C,QAAM,UAAU,iBAAiB,cAAc,aAAa;AAC5D,QAAM,qBAAqB,gBAAgB,cAAc,QAAQ,UAAU;AAC3E,SACE,oCAAC;AAAA,IACC,KAAI;AAAA,IACJ,iBAAc;AAAA,IACd,iBAAe,QAAQ;AAAA,IACvB,iBAAe,QAAQ;AAAA,IACvB,cAAY,SAAS,QAAQ,IAAI;AAAA,OAC7B;AAAA,IACJ,KAAK;AAAA,IACL,SAAS,qBAAqB,MAAM,SAAS,QAAQ,YAAY;AAAA,GACnE;AAEJ,CACF;AAEA,cAAc,cAAc;AAM5B,MAAM,cAAc;AAGpB,MAAM,CAAC,gBAAgB,oBAAoB,oBA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;AAAA,IACA,gBAAgB,kBAAkB;AAAA,KAEjC,QACH;AAEJ,GAnCA,WAoCA;AAAA,EACE,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AAAA,EACP,aAAa;AAAA,EACb,OAAO;AACT,CACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Dialog";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["export * from './Dialog'\n"],
5
+ "mappings": "AAAA;",
6
+ "names": []
7
+ }