@tamagui/dialog 3.0.0-beta.1097.1 → 3.0.0-beta.1099.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -89,7 +89,7 @@ const DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {
89
89
  inset: 0,
90
90
  borderWidth: "web:0px",
91
91
  backgroundColor: "web:transparent",
92
- color: "web:inherit",
92
+ style: import_constants.isWeb ? { color: "inherit" } : void 0,
93
93
  maxInlineSize: "web:none",
94
94
  margin: "web:0px",
95
95
  width: "web:auto",
@@ -91,7 +91,7 @@ var DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {
91
91
  inset: 0,
92
92
  borderWidth: "web:0px",
93
93
  backgroundColor: "web:transparent",
94
- color: "web:inherit",
94
+ style: import_constants.isWeb ? { color: "inherit" } : void 0,
95
95
  maxInlineSize: "web:none",
96
96
  margin: "web:0px",
97
97
  width: "web:auto",
@@ -91,7 +91,7 @@ var DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {
91
91
  inset: 0,
92
92
  borderWidth: "web:0px",
93
93
  backgroundColor: "web:transparent",
94
- color: "web:inherit",
94
+ style: import_constants.isWeb ? { color: "inherit" } : void 0,
95
95
  maxInlineSize: "web:none",
96
96
  margin: "web:0px",
97
97
  width: "web:auto",
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.native.js","names":[],"sources":["cjs/Dialog.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Dialog_exports = {};\n__export(Dialog_exports, {\n Dialog: () => Dialog,\n DialogClose: () => DialogClose,\n DialogContent: () => DialogContent,\n DialogContext: () => DialogContext,\n DialogDescription: () => DialogDescription,\n DialogOverlay: () => DialogOverlay,\n DialogOverlayFrame: () => DialogOverlayFrame,\n DialogPortal: () => DialogPortal,\n DialogPortalFrame: () => DialogPortalFrame,\n DialogProvider: () => DialogProvider,\n DialogTitle: () => DialogTitle,\n DialogTrigger: () => DialogTrigger,\n DialogWarningProvider: () => DialogWarningProvider,\n useDialogContext: () => useDialogContext\n});\nmodule.exports = __toCommonJS(Dialog_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_animate = require(\"@tamagui/animate\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_create_context = require(\"@tamagui/create-context\");\nvar import_dismissable = require(\"@tamagui/dismissable\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_portal = require(\"@tamagui/portal\");\nvar import_remove_scroll = require(\"@tamagui/remove-scroll\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar import_z_index_stack = require(\"@tamagui/z-index-stack\");\nvar React = __toESM(require(\"react\"), 1);\nvar DialogContext = (0, import_core.createStyledContext)(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nvar { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nvar DialogTriggerFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"DialogTrigger\"\n});\nvar DialogTrigger = (0, import_core.createStyledHOC)(DialogTriggerFrame, function DialogTrigger2(props, forwardedRef) {\n var { scope, ...triggerProps } = props;\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n var context = useDialogContext(scope);\n var composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: props.asChild ? isInsideButton : true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTriggerFrame, {\n render: isInsideButton ? \"span\" : \"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: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)\n })\n });\n});\nvar DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n color: \"web:inherit\",\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nvar needsRepropagation = (0, import_portal.needsPortalRepropagation)();\nvar DialogPortalItem = function(param) {\n var { context, children } = param;\n var themeName = (0, import_core.useThemeName)();\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: themeName,\n children\n });\n if (needsRepropagation) {\n content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.ProvideAdaptContext, {\n ...adaptContext,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n ...context,\n children: content\n })\n });\n }\n return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n scope: context.adaptScope,\n children: content\n }) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, {\n hostName: \"root\",\n children: content\n }) : content;\n};\nvar DialogPortal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { scope, forceMount, children, ...frameProps } = props;\n var dialogRef = React.useRef(null);\n var ref = (0, import_compose_refs.composeRefs)(dialogRef, forwardedRef);\n var context = useDialogContext(scope);\n var portalContext = forceMount ? {\n ...context,\n forceMount: true\n } : context;\n var keepMounted = forceMount || context.keepChildrenMounted;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isVisible = context.open || context.hasPresentParts;\n if (import_constants.isWeb) {\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n var _node_show;\n (_node_show = node.show) === null || _node_show === void 0 ? void 0 : _node_show.call(node);\n } else {\n var _node_close;\n (_node_close = node.close) === null || _node_close === void 0 ? void 0 : _node_close.call(node);\n }\n }, [\n isVisible\n ]);\n }\n var zIndex = (0, import_core.getExpandedShorthand)(\"zIndex\", props);\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {\n zIndex: (0, import_portal.resolveViewZIndex)(zIndex),\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope: context.dialogScope,\n ...portalContext,\n children\n })\n });\n var framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.LayoutMeasurementController, {\n disable: !context.open,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalFrame, {\n ref,\n ...import_constants.isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n })\n });\n if (import_constants.isWeb) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {\n zIndex,\n // set to 100000 which ensures dialogs are above most fixed UI (headers, navs)\n // this makes sure its above typical stacking contexts\n stackZIndex: 1e5,\n passThrough: isAdapted,\n // hide the host while closed (covers keepChildrenMounted content, see\n // Portal.tsx); isVisible stays true through the exit animation\n hidden: !isVisible,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PassthroughTheme, {\n passThrough: isAdapted,\n children: framedContents\n })\n });\n }\n return isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context: portalContext,\n children: framedContents\n });\n});\nvar PassthroughTheme = function(param) {\n var { children, passThrough } = param;\n var themeName = (0, import_core.useThemeName)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n passThrough,\n name: themeName,\n forceClassName: true,\n children\n });\n};\nfunction useDialogAnimationReporter(context) {\n var onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n var openRef = React.useRef(context.open);\n var pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n var reportComplete = React.useCallback(function(open) {\n var _onAnimationCompleteRef_current;\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n (_onAnimationCompleteRef_current = onAnimationCompleteRef.current) === null || _onAnimationCompleteRef_current === void 0 ? void 0 : _onAnimationCompleteRef_current.call(onAnimationCompleteRef, {\n open\n });\n }, []);\n return React.useMemo(function() {\n return {\n onEnterComplete: function() {\n return reportComplete(true);\n },\n onExitComplete: function() {\n return reportComplete(false);\n }\n };\n }, [\n reportComplete\n ]);\n}\nfunction useDialogPartPresence(context, options) {\n var [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n var reactId = React.useId();\n var partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n var keepMounted = options.forceMount || context.keepChildrenMounted;\n var isPresent = context.open || !isFullyHidden;\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [\n context.open,\n isFullyHidden\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return function() {\n context.setPartPresence(partPresenceId, false);\n };\n }, [\n context.setPartPresence,\n isPresent,\n options.disabled,\n partPresenceId\n ]);\n var onExitComplete = React.useCallback(function() {\n var _options_onExitComplete;\n setIsFullyHidden(true);\n (_options_onExitComplete = options.onExitComplete) === null || _options_onExitComplete === void 0 ? void 0 : _options_onExitComplete.call(options);\n }, [\n options.onExitComplete\n ]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlayFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar DialogOverlay = (0, import_core.createStyledHOC)(DialogOverlayFrame, function DialogOverlay2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var { forceMount = context.forceMount, ...overlayProps } = props;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayFrame, {\n \"data-state\": getState(context.open),\n // Presence freezes the exiting clone with its open props. The exit\n // clause releases the full-screen overlay during that frozen frame.\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n }, `${context.contentId}-overlay`)\n });\n});\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContentFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: {\n width: 0,\n height: 12\n }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nvar DialogContent = (0, import_core.createStyledHOC)(DialogContentFrame, function DialogContent2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var reporter = useDialogAnimationReporter(context);\n var onTransitionProp = props.onTransition;\n var onTransition = React.useCallback(function(event) {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp === null || onTransitionProp === void 0 ? void 0 : onTransitionProp(event);\n }, [\n reporter.onEnterComplete,\n onTransitionProp\n ]);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n })\n });\n if (isAdapted) {\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: contents\n })\n });\n }\n if (!presence.shouldRender) {\n return null;\n }\n var animated = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(React.Fragment, {\n children: contents\n }, context.contentId)\n });\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: animated\n })\n });\n});\nvar DialogContentModal = (0, import_core.createRefComponent)(function(param, forwardedRef) {\n var { children, context: contextProp, ...props } = param;\n var context = useDialogContext(contextProp.dialogScope);\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\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: true,\n onCloseAutoFocus: (0, import_helpers.composeEventHandlers)(props.onCloseAutoFocus, function(event) {\n var _context_triggerRef_current;\n event.cancel();\n (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 ? void 0 : _context_triggerRef_current.focus();\n }),\n onPointerDownOutside: (0, import_helpers.composeEventHandlers)(props.onPointerDownOutside, function(event) {\n var originalEvent = event.event;\n if (!originalEvent) return;\n var ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n var isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\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: (0, import_helpers.composeEventHandlers)(props.onFocusOutside, function(event) {\n return event.cancel();\n }),\n outlineStyle: \"none\",\n children\n });\n});\nvar DialogContentNonModal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var context = useDialogContext(props.context.dialogScope);\n var hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: function(event) {\n var _props_onCloseAutoFocus;\n (_props_onCloseAutoFocus = props.onCloseAutoFocus) === null || _props_onCloseAutoFocus === void 0 ? void 0 : _props_onCloseAutoFocus.call(props, event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n var _props_context_triggerRef_current;\n (_props_context_triggerRef_current = props.context.triggerRef.current) === null || _props_context_triggerRef_current === void 0 ? void 0 : _props_context_triggerRef_current.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: function(event) {\n var _props_onInteractOutside, _event_event;\n (_props_onInteractOutside = props.onInteractOutside) === null || _props_onInteractOutside === void 0 ? void 0 : _props_onInteractOutside.call(props, event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n var target = (_event_event = event.event) === null || _event_event === void 0 ? void 0 : _event_event.target;\n var trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n var targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n });\n});\nvar DialogContentImpl = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, onTransition, ...contentProps } = props;\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context,\n children: contentProps.children\n });\n }\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentFrame, {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n // allow clicking through content during exit animation\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n });\n if (!import_constants.isWeb) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dismissable.Dismissable, {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: function() {\n var _context_onOpenChange;\n return context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false);\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_focus_scope.FocusScope, {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n })\n }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, {\n titleId: context.titleId\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, {\n contentRef,\n descriptionId: context.descriptionId\n })\n ]\n })\n ]\n });\n});\nvar DialogTitleFrame = (0, import_core.styled)(import_text.H2, {\n displayName: \"DialogTitle\"\n});\nvar DialogTitle = (0, import_core.createStyledHOC)(DialogTitleFrame, function DialogTitle2(props, forwardedRef) {\n var { scope, ...titleProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitleFrame, {\n id: context.titleId,\n ...titleProps,\n ref: forwardedRef\n });\n});\nvar DialogDescriptionFrame = (0, import_core.styled)(import_text.Paragraph, {\n displayName: \"DialogDescription\"\n});\nvar DialogDescription = (0, import_core.createStyledHOC)(DialogDescriptionFrame, function DialogDescription2(props, forwardedRef) {\n var { scope, ...descriptionProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDescriptionFrame, {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n });\n});\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogCloseFrame = (0, import_core.styled)(import_core.View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nvar DialogClose = (0, import_core.createStyledHOC)(DialogCloseFrame, function(props, forwardedRef) {\n var { scope, displayWhenAdapted, ...closeProps } = props;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogCloseFrame, {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: (0, import_helpers.composeEventHandlers)(props.onPress, function() {\n context.onOpenChange(false);\n })\n });\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [DialogWarningProvider, useWarningContext] = (0, import_create_context.createContext)(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nvar TitleWarning = function(param) {\n var { titleId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n var MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n if (titleId) {\n var hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n titleId\n ]);\n }\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = function(param) {\n var { contentRef, descriptionId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n var MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n var contentNode = contentRef.current;\n if (!(contentNode instanceof HTMLElement)) {\n return;\n }\n var describedById = contentNode.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n var hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n contentRef,\n descriptionId\n ]);\n }\n return null;\n};\nvar Dialog = (0, import_helpers.withStaticProperties)((0, import_core.createRefComponent)(function Dialog2(props) {\n var { scope = \"\", children, open: openProp, defaultOpen = false, onOpenChange, modal = true, keepChildrenMounted, disableRemoveScroll = false, onAnimationComplete } = props;\n var baseId = React.useId();\n var dialogId = `Dialog-${scope}-${baseId}`;\n var contentId = `${dialogId}-content`;\n var titleId = `${dialogId}-title`;\n var descriptionId = `${dialogId}-description`;\n var triggerRef = React.useRef(null);\n var contentRef = React.useRef(null);\n var presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n var [presentPartCount, setPresentPartCount] = React.useState(0);\n var [open, setOpen] = (0, import_use_controllable_state.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n var onOpenToggle = React.useCallback(function() {\n setOpen(function(prevOpen) {\n return !prevOpen;\n });\n }, [\n setOpen\n ]);\n var adaptScope = `DialogAdapt${scope}`;\n var setPartPresence = React.useCallback(function(id, present) {\n var presentPartIds = presentPartIdsRef.current;\n var hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n var context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope,\n ...context,\n children\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 FocusScope: import_focus_scope.FocusScopeController,\n Adapt: import_adapt.Adapt\n});\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAA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,IAAI,UAAU;EACZ,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA,iBAAiB,mBAAmB;EACpC;EACA;CACF;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,aAAa;EAC3E,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,gBAAgB;GACpE;GACA,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH,CAAC,GAAG;CACF,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY,mBAAmB;CAC/B,OAAO,aAAa;AACtB,CAAC"}
1
+ {"version":3,"file":"Dialog.native.js","names":[],"sources":["cjs/Dialog.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Dialog_exports = {};\n__export(Dialog_exports, {\n Dialog: () => Dialog,\n DialogClose: () => DialogClose,\n DialogContent: () => DialogContent,\n DialogContext: () => DialogContext,\n DialogDescription: () => DialogDescription,\n DialogOverlay: () => DialogOverlay,\n DialogOverlayFrame: () => DialogOverlayFrame,\n DialogPortal: () => DialogPortal,\n DialogPortalFrame: () => DialogPortalFrame,\n DialogProvider: () => DialogProvider,\n DialogTitle: () => DialogTitle,\n DialogTrigger: () => DialogTrigger,\n DialogWarningProvider: () => DialogWarningProvider,\n useDialogContext: () => useDialogContext\n});\nmodule.exports = __toCommonJS(Dialog_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_animate = require(\"@tamagui/animate\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_create_context = require(\"@tamagui/create-context\");\nvar import_dismissable = require(\"@tamagui/dismissable\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_portal = require(\"@tamagui/portal\");\nvar import_remove_scroll = require(\"@tamagui/remove-scroll\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar import_z_index_stack = require(\"@tamagui/z-index-stack\");\nvar React = __toESM(require(\"react\"), 1);\nvar DialogContext = (0, import_core.createStyledContext)(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nvar { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nvar DialogTriggerFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"DialogTrigger\"\n});\nvar DialogTrigger = (0, import_core.createStyledHOC)(DialogTriggerFrame, function DialogTrigger2(props, forwardedRef) {\n var { scope, ...triggerProps } = props;\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n var context = useDialogContext(scope);\n var composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: props.asChild ? isInsideButton : true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTriggerFrame, {\n render: isInsideButton ? \"span\" : \"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: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)\n })\n });\n});\nvar DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n style: import_constants.isWeb ? {\n color: \"inherit\"\n } : void 0,\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nvar needsRepropagation = (0, import_portal.needsPortalRepropagation)();\nvar DialogPortalItem = function(param) {\n var { context, children } = param;\n var themeName = (0, import_core.useThemeName)();\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: themeName,\n children\n });\n if (needsRepropagation) {\n content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.ProvideAdaptContext, {\n ...adaptContext,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n ...context,\n children: content\n })\n });\n }\n return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n scope: context.adaptScope,\n children: content\n }) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, {\n hostName: \"root\",\n children: content\n }) : content;\n};\nvar DialogPortal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { scope, forceMount, children, ...frameProps } = props;\n var dialogRef = React.useRef(null);\n var ref = (0, import_compose_refs.composeRefs)(dialogRef, forwardedRef);\n var context = useDialogContext(scope);\n var portalContext = forceMount ? {\n ...context,\n forceMount: true\n } : context;\n var keepMounted = forceMount || context.keepChildrenMounted;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isVisible = context.open || context.hasPresentParts;\n if (import_constants.isWeb) {\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n var _node_show;\n (_node_show = node.show) === null || _node_show === void 0 ? void 0 : _node_show.call(node);\n } else {\n var _node_close;\n (_node_close = node.close) === null || _node_close === void 0 ? void 0 : _node_close.call(node);\n }\n }, [\n isVisible\n ]);\n }\n var zIndex = (0, import_core.getExpandedShorthand)(\"zIndex\", props);\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {\n zIndex: (0, import_portal.resolveViewZIndex)(zIndex),\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope: context.dialogScope,\n ...portalContext,\n children\n })\n });\n var framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.LayoutMeasurementController, {\n disable: !context.open,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalFrame, {\n ref,\n ...import_constants.isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n })\n });\n if (import_constants.isWeb) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {\n zIndex,\n // set to 100000 which ensures dialogs are above most fixed UI (headers, navs)\n // this makes sure its above typical stacking contexts\n stackZIndex: 1e5,\n passThrough: isAdapted,\n // hide the host while closed (covers keepChildrenMounted content, see\n // Portal.tsx); isVisible stays true through the exit animation\n hidden: !isVisible,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PassthroughTheme, {\n passThrough: isAdapted,\n children: framedContents\n })\n });\n }\n return isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context: portalContext,\n children: framedContents\n });\n});\nvar PassthroughTheme = function(param) {\n var { children, passThrough } = param;\n var themeName = (0, import_core.useThemeName)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n passThrough,\n name: themeName,\n forceClassName: true,\n children\n });\n};\nfunction useDialogAnimationReporter(context) {\n var onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n var openRef = React.useRef(context.open);\n var pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n var reportComplete = React.useCallback(function(open) {\n var _onAnimationCompleteRef_current;\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n (_onAnimationCompleteRef_current = onAnimationCompleteRef.current) === null || _onAnimationCompleteRef_current === void 0 ? void 0 : _onAnimationCompleteRef_current.call(onAnimationCompleteRef, {\n open\n });\n }, []);\n return React.useMemo(function() {\n return {\n onEnterComplete: function() {\n return reportComplete(true);\n },\n onExitComplete: function() {\n return reportComplete(false);\n }\n };\n }, [\n reportComplete\n ]);\n}\nfunction useDialogPartPresence(context, options) {\n var [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n var reactId = React.useId();\n var partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n var keepMounted = options.forceMount || context.keepChildrenMounted;\n var isPresent = context.open || !isFullyHidden;\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [\n context.open,\n isFullyHidden\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return function() {\n context.setPartPresence(partPresenceId, false);\n };\n }, [\n context.setPartPresence,\n isPresent,\n options.disabled,\n partPresenceId\n ]);\n var onExitComplete = React.useCallback(function() {\n var _options_onExitComplete;\n setIsFullyHidden(true);\n (_options_onExitComplete = options.onExitComplete) === null || _options_onExitComplete === void 0 ? void 0 : _options_onExitComplete.call(options);\n }, [\n options.onExitComplete\n ]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlayFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar DialogOverlay = (0, import_core.createStyledHOC)(DialogOverlayFrame, function DialogOverlay2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var { forceMount = context.forceMount, ...overlayProps } = props;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayFrame, {\n \"data-state\": getState(context.open),\n // Presence freezes the exiting clone with its open props. The exit\n // clause releases the full-screen overlay during that frozen frame.\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n }, `${context.contentId}-overlay`)\n });\n});\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContentFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: {\n width: 0,\n height: 12\n }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nvar DialogContent = (0, import_core.createStyledHOC)(DialogContentFrame, function DialogContent2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var reporter = useDialogAnimationReporter(context);\n var onTransitionProp = props.onTransition;\n var onTransition = React.useCallback(function(event) {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp === null || onTransitionProp === void 0 ? void 0 : onTransitionProp(event);\n }, [\n reporter.onEnterComplete,\n onTransitionProp\n ]);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n })\n });\n if (isAdapted) {\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: contents\n })\n });\n }\n if (!presence.shouldRender) {\n return null;\n }\n var animated = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(React.Fragment, {\n children: contents\n }, context.contentId)\n });\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: animated\n })\n });\n});\nvar DialogContentModal = (0, import_core.createRefComponent)(function(param, forwardedRef) {\n var { children, context: contextProp, ...props } = param;\n var context = useDialogContext(contextProp.dialogScope);\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\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: true,\n onCloseAutoFocus: (0, import_helpers.composeEventHandlers)(props.onCloseAutoFocus, function(event) {\n var _context_triggerRef_current;\n event.cancel();\n (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 ? void 0 : _context_triggerRef_current.focus();\n }),\n onPointerDownOutside: (0, import_helpers.composeEventHandlers)(props.onPointerDownOutside, function(event) {\n var originalEvent = event.event;\n if (!originalEvent) return;\n var ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n var isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\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: (0, import_helpers.composeEventHandlers)(props.onFocusOutside, function(event) {\n return event.cancel();\n }),\n outlineStyle: \"none\",\n children\n });\n});\nvar DialogContentNonModal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var context = useDialogContext(props.context.dialogScope);\n var hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: function(event) {\n var _props_onCloseAutoFocus;\n (_props_onCloseAutoFocus = props.onCloseAutoFocus) === null || _props_onCloseAutoFocus === void 0 ? void 0 : _props_onCloseAutoFocus.call(props, event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n var _props_context_triggerRef_current;\n (_props_context_triggerRef_current = props.context.triggerRef.current) === null || _props_context_triggerRef_current === void 0 ? void 0 : _props_context_triggerRef_current.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: function(event) {\n var _props_onInteractOutside, _event_event;\n (_props_onInteractOutside = props.onInteractOutside) === null || _props_onInteractOutside === void 0 ? void 0 : _props_onInteractOutside.call(props, event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n var target = (_event_event = event.event) === null || _event_event === void 0 ? void 0 : _event_event.target;\n var trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n var targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n });\n});\nvar DialogContentImpl = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, onTransition, ...contentProps } = props;\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context,\n children: contentProps.children\n });\n }\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentFrame, {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n // allow clicking through content during exit animation\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n });\n if (!import_constants.isWeb) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dismissable.Dismissable, {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: function() {\n var _context_onOpenChange;\n return context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false);\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_focus_scope.FocusScope, {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n })\n }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, {\n titleId: context.titleId\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, {\n contentRef,\n descriptionId: context.descriptionId\n })\n ]\n })\n ]\n });\n});\nvar DialogTitleFrame = (0, import_core.styled)(import_text.H2, {\n displayName: \"DialogTitle\"\n});\nvar DialogTitle = (0, import_core.createStyledHOC)(DialogTitleFrame, function DialogTitle2(props, forwardedRef) {\n var { scope, ...titleProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitleFrame, {\n id: context.titleId,\n ...titleProps,\n ref: forwardedRef\n });\n});\nvar DialogDescriptionFrame = (0, import_core.styled)(import_text.Paragraph, {\n displayName: \"DialogDescription\"\n});\nvar DialogDescription = (0, import_core.createStyledHOC)(DialogDescriptionFrame, function DialogDescription2(props, forwardedRef) {\n var { scope, ...descriptionProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDescriptionFrame, {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n });\n});\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogCloseFrame = (0, import_core.styled)(import_core.View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nvar DialogClose = (0, import_core.createStyledHOC)(DialogCloseFrame, function(props, forwardedRef) {\n var { scope, displayWhenAdapted, ...closeProps } = props;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogCloseFrame, {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: (0, import_helpers.composeEventHandlers)(props.onPress, function() {\n context.onOpenChange(false);\n })\n });\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [DialogWarningProvider, useWarningContext] = (0, import_create_context.createContext)(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nvar TitleWarning = function(param) {\n var { titleId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n var MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n if (titleId) {\n var hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n titleId\n ]);\n }\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = function(param) {\n var { contentRef, descriptionId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n var MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n var contentNode = contentRef.current;\n if (!(contentNode instanceof HTMLElement)) {\n return;\n }\n var describedById = contentNode.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n var hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n contentRef,\n descriptionId\n ]);\n }\n return null;\n};\nvar Dialog = (0, import_helpers.withStaticProperties)((0, import_core.createRefComponent)(function Dialog2(props) {\n var { scope = \"\", children, open: openProp, defaultOpen = false, onOpenChange, modal = true, keepChildrenMounted, disableRemoveScroll = false, onAnimationComplete } = props;\n var baseId = React.useId();\n var dialogId = `Dialog-${scope}-${baseId}`;\n var contentId = `${dialogId}-content`;\n var titleId = `${dialogId}-title`;\n var descriptionId = `${dialogId}-description`;\n var triggerRef = React.useRef(null);\n var contentRef = React.useRef(null);\n var presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n var [presentPartCount, setPresentPartCount] = React.useState(0);\n var [open, setOpen] = (0, import_use_controllable_state.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n var onOpenToggle = React.useCallback(function() {\n setOpen(function(prevOpen) {\n return !prevOpen;\n });\n }, [\n setOpen\n ]);\n var adaptScope = `DialogAdapt${scope}`;\n var setPartPresence = React.useCallback(function(id, present) {\n var presentPartIds = presentPartIdsRef.current;\n var hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n var context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope,\n ...context,\n children\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 FocusScope: import_focus_scope.FocusScopeController,\n Adapt: import_adapt.Adapt\n});\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB;CACvB,cAAc;CACd,mBAAmB;CACnB,qBAAqB;CACrB,qBAAqB;CACrB,yBAAyB;CACzB,qBAAqB;CACrB,0BAA0B;CAC1B,oBAAoB;CACpB,yBAAyB;CACzB,sBAAsB;CACtB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ACpE;GACA,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH,CAAC,GAAG;CACF,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY,mBAAmB;CAC/B,OAAO,aAAa;AACtB,CAAC"}
@@ -46,7 +46,7 @@ const DialogPortalFrame = styled(YStack, {
46
46
  inset: 0,
47
47
  borderWidth: "web:0px",
48
48
  backgroundColor: "web:transparent",
49
- color: "web:inherit",
49
+ style: isWeb ? { color: "inherit" } : void 0,
50
50
  maxInlineSize: "web:none",
51
51
  margin: "web:0px",
52
52
  width: "web:auto",
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":[],"sources":["esm/Dialog.js"],"sourcesContent":["import {\n Adapt,\n AdaptParent,\n AdaptPortalContents,\n ProvideAdaptContext,\n useAdaptContext,\n useAdaptIsActive\n} from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { composeRefs, useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport {\n createStyledHOC,\n createStyledContext,\n createRefComponent,\n getExpandedShorthand,\n LayoutMeasurementController,\n styled,\n Theme,\n useThemeName,\n View\n} from \"@tamagui/core\";\nimport { createContext } from \"@tamagui/create-context\";\nimport { Dismissable } from \"@tamagui/dismissable\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport {\n needsPortalRepropagation,\n Portal,\n PortalItem,\n resolveViewZIndex\n} from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ButtonNestingContext, YStack } from \"@tamagui/stacks\";\nimport { H2, Paragraph } from \"@tamagui/text\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { StackZIndexContext } from \"@tamagui/z-index-stack\";\nimport * as React from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst DialogContext = createStyledContext(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nconst { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nconst DialogTriggerFrame = styled(View, {\n displayName: \"DialogTrigger\"\n});\nconst DialogTrigger = createStyledHOC(\n DialogTriggerFrame,\n function DialogTrigger2(props, forwardedRef) {\n const { scope, ...triggerProps } = props;\n const isInsideButton = React.useContext(ButtonNestingContext);\n const context = useDialogContext(scope);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: props.asChild ? isInsideButton : true, children: /* @__PURE__ */ jsx(\n DialogTriggerFrame,\n {\n render: isInsideButton ? \"span\" : \"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);\nconst DialogPortalFrame = styled(YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n color: \"web:inherit\",\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nconst needsRepropagation = needsPortalRepropagation();\nconst DialogPortalItem = ({\n context,\n children\n}) => {\n const themeName = useThemeName();\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n let content = /* @__PURE__ */ jsx(Theme, { name: themeName, children });\n if (needsRepropagation) {\n content = /* @__PURE__ */ jsx(ProvideAdaptContext, { ...adaptContext, children: /* @__PURE__ */ jsx(DialogProvider, { ...context, children: content }) });\n }\n return isAdapted ? /* @__PURE__ */ jsx(AdaptPortalContents, { scope: context.adaptScope, children: content }) : context.modal ? /* @__PURE__ */ jsx(PortalItem, { hostName: \"root\", children: content }) : content;\n};\nconst DialogPortal = createRefComponent(\n (props, forwardedRef) => {\n const { scope, forceMount, children, ...frameProps } = props;\n const dialogRef = React.useRef(null);\n const ref = composeRefs(dialogRef, forwardedRef);\n const context = useDialogContext(scope);\n const portalContext = forceMount ? { ...context, forceMount: true } : context;\n const keepMounted = forceMount || context.keepChildrenMounted;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isVisible = context.open || context.hasPresentParts;\n if (isWeb) {\n useIsomorphicLayoutEffect(() => {\n const node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n node.show?.();\n } else {\n node.close?.();\n }\n }, [isVisible]);\n }\n const zIndex = getExpandedShorthand(\"zIndex\", props);\n const contents = /* @__PURE__ */ jsx(StackZIndexContext, { zIndex: resolveViewZIndex(zIndex), children: /* @__PURE__ */ jsx(DialogProvider, { scope: context.dialogScope, ...portalContext, children }) });\n const framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ jsx(LayoutMeasurementController, { disable: !context.open, children: /* @__PURE__ */ jsx(\n DialogPortalFrame,\n {\n ref,\n ...isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n }\n ) });\n if (isWeb) {\n return /* @__PURE__ */ jsx(\n Portal,\n {\n zIndex,\n stackZIndex: 1e5,\n passThrough: isAdapted,\n hidden: !isVisible,\n children: /* @__PURE__ */ jsx(PassthroughTheme, { passThrough: isAdapted, children: framedContents })\n }\n );\n }\n return isAdapted ? framedContents : /* @__PURE__ */ jsx(DialogPortalItem, { context: portalContext, children: framedContents });\n }\n);\nconst PassthroughTheme = ({\n children,\n passThrough\n}) => {\n const themeName = useThemeName();\n return /* @__PURE__ */ jsx(Theme, { passThrough, name: themeName, forceClassName: true, children });\n};\nfunction useDialogAnimationReporter(context) {\n const onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n const openRef = React.useRef(context.open);\n const pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n const reportComplete = React.useCallback((open) => {\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n onAnimationCompleteRef.current?.({ open });\n }, []);\n return React.useMemo(\n () => ({\n onEnterComplete: () => reportComplete(true),\n onExitComplete: () => reportComplete(false)\n }),\n [reportComplete]\n );\n}\nfunction useDialogPartPresence(context, options) {\n const [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n const reactId = React.useId();\n const partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n const keepMounted = options.forceMount || context.keepChildrenMounted;\n const isPresent = context.open || !isFullyHidden;\n useIsomorphicLayoutEffect(() => {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [context.open, isFullyHidden]);\n useIsomorphicLayoutEffect(() => {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return () => {\n context.setPartPresence(partPresenceId, false);\n };\n }, [context.setPartPresence, isPresent, options.disabled, partPresenceId]);\n const onExitComplete = React.useCallback(() => {\n setIsFullyHidden(true);\n options.onExitComplete?.();\n }, [options.onExitComplete]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nconst OVERLAY_NAME = \"DialogOverlay\";\nconst DialogOverlayFrame = styled(YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst DialogOverlay = createStyledHOC(\n DialogOverlayFrame,\n function DialogOverlay2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const { forceMount = context.forceMount, ...overlayProps } = props;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ jsx(\n DialogOverlayFrame,\n {\n \"data-state\": getState(context.open),\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n },\n `${context.contentId}-overlay`\n )\n }\n );\n }\n);\nconst CONTENT_NAME = \"DialogContent\";\nconst DialogContentFrame = styled(YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: { width: 0, height: 12 }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nconst DialogContent = createStyledHOC(\n DialogContentFrame,\n function DialogContent2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const reporter = useDialogAnimationReporter(context);\n const onTransitionProp = props.onTransition;\n const onTransition = React.useCallback(\n (event) => {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp?.(event);\n },\n [reporter.onEnterComplete, onTransitionProp]\n );\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n const contents = /* @__PURE__ */ jsx(Fragment, { children: context.modal ? /* @__PURE__ */ jsx(\n DialogContentModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) : /* @__PURE__ */ jsx(\n DialogContentNonModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) });\n if (isAdapted) {\n if (!isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: contents }) });\n }\n if (!presence.shouldRender) {\n return null;\n }\n const animated = /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ jsx(React.Fragment, { children: contents }, context.contentId)\n }\n );\n if (!isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: animated }) });\n }\n);\nconst DialogContentModal = createRefComponent(\n ({ children, context: contextProp, ...props }, forwardedRef) => {\n const context = useDialogContext(contextProp.dialogScope);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.cancel();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.event;\n if (!originalEvent) return;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\n }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.cancel()\n ),\n outlineStyle: \"none\",\n children\n }\n );\n }\n);\nconst DialogContentNonModal = createRefComponent(\n (props, forwardedRef) => {\n const context = useDialogContext(props.context.dialogScope);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n props.context.triggerRef.current?.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n const target = event.event?.target;\n const trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n const targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n }\n );\n }\n);\nconst DialogContentImpl = createRefComponent(\n (props, forwardedRef) => {\n const {\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n context,\n onTransition,\n ...contentProps\n } = props;\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ jsx(DialogPortalItem, { context, children: contentProps.children });\n }\n const contents = /* @__PURE__ */ jsx(\n DialogContentFrame,\n {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n }\n );\n if (!isWeb) {\n return contents;\n }\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n Dismissable,\n {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: () => context?.onOpenChange?.(false),\n children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n }\n )\n }\n ),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(\n DescriptionWarning,\n {\n contentRef,\n descriptionId: context.descriptionId\n }\n )\n ] })\n ] });\n }\n);\nconst DialogTitleFrame = styled(H2, {\n displayName: \"DialogTitle\"\n});\nconst DialogTitle = createStyledHOC(\n DialogTitleFrame,\n function DialogTitle2(props, forwardedRef) {\n const { scope, ...titleProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(DialogTitleFrame, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nconst DialogDescriptionFrame = styled(Paragraph, {\n displayName: \"DialogDescription\"\n});\nconst DialogDescription = createStyledHOC(\n DialogDescriptionFrame,\n function DialogDescription2(props, forwardedRef) {\n const { scope, ...descriptionProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(\n DialogDescriptionFrame,\n {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n }\n );\n }\n);\nconst CLOSE_NAME = \"DialogClose\";\nconst DialogCloseFrame = styled(View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nconst DialogClose = createStyledHOC(\n DialogCloseFrame,\n (props, forwardedRef) => {\n const { scope, displayWhenAdapted, ...closeProps } = props;\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isInsideButton = React.useContext(ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n DialogCloseFrame,\n {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: composeEventHandlers(props.onPress, () => {\n context.onOpenChange(false);\n })\n }\n );\n }\n);\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nconst TITLE_WARNING_NAME = \"DialogTitleWarning\";\nconst [DialogWarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nconst TitleWarning = ({ titleId }) => {\n if (process.env.NODE_ENV === \"development\") {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(() => {\n if (!isWeb) return;\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, titleId]);\n }\n return null;\n};\nconst DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nconst DescriptionWarning = ({\n contentRef,\n descriptionId\n}) => {\n if (process.env.NODE_ENV === \"development\") {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\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 (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, contentRef, descriptionId]);\n }\n return null;\n};\nconst Dialog = withStaticProperties(\n createRefComponent(function Dialog2(props) {\n const {\n scope = \"\",\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n modal = true,\n keepChildrenMounted,\n disableRemoveScroll = false,\n onAnimationComplete\n } = props;\n const baseId = React.useId();\n const dialogId = `Dialog-${scope}-${baseId}`;\n const contentId = `${dialogId}-content`;\n const titleId = `${dialogId}-title`;\n const descriptionId = `${dialogId}-description`;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n const [presentPartCount, setPresentPartCount] = React.useState(0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const onOpenToggle = React.useCallback(() => {\n setOpen((prevOpen) => !prevOpen);\n }, [setOpen]);\n const adaptScope = `DialogAdapt${scope}`;\n const setPartPresence = React.useCallback((id, present) => {\n const presentPartIds = presentPartIdsRef.current;\n const hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n const context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ jsx(\n AdaptParent,\n {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ jsx(DialogProvider, { scope, ...context, children })\n }\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 FocusScope: FocusScopeController,\n Adapt\n }\n);\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogOverlay,\n DialogOverlayFrame,\n DialogPortal,\n DialogPortalFrame,\n DialogProvider,\n DialogTitle,\n DialogTrigger,\n DialogWarningProvider,\n useDialogContext\n};\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA,MAAM,gBAAgB,oBAEpB,CAAC,GACD,UACF;AACA,MAAM,EAAE,kBAAkB,kBAAkB,UAAU,mBAAmB;AACzE,MAAM,qBAAqB,OAAO,MAAM,EACtC,aAAa,gBACf,CAAC;AACD,MAAM,gBAAgB,gBACpB,oBACA,SAAS,eAAe,OAAO,cAAc;CAC3C,MAAM,EAAE,OAAO,GAAG,iBAAiB;CACnC,MAAM,iBAAiB,MAAM,WAAW,oBAAoB;CAC5D,MAAM,UAAU,iBAAiB,KAAK;CACtC,MAAM,qBAAqB,gBAAgB,cAAc,QAAQ,UAAU;CAC3E,OAAuB,oBAAI,qBAAqB,UAAU;EAAE,OAAO,MAAM,UAAU,iBAAiB;EAAM,UAA0B,oBAClI,oBACA;GACE,QAAQ,iBAAiB,SAAS;GAClC,iBAAiB;GACjB,iBAAiB,QAAQ;GACzB,iBAAiB,QAAQ;GACzB,cAAc,SAAS,QAAQ,IAAI;GACnC,GAAG;GACH,KAAK;GACL,SAAS,qBAAqB,MAAM,SAAS,QAAQ,YAAY;EACnE,CACF;CAAE,CAAC;AACL,CACF;AACA,MAAM,oBAAoB,OAAO,QAAQ;CACvC,eAAe;CACf,YAAY;CACZ,gBAAgB;CAChB,UAAU;CACV,OAAO;CACP,aAAa;CACb,iBAAiB;CACjB,OAAO;CACP,eAAe;CACf,QA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SAAS;CAC5B,MAAM,gBAAgB,GAAG,SAAS;CAClC,MAAM,aAAa,MAAM,OAAO,IAAI;CACpC,MAAM,aAAa,MAAM,OAAO,IAAI;CACpC,MAAM,oBAAoB,MAAM,uBAAuB,IAAI,IAAI,CAAC;CAChE,MAAM,CAAC,kBAAkB,uBAAuB,MAAM,SAAS,CAAC;CAChE,MAAM,CAAC,MAAM,WAAW,qBAAqB;EAC3C,MAAM;EACN,aAAa;EACb,UAAU;CACZ,CAAC;CACD,MAAM,eAAe,MAAM,kBAAkB;EAC3C,SAAS,aAAa,CAAC,QAAQ;CACjC,GAAG,CAAC,OAAO,CAAC;CACZ,MAAM,aAAa,cAAc;CACjC,MAAM,kBAAkB,MAAM,aAAa,IAAI,YAAY;EACzD,MAAM,iBAAiB,kBAAkB;EACzC,MAAM,UAAU,eAAe,IAAI,EAAE;EACrC,IAAI,WAAW,CAAC,SAAS;GACvB,eAAe,IAAI,EAAE;GACrB,oBAAoB,eAAe,IAAI;EACzC,OAAO,IAAI,CAAC,WAAW,SAAS;GAC9B,eAAe,OAAO,EAAE;GACxB,oBAAoB,eAAe,IAAI;EACzC;CACF,GAAG,CAAC,CAAC;CACL,MAAM,UAAU;EACd,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA,iBAAiB,mBAAmB;EACpC;EACA;CACF;CACA,OAAuB,oBACrB,aACA;EACE,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,oBAAI,gBAAgB;GAAE;GAAO,GAAG;GAAS;EAAS,CAAC;CAC/E,CACF;AACF,CAAC,GACD;CACE,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY;CACZ;AACF,CACF"}
1
+ {"version":3,"file":"Dialog.js","names":[],"sources":["esm/Dialog.js"],"sourcesContent":["import {\n Adapt,\n AdaptParent,\n AdaptPortalContents,\n ProvideAdaptContext,\n useAdaptContext,\n useAdaptIsActive\n} from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { composeRefs, useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport {\n createStyledHOC,\n createStyledContext,\n createRefComponent,\n getExpandedShorthand,\n LayoutMeasurementController,\n styled,\n Theme,\n useThemeName,\n View\n} from \"@tamagui/core\";\nimport { createContext } from \"@tamagui/create-context\";\nimport { Dismissable } from \"@tamagui/dismissable\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport {\n needsPortalRepropagation,\n Portal,\n PortalItem,\n resolveViewZIndex\n} from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ButtonNestingContext, YStack } from \"@tamagui/stacks\";\nimport { H2, Paragraph } from \"@tamagui/text\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { StackZIndexContext } from \"@tamagui/z-index-stack\";\nimport * as React from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst DialogContext = createStyledContext(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nconst { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nconst DialogTriggerFrame = styled(View, {\n displayName: \"DialogTrigger\"\n});\nconst DialogTrigger = createStyledHOC(\n DialogTriggerFrame,\n function DialogTrigger2(props, forwardedRef) {\n const { scope, ...triggerProps } = props;\n const isInsideButton = React.useContext(ButtonNestingContext);\n const context = useDialogContext(scope);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: props.asChild ? isInsideButton : true, children: /* @__PURE__ */ jsx(\n DialogTriggerFrame,\n {\n render: isInsideButton ? \"span\" : \"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);\nconst DialogPortalFrame = styled(YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n style: isWeb ? { color: \"inherit\" } : void 0,\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nconst needsRepropagation = needsPortalRepropagation();\nconst DialogPortalItem = ({\n context,\n children\n}) => {\n const themeName = useThemeName();\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n let content = /* @__PURE__ */ jsx(Theme, { name: themeName, children });\n if (needsRepropagation) {\n content = /* @__PURE__ */ jsx(ProvideAdaptContext, { ...adaptContext, children: /* @__PURE__ */ jsx(DialogProvider, { ...context, children: content }) });\n }\n return isAdapted ? /* @__PURE__ */ jsx(AdaptPortalContents, { scope: context.adaptScope, children: content }) : context.modal ? /* @__PURE__ */ jsx(PortalItem, { hostName: \"root\", children: content }) : content;\n};\nconst DialogPortal = createRefComponent(\n (props, forwardedRef) => {\n const { scope, forceMount, children, ...frameProps } = props;\n const dialogRef = React.useRef(null);\n const ref = composeRefs(dialogRef, forwardedRef);\n const context = useDialogContext(scope);\n const portalContext = forceMount ? { ...context, forceMount: true } : context;\n const keepMounted = forceMount || context.keepChildrenMounted;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isVisible = context.open || context.hasPresentParts;\n if (isWeb) {\n useIsomorphicLayoutEffect(() => {\n const node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n node.show?.();\n } else {\n node.close?.();\n }\n }, [isVisible]);\n }\n const zIndex = getExpandedShorthand(\"zIndex\", props);\n const contents = /* @__PURE__ */ jsx(StackZIndexContext, { zIndex: resolveViewZIndex(zIndex), children: /* @__PURE__ */ jsx(DialogProvider, { scope: context.dialogScope, ...portalContext, children }) });\n const framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ jsx(LayoutMeasurementController, { disable: !context.open, children: /* @__PURE__ */ jsx(\n DialogPortalFrame,\n {\n ref,\n ...isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n }\n ) });\n if (isWeb) {\n return /* @__PURE__ */ jsx(\n Portal,\n {\n zIndex,\n stackZIndex: 1e5,\n passThrough: isAdapted,\n hidden: !isVisible,\n children: /* @__PURE__ */ jsx(PassthroughTheme, { passThrough: isAdapted, children: framedContents })\n }\n );\n }\n return isAdapted ? framedContents : /* @__PURE__ */ jsx(DialogPortalItem, { context: portalContext, children: framedContents });\n }\n);\nconst PassthroughTheme = ({\n children,\n passThrough\n}) => {\n const themeName = useThemeName();\n return /* @__PURE__ */ jsx(Theme, { passThrough, name: themeName, forceClassName: true, children });\n};\nfunction useDialogAnimationReporter(context) {\n const onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n const openRef = React.useRef(context.open);\n const pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n const reportComplete = React.useCallback((open) => {\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n onAnimationCompleteRef.current?.({ open });\n }, []);\n return React.useMemo(\n () => ({\n onEnterComplete: () => reportComplete(true),\n onExitComplete: () => reportComplete(false)\n }),\n [reportComplete]\n );\n}\nfunction useDialogPartPresence(context, options) {\n const [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n const reactId = React.useId();\n const partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n const keepMounted = options.forceMount || context.keepChildrenMounted;\n const isPresent = context.open || !isFullyHidden;\n useIsomorphicLayoutEffect(() => {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [context.open, isFullyHidden]);\n useIsomorphicLayoutEffect(() => {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return () => {\n context.setPartPresence(partPresenceId, false);\n };\n }, [context.setPartPresence, isPresent, options.disabled, partPresenceId]);\n const onExitComplete = React.useCallback(() => {\n setIsFullyHidden(true);\n options.onExitComplete?.();\n }, [options.onExitComplete]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nconst OVERLAY_NAME = \"DialogOverlay\";\nconst DialogOverlayFrame = styled(YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst DialogOverlay = createStyledHOC(\n DialogOverlayFrame,\n function DialogOverlay2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const { forceMount = context.forceMount, ...overlayProps } = props;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ jsx(\n DialogOverlayFrame,\n {\n \"data-state\": getState(context.open),\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n },\n `${context.contentId}-overlay`\n )\n }\n );\n }\n);\nconst CONTENT_NAME = \"DialogContent\";\nconst DialogContentFrame = styled(YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: { width: 0, height: 12 }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nconst DialogContent = createStyledHOC(\n DialogContentFrame,\n function DialogContent2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const reporter = useDialogAnimationReporter(context);\n const onTransitionProp = props.onTransition;\n const onTransition = React.useCallback(\n (event) => {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp?.(event);\n },\n [reporter.onEnterComplete, onTransitionProp]\n );\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n const contents = /* @__PURE__ */ jsx(Fragment, { children: context.modal ? /* @__PURE__ */ jsx(\n DialogContentModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) : /* @__PURE__ */ jsx(\n DialogContentNonModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) });\n if (isAdapted) {\n if (!isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: contents }) });\n }\n if (!presence.shouldRender) {\n return null;\n }\n const animated = /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ jsx(React.Fragment, { children: contents }, context.contentId)\n }\n );\n if (!isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: animated }) });\n }\n);\nconst DialogContentModal = createRefComponent(\n ({ children, context: contextProp, ...props }, forwardedRef) => {\n const context = useDialogContext(contextProp.dialogScope);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.cancel();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.event;\n if (!originalEvent) return;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\n }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.cancel()\n ),\n outlineStyle: \"none\",\n children\n }\n );\n }\n);\nconst DialogContentNonModal = createRefComponent(\n (props, forwardedRef) => {\n const context = useDialogContext(props.context.dialogScope);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n props.context.triggerRef.current?.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n const target = event.event?.target;\n const trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n const targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n }\n );\n }\n);\nconst DialogContentImpl = createRefComponent(\n (props, forwardedRef) => {\n const {\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n context,\n onTransition,\n ...contentProps\n } = props;\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ jsx(DialogPortalItem, { context, children: contentProps.children });\n }\n const contents = /* @__PURE__ */ jsx(\n DialogContentFrame,\n {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n }\n );\n if (!isWeb) {\n return contents;\n }\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n Dismissable,\n {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: () => context?.onOpenChange?.(false),\n children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n }\n )\n }\n ),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(\n DescriptionWarning,\n {\n contentRef,\n descriptionId: context.descriptionId\n }\n )\n ] })\n ] });\n }\n);\nconst DialogTitleFrame = styled(H2, {\n displayName: \"DialogTitle\"\n});\nconst DialogTitle = createStyledHOC(\n DialogTitleFrame,\n function DialogTitle2(props, forwardedRef) {\n const { scope, ...titleProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(DialogTitleFrame, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nconst DialogDescriptionFrame = styled(Paragraph, {\n displayName: \"DialogDescription\"\n});\nconst DialogDescription = createStyledHOC(\n DialogDescriptionFrame,\n function DialogDescription2(props, forwardedRef) {\n const { scope, ...descriptionProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(\n DialogDescriptionFrame,\n {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n }\n );\n }\n);\nconst CLOSE_NAME = \"DialogClose\";\nconst DialogCloseFrame = styled(View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nconst DialogClose = createStyledHOC(\n DialogCloseFrame,\n (props, forwardedRef) => {\n const { scope, displayWhenAdapted, ...closeProps } = props;\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isInsideButton = React.useContext(ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n DialogCloseFrame,\n {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: composeEventHandlers(props.onPress, () => {\n context.onOpenChange(false);\n })\n }\n );\n }\n);\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nconst TITLE_WARNING_NAME = \"DialogTitleWarning\";\nconst [DialogWarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nconst TitleWarning = ({ titleId }) => {\n if (process.env.NODE_ENV === \"development\") {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(() => {\n if (!isWeb) return;\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, titleId]);\n }\n return null;\n};\nconst DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nconst DescriptionWarning = ({\n contentRef,\n descriptionId\n}) => {\n if (process.env.NODE_ENV === \"development\") {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\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 (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, contentRef, descriptionId]);\n }\n return null;\n};\nconst Dialog = withStaticProperties(\n createRefComponent(function Dialog2(props) {\n const {\n scope = \"\",\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n modal = true,\n keepChildrenMounted,\n disableRemoveScroll = false,\n onAnimationComplete\n } = props;\n const baseId = React.useId();\n const dialogId = `Dialog-${scope}-${baseId}`;\n const contentId = `${dialogId}-content`;\n const titleId = `${dialogId}-title`;\n const descriptionId = `${dialogId}-description`;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n const [presentPartCount, setPresentPartCount] = React.useState(0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const onOpenToggle = React.useCallback(() => {\n setOpen((prevOpen) => !prevOpen);\n }, [setOpen]);\n const adaptScope = `DialogAdapt${scope}`;\n const setPartPresence = React.useCallback((id, present) => {\n const presentPartIds = presentPartIdsRef.current;\n const hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n const context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ jsx(\n AdaptParent,\n {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ jsx(DialogProvider, { scope, ...context, children })\n }\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 FocusScope: FocusScopeController,\n Adapt\n }\n);\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogOverlay,\n DialogOverlayFrame,\n DialogPortal,\n DialogPortalFrame,\n DialogProvider,\n DialogTitle,\n DialogTrigger,\n DialogWarningProvider,\n useDialogContext\n};\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA,MAAM,gBAAgB,oBAEpB,CAAC,GACD,UACF;AACA,MAAM,EAAE,kBAAkB,kBAAkB,UAAU,mBAAmB;AAC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AY;EACzD,MAAM,iBAAiB,kBAAkB;EACzC,MAAM,UAAU,eAAe,IAAI,EAAE;EACrC,IAAI,WAAW,CAAC,SAAS;GACvB,eAAe,IAAI,EAAE;GACrB,oBAAoB,eAAe,IAAI;EACzC,OAAO,IAAI,CAAC,WAAW,SAAS;GAC9B,eAAe,OAAO,EAAE;GACxB,oBAAoB,eAAe,IAAI;EACzC;CACF,GAAG,CAAC,CAAC;CACL,MAAM,UAAU;EACd,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA,iBAAiB,mBAAmB;EACpC;EACA;CACF;CACA,OAAuB,oBACrB,aACA;EACE,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,oBAAI,gBAAgB;GAAE;GAAO,GAAG;GAAS;EAAS,CAAC;CAC/E,CACF;AACF,CAAC,GACD;CACE,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY;CACZ;AACF,CACF"}
@@ -46,7 +46,7 @@ var DialogPortalFrame = styled(YStack, {
46
46
  inset: 0,
47
47
  borderWidth: "web:0px",
48
48
  backgroundColor: "web:transparent",
49
- color: "web:inherit",
49
+ style: isWeb ? { color: "inherit" } : void 0,
50
50
  maxInlineSize: "web:none",
51
51
  margin: "web:0px",
52
52
  width: "web:auto",
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.native.js","names":["_Fragment"],"sources":["esm/Dialog.native.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Adapt, AdaptParent, AdaptPortalContents, ProvideAdaptContext, useAdaptContext, useAdaptIsActive } from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { composeRefs, useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { createStyledHOC, createStyledContext, createRefComponent, getExpandedShorthand, LayoutMeasurementController, styled, Theme, useThemeName, View } from \"@tamagui/core\";\nimport { createContext } from \"@tamagui/create-context\";\nimport { Dismissable } from \"@tamagui/dismissable\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { needsPortalRepropagation, Portal, PortalItem, resolveViewZIndex } from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ButtonNestingContext, YStack } from \"@tamagui/stacks\";\nimport { H2, Paragraph } from \"@tamagui/text\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { StackZIndexContext } from \"@tamagui/z-index-stack\";\nimport * as React from \"react\";\nvar DialogContext = createStyledContext(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nvar { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nvar DialogTriggerFrame = styled(View, {\n displayName: \"DialogTrigger\"\n});\nvar DialogTrigger = createStyledHOC(DialogTriggerFrame, function DialogTrigger2(props, forwardedRef) {\n var { scope, ...triggerProps } = props;\n var isInsideButton = React.useContext(ButtonNestingContext);\n var context = useDialogContext(scope);\n var composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ _jsx(ButtonNestingContext.Provider, {\n value: props.asChild ? isInsideButton : true,\n children: /* @__PURE__ */ _jsx(DialogTriggerFrame, {\n render: isInsideButton ? \"span\" : \"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});\nvar DialogPortalFrame = styled(YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n color: \"web:inherit\",\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nvar needsRepropagation = needsPortalRepropagation();\nvar DialogPortalItem = function(param) {\n var { context, children } = param;\n var themeName = useThemeName();\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var adaptContext = useAdaptContext(context.adaptScope);\n var content = /* @__PURE__ */ _jsx(Theme, {\n name: themeName,\n children\n });\n if (needsRepropagation) {\n content = /* @__PURE__ */ _jsx(ProvideAdaptContext, {\n ...adaptContext,\n children: /* @__PURE__ */ _jsx(DialogProvider, {\n ...context,\n children: content\n })\n });\n }\n return isAdapted ? /* @__PURE__ */ _jsx(AdaptPortalContents, {\n scope: context.adaptScope,\n children: content\n }) : context.modal ? /* @__PURE__ */ _jsx(PortalItem, {\n hostName: \"root\",\n children: content\n }) : content;\n};\nvar DialogPortal = createRefComponent(function(props, forwardedRef) {\n var { scope, forceMount, children, ...frameProps } = props;\n var dialogRef = React.useRef(null);\n var ref = composeRefs(dialogRef, forwardedRef);\n var context = useDialogContext(scope);\n var portalContext = forceMount ? {\n ...context,\n forceMount: true\n } : context;\n var keepMounted = forceMount || context.keepChildrenMounted;\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var isVisible = context.open || context.hasPresentParts;\n if (isWeb) {\n useIsomorphicLayoutEffect(function() {\n var node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n var _node_show;\n (_node_show = node.show) === null || _node_show === void 0 ? void 0 : _node_show.call(node);\n } else {\n var _node_close;\n (_node_close = node.close) === null || _node_close === void 0 ? void 0 : _node_close.call(node);\n }\n }, [\n isVisible\n ]);\n }\n var zIndex = getExpandedShorthand(\"zIndex\", props);\n var contents = /* @__PURE__ */ _jsx(StackZIndexContext, {\n zIndex: resolveViewZIndex(zIndex),\n children: /* @__PURE__ */ _jsx(DialogProvider, {\n scope: context.dialogScope,\n ...portalContext,\n children\n })\n });\n var framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ _jsx(LayoutMeasurementController, {\n disable: !context.open,\n children: /* @__PURE__ */ _jsx(DialogPortalFrame, {\n ref,\n ...isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n })\n });\n if (isWeb) {\n return /* @__PURE__ */ _jsx(Portal, {\n zIndex,\n // set to 100000 which ensures dialogs are above most fixed UI (headers, navs)\n // this makes sure its above typical stacking contexts\n stackZIndex: 1e5,\n passThrough: isAdapted,\n // hide the host while closed (covers keepChildrenMounted content, see\n // Portal.tsx); isVisible stays true through the exit animation\n hidden: !isVisible,\n children: /* @__PURE__ */ _jsx(PassthroughTheme, {\n passThrough: isAdapted,\n children: framedContents\n })\n });\n }\n return isAdapted ? framedContents : /* @__PURE__ */ _jsx(DialogPortalItem, {\n context: portalContext,\n children: framedContents\n });\n});\nvar PassthroughTheme = function(param) {\n var { children, passThrough } = param;\n var themeName = useThemeName();\n return /* @__PURE__ */ _jsx(Theme, {\n passThrough,\n name: themeName,\n forceClassName: true,\n children\n });\n};\nfunction useDialogAnimationReporter(context) {\n var onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n var openRef = React.useRef(context.open);\n var pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n var reportComplete = React.useCallback(function(open) {\n var _onAnimationCompleteRef_current;\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n (_onAnimationCompleteRef_current = onAnimationCompleteRef.current) === null || _onAnimationCompleteRef_current === void 0 ? void 0 : _onAnimationCompleteRef_current.call(onAnimationCompleteRef, {\n open\n });\n }, []);\n return React.useMemo(function() {\n return {\n onEnterComplete: function() {\n return reportComplete(true);\n },\n onExitComplete: function() {\n return reportComplete(false);\n }\n };\n }, [\n reportComplete\n ]);\n}\nfunction useDialogPartPresence(context, options) {\n var [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n var reactId = React.useId();\n var partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n var keepMounted = options.forceMount || context.keepChildrenMounted;\n var isPresent = context.open || !isFullyHidden;\n useIsomorphicLayoutEffect(function() {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [\n context.open,\n isFullyHidden\n ]);\n useIsomorphicLayoutEffect(function() {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return function() {\n context.setPartPresence(partPresenceId, false);\n };\n }, [\n context.setPartPresence,\n isPresent,\n options.disabled,\n partPresenceId\n ]);\n var onExitComplete = React.useCallback(function() {\n var _options_onExitComplete;\n setIsFullyHidden(true);\n (_options_onExitComplete = options.onExitComplete) === null || _options_onExitComplete === void 0 ? void 0 : _options_onExitComplete.call(options);\n }, [\n options.onExitComplete\n ]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlayFrame = styled(YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar DialogOverlay = createStyledHOC(DialogOverlayFrame, function DialogOverlay2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var { forceMount = context.forceMount, ...overlayProps } = props;\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ _jsx(Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ _jsx(DialogOverlayFrame, {\n \"data-state\": getState(context.open),\n // Presence freezes the exiting clone with its open props. The exit\n // clause releases the full-screen overlay during that frozen frame.\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n }, `${context.contentId}-overlay`)\n });\n});\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContentFrame = styled(YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: {\n width: 0,\n height: 12\n }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nvar DialogContent = createStyledHOC(DialogContentFrame, function DialogContent2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var reporter = useDialogAnimationReporter(context);\n var onTransitionProp = props.onTransition;\n var onTransition = React.useCallback(function(event) {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp === null || onTransitionProp === void 0 ? void 0 : onTransitionProp(event);\n }, [\n reporter.onEnterComplete,\n onTransitionProp\n ]);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n var contents = /* @__PURE__ */ _jsx(_Fragment, {\n children: context.modal ? /* @__PURE__ */ _jsx(DialogContentModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }) : /* @__PURE__ */ _jsx(DialogContentNonModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n })\n });\n if (isAdapted) {\n if (!isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ _jsx(RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ _jsx(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: contents\n })\n });\n }\n if (!presence.shouldRender) {\n return null;\n }\n var animated = /* @__PURE__ */ _jsx(Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ _jsx(React.Fragment, {\n children: contents\n }, context.contentId)\n });\n if (!isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ _jsx(RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ _jsx(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: animated\n })\n });\n});\nvar DialogContentModal = createRefComponent(function(param, forwardedRef) {\n var { children, context: contextProp, ...props } = param;\n var context = useDialogContext(contextProp.dialogScope);\n var contentRef = React.useRef(null);\n var composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ _jsx(DialogContentImpl, {\n ...props,\n context,\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: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, function(event) {\n var _context_triggerRef_current;\n event.cancel();\n (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 ? void 0 : _context_triggerRef_current.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, function(event) {\n var originalEvent = event.event;\n if (!originalEvent) return;\n var ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n var isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\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, function(event) {\n return event.cancel();\n }),\n outlineStyle: \"none\",\n children\n });\n});\nvar DialogContentNonModal = createRefComponent(function(props, forwardedRef) {\n var context = useDialogContext(props.context.dialogScope);\n var hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ _jsx(DialogContentImpl, {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: function(event) {\n var _props_onCloseAutoFocus;\n (_props_onCloseAutoFocus = props.onCloseAutoFocus) === null || _props_onCloseAutoFocus === void 0 ? void 0 : _props_onCloseAutoFocus.call(props, event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n var _props_context_triggerRef_current;\n (_props_context_triggerRef_current = props.context.triggerRef.current) === null || _props_context_triggerRef_current === void 0 ? void 0 : _props_context_triggerRef_current.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: function(event) {\n var _props_onInteractOutside, _event_event;\n (_props_onInteractOutside = props.onInteractOutside) === null || _props_onInteractOutside === void 0 ? void 0 : _props_onInteractOutside.call(props, event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n var target = (_event_event = event.event) === null || _event_event === void 0 ? void 0 : _event_event.target;\n var trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n var targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n });\n});\nvar DialogContentImpl = createRefComponent(function(props, forwardedRef) {\n var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, onTransition, ...contentProps } = props;\n var contentRef = React.useRef(null);\n var composedRefs = useComposedRefs(forwardedRef, contentRef);\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var adaptContext = useAdaptContext(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ _jsx(DialogPortalItem, {\n context,\n children: contentProps.children\n });\n }\n var contents = /* @__PURE__ */ _jsx(DialogContentFrame, {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n // allow clicking through content during exit animation\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n });\n if (!isWeb) {\n return contents;\n }\n return /* @__PURE__ */ _jsxs(_Fragment, {\n children: [\n /* @__PURE__ */ _jsx(Dismissable, {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: function() {\n var _context_onOpenChange;\n return context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false);\n },\n children: /* @__PURE__ */ _jsx(FocusScope, {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n })\n }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ _jsxs(_Fragment, {\n children: [\n /* @__PURE__ */ _jsx(TitleWarning, {\n titleId: context.titleId\n }),\n /* @__PURE__ */ _jsx(DescriptionWarning, {\n contentRef,\n descriptionId: context.descriptionId\n })\n ]\n })\n ]\n });\n});\nvar DialogTitleFrame = styled(H2, {\n displayName: \"DialogTitle\"\n});\nvar DialogTitle = createStyledHOC(DialogTitleFrame, function DialogTitle2(props, forwardedRef) {\n var { scope, ...titleProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ _jsx(DialogTitleFrame, {\n id: context.titleId,\n ...titleProps,\n ref: forwardedRef\n });\n});\nvar DialogDescriptionFrame = styled(Paragraph, {\n displayName: \"DialogDescription\"\n});\nvar DialogDescription = createStyledHOC(DialogDescriptionFrame, function DialogDescription2(props, forwardedRef) {\n var { scope, ...descriptionProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ _jsx(DialogDescriptionFrame, {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n });\n});\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogCloseFrame = styled(View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nvar DialogClose = createStyledHOC(DialogCloseFrame, function(props, forwardedRef) {\n var { scope, displayWhenAdapted, ...closeProps } = props;\n var context = useDialogContext(scope);\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var isInsideButton = React.useContext(ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ _jsx(DialogCloseFrame, {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: composeEventHandlers(props.onPress, function() {\n context.onOpenChange(false);\n })\n });\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [DialogWarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nvar TitleWarning = function(param) {\n var { titleId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n var MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(function() {\n if (!isWeb) return;\n if (titleId) {\n var hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n titleId\n ]);\n }\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = function(param) {\n var { contentRef, descriptionId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n var MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(function() {\n if (!isWeb) return;\n var contentNode = contentRef.current;\n if (!(contentNode instanceof HTMLElement)) {\n return;\n }\n var describedById = contentNode.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n var hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n contentRef,\n descriptionId\n ]);\n }\n return null;\n};\nvar Dialog = withStaticProperties(createRefComponent(function Dialog2(props) {\n var { scope = \"\", children, open: openProp, defaultOpen = false, onOpenChange, modal = true, keepChildrenMounted, disableRemoveScroll = false, onAnimationComplete } = props;\n var baseId = React.useId();\n var dialogId = `Dialog-${scope}-${baseId}`;\n var contentId = `${dialogId}-content`;\n var titleId = `${dialogId}-title`;\n var descriptionId = `${dialogId}-description`;\n var triggerRef = React.useRef(null);\n var contentRef = React.useRef(null);\n var presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n var [presentPartCount, setPresentPartCount] = React.useState(0);\n var [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n var onOpenToggle = React.useCallback(function() {\n setOpen(function(prevOpen) {\n return !prevOpen;\n });\n }, [\n setOpen\n ]);\n var adaptScope = `DialogAdapt${scope}`;\n var setPartPresence = React.useCallback(function(id, present) {\n var presentPartIds = presentPartIdsRef.current;\n var hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n var context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ _jsx(AdaptParent, {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ _jsx(DialogProvider, {\n scope,\n ...context,\n children\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 FocusScope: FocusScopeController,\n Adapt\n});\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogOverlay,\n DialogOverlayFrame,\n DialogPortal,\n DialogPortalFrame,\n DialogProvider,\n DialogTitle,\n DialogTrigger,\n DialogWarningProvider,\n useDialogContext\n};\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,IAAI,gBAAgB,oBAElB,CAAC,GACD,UACF;AACA,IAAI,EAAE,kBAAkB,kBAAkB,UAAU,mBAAmB;AACvE,IAAI,qBAAqB,OAAO,MAAM,EACpC,aAAa,gBACf,CAAC;AACD,IAAI,gBAAgB,gBAAgB,oBAAoB,SAAS,eAAe,OAAO,cAAc;CACnG,IAAI,EAAE,OAAO,GAAG,iBAAiB;CACjC,IAAI,iBAAiB,MAAM,WAAW,oBAAoB;CAC1D,IAAI,UAAU,iBAAiB,KAAK;CACpC,IAAI,qBAAqB,gBAAgB,cAAc,QAAQ,UAAU;CACzE,OAAuB,oBAAK,qBAAqB,UAAU;EACzD,OAAO,MAAM,UAAU,iBAAiB;EACx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F,GAAG,CAAC,CAAC;CACL,IAAI,UAAU;EACZ,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA,iBAAiB,mBAAmB;EACpC;EACA;CACF;CACA,OAAuB,oBAAK,aAAa;EACvC,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,oBAAK,gBAAgB;GAC7C;GACA,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH,CAAC,GAAG;CACF,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY;CACZ;AACF,CAAC"}
1
+ {"version":3,"file":"Dialog.native.js","names":["_Fragment"],"sources":["esm/Dialog.native.js"],"sourcesContent":["import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nimport { Adapt, AdaptParent, AdaptPortalContents, ProvideAdaptContext, useAdaptContext, useAdaptIsActive } from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { composeRefs, useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { createStyledHOC, createStyledContext, createRefComponent, getExpandedShorthand, LayoutMeasurementController, styled, Theme, useThemeName, View } from \"@tamagui/core\";\nimport { createContext } from \"@tamagui/create-context\";\nimport { Dismissable } from \"@tamagui/dismissable\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { needsPortalRepropagation, Portal, PortalItem, resolveViewZIndex } from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ButtonNestingContext, YStack } from \"@tamagui/stacks\";\nimport { H2, Paragraph } from \"@tamagui/text\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { StackZIndexContext } from \"@tamagui/z-index-stack\";\nimport * as React from \"react\";\nvar DialogContext = createStyledContext(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nvar { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nvar DialogTriggerFrame = styled(View, {\n displayName: \"DialogTrigger\"\n});\nvar DialogTrigger = createStyledHOC(DialogTriggerFrame, function DialogTrigger2(props, forwardedRef) {\n var { scope, ...triggerProps } = props;\n var isInsideButton = React.useContext(ButtonNestingContext);\n var context = useDialogContext(scope);\n var composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ _jsx(ButtonNestingContext.Provider, {\n value: props.asChild ? isInsideButton : true,\n children: /* @__PURE__ */ _jsx(DialogTriggerFrame, {\n render: isInsideButton ? \"span\" : \"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});\nvar DialogPortalFrame = styled(YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n style: isWeb ? {\n color: \"inherit\"\n } : void 0,\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nvar needsRepropagation = needsPortalRepropagation();\nvar DialogPortalItem = function(param) {\n var { context, children } = param;\n var themeName = useThemeName();\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var adaptContext = useAdaptContext(context.adaptScope);\n var content = /* @__PURE__ */ _jsx(Theme, {\n name: themeName,\n children\n });\n if (needsRepropagation) {\n content = /* @__PURE__ */ _jsx(ProvideAdaptContext, {\n ...adaptContext,\n children: /* @__PURE__ */ _jsx(DialogProvider, {\n ...context,\n children: content\n })\n });\n }\n return isAdapted ? /* @__PURE__ */ _jsx(AdaptPortalContents, {\n scope: context.adaptScope,\n children: content\n }) : context.modal ? /* @__PURE__ */ _jsx(PortalItem, {\n hostName: \"root\",\n children: content\n }) : content;\n};\nvar DialogPortal = createRefComponent(function(props, forwardedRef) {\n var { scope, forceMount, children, ...frameProps } = props;\n var dialogRef = React.useRef(null);\n var ref = composeRefs(dialogRef, forwardedRef);\n var context = useDialogContext(scope);\n var portalContext = forceMount ? {\n ...context,\n forceMount: true\n } : context;\n var keepMounted = forceMount || context.keepChildrenMounted;\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var isVisible = context.open || context.hasPresentParts;\n if (isWeb) {\n useIsomorphicLayoutEffect(function() {\n var node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n var _node_show;\n (_node_show = node.show) === null || _node_show === void 0 ? void 0 : _node_show.call(node);\n } else {\n var _node_close;\n (_node_close = node.close) === null || _node_close === void 0 ? void 0 : _node_close.call(node);\n }\n }, [\n isVisible\n ]);\n }\n var zIndex = getExpandedShorthand(\"zIndex\", props);\n var contents = /* @__PURE__ */ _jsx(StackZIndexContext, {\n zIndex: resolveViewZIndex(zIndex),\n children: /* @__PURE__ */ _jsx(DialogProvider, {\n scope: context.dialogScope,\n ...portalContext,\n children\n })\n });\n var framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ _jsx(LayoutMeasurementController, {\n disable: !context.open,\n children: /* @__PURE__ */ _jsx(DialogPortalFrame, {\n ref,\n ...isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n })\n });\n if (isWeb) {\n return /* @__PURE__ */ _jsx(Portal, {\n zIndex,\n // set to 100000 which ensures dialogs are above most fixed UI (headers, navs)\n // this makes sure its above typical stacking contexts\n stackZIndex: 1e5,\n passThrough: isAdapted,\n // hide the host while closed (covers keepChildrenMounted content, see\n // Portal.tsx); isVisible stays true through the exit animation\n hidden: !isVisible,\n children: /* @__PURE__ */ _jsx(PassthroughTheme, {\n passThrough: isAdapted,\n children: framedContents\n })\n });\n }\n return isAdapted ? framedContents : /* @__PURE__ */ _jsx(DialogPortalItem, {\n context: portalContext,\n children: framedContents\n });\n});\nvar PassthroughTheme = function(param) {\n var { children, passThrough } = param;\n var themeName = useThemeName();\n return /* @__PURE__ */ _jsx(Theme, {\n passThrough,\n name: themeName,\n forceClassName: true,\n children\n });\n};\nfunction useDialogAnimationReporter(context) {\n var onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n var openRef = React.useRef(context.open);\n var pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n var reportComplete = React.useCallback(function(open) {\n var _onAnimationCompleteRef_current;\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n (_onAnimationCompleteRef_current = onAnimationCompleteRef.current) === null || _onAnimationCompleteRef_current === void 0 ? void 0 : _onAnimationCompleteRef_current.call(onAnimationCompleteRef, {\n open\n });\n }, []);\n return React.useMemo(function() {\n return {\n onEnterComplete: function() {\n return reportComplete(true);\n },\n onExitComplete: function() {\n return reportComplete(false);\n }\n };\n }, [\n reportComplete\n ]);\n}\nfunction useDialogPartPresence(context, options) {\n var [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n var reactId = React.useId();\n var partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n var keepMounted = options.forceMount || context.keepChildrenMounted;\n var isPresent = context.open || !isFullyHidden;\n useIsomorphicLayoutEffect(function() {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [\n context.open,\n isFullyHidden\n ]);\n useIsomorphicLayoutEffect(function() {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return function() {\n context.setPartPresence(partPresenceId, false);\n };\n }, [\n context.setPartPresence,\n isPresent,\n options.disabled,\n partPresenceId\n ]);\n var onExitComplete = React.useCallback(function() {\n var _options_onExitComplete;\n setIsFullyHidden(true);\n (_options_onExitComplete = options.onExitComplete) === null || _options_onExitComplete === void 0 ? void 0 : _options_onExitComplete.call(options);\n }, [\n options.onExitComplete\n ]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlayFrame = styled(YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar DialogOverlay = createStyledHOC(DialogOverlayFrame, function DialogOverlay2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var { forceMount = context.forceMount, ...overlayProps } = props;\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ _jsx(Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ _jsx(DialogOverlayFrame, {\n \"data-state\": getState(context.open),\n // Presence freezes the exiting clone with its open props. The exit\n // clause releases the full-screen overlay during that frozen frame.\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n }, `${context.contentId}-overlay`)\n });\n});\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContentFrame = styled(YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: {\n width: 0,\n height: 12\n }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nvar DialogContent = createStyledHOC(DialogContentFrame, function DialogContent2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var reporter = useDialogAnimationReporter(context);\n var onTransitionProp = props.onTransition;\n var onTransition = React.useCallback(function(event) {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp === null || onTransitionProp === void 0 ? void 0 : onTransitionProp(event);\n }, [\n reporter.onEnterComplete,\n onTransitionProp\n ]);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n var contents = /* @__PURE__ */ _jsx(_Fragment, {\n children: context.modal ? /* @__PURE__ */ _jsx(DialogContentModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }) : /* @__PURE__ */ _jsx(DialogContentNonModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n })\n });\n if (isAdapted) {\n if (!isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ _jsx(RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ _jsx(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: contents\n })\n });\n }\n if (!presence.shouldRender) {\n return null;\n }\n var animated = /* @__PURE__ */ _jsx(Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ _jsx(React.Fragment, {\n children: contents\n }, context.contentId)\n });\n if (!isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ _jsx(RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ _jsx(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: animated\n })\n });\n});\nvar DialogContentModal = createRefComponent(function(param, forwardedRef) {\n var { children, context: contextProp, ...props } = param;\n var context = useDialogContext(contextProp.dialogScope);\n var contentRef = React.useRef(null);\n var composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ _jsx(DialogContentImpl, {\n ...props,\n context,\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: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, function(event) {\n var _context_triggerRef_current;\n event.cancel();\n (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 ? void 0 : _context_triggerRef_current.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, function(event) {\n var originalEvent = event.event;\n if (!originalEvent) return;\n var ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n var isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\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, function(event) {\n return event.cancel();\n }),\n outlineStyle: \"none\",\n children\n });\n});\nvar DialogContentNonModal = createRefComponent(function(props, forwardedRef) {\n var context = useDialogContext(props.context.dialogScope);\n var hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ _jsx(DialogContentImpl, {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: function(event) {\n var _props_onCloseAutoFocus;\n (_props_onCloseAutoFocus = props.onCloseAutoFocus) === null || _props_onCloseAutoFocus === void 0 ? void 0 : _props_onCloseAutoFocus.call(props, event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n var _props_context_triggerRef_current;\n (_props_context_triggerRef_current = props.context.triggerRef.current) === null || _props_context_triggerRef_current === void 0 ? void 0 : _props_context_triggerRef_current.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: function(event) {\n var _props_onInteractOutside, _event_event;\n (_props_onInteractOutside = props.onInteractOutside) === null || _props_onInteractOutside === void 0 ? void 0 : _props_onInteractOutside.call(props, event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n var target = (_event_event = event.event) === null || _event_event === void 0 ? void 0 : _event_event.target;\n var trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n var targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n });\n});\nvar DialogContentImpl = createRefComponent(function(props, forwardedRef) {\n var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, onTransition, ...contentProps } = props;\n var contentRef = React.useRef(null);\n var composedRefs = useComposedRefs(forwardedRef, contentRef);\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var adaptContext = useAdaptContext(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ _jsx(DialogPortalItem, {\n context,\n children: contentProps.children\n });\n }\n var contents = /* @__PURE__ */ _jsx(DialogContentFrame, {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n // allow clicking through content during exit animation\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n });\n if (!isWeb) {\n return contents;\n }\n return /* @__PURE__ */ _jsxs(_Fragment, {\n children: [\n /* @__PURE__ */ _jsx(Dismissable, {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: function() {\n var _context_onOpenChange;\n return context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false);\n },\n children: /* @__PURE__ */ _jsx(FocusScope, {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n })\n }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ _jsxs(_Fragment, {\n children: [\n /* @__PURE__ */ _jsx(TitleWarning, {\n titleId: context.titleId\n }),\n /* @__PURE__ */ _jsx(DescriptionWarning, {\n contentRef,\n descriptionId: context.descriptionId\n })\n ]\n })\n ]\n });\n});\nvar DialogTitleFrame = styled(H2, {\n displayName: \"DialogTitle\"\n});\nvar DialogTitle = createStyledHOC(DialogTitleFrame, function DialogTitle2(props, forwardedRef) {\n var { scope, ...titleProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ _jsx(DialogTitleFrame, {\n id: context.titleId,\n ...titleProps,\n ref: forwardedRef\n });\n});\nvar DialogDescriptionFrame = styled(Paragraph, {\n displayName: \"DialogDescription\"\n});\nvar DialogDescription = createStyledHOC(DialogDescriptionFrame, function DialogDescription2(props, forwardedRef) {\n var { scope, ...descriptionProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ _jsx(DialogDescriptionFrame, {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n });\n});\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogCloseFrame = styled(View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nvar DialogClose = createStyledHOC(DialogCloseFrame, function(props, forwardedRef) {\n var { scope, displayWhenAdapted, ...closeProps } = props;\n var context = useDialogContext(scope);\n var isAdapted = useAdaptIsActive(context.adaptScope);\n var isInsideButton = React.useContext(ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ _jsx(DialogCloseFrame, {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: composeEventHandlers(props.onPress, function() {\n context.onOpenChange(false);\n })\n });\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [DialogWarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nvar TitleWarning = function(param) {\n var { titleId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n var MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(function() {\n if (!isWeb) return;\n if (titleId) {\n var hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n titleId\n ]);\n }\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = function(param) {\n var { contentRef, descriptionId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n var MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(function() {\n if (!isWeb) return;\n var contentNode = contentRef.current;\n if (!(contentNode instanceof HTMLElement)) {\n return;\n }\n var describedById = contentNode.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n var hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n contentRef,\n descriptionId\n ]);\n }\n return null;\n};\nvar Dialog = withStaticProperties(createRefComponent(function Dialog2(props) {\n var { scope = \"\", children, open: openProp, defaultOpen = false, onOpenChange, modal = true, keepChildrenMounted, disableRemoveScroll = false, onAnimationComplete } = props;\n var baseId = React.useId();\n var dialogId = `Dialog-${scope}-${baseId}`;\n var contentId = `${dialogId}-content`;\n var titleId = `${dialogId}-title`;\n var descriptionId = `${dialogId}-description`;\n var triggerRef = React.useRef(null);\n var contentRef = React.useRef(null);\n var presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n var [presentPartCount, setPresentPartCount] = React.useState(0);\n var [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n var onOpenToggle = React.useCallback(function() {\n setOpen(function(prevOpen) {\n return !prevOpen;\n });\n }, [\n setOpen\n ]);\n var adaptScope = `DialogAdapt${scope}`;\n var setPartPresence = React.useCallback(function(id, present) {\n var presentPartIds = presentPartIdsRef.current;\n var hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n var context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ _jsx(AdaptParent, {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ _jsx(DialogProvider, {\n scope,\n ...context,\n children\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 FocusScope: FocusScopeController,\n Adapt\n});\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogOverlay,\n DialogOverlayFrame,\n DialogPortal,\n DialogPortalFrame,\n DialogProvider,\n DialogTitle,\n DialogTrigger,\n DialogWarningProvider,\n useDialogContext\n};\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,IAAI,gBAAgB,oBAElB,CAAC,GACD,UACF;AACA,IAAI,EAAE,kBAAkB,kBAAkB,UAAU,mBAAmB;AACvE,IAAI,qBAAqB,OAAO,MAAM,EACpC,aAAa,gBACf,CAAC;AACD,IAAI,gBAAgB,gBAAgB,oBAAoB,SAAS,eAAe,OAAO,cAAc;CACnG,IAAI,EAAE,OAAO,GAAG,iBAAiB;CACjC,IAAI,iBAAiB,MAAM,WAAW,oBAAoB;CAC1D,IAAI,UAAU,iBAAiB,KAAK;CACpC,IAAI,qBAAqB,gBAAgB,cAAc,QAAQ,UAAU;CACzE,OAAuB,oBAAK,qBAAqB,UAAU;EACzD,OAAO,MAAM,UAAU,iBAAiB;EACxC,UAA0B,oBAAK,oBAAoB;GACjD,QAAQ,iBAAiB,SAAS;GAClC,iBAAiB;GACjB,iBAAiB,QAAQ;GACzB,iBAAiB,QAAQ;GACzB,cAAc,SAAS,QAAQ,IAAI;GACnC,GAAG;GACH,KAAK;GACL,SAAS,qBAAqB,MAAM,SAAS,QAAQ,YAAY;EACnE,CAAC;CACH,CAAC;AACH,CAAC;AACD,IAAI,oBAAoB,OAAO,QAAQ;CACrC,eAAe;CACf,YAAY;CACZ,gBAAgB;CAChB,UAAU;CACV,OAAO;CACP,aAAa;CACb,iBAAiB;CACjB,OAAO,QAAQ,EACb,OAAO,UACT,IAAI,KAAK;CACT,eAAe;CACf,QAAQ;CACR,OAAO;CACP,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F,CAAC"}
@@ -46,7 +46,7 @@ const DialogPortalFrame = styled(YStack, {
46
46
  inset: 0,
47
47
  borderWidth: "web:0px",
48
48
  backgroundColor: "web:transparent",
49
- color: "web:inherit",
49
+ style: isWeb ? { color: "inherit" } : void 0,
50
50
  maxInlineSize: "web:none",
51
51
  margin: "web:0px",
52
52
  width: "web:auto",
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":[],"sources":["jsx/Dialog.js"],"sourcesContent":["import {\n Adapt,\n AdaptParent,\n AdaptPortalContents,\n ProvideAdaptContext,\n useAdaptContext,\n useAdaptIsActive\n} from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { composeRefs, useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport {\n createStyledHOC,\n createStyledContext,\n createRefComponent,\n getExpandedShorthand,\n LayoutMeasurementController,\n styled,\n Theme,\n useThemeName,\n View\n} from \"@tamagui/core\";\nimport { createContext } from \"@tamagui/create-context\";\nimport { Dismissable } from \"@tamagui/dismissable\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport {\n needsPortalRepropagation,\n Portal,\n PortalItem,\n resolveViewZIndex\n} from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ButtonNestingContext, YStack } from \"@tamagui/stacks\";\nimport { H2, Paragraph } from \"@tamagui/text\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { StackZIndexContext } from \"@tamagui/z-index-stack\";\nimport * as React from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst DialogContext = createStyledContext(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nconst { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nconst DialogTriggerFrame = styled(View, {\n displayName: \"DialogTrigger\"\n});\nconst DialogTrigger = createStyledHOC(\n DialogTriggerFrame,\n function DialogTrigger2(props, forwardedRef) {\n const { scope, ...triggerProps } = props;\n const isInsideButton = React.useContext(ButtonNestingContext);\n const context = useDialogContext(scope);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: props.asChild ? isInsideButton : true, children: /* @__PURE__ */ jsx(\n DialogTriggerFrame,\n {\n render: isInsideButton ? \"span\" : \"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);\nconst DialogPortalFrame = styled(YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n color: \"web:inherit\",\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nconst needsRepropagation = needsPortalRepropagation();\nconst DialogPortalItem = ({\n context,\n children\n}) => {\n const themeName = useThemeName();\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n let content = /* @__PURE__ */ jsx(Theme, { name: themeName, children });\n if (needsRepropagation) {\n content = /* @__PURE__ */ jsx(ProvideAdaptContext, { ...adaptContext, children: /* @__PURE__ */ jsx(DialogProvider, { ...context, children: content }) });\n }\n return isAdapted ? /* @__PURE__ */ jsx(AdaptPortalContents, { scope: context.adaptScope, children: content }) : context.modal ? /* @__PURE__ */ jsx(PortalItem, { hostName: \"root\", children: content }) : content;\n};\nconst DialogPortal = createRefComponent(\n (props, forwardedRef) => {\n const { scope, forceMount, children, ...frameProps } = props;\n const dialogRef = React.useRef(null);\n const ref = composeRefs(dialogRef, forwardedRef);\n const context = useDialogContext(scope);\n const portalContext = forceMount ? { ...context, forceMount: true } : context;\n const keepMounted = forceMount || context.keepChildrenMounted;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isVisible = context.open || context.hasPresentParts;\n if (isWeb) {\n useIsomorphicLayoutEffect(() => {\n const node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n node.show?.();\n } else {\n node.close?.();\n }\n }, [isVisible]);\n }\n const zIndex = getExpandedShorthand(\"zIndex\", props);\n const contents = /* @__PURE__ */ jsx(StackZIndexContext, { zIndex: resolveViewZIndex(zIndex), children: /* @__PURE__ */ jsx(DialogProvider, { scope: context.dialogScope, ...portalContext, children }) });\n const framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ jsx(LayoutMeasurementController, { disable: !context.open, children: /* @__PURE__ */ jsx(\n DialogPortalFrame,\n {\n ref,\n ...isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n }\n ) });\n if (isWeb) {\n return /* @__PURE__ */ jsx(\n Portal,\n {\n zIndex,\n stackZIndex: 1e5,\n passThrough: isAdapted,\n hidden: !isVisible,\n children: /* @__PURE__ */ jsx(PassthroughTheme, { passThrough: isAdapted, children: framedContents })\n }\n );\n }\n return isAdapted ? framedContents : /* @__PURE__ */ jsx(DialogPortalItem, { context: portalContext, children: framedContents });\n }\n);\nconst PassthroughTheme = ({\n children,\n passThrough\n}) => {\n const themeName = useThemeName();\n return /* @__PURE__ */ jsx(Theme, { passThrough, name: themeName, forceClassName: true, children });\n};\nfunction useDialogAnimationReporter(context) {\n const onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n const openRef = React.useRef(context.open);\n const pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n const reportComplete = React.useCallback((open) => {\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n onAnimationCompleteRef.current?.({ open });\n }, []);\n return React.useMemo(\n () => ({\n onEnterComplete: () => reportComplete(true),\n onExitComplete: () => reportComplete(false)\n }),\n [reportComplete]\n );\n}\nfunction useDialogPartPresence(context, options) {\n const [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n const reactId = React.useId();\n const partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n const keepMounted = options.forceMount || context.keepChildrenMounted;\n const isPresent = context.open || !isFullyHidden;\n useIsomorphicLayoutEffect(() => {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [context.open, isFullyHidden]);\n useIsomorphicLayoutEffect(() => {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return () => {\n context.setPartPresence(partPresenceId, false);\n };\n }, [context.setPartPresence, isPresent, options.disabled, partPresenceId]);\n const onExitComplete = React.useCallback(() => {\n setIsFullyHidden(true);\n options.onExitComplete?.();\n }, [options.onExitComplete]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nconst OVERLAY_NAME = \"DialogOverlay\";\nconst DialogOverlayFrame = styled(YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst DialogOverlay = createStyledHOC(\n DialogOverlayFrame,\n function DialogOverlay2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const { forceMount = context.forceMount, ...overlayProps } = props;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ jsx(\n DialogOverlayFrame,\n {\n \"data-state\": getState(context.open),\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n },\n `${context.contentId}-overlay`\n )\n }\n );\n }\n);\nconst CONTENT_NAME = \"DialogContent\";\nconst DialogContentFrame = styled(YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: { width: 0, height: 12 }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nconst DialogContent = createStyledHOC(\n DialogContentFrame,\n function DialogContent2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const reporter = useDialogAnimationReporter(context);\n const onTransitionProp = props.onTransition;\n const onTransition = React.useCallback(\n (event) => {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp?.(event);\n },\n [reporter.onEnterComplete, onTransitionProp]\n );\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n const contents = /* @__PURE__ */ jsx(Fragment, { children: context.modal ? /* @__PURE__ */ jsx(\n DialogContentModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) : /* @__PURE__ */ jsx(\n DialogContentNonModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) });\n if (isAdapted) {\n if (!isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: contents }) });\n }\n if (!presence.shouldRender) {\n return null;\n }\n const animated = /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ jsx(React.Fragment, { children: contents }, context.contentId)\n }\n );\n if (!isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: animated }) });\n }\n);\nconst DialogContentModal = createRefComponent(\n ({ children, context: contextProp, ...props }, forwardedRef) => {\n const context = useDialogContext(contextProp.dialogScope);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.cancel();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.event;\n if (!originalEvent) return;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\n }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.cancel()\n ),\n outlineStyle: \"none\",\n children\n }\n );\n }\n);\nconst DialogContentNonModal = createRefComponent(\n (props, forwardedRef) => {\n const context = useDialogContext(props.context.dialogScope);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n props.context.triggerRef.current?.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n const target = event.event?.target;\n const trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n const targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n }\n );\n }\n);\nconst DialogContentImpl = createRefComponent(\n (props, forwardedRef) => {\n const {\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n context,\n onTransition,\n ...contentProps\n } = props;\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ jsx(DialogPortalItem, { context, children: contentProps.children });\n }\n const contents = /* @__PURE__ */ jsx(\n DialogContentFrame,\n {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n }\n );\n if (!isWeb) {\n return contents;\n }\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n Dismissable,\n {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: () => context?.onOpenChange?.(false),\n children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n }\n )\n }\n ),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(\n DescriptionWarning,\n {\n contentRef,\n descriptionId: context.descriptionId\n }\n )\n ] })\n ] });\n }\n);\nconst DialogTitleFrame = styled(H2, {\n displayName: \"DialogTitle\"\n});\nconst DialogTitle = createStyledHOC(\n DialogTitleFrame,\n function DialogTitle2(props, forwardedRef) {\n const { scope, ...titleProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(DialogTitleFrame, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nconst DialogDescriptionFrame = styled(Paragraph, {\n displayName: \"DialogDescription\"\n});\nconst DialogDescription = createStyledHOC(\n DialogDescriptionFrame,\n function DialogDescription2(props, forwardedRef) {\n const { scope, ...descriptionProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(\n DialogDescriptionFrame,\n {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n }\n );\n }\n);\nconst CLOSE_NAME = \"DialogClose\";\nconst DialogCloseFrame = styled(View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nconst DialogClose = createStyledHOC(\n DialogCloseFrame,\n (props, forwardedRef) => {\n const { scope, displayWhenAdapted, ...closeProps } = props;\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isInsideButton = React.useContext(ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n DialogCloseFrame,\n {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: composeEventHandlers(props.onPress, () => {\n context.onOpenChange(false);\n })\n }\n );\n }\n);\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nconst TITLE_WARNING_NAME = \"DialogTitleWarning\";\nconst [DialogWarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nconst TitleWarning = ({ titleId }) => {\n if (process.env.NODE_ENV === \"development\") {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(() => {\n if (!isWeb) return;\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, titleId]);\n }\n return null;\n};\nconst DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nconst DescriptionWarning = ({\n contentRef,\n descriptionId\n}) => {\n if (process.env.NODE_ENV === \"development\") {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\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 (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, contentRef, descriptionId]);\n }\n return null;\n};\nconst Dialog = withStaticProperties(\n createRefComponent(function Dialog2(props) {\n const {\n scope = \"\",\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n modal = true,\n keepChildrenMounted,\n disableRemoveScroll = false,\n onAnimationComplete\n } = props;\n const baseId = React.useId();\n const dialogId = `Dialog-${scope}-${baseId}`;\n const contentId = `${dialogId}-content`;\n const titleId = `${dialogId}-title`;\n const descriptionId = `${dialogId}-description`;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n const [presentPartCount, setPresentPartCount] = React.useState(0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const onOpenToggle = React.useCallback(() => {\n setOpen((prevOpen) => !prevOpen);\n }, [setOpen]);\n const adaptScope = `DialogAdapt${scope}`;\n const setPartPresence = React.useCallback((id, present) => {\n const presentPartIds = presentPartIdsRef.current;\n const hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n const context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ jsx(\n AdaptParent,\n {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ jsx(DialogProvider, { scope, ...context, children })\n }\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 FocusScope: FocusScopeController,\n Adapt\n }\n);\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogOverlay,\n DialogOverlayFrame,\n DialogPortal,\n DialogPortalFrame,\n DialogProvider,\n DialogTitle,\n DialogTrigger,\n DialogWarningProvider,\n useDialogContext\n};\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA,MAAM,gBAAgB,oBAEpB,CAAC,GACD,UACF;AACA,MAAM,EAAE,kBAAkB,kBAAkB,UAAU,mBAAmB;AACzE,MAAM,qBAAqB,OAAO,MAAM,EACtC,aAAa,gBACf,CAAC;AACD,MAAM,gBAAgB,gBACpB,oBACA,SAAS,eAAe,OAAO,cAAc;CAC3C,MAAM,EAAE,OAAO,GAAG,iBAAiB;CACnC,MAAM,iBAAiB,MAAM,WAAW,oBAAoB;CAC5D,MAAM,UAAU,iBAAiB,KAAK;CACtC,MAAM,qBAAqB,gBAAgB,cAAc,QAAQ,UAAU;CAC3E,OAAuB,oBAAI,qBAAqB,UAAU;EAAE,OAAO,MAAM,UAAU,iBAAiB;EAAM,UAA0B,oBAClI,oBACA;GACE,QAAQ,iBAAiB,SAAS;GAClC,iBAAiB;GACjB,iBAAiB,QAAQ;GACzB,iBAAiB,QAAQ;GACzB,cAAc,SAAS,QAAQ,IAAI;GACnC,GAAG;GACH,KAAK;GACL,SAAS,qBAAqB,MAAM,SAAS,QAAQ,YAAY;EACnE,CACF;CAAE,CAAC;AACL,CACF;AACA,MAAM,oBAAoB,OAAO,QAAQ;CACvC,eAAe;CACf,YAAY;CACZ,gBAAgB;CAChB,UAAU;CACV,OAAO;CACP,aAAa;CACb,iBAAiB;CACjB,OAAO;CACP,eAAe;CACf,QAAQ;CACR,OAAO;CACP,QAAQ;CACR,WAAW;CACX,QAAQ;CACR,QAAQ;AACV,CAAC;AACD,MAAM,qBAAqB,yBAAyB;AACpD,MAAM,oBAAoB,EACxB,SACA,eACI;CACJ,MAAM,YAAY,aAAa;CAC/B,MAAM,YA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CAAC,kBAAkB,uBAAuB,MAAM,SAAS,CAAC;CAChE,MAAM,CAAC,MAAM,WAAW,qBAAqB;EAC3C,MAAM;EACN,aAAa;EACb,UAAU;CACZ,CAAC;CACD,MAAM,eAAe,MAAM,kBAAkB;EAC3C,SAAS,aAAa,CAAC,QAAQ;CACjC,GAAG,CAAC,OAAO,CAAC;CACZ,MAAM,aAAa,cAAc;CACjC,MAAM,kBAAkB,MAAM,aAAa,IAAI,YAAY;EACzD,MAAM,iBAAiB,kBAAkB;EACzC,MAAM,UAAU,eAAe,IAAI,EAAE;EACrC,IAAI,WAAW,CAAC,SAAS;GACvB,eAAe,IAAI,EAAE;GACrB,oBAAoB,eAAe,IAAI;EACzC,OAAO,IAAI,CAAC,WAAW,SAAS;GAC9B,eAAe,OAAO,EAAE;GACxB,oBAAoB,eAAe,IAAI;EACzC;CACF,GAAG,CAAC,CAAC;CACL,MAAM,UAAU;EACd,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA,iBAAiB,mBAAmB;EACpC;EACA;CACF;CACA,OAAuB,oBACrB,aACA;EACE,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,oBAAI,gBAAgB;GAAE;GAAO,GAAG;GAAS;EAAS,CAAC;CAC/E,CACF;AACF,CAAC,GACD;CACE,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY;CACZ;AACF,CACF"}
1
+ {"version":3,"file":"Dialog.js","names":[],"sources":["jsx/Dialog.js"],"sourcesContent":["import {\n Adapt,\n AdaptParent,\n AdaptPortalContents,\n ProvideAdaptContext,\n useAdaptContext,\n useAdaptIsActive\n} from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { composeRefs, useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport {\n createStyledHOC,\n createStyledContext,\n createRefComponent,\n getExpandedShorthand,\n LayoutMeasurementController,\n styled,\n Theme,\n useThemeName,\n View\n} from \"@tamagui/core\";\nimport { createContext } from \"@tamagui/create-context\";\nimport { Dismissable } from \"@tamagui/dismissable\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport {\n needsPortalRepropagation,\n Portal,\n PortalItem,\n resolveViewZIndex\n} from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ButtonNestingContext, YStack } from \"@tamagui/stacks\";\nimport { H2, Paragraph } from \"@tamagui/text\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport { StackZIndexContext } from \"@tamagui/z-index-stack\";\nimport * as React from \"react\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nconst DialogContext = createStyledContext(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nconst { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nconst DialogTriggerFrame = styled(View, {\n displayName: \"DialogTrigger\"\n});\nconst DialogTrigger = createStyledHOC(\n DialogTriggerFrame,\n function DialogTrigger2(props, forwardedRef) {\n const { scope, ...triggerProps } = props;\n const isInsideButton = React.useContext(ButtonNestingContext);\n const context = useDialogContext(scope);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(ButtonNestingContext.Provider, { value: props.asChild ? isInsideButton : true, children: /* @__PURE__ */ jsx(\n DialogTriggerFrame,\n {\n render: isInsideButton ? \"span\" : \"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);\nconst DialogPortalFrame = styled(YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n style: isWeb ? { color: \"inherit\" } : void 0,\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nconst needsRepropagation = needsPortalRepropagation();\nconst DialogPortalItem = ({\n context,\n children\n}) => {\n const themeName = useThemeName();\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n let content = /* @__PURE__ */ jsx(Theme, { name: themeName, children });\n if (needsRepropagation) {\n content = /* @__PURE__ */ jsx(ProvideAdaptContext, { ...adaptContext, children: /* @__PURE__ */ jsx(DialogProvider, { ...context, children: content }) });\n }\n return isAdapted ? /* @__PURE__ */ jsx(AdaptPortalContents, { scope: context.adaptScope, children: content }) : context.modal ? /* @__PURE__ */ jsx(PortalItem, { hostName: \"root\", children: content }) : content;\n};\nconst DialogPortal = createRefComponent(\n (props, forwardedRef) => {\n const { scope, forceMount, children, ...frameProps } = props;\n const dialogRef = React.useRef(null);\n const ref = composeRefs(dialogRef, forwardedRef);\n const context = useDialogContext(scope);\n const portalContext = forceMount ? { ...context, forceMount: true } : context;\n const keepMounted = forceMount || context.keepChildrenMounted;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isVisible = context.open || context.hasPresentParts;\n if (isWeb) {\n useIsomorphicLayoutEffect(() => {\n const node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n node.show?.();\n } else {\n node.close?.();\n }\n }, [isVisible]);\n }\n const zIndex = getExpandedShorthand(\"zIndex\", props);\n const contents = /* @__PURE__ */ jsx(StackZIndexContext, { zIndex: resolveViewZIndex(zIndex), children: /* @__PURE__ */ jsx(DialogProvider, { scope: context.dialogScope, ...portalContext, children }) });\n const framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ jsx(LayoutMeasurementController, { disable: !context.open, children: /* @__PURE__ */ jsx(\n DialogPortalFrame,\n {\n ref,\n ...isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n }\n ) });\n if (isWeb) {\n return /* @__PURE__ */ jsx(\n Portal,\n {\n zIndex,\n stackZIndex: 1e5,\n passThrough: isAdapted,\n hidden: !isVisible,\n children: /* @__PURE__ */ jsx(PassthroughTheme, { passThrough: isAdapted, children: framedContents })\n }\n );\n }\n return isAdapted ? framedContents : /* @__PURE__ */ jsx(DialogPortalItem, { context: portalContext, children: framedContents });\n }\n);\nconst PassthroughTheme = ({\n children,\n passThrough\n}) => {\n const themeName = useThemeName();\n return /* @__PURE__ */ jsx(Theme, { passThrough, name: themeName, forceClassName: true, children });\n};\nfunction useDialogAnimationReporter(context) {\n const onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n const openRef = React.useRef(context.open);\n const pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n const reportComplete = React.useCallback((open) => {\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n onAnimationCompleteRef.current?.({ open });\n }, []);\n return React.useMemo(\n () => ({\n onEnterComplete: () => reportComplete(true),\n onExitComplete: () => reportComplete(false)\n }),\n [reportComplete]\n );\n}\nfunction useDialogPartPresence(context, options) {\n const [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n const reactId = React.useId();\n const partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n const keepMounted = options.forceMount || context.keepChildrenMounted;\n const isPresent = context.open || !isFullyHidden;\n useIsomorphicLayoutEffect(() => {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [context.open, isFullyHidden]);\n useIsomorphicLayoutEffect(() => {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return () => {\n context.setPartPresence(partPresenceId, false);\n };\n }, [context.setPartPresence, isPresent, options.disabled, partPresenceId]);\n const onExitComplete = React.useCallback(() => {\n setIsFullyHidden(true);\n options.onExitComplete?.();\n }, [options.onExitComplete]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nconst OVERLAY_NAME = \"DialogOverlay\";\nconst DialogOverlayFrame = styled(YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nconst DialogOverlay = createStyledHOC(\n DialogOverlayFrame,\n function DialogOverlay2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const { forceMount = context.forceMount, ...overlayProps } = props;\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ jsx(\n DialogOverlayFrame,\n {\n \"data-state\": getState(context.open),\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n },\n `${context.contentId}-overlay`\n )\n }\n );\n }\n);\nconst CONTENT_NAME = \"DialogContent\";\nconst DialogContentFrame = styled(YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: { width: 0, height: 12 }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nconst DialogContent = createStyledHOC(\n DialogContentFrame,\n function DialogContent2({ scope, ...props }, forwardedRef) {\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const reporter = useDialogAnimationReporter(context);\n const onTransitionProp = props.onTransition;\n const onTransition = React.useCallback(\n (event) => {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp?.(event);\n },\n [reporter.onEnterComplete, onTransitionProp]\n );\n const presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n const contents = /* @__PURE__ */ jsx(Fragment, { children: context.modal ? /* @__PURE__ */ jsx(\n DialogContentModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) : /* @__PURE__ */ jsx(\n DialogContentNonModal,\n {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }\n ) });\n if (isAdapted) {\n if (!isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: contents }) });\n }\n if (!presence.shouldRender) {\n return null;\n }\n const animated = /* @__PURE__ */ jsx(\n Animate,\n {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ jsx(React.Fragment, { children: contents }, context.contentId)\n }\n );\n if (!isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ jsx(RemoveScroll, { enabled: context.open && context.modal, children: /* @__PURE__ */ jsx(\"div\", { \"data-remove-scroll-container\": true, className: \"_dsp_contents\", children: animated }) });\n }\n);\nconst DialogContentModal = createRefComponent(\n ({ children, context: contextProp, ...props }, forwardedRef) => {\n const context = useDialogContext(contextProp.dialogScope);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.cancel();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.event;\n if (!originalEvent) return;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\n }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.cancel()\n ),\n outlineStyle: \"none\",\n children\n }\n );\n }\n);\nconst DialogContentNonModal = createRefComponent(\n (props, forwardedRef) => {\n const context = useDialogContext(props.context.dialogScope);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n props.context.triggerRef.current?.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n const target = event.event?.target;\n const trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n const targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n }\n );\n }\n);\nconst DialogContentImpl = createRefComponent(\n (props, forwardedRef) => {\n const {\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n context,\n onTransition,\n ...contentProps\n } = props;\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const adaptContext = useAdaptContext(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ jsx(DialogPortalItem, { context, children: contentProps.children });\n }\n const contents = /* @__PURE__ */ jsx(\n DialogContentFrame,\n {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n }\n );\n if (!isWeb) {\n return contents;\n }\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n Dismissable,\n {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: () => context?.onOpenChange?.(false),\n children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n }\n )\n }\n ),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(\n DescriptionWarning,\n {\n contentRef,\n descriptionId: context.descriptionId\n }\n )\n ] })\n ] });\n }\n);\nconst DialogTitleFrame = styled(H2, {\n displayName: \"DialogTitle\"\n});\nconst DialogTitle = createStyledHOC(\n DialogTitleFrame,\n function DialogTitle2(props, forwardedRef) {\n const { scope, ...titleProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(DialogTitleFrame, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nconst DialogDescriptionFrame = styled(Paragraph, {\n displayName: \"DialogDescription\"\n});\nconst DialogDescription = createStyledHOC(\n DialogDescriptionFrame,\n function DialogDescription2(props, forwardedRef) {\n const { scope, ...descriptionProps } = props;\n const context = useDialogContext(scope);\n return /* @__PURE__ */ jsx(\n DialogDescriptionFrame,\n {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n }\n );\n }\n);\nconst CLOSE_NAME = \"DialogClose\";\nconst DialogCloseFrame = styled(View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nconst DialogClose = createStyledHOC(\n DialogCloseFrame,\n (props, forwardedRef) => {\n const { scope, displayWhenAdapted, ...closeProps } = props;\n const context = useDialogContext(scope);\n const isAdapted = useAdaptIsActive(context.adaptScope);\n const isInsideButton = React.useContext(ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ jsx(\n DialogCloseFrame,\n {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: composeEventHandlers(props.onPress, () => {\n context.onOpenChange(false);\n })\n }\n );\n }\n);\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nconst TITLE_WARNING_NAME = \"DialogTitleWarning\";\nconst [DialogWarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nconst TitleWarning = ({ titleId }) => {\n if (process.env.NODE_ENV === \"development\") {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(() => {\n if (!isWeb) return;\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, titleId]);\n }\n return null;\n};\nconst DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nconst DescriptionWarning = ({\n contentRef,\n descriptionId\n}) => {\n if (process.env.NODE_ENV === \"development\") {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\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 (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [MESSAGE, contentRef, descriptionId]);\n }\n return null;\n};\nconst Dialog = withStaticProperties(\n createRefComponent(function Dialog2(props) {\n const {\n scope = \"\",\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n modal = true,\n keepChildrenMounted,\n disableRemoveScroll = false,\n onAnimationComplete\n } = props;\n const baseId = React.useId();\n const dialogId = `Dialog-${scope}-${baseId}`;\n const contentId = `${dialogId}-content`;\n const titleId = `${dialogId}-title`;\n const descriptionId = `${dialogId}-description`;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n const [presentPartCount, setPresentPartCount] = React.useState(0);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n const onOpenToggle = React.useCallback(() => {\n setOpen((prevOpen) => !prevOpen);\n }, [setOpen]);\n const adaptScope = `DialogAdapt${scope}`;\n const setPartPresence = React.useCallback((id, present) => {\n const presentPartIds = presentPartIdsRef.current;\n const hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n const context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ jsx(\n AdaptParent,\n {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ jsx(DialogProvider, { scope, ...context, children })\n }\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 FocusScope: FocusScopeController,\n Adapt\n }\n);\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogContext,\n DialogDescription,\n DialogOverlay,\n DialogOverlayFrame,\n DialogPortal,\n DialogPortalFrame,\n DialogProvider,\n DialogTitle,\n DialogTrigger,\n DialogWarningProvider,\n useDialogContext\n};\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA,MAAM,gBAAgB,oBAEpB,CAAC,GACD,UACF;AACA,MAAM,EAAE,kBAAkB,kBAAkB,UAAU,mBAAmB;AACzE,MAAM,qBAAqB,OAAO,MAAM,EACtC,aAAa,gBACf,CAAC;AACD,MAAM,gBAAgB,gBACpB,oBACA,SAAS,eAAe,OAAO,cAAc;CAC3C,MAAM,EAAE,OAAO,GAAG,iBAAiB;CACnC,MAAM,iBAAiB,MAAM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AW,SAAS;GAC9B,eAAe,OAAO,EAAE;GACxB,oBAAoB,eAAe,IAAI;EACzC;CACF,GAAG,CAAC,CAAC;CACL,MAAM,UAAU;EACd,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA,iBAAiB,mBAAmB;EACpC;EACA;CACF;CACA,OAAuB,oBACrB,aACA;EACE,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,oBAAI,gBAAgB;GAAE;GAAO,GAAG;GAAS;EAAS,CAAC;CAC/E,CACF;AACF,CAAC,GACD;CACE,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY;CACZ;AACF,CACF"}
@@ -91,7 +91,7 @@ var DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {
91
91
  inset: 0,
92
92
  borderWidth: "web:0px",
93
93
  backgroundColor: "web:transparent",
94
- color: "web:inherit",
94
+ style: import_constants.isWeb ? { color: "inherit" } : void 0,
95
95
  maxInlineSize: "web:none",
96
96
  margin: "web:0px",
97
97
  width: "web:auto",
@@ -91,7 +91,7 @@ var DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {
91
91
  inset: 0,
92
92
  borderWidth: "web:0px",
93
93
  backgroundColor: "web:transparent",
94
- color: "web:inherit",
94
+ style: import_constants.isWeb ? { color: "inherit" } : void 0,
95
95
  maxInlineSize: "web:none",
96
96
  margin: "web:0px",
97
97
  width: "web:auto",
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.native.js","names":[],"sources":["jsx/Dialog.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Dialog_exports = {};\n__export(Dialog_exports, {\n Dialog: () => Dialog,\n DialogClose: () => DialogClose,\n DialogContent: () => DialogContent,\n DialogContext: () => DialogContext,\n DialogDescription: () => DialogDescription,\n DialogOverlay: () => DialogOverlay,\n DialogOverlayFrame: () => DialogOverlayFrame,\n DialogPortal: () => DialogPortal,\n DialogPortalFrame: () => DialogPortalFrame,\n DialogProvider: () => DialogProvider,\n DialogTitle: () => DialogTitle,\n DialogTrigger: () => DialogTrigger,\n DialogWarningProvider: () => DialogWarningProvider,\n useDialogContext: () => useDialogContext\n});\nmodule.exports = __toCommonJS(Dialog_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_animate = require(\"@tamagui/animate\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_create_context = require(\"@tamagui/create-context\");\nvar import_dismissable = require(\"@tamagui/dismissable\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_portal = require(\"@tamagui/portal\");\nvar import_remove_scroll = require(\"@tamagui/remove-scroll\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar import_z_index_stack = require(\"@tamagui/z-index-stack\");\nvar React = __toESM(require(\"react\"), 1);\nvar DialogContext = (0, import_core.createStyledContext)(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nvar { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nvar DialogTriggerFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"DialogTrigger\"\n});\nvar DialogTrigger = (0, import_core.createStyledHOC)(DialogTriggerFrame, function DialogTrigger2(props, forwardedRef) {\n var { scope, ...triggerProps } = props;\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n var context = useDialogContext(scope);\n var composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: props.asChild ? isInsideButton : true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTriggerFrame, {\n render: isInsideButton ? \"span\" : \"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: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)\n })\n });\n});\nvar DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n color: \"web:inherit\",\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nvar needsRepropagation = (0, import_portal.needsPortalRepropagation)();\nvar DialogPortalItem = function(param) {\n var { context, children } = param;\n var themeName = (0, import_core.useThemeName)();\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: themeName,\n children\n });\n if (needsRepropagation) {\n content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.ProvideAdaptContext, {\n ...adaptContext,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n ...context,\n children: content\n })\n });\n }\n return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n scope: context.adaptScope,\n children: content\n }) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, {\n hostName: \"root\",\n children: content\n }) : content;\n};\nvar DialogPortal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { scope, forceMount, children, ...frameProps } = props;\n var dialogRef = React.useRef(null);\n var ref = (0, import_compose_refs.composeRefs)(dialogRef, forwardedRef);\n var context = useDialogContext(scope);\n var portalContext = forceMount ? {\n ...context,\n forceMount: true\n } : context;\n var keepMounted = forceMount || context.keepChildrenMounted;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isVisible = context.open || context.hasPresentParts;\n if (import_constants.isWeb) {\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n var _node_show;\n (_node_show = node.show) === null || _node_show === void 0 ? void 0 : _node_show.call(node);\n } else {\n var _node_close;\n (_node_close = node.close) === null || _node_close === void 0 ? void 0 : _node_close.call(node);\n }\n }, [\n isVisible\n ]);\n }\n var zIndex = (0, import_core.getExpandedShorthand)(\"zIndex\", props);\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {\n zIndex: (0, import_portal.resolveViewZIndex)(zIndex),\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope: context.dialogScope,\n ...portalContext,\n children\n })\n });\n var framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.LayoutMeasurementController, {\n disable: !context.open,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalFrame, {\n ref,\n ...import_constants.isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n })\n });\n if (import_constants.isWeb) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {\n zIndex,\n // set to 100000 which ensures dialogs are above most fixed UI (headers, navs)\n // this makes sure its above typical stacking contexts\n stackZIndex: 1e5,\n passThrough: isAdapted,\n // hide the host while closed (covers keepChildrenMounted content, see\n // Portal.tsx); isVisible stays true through the exit animation\n hidden: !isVisible,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PassthroughTheme, {\n passThrough: isAdapted,\n children: framedContents\n })\n });\n }\n return isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context: portalContext,\n children: framedContents\n });\n});\nvar PassthroughTheme = function(param) {\n var { children, passThrough } = param;\n var themeName = (0, import_core.useThemeName)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n passThrough,\n name: themeName,\n forceClassName: true,\n children\n });\n};\nfunction useDialogAnimationReporter(context) {\n var onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n var openRef = React.useRef(context.open);\n var pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n var reportComplete = React.useCallback(function(open) {\n var _onAnimationCompleteRef_current;\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n (_onAnimationCompleteRef_current = onAnimationCompleteRef.current) === null || _onAnimationCompleteRef_current === void 0 ? void 0 : _onAnimationCompleteRef_current.call(onAnimationCompleteRef, {\n open\n });\n }, []);\n return React.useMemo(function() {\n return {\n onEnterComplete: function() {\n return reportComplete(true);\n },\n onExitComplete: function() {\n return reportComplete(false);\n }\n };\n }, [\n reportComplete\n ]);\n}\nfunction useDialogPartPresence(context, options) {\n var [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n var reactId = React.useId();\n var partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n var keepMounted = options.forceMount || context.keepChildrenMounted;\n var isPresent = context.open || !isFullyHidden;\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [\n context.open,\n isFullyHidden\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return function() {\n context.setPartPresence(partPresenceId, false);\n };\n }, [\n context.setPartPresence,\n isPresent,\n options.disabled,\n partPresenceId\n ]);\n var onExitComplete = React.useCallback(function() {\n var _options_onExitComplete;\n setIsFullyHidden(true);\n (_options_onExitComplete = options.onExitComplete) === null || _options_onExitComplete === void 0 ? void 0 : _options_onExitComplete.call(options);\n }, [\n options.onExitComplete\n ]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlayFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar DialogOverlay = (0, import_core.createStyledHOC)(DialogOverlayFrame, function DialogOverlay2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var { forceMount = context.forceMount, ...overlayProps } = props;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayFrame, {\n \"data-state\": getState(context.open),\n // Presence freezes the exiting clone with its open props. The exit\n // clause releases the full-screen overlay during that frozen frame.\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n }, `${context.contentId}-overlay`)\n });\n});\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContentFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: {\n width: 0,\n height: 12\n }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nvar DialogContent = (0, import_core.createStyledHOC)(DialogContentFrame, function DialogContent2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var reporter = useDialogAnimationReporter(context);\n var onTransitionProp = props.onTransition;\n var onTransition = React.useCallback(function(event) {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp === null || onTransitionProp === void 0 ? void 0 : onTransitionProp(event);\n }, [\n reporter.onEnterComplete,\n onTransitionProp\n ]);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n })\n });\n if (isAdapted) {\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: contents\n })\n });\n }\n if (!presence.shouldRender) {\n return null;\n }\n var animated = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(React.Fragment, {\n children: contents\n }, context.contentId)\n });\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: animated\n })\n });\n});\nvar DialogContentModal = (0, import_core.createRefComponent)(function(param, forwardedRef) {\n var { children, context: contextProp, ...props } = param;\n var context = useDialogContext(contextProp.dialogScope);\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\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: true,\n onCloseAutoFocus: (0, import_helpers.composeEventHandlers)(props.onCloseAutoFocus, function(event) {\n var _context_triggerRef_current;\n event.cancel();\n (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 ? void 0 : _context_triggerRef_current.focus();\n }),\n onPointerDownOutside: (0, import_helpers.composeEventHandlers)(props.onPointerDownOutside, function(event) {\n var originalEvent = event.event;\n if (!originalEvent) return;\n var ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n var isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\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: (0, import_helpers.composeEventHandlers)(props.onFocusOutside, function(event) {\n return event.cancel();\n }),\n outlineStyle: \"none\",\n children\n });\n});\nvar DialogContentNonModal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var context = useDialogContext(props.context.dialogScope);\n var hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: function(event) {\n var _props_onCloseAutoFocus;\n (_props_onCloseAutoFocus = props.onCloseAutoFocus) === null || _props_onCloseAutoFocus === void 0 ? void 0 : _props_onCloseAutoFocus.call(props, event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n var _props_context_triggerRef_current;\n (_props_context_triggerRef_current = props.context.triggerRef.current) === null || _props_context_triggerRef_current === void 0 ? void 0 : _props_context_triggerRef_current.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: function(event) {\n var _props_onInteractOutside, _event_event;\n (_props_onInteractOutside = props.onInteractOutside) === null || _props_onInteractOutside === void 0 ? void 0 : _props_onInteractOutside.call(props, event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n var target = (_event_event = event.event) === null || _event_event === void 0 ? void 0 : _event_event.target;\n var trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n var targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n });\n});\nvar DialogContentImpl = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, onTransition, ...contentProps } = props;\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context,\n children: contentProps.children\n });\n }\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentFrame, {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n // allow clicking through content during exit animation\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n });\n if (!import_constants.isWeb) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dismissable.Dismissable, {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: function() {\n var _context_onOpenChange;\n return context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false);\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_focus_scope.FocusScope, {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n })\n }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, {\n titleId: context.titleId\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, {\n contentRef,\n descriptionId: context.descriptionId\n })\n ]\n })\n ]\n });\n});\nvar DialogTitleFrame = (0, import_core.styled)(import_text.H2, {\n displayName: \"DialogTitle\"\n});\nvar DialogTitle = (0, import_core.createStyledHOC)(DialogTitleFrame, function DialogTitle2(props, forwardedRef) {\n var { scope, ...titleProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitleFrame, {\n id: context.titleId,\n ...titleProps,\n ref: forwardedRef\n });\n});\nvar DialogDescriptionFrame = (0, import_core.styled)(import_text.Paragraph, {\n displayName: \"DialogDescription\"\n});\nvar DialogDescription = (0, import_core.createStyledHOC)(DialogDescriptionFrame, function DialogDescription2(props, forwardedRef) {\n var { scope, ...descriptionProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDescriptionFrame, {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n });\n});\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogCloseFrame = (0, import_core.styled)(import_core.View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nvar DialogClose = (0, import_core.createStyledHOC)(DialogCloseFrame, function(props, forwardedRef) {\n var { scope, displayWhenAdapted, ...closeProps } = props;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogCloseFrame, {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: (0, import_helpers.composeEventHandlers)(props.onPress, function() {\n context.onOpenChange(false);\n })\n });\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [DialogWarningProvider, useWarningContext] = (0, import_create_context.createContext)(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nvar TitleWarning = function(param) {\n var { titleId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n var MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n if (titleId) {\n var hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n titleId\n ]);\n }\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = function(param) {\n var { contentRef, descriptionId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n var MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n var contentNode = contentRef.current;\n if (!(contentNode instanceof HTMLElement)) {\n return;\n }\n var describedById = contentNode.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n var hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n contentRef,\n descriptionId\n ]);\n }\n return null;\n};\nvar Dialog = (0, import_helpers.withStaticProperties)((0, import_core.createRefComponent)(function Dialog2(props) {\n var { scope = \"\", children, open: openProp, defaultOpen = false, onOpenChange, modal = true, keepChildrenMounted, disableRemoveScroll = false, onAnimationComplete } = props;\n var baseId = React.useId();\n var dialogId = `Dialog-${scope}-${baseId}`;\n var contentId = `${dialogId}-content`;\n var titleId = `${dialogId}-title`;\n var descriptionId = `${dialogId}-description`;\n var triggerRef = React.useRef(null);\n var contentRef = React.useRef(null);\n var presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n var [presentPartCount, setPresentPartCount] = React.useState(0);\n var [open, setOpen] = (0, import_use_controllable_state.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n var onOpenToggle = React.useCallback(function() {\n setOpen(function(prevOpen) {\n return !prevOpen;\n });\n }, [\n setOpen\n ]);\n var adaptScope = `DialogAdapt${scope}`;\n var setPartPresence = React.useCallback(function(id, present) {\n var presentPartIds = presentPartIdsRef.current;\n var hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n var context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope,\n ...context,\n children\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 FocusScope: import_focus_scope.FocusScopeController,\n Adapt: import_adapt.Adapt\n});\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,S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AAI;EACzC,OAAO,IAAI,CAAC,WAAW,SAAS;GAC9B,eAAe,OAAO,EAAE;GACxB,oBAAoB,eAAe,IAAI;EACzC;CACF,GAAG,CAAC,CAAC;CACL,IAAI,UAAU;EACZ,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA,iBAAiB,mBAAmB;EACpC;EACA;CACF;CACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,aAAa;EAC3E,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,gBAAgB;GACpE;GACA,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH,CAAC,GAAG;CACF,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY,mBAAmB;CAC/B,OAAO,aAAa;AACtB,CAAC"}
1
+ {"version":3,"file":"Dialog.native.js","names":[],"sources":["jsx/Dialog.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Dialog_exports = {};\n__export(Dialog_exports, {\n Dialog: () => Dialog,\n DialogClose: () => DialogClose,\n DialogContent: () => DialogContent,\n DialogContext: () => DialogContext,\n DialogDescription: () => DialogDescription,\n DialogOverlay: () => DialogOverlay,\n DialogOverlayFrame: () => DialogOverlayFrame,\n DialogPortal: () => DialogPortal,\n DialogPortalFrame: () => DialogPortalFrame,\n DialogProvider: () => DialogProvider,\n DialogTitle: () => DialogTitle,\n DialogTrigger: () => DialogTrigger,\n DialogWarningProvider: () => DialogWarningProvider,\n useDialogContext: () => useDialogContext\n});\nmodule.exports = __toCommonJS(Dialog_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_adapt = require(\"@tamagui/adapt\");\nvar import_animate = require(\"@tamagui/animate\");\nvar import_compose_refs = require(\"@tamagui/compose-refs\");\nvar import_constants = require(\"@tamagui/constants\");\nvar import_core = require(\"@tamagui/core\");\nvar import_create_context = require(\"@tamagui/create-context\");\nvar import_dismissable = require(\"@tamagui/dismissable\");\nvar import_focus_scope = require(\"@tamagui/focus-scope\");\nvar import_helpers = require(\"@tamagui/helpers\");\nvar import_portal = require(\"@tamagui/portal\");\nvar import_remove_scroll = require(\"@tamagui/remove-scroll\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_text = require(\"@tamagui/text\");\nvar import_use_controllable_state = require(\"@tamagui/use-controllable-state\");\nvar import_z_index_stack = require(\"@tamagui/z-index-stack\");\nvar React = __toESM(require(\"react\"), 1);\nvar DialogContext = (0, import_core.createStyledContext)(\n // since we always provide this we can avoid setting here\n {},\n \"Dialog__\"\n);\nvar { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext;\nvar DialogTriggerFrame = (0, import_core.styled)(import_core.View, {\n displayName: \"DialogTrigger\"\n});\nvar DialogTrigger = (0, import_core.createStyledHOC)(DialogTriggerFrame, function DialogTrigger2(props, forwardedRef) {\n var { scope, ...triggerProps } = props;\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n var context = useDialogContext(scope);\n var composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.ButtonNestingContext.Provider, {\n value: props.asChild ? isInsideButton : true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTriggerFrame, {\n render: isInsideButton ? \"span\" : \"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: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)\n })\n });\n});\nvar DialogPortalFrame = (0, import_core.styled)(import_stacks.YStack, {\n pointerEvents: \"none\",\n alignItems: \"center\",\n justifyContent: \"center\",\n position: \"absolute web:fixed\",\n inset: 0,\n borderWidth: \"web:0px\",\n backgroundColor: \"web:transparent\",\n style: import_constants.isWeb ? {\n color: \"inherit\"\n } : void 0,\n maxInlineSize: \"web:none\",\n margin: \"web:0px\",\n width: \"web:auto\",\n height: \"web:auto\",\n maxHeight: \"web:100vh\",\n zIndex: \"web:1\",\n render: \"dialog\"\n});\nvar needsRepropagation = (0, import_portal.needsPortalRepropagation)();\nvar DialogPortalItem = function(param) {\n var { context, children } = param;\n var themeName = (0, import_core.useThemeName)();\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n var content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: themeName,\n children\n });\n if (needsRepropagation) {\n content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.ProvideAdaptContext, {\n ...adaptContext,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n ...context,\n children: content\n })\n });\n }\n return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, {\n scope: context.adaptScope,\n children: content\n }) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, {\n hostName: \"root\",\n children: content\n }) : content;\n};\nvar DialogPortal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { scope, forceMount, children, ...frameProps } = props;\n var dialogRef = React.useRef(null);\n var ref = (0, import_compose_refs.composeRefs)(dialogRef, forwardedRef);\n var context = useDialogContext(scope);\n var portalContext = forceMount ? {\n ...context,\n forceMount: true\n } : context;\n var keepMounted = forceMount || context.keepChildrenMounted;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isVisible = context.open || context.hasPresentParts;\n if (import_constants.isWeb) {\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n var node = dialogRef.current;\n if (!(node instanceof HTMLDialogElement)) return;\n if (isVisible) {\n var _node_show;\n (_node_show = node.show) === null || _node_show === void 0 ? void 0 : _node_show.call(node);\n } else {\n var _node_close;\n (_node_close = node.close) === null || _node_close === void 0 ? void 0 : _node_close.call(node);\n }\n }, [\n isVisible\n ]);\n }\n var zIndex = (0, import_core.getExpandedShorthand)(\"zIndex\", props);\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_z_index_stack.StackZIndexContext, {\n zIndex: (0, import_portal.resolveViewZIndex)(zIndex),\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope: context.dialogScope,\n ...portalContext,\n children\n })\n });\n var framedContents = !isVisible && !keepMounted && !isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.LayoutMeasurementController, {\n disable: !context.open,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalFrame, {\n ref,\n ...import_constants.isWeb && context.open && context.modal && {\n \"aria-modal\": true\n },\n pointerEvents: context.open && context.modal ? \"auto\" : \"none\",\n ...frameProps,\n className: `_no_backdrop ` + (frameProps.className || \"\"),\n children: contents\n })\n });\n if (import_constants.isWeb) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {\n zIndex,\n // set to 100000 which ensures dialogs are above most fixed UI (headers, navs)\n // this makes sure its above typical stacking contexts\n stackZIndex: 1e5,\n passThrough: isAdapted,\n // hide the host while closed (covers keepChildrenMounted content, see\n // Portal.tsx); isVisible stays true through the exit animation\n hidden: !isVisible,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PassthroughTheme, {\n passThrough: isAdapted,\n children: framedContents\n })\n });\n }\n return isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context: portalContext,\n children: framedContents\n });\n});\nvar PassthroughTheme = function(param) {\n var { children, passThrough } = param;\n var themeName = (0, import_core.useThemeName)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n passThrough,\n name: themeName,\n forceClassName: true,\n children\n });\n};\nfunction useDialogAnimationReporter(context) {\n var onAnimationCompleteRef = React.useRef(context.onAnimationComplete);\n onAnimationCompleteRef.current = context.onAnimationComplete;\n var openRef = React.useRef(context.open);\n var pendingTransitionRef = React.useRef(context.open ? true : null);\n if (openRef.current !== context.open) {\n openRef.current = context.open;\n pendingTransitionRef.current = context.open;\n }\n var reportComplete = React.useCallback(function(open) {\n var _onAnimationCompleteRef_current;\n if (pendingTransitionRef.current !== open) return;\n if (openRef.current !== open) return;\n pendingTransitionRef.current = null;\n (_onAnimationCompleteRef_current = onAnimationCompleteRef.current) === null || _onAnimationCompleteRef_current === void 0 ? void 0 : _onAnimationCompleteRef_current.call(onAnimationCompleteRef, {\n open\n });\n }, []);\n return React.useMemo(function() {\n return {\n onEnterComplete: function() {\n return reportComplete(true);\n },\n onExitComplete: function() {\n return reportComplete(false);\n }\n };\n }, [\n reportComplete\n ]);\n}\nfunction useDialogPartPresence(context, options) {\n var [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);\n var reactId = React.useId();\n var partPresenceId = `${context.contentId}-${options.id}-${reactId}`;\n var keepMounted = options.forceMount || context.keepChildrenMounted;\n var isPresent = context.open || !isFullyHidden;\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (context.open && isFullyHidden) {\n setIsFullyHidden(false);\n }\n }, [\n context.open,\n isFullyHidden\n ]);\n (0, import_constants.useIsomorphicLayoutEffect)(function() {\n if (options.disabled) return;\n context.setPartPresence(partPresenceId, isPresent);\n return function() {\n context.setPartPresence(partPresenceId, false);\n };\n }, [\n context.setPartPresence,\n isPresent,\n options.disabled,\n partPresenceId\n ]);\n var onExitComplete = React.useCallback(function() {\n var _options_onExitComplete;\n setIsFullyHidden(true);\n (_options_onExitComplete = options.onExitComplete) === null || _options_onExitComplete === void 0 ? void 0 : _options_onExitComplete.call(options);\n }, [\n options.onExitComplete\n ]);\n return {\n keepMounted,\n onExitComplete,\n shouldRender: Boolean(keepMounted || context.open || !isFullyHidden)\n };\n}\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlayFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: OVERLAY_NAME,\n zIndex: 1,\n inset: 0,\n position: \"absolute\",\n pointerEvents: \"auto\",\n variants: {\n open: {\n true: {\n pointerEvents: \"auto\"\n },\n false: {\n pointerEvents: \"none\"\n }\n }\n }\n});\nvar DialogOverlay = (0, import_core.createStyledHOC)(DialogOverlayFrame, function DialogOverlay2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var { forceMount = context.forceMount, ...overlayProps } = props;\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount,\n id: \"overlay\"\n });\n if (!forceMount && isAdapted) {\n return null;\n }\n if (!presence.shouldRender) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n passThrough: isAdapted,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogOverlayFrame, {\n \"data-state\": getState(context.open),\n // Presence freezes the exiting clone with its open props. The exit\n // clause releases the full-screen overlay during that frozen frame.\n pointerEvents: context.open && context.modal ? \"auto exit:none\" : \"none\",\n ...overlayProps,\n ref: forwardedRef\n }, `${context.contentId}-overlay`)\n });\n});\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContentFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: CONTENT_NAME,\n zIndex: 2,\n position: \"relative\",\n // Ensure content receives pointer events (fixes React 19 + display:contents inheritance)\n pointerEvents: \"auto\",\n variants: {\n elevate: {\n true: {\n shadowColor: \"shadow-color\",\n shadowRadius: 24,\n shadowOffset: {\n width: 0,\n height: 12\n }\n }\n },\n bordered: {\n true: {\n borderWidth: 1,\n borderColor: \"border-color\"\n }\n }\n }\n});\nvar DialogContent = (0, import_core.createStyledHOC)(DialogContentFrame, function DialogContent2(param, forwardedRef) {\n var { scope, ...props } = param;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var reporter = useDialogAnimationReporter(context);\n var onTransitionProp = props.onTransition;\n var onTransition = React.useCallback(function(event) {\n if (event.phase === \"end\" && event.cause === \"enter\") {\n reporter.onEnterComplete();\n }\n onTransitionProp === null || onTransitionProp === void 0 ? void 0 : onTransitionProp(event);\n }, [\n reporter.onEnterComplete,\n onTransitionProp\n ]);\n var presence = useDialogPartPresence(context, {\n disabled: isAdapted,\n forceMount: context.forceMount,\n id: \"content\",\n onExitComplete: reporter.onExitComplete\n });\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {\n children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentNonModal, {\n context,\n ...props,\n onTransition,\n ref: forwardedRef\n })\n });\n if (isAdapted) {\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: contents\n })\n });\n }\n if (!presence.shouldRender) {\n return null;\n }\n var animated = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate.Animate, {\n type: \"presence\",\n present: Boolean(context.open),\n keepChildrenMounted: Boolean(presence.keepMounted),\n onExitComplete: presence.onExitComplete,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(React.Fragment, {\n children: contents\n }, context.contentId)\n });\n if (!import_constants.isWeb || context.disableRemoveScroll) {\n return animated;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {\n enabled: context.open && context.modal,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(\"div\", {\n \"data-remove-scroll-container\": true,\n className: \"_dsp_contents\",\n children: animated\n })\n });\n});\nvar DialogContentModal = (0, import_core.createRefComponent)(function(param, forwardedRef) {\n var { children, context: contextProp, ...props } = param;\n var context = useDialogContext(contextProp.dialogScope);\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\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: true,\n onCloseAutoFocus: (0, import_helpers.composeEventHandlers)(props.onCloseAutoFocus, function(event) {\n var _context_triggerRef_current;\n event.cancel();\n (_context_triggerRef_current = context.triggerRef.current) === null || _context_triggerRef_current === void 0 ? void 0 : _context_triggerRef_current.focus();\n }),\n onPointerDownOutside: (0, import_helpers.composeEventHandlers)(props.onPointerDownOutside, function(event) {\n var originalEvent = event.event;\n if (!originalEvent) return;\n var ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n var isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.cancel();\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: (0, import_helpers.composeEventHandlers)(props.onFocusOutside, function(event) {\n return event.cancel();\n }),\n outlineStyle: \"none\",\n children\n });\n});\nvar DialogContentNonModal = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var context = useDialogContext(props.context.dialogScope);\n var hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentImpl, {\n ...props,\n context,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: function(event) {\n var _props_onCloseAutoFocus;\n (_props_onCloseAutoFocus = props.onCloseAutoFocus) === null || _props_onCloseAutoFocus === void 0 ? void 0 : _props_onCloseAutoFocus.call(props, event);\n if (!event.isCanceled) {\n if (!hasInteractedOutsideRef.current) {\n var _props_context_triggerRef_current;\n (_props_context_triggerRef_current = props.context.triggerRef.current) === null || _props_context_triggerRef_current === void 0 ? void 0 : _props_context_triggerRef_current.focus();\n }\n event.cancel();\n }\n hasInteractedOutsideRef.current = false;\n },\n onInteractOutside: function(event) {\n var _props_onInteractOutside, _event_event;\n (_props_onInteractOutside = props.onInteractOutside) === null || _props_onInteractOutside === void 0 ? void 0 : _props_onInteractOutside.call(props, event);\n if (!event.isCanceled) hasInteractedOutsideRef.current = true;\n var target = (_event_event = event.event) === null || _event_event === void 0 ? void 0 : _event_event.target;\n var trigger = props.context.triggerRef.current;\n if (!target || !(trigger instanceof HTMLElement)) return;\n var targetIsTrigger = trigger.contains(target);\n if (targetIsTrigger) event.cancel();\n }\n });\n});\nvar DialogContentImpl = (0, import_core.createRefComponent)(function(props, forwardedRef) {\n var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, onTransition, ...contentProps } = props;\n var contentRef = React.useRef(null);\n var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);\n if (isAdapted) {\n if (!context.open && !context.keepChildrenMounted && adaptContext.targetFullyHidden) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogPortalItem, {\n context,\n children: contentProps.children\n });\n }\n var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentFrame, {\n ref: composedRefs,\n id: context.contentId,\n role: \"dialog\",\n \"aria-modal\": context.modal,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n // allow clicking through content during exit animation\n pointerEvents: context.open ? \"auto\" : \"none\",\n onTransition,\n ...contentProps\n });\n if (!import_constants.isWeb) {\n return contents;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dismissable.Dismissable, {\n disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,\n forceUnmount: !context.open,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss: function() {\n var _context_onOpenChange;\n return context === null || context === void 0 ? void 0 : (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, false);\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_focus_scope.FocusScope, {\n loop: true,\n enabled: context.open,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n forceUnmount: !context.open,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: contents\n })\n }),\n process.env.NODE_ENV === \"development\" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TitleWarning, {\n titleId: context.titleId\n }),\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DescriptionWarning, {\n contentRef,\n descriptionId: context.descriptionId\n })\n ]\n })\n ]\n });\n});\nvar DialogTitleFrame = (0, import_core.styled)(import_text.H2, {\n displayName: \"DialogTitle\"\n});\nvar DialogTitle = (0, import_core.createStyledHOC)(DialogTitleFrame, function DialogTitle2(props, forwardedRef) {\n var { scope, ...titleProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogTitleFrame, {\n id: context.titleId,\n ...titleProps,\n ref: forwardedRef\n });\n});\nvar DialogDescriptionFrame = (0, import_core.styled)(import_text.Paragraph, {\n displayName: \"DialogDescription\"\n});\nvar DialogDescription = (0, import_core.createStyledHOC)(DialogDescriptionFrame, function DialogDescription2(props, forwardedRef) {\n var { scope, ...descriptionProps } = props;\n var context = useDialogContext(scope);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogDescriptionFrame, {\n id: context.descriptionId,\n ...descriptionProps,\n ref: forwardedRef\n });\n});\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogCloseFrame = (0, import_core.styled)(import_core.View, {\n displayName: CLOSE_NAME,\n render: \"button\"\n});\nvar DialogClose = (0, import_core.createStyledHOC)(DialogCloseFrame, function(props, forwardedRef) {\n var { scope, displayWhenAdapted, ...closeProps } = props;\n var context = useDialogContext(scope);\n var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);\n var isInsideButton = React.useContext(import_stacks.ButtonNestingContext);\n if (isAdapted && !displayWhenAdapted) {\n return null;\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogCloseFrame, {\n \"aria-label\": \"Dialog Close\",\n render: isInsideButton ? \"span\" : \"button\",\n ...closeProps,\n ref: forwardedRef,\n onPress: (0, import_helpers.composeEventHandlers)(props.onPress, function() {\n context.onOpenChange(false);\n })\n });\n});\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [DialogWarningProvider, useWarningContext] = (0, import_create_context.createContext)(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: \"DialogTitle\",\n docsSlug: \"dialog\"\n});\nvar TitleWarning = function(param) {\n var { titleId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n var MESSAGE = `\\`${titleWarningContext.contentName}\\` wants a \\`${titleWarningContext.titleName}\\` to be accessible. If you want to hide the \\`${titleWarningContext.titleName}\\`, wrap it with <VisuallyHidden />.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n if (titleId) {\n var hasTitle = document.getElementById(titleId);\n if (!hasTitle) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n titleId\n ]);\n }\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = function(param) {\n var { contentRef, descriptionId } = param;\n if (process.env.NODE_ENV === \"development\") {\n var descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n var MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(function() {\n if (!import_constants.isWeb) return;\n var contentNode = contentRef.current;\n if (!(contentNode instanceof HTMLElement)) {\n return;\n }\n var describedById = contentNode.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n var hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) {\n console.warn(MESSAGE);\n }\n }\n }, [\n MESSAGE,\n contentRef,\n descriptionId\n ]);\n }\n return null;\n};\nvar Dialog = (0, import_helpers.withStaticProperties)((0, import_core.createRefComponent)(function Dialog2(props) {\n var { scope = \"\", children, open: openProp, defaultOpen = false, onOpenChange, modal = true, keepChildrenMounted, disableRemoveScroll = false, onAnimationComplete } = props;\n var baseId = React.useId();\n var dialogId = `Dialog-${scope}-${baseId}`;\n var contentId = `${dialogId}-content`;\n var titleId = `${dialogId}-title`;\n var descriptionId = `${dialogId}-description`;\n var triggerRef = React.useRef(null);\n var contentRef = React.useRef(null);\n var presentPartIdsRef = React.useRef(/* @__PURE__ */ new Set());\n var [presentPartCount, setPresentPartCount] = React.useState(0);\n var [open, setOpen] = (0, import_use_controllable_state.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n var onOpenToggle = React.useCallback(function() {\n setOpen(function(prevOpen) {\n return !prevOpen;\n });\n }, [\n setOpen\n ]);\n var adaptScope = `DialogAdapt${scope}`;\n var setPartPresence = React.useCallback(function(id, present) {\n var presentPartIds = presentPartIdsRef.current;\n var hasPart = presentPartIds.has(id);\n if (present && !hasPart) {\n presentPartIds.add(id);\n setPresentPartCount(presentPartIds.size);\n } else if (!present && hasPart) {\n presentPartIds.delete(id);\n setPresentPartCount(presentPartIds.size);\n }\n }, []);\n var context = {\n dialogScope: scope,\n adaptScope,\n triggerRef,\n contentRef,\n contentId,\n titleId,\n descriptionId,\n open,\n onOpenChange: setOpen,\n onOpenToggle,\n modal,\n keepChildrenMounted,\n disableRemoveScroll,\n hasPresentParts: presentPartCount > 0,\n setPartPresence,\n onAnimationComplete\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, {\n scope: adaptScope,\n adaptChildren: children,\n open,\n onOpenChange: setOpen,\n state: context,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogProvider, {\n scope,\n ...context,\n children\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 FocusScope: import_focus_scope.FocusScopeController,\n Adapt: import_adapt.Adapt\n});\n//# sourceMappingURL=Dialog.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,iBAAiB,CAAC;AACtB,SAAS,gBAAgB;CACvB,cAAc;CACd,mBAA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,CAAE,aAAa,aAAa;EAC3E,OAAO;EACP,eAAe;EACf;EACA,cAAc;EACd,OAAO;EACP,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,gBAAgB;GACpE;GACA,GAAG;GACH;EACF,CAAC;CACH,CAAC;AACH,CAAC,GAAG;CACF,SAAS;CACT,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,aAAa;CACb,OAAO;CACP,YAAY,mBAAmB;CAC/B,OAAO,aAAa;AACtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/dialog",
3
- "version": "3.0.0-beta.1097.1",
3
+ "version": "3.0.0-beta.1099.1",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "files": [
@@ -35,27 +35,27 @@
35
35
  "clean:build": "tamagui-build clean:build"
36
36
  },
37
37
  "dependencies": {
38
- "@tamagui/adapt": "3.0.0-beta.1097.1",
39
- "@tamagui/animate": "3.0.0-beta.1097.1",
40
- "@tamagui/animate-presence": "3.0.0-beta.1097.1",
41
- "@tamagui/compose-refs": "3.0.0-beta.1097.1",
42
- "@tamagui/constants": "3.0.0-beta.1097.1",
43
- "@tamagui/core": "3.0.0-beta.1097.1",
44
- "@tamagui/create-context": "3.0.0-beta.1097.1",
45
- "@tamagui/dismissable": "3.0.0-beta.1097.1",
46
- "@tamagui/focus-scope": "3.0.0-beta.1097.1",
47
- "@tamagui/helpers": "3.0.0-beta.1097.1",
48
- "@tamagui/polyfill-dev": "3.0.0-beta.1097.1",
49
- "@tamagui/portal": "3.0.0-beta.1097.1",
50
- "@tamagui/remove-scroll": "3.0.0-beta.1097.1",
51
- "@tamagui/sheet": "3.0.0-beta.1097.1",
52
- "@tamagui/stacks": "3.0.0-beta.1097.1",
53
- "@tamagui/text": "3.0.0-beta.1097.1",
54
- "@tamagui/use-controllable-state": "3.0.0-beta.1097.1",
55
- "@tamagui/z-index-stack": "3.0.0-beta.1097.1"
38
+ "@tamagui/adapt": "3.0.0-beta.1099.1",
39
+ "@tamagui/animate": "3.0.0-beta.1099.1",
40
+ "@tamagui/animate-presence": "3.0.0-beta.1099.1",
41
+ "@tamagui/compose-refs": "3.0.0-beta.1099.1",
42
+ "@tamagui/constants": "3.0.0-beta.1099.1",
43
+ "@tamagui/core": "3.0.0-beta.1099.1",
44
+ "@tamagui/create-context": "3.0.0-beta.1099.1",
45
+ "@tamagui/dismissable": "3.0.0-beta.1099.1",
46
+ "@tamagui/focus-scope": "3.0.0-beta.1099.1",
47
+ "@tamagui/helpers": "3.0.0-beta.1099.1",
48
+ "@tamagui/polyfill-dev": "3.0.0-beta.1099.1",
49
+ "@tamagui/portal": "3.0.0-beta.1099.1",
50
+ "@tamagui/remove-scroll": "3.0.0-beta.1099.1",
51
+ "@tamagui/sheet": "3.0.0-beta.1099.1",
52
+ "@tamagui/stacks": "3.0.0-beta.1099.1",
53
+ "@tamagui/text": "3.0.0-beta.1099.1",
54
+ "@tamagui/use-controllable-state": "3.0.0-beta.1099.1",
55
+ "@tamagui/z-index-stack": "3.0.0-beta.1099.1"
56
56
  },
57
57
  "devDependencies": {
58
- "@tamagui/build": "3.0.0-beta.1097.1",
58
+ "@tamagui/build": "3.0.0-beta.1099.1",
59
59
  "react": "19.2.3",
60
60
  "react-native": "0.86.2"
61
61
  },
package/src/Dialog.tsx CHANGED
@@ -161,7 +161,7 @@ export const DialogPortalFrame = styled(YStack, {
161
161
  inset: 0,
162
162
  borderWidth: 'web:0px',
163
163
  backgroundColor: 'web:transparent',
164
- color: 'web:inherit',
164
+ style: isWeb ? { color: 'inherit' } : undefined,
165
165
  maxInlineSize: 'web:none',
166
166
  margin: 'web:0px',
167
167
  width: 'web:auto',