@multiplatform.one/theme 10.26.0 → 10.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -332,20 +332,18 @@ const AlertDialogOverlay = (0, import_react.forwardRef)(function AlertDialogOver
332
332
  children
333
333
  });
334
334
  });
335
- const PopoverContent = (0, import_react.forwardRef)(function PopoverContent2({ children, onOpenAutoFocus, ...props }, ref) {
335
+ const PopoverContent = (0, import_react.forwardRef)(function PopoverContent2({ children, onOpenAutoFocus: _onOpenAutoFocus, ...props }, ref) {
336
336
  const { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({
337
337
  component: "PopoverContent",
338
338
  painted: false
339
339
  });
340
- const { contentId } = (0, import_tamagui.usePopoverContext)();
341
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Content, {
340
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
342
341
  ref,
343
342
  ...knobProps.elevatedSurface,
344
343
  ...knobProps.containerRadius,
345
344
  ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),
346
345
  ...overlayEnterExit,
347
346
  ...overlayFrameFocus,
348
- onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),
349
347
  ...props,
350
348
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {
351
349
  painted: false,
@@ -348,20 +348,18 @@ var AlertDialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function A
348
348
  });
349
349
  });
350
350
  var PopoverContent = /* @__PURE__ */ (0, import_react.forwardRef)(function PopoverContent2(param, ref) {
351
- var { children, onOpenAutoFocus, ...props } = param;
351
+ var { children, onOpenAutoFocus: _onOpenAutoFocus, ...props } = param;
352
352
  var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({
353
353
  component: "PopoverContent",
354
354
  painted: false
355
355
  });
356
- var { contentId } = (0, import_tamagui.usePopoverContext)();
357
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Content, {
356
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
358
357
  ref,
359
358
  ...knobProps.elevatedSurface,
360
359
  ...knobProps.containerRadius,
361
360
  ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),
362
361
  ...overlayEnterExit,
363
362
  ...overlayFrameFocus,
364
- onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),
365
363
  ...props,
366
364
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {
367
365
  painted: false,
@@ -348,20 +348,18 @@ var AlertDialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function A
348
348
  });
349
349
  });
350
350
  var PopoverContent = /* @__PURE__ */ (0, import_react.forwardRef)(function PopoverContent2(param, ref) {
351
- var { children, onOpenAutoFocus, ...props } = param;
351
+ var { children, onOpenAutoFocus: _onOpenAutoFocus, ...props } = param;
352
352
  var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({
353
353
  component: "PopoverContent",
354
354
  painted: false
355
355
  });
356
- var { contentId } = (0, import_tamagui.usePopoverContext)();
357
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Content, {
356
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
358
357
  ref,
359
358
  ...knobProps.elevatedSurface,
360
359
  ...knobProps.containerRadius,
361
360
  ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),
362
361
  ...overlayEnterExit,
363
362
  ...overlayFrameFocus,
364
- onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),
365
363
  ...props,
366
364
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {
367
365
  painted: false,
@@ -1 +1 @@
1
- {"version":3,"file":"overlaySurfaces.native.js","names":[],"sources":["cjs/theme/overlaySurfaces.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar overlaySurfaces_exports = {};\n__export(overlaySurfaces_exports, {\n AlertDialogContent: () => AlertDialogContent,\n AlertDialogOverlay: () => AlertDialogOverlay,\n DialogContent: () => DialogContent,\n DialogOverlay: () => DialogOverlay,\n DialogRegionContext: () => DialogRegionContext,\n DialogSheetFaceProvider: () => DialogSheetFaceProvider,\n DialogShowFocus: () => DialogShowFocus,\n PopoverContent: () => PopoverContent,\n SheetBodyProvider: () => SheetBodyProvider,\n dialogScrim: () => dialogScrim,\n overlayScrim: () => overlayScrim,\n sheetGrabber: () => sheetGrabber,\n sheetGrabberClearance: () => sheetGrabberClearance,\n sheetGrabberZone: () => sheetGrabberZone,\n sheetHandle: () => sheetHandle,\n sheetHandleTone: () => sheetHandleTone,\n sheetHandleWidthRatio: () => sheetHandleWidthRatio,\n sheetHandleZone: () => sheetHandleZone,\n sheetScrim: () => sheetScrim,\n useDialogRegionContext: () => useDialogRegionContext,\n useDialogSheetFace: () => useDialogSheetFace,\n useIsInDialogRegion: () => useIsInDialogRegion,\n useIsInSheetBody: () => useIsInSheetBody\n});\nmodule.exports = __toCommonJS(overlaySurfaces_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_keyboardFocusRing = require(\"../keyboardFocusRing\");\nvar import_motion = require(\"./motion\");\nvar import_transitionProps = require(\"./transitionProps\");\nvar import_Surface = require(\"./Surface\");\nvar import_useResolvedKnobs = require(\"./useResolvedKnobs\");\nvar import_layoutTokens = require(\"./layoutTokens\");\nvar import_resolveKnobs = require(\"./resolveKnobs\");\nvar import_react = require(\"react\");\nvar import_web = require(\"@tamagui/web\");\nvar import_tamagui = require(\"tamagui\");\nvar dialogScrim = \"$scrim-dialog\";\nvar sheetScrim = \"$scrim-sheet\";\nvar overlayScrim = dialogScrim;\nvar sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nvar sheetGrabberClearance = 16;\nvar sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nvar sheetHandleWidthRatio = 0.3;\nvar sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nvar sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nvar sheetHandleToneOpen = {\n backgroundColor: \"$color-5\",\n opacity: 1\n};\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nvar overlayFrameFocus = {\n outlineWidth: {\n default: 0,\n focus: 0,\n \"focus-visible\": 0\n },\n outlineStyle: {\n default: \"none\",\n focus: \"none\",\n \"focus-visible\": \"none\"\n }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (var el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n var first = Array.from(container.querySelectorAll(\"*\")).find(function(node) {\n return isTabbableWithin(node, container);\n });\n if (!first) return;\n details.cancel();\n var focused = (0, import_keyboardFocusRing.focusOnOpen)(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return function(details) {\n onOpenAutoFocus === null || onOpenAutoFocus === void 0 ? void 0 : onOpenAutoFocus(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nfunction useDialogShowFocus(onOpenAutoFocus) {\n var { open, contentId } = (0, import_tamagui.useDialogContext)();\n (0, import_react.useEffect)(function() {\n if (!open || !contentId || !import_tamagui.isWeb || typeof document === \"undefined\") return;\n var content = document.getElementById(contentId);\n var focused = document.activeElement;\n if (!content || typeof HTMLElement === \"undefined\" || !(focused instanceof HTMLElement)) return;\n if (!content.contains(focused) || focused.tabIndex >= 0 && (0, import_keyboardFocusRing.wasKeyboardFocus)()) return;\n onOpenAutoFocus((0, import_web.createChangeEventDetails)(\"trigger-focus\"));\n }, [\n open,\n contentId\n ]);\n}\nfunction DialogShowFocus(param) {\n var { onOpenAutoFocus } = param;\n var { contentId } = (0, import_tamagui.useDialogContext)();\n useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));\n return null;\n}\nvar DialogRegionContext = /* @__PURE__ */ (0, import_react.createContext)({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return (0, import_react.useContext)(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nvar IN_DIALOG_REGION = {\n inDialogRegion: true\n};\nvar SheetBodyContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return (0, import_react.useContext)(SheetBodyContext);\n}\nvar DialogSheetFaceContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return (0, import_react.useContext)(DialogSheetFaceContext);\n}\nvar DialogSheetBody = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogSheetBody2(param, ref) {\n var { children } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ref,\n ...knobProps.gap,\n ...{\n \"data-mp-dialog-face\": \"sheet\"\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetFaceContext.Provider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children\n })\n })\n });\n});\nvar overlayEnterExit = {\n opacity: {\n enter: 0,\n exit: 0\n },\n y: {\n enter: -4,\n exit: -4\n },\n scale: {\n enter: 0.97,\n exit: 0.97\n }\n};\nvar DialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n if (useDialogSheetFace()) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetBody, {\n ref,\n children\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n var _ref, _props_maxWidth;\n var { width: windowWidth } = (0, import_tamagui.useWindowDimensions)();\n var room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * (0, import_resolveKnobs.panelPaddingPx)()) : void 0;\n var fit = function fit2(value) {\n return room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n };\n if (room == null) return fallbackMaxWidth == null ? void 0 : {\n maxWidth: fallbackMaxWidth\n };\n return {\n maxWidth: fit((_ref = (_props_maxWidth = props.maxWidth) !== null && _props_maxWidth !== void 0 ? _props_maxWidth : fallbackMaxWidth) !== null && _ref !== void 0 ? _ref : room),\n ...props.minWidth != null ? {\n minWidth: fit(props.minWidth)\n } : void 0,\n ...props.width != null ? {\n width: fit(props.width)\n } : void 0\n };\n}\nvar DialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContentInner2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n var { contentId } = (0, import_tamagui.useDialogContext)();\n var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n useDialogShowFocus(openFocus);\n var windowFit = useWindowFit(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Content, {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar scrimFade = {\n opacity: {\n enter: 0,\n exit: 0\n }\n};\nvar DialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n var sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar AlertDialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nvar AlertDialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContentInner2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"AlertDialogContent\"\n });\n var { contentId } = (0, import_tamagui.useDialogContext)();\n useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));\n var windowFit = useWindowFit(props, import_layoutTokens.ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar AlertDialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar PopoverContent = /* @__PURE__ */ (0, import_react.forwardRef)(function PopoverContent2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"PopoverContent\",\n painted: false\n });\n var { contentId } = (0, import_tamagui.usePopoverContext)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Popover.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,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,kBAAk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AY,SAAS;EACrF;EACA,iBAAiB;EACjB,IAAI,GAAG,uBAAuB,gBAAe,EAAG,GAAG,cAAc,SAAQ,CAAE,UAAU,OAAO,OAAO,CAAC;EACpG,GAAG;EACH,GAAG;EACH;CACF,CAAC;AACH,CAAC;AACD,IAAI,iBAAiC,iBAAC,GAAG,aAAa,WAAU,CAAE,SAAS,gBAAgB,OAAO,KAAK;CACrG,IAAI,EAAE,UAAU,iBAAiB,GAAG,UAAU;CAC9C,IAAI,EAAE,eAAe,GAAG,wBAAwB,iBAAgB,CAAE;EAChE,WAAW;EACX,SAAS;CACX,CAAC;CACD,IAAI,EAAE,eAAe,GAAG,eAAe,kBAAiB,CAAE;CAC1D,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,QAAQ,SAAS;EACjF;EACA,GAAG,UAAU;EACb,GAAG,UAAU;EACb,IAAI,GAAG,uBAAuB,gBAAe,CAAE,UAAU,OAAO,OAAO;EACvE,GAAG;EACH,GAAG;EACH,iBAAiB,mBAAmB,iBAAiB,SAAS;EAC9D,GAAG;EACH,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,SAAS;GAC5E,SAAS;GACT,UAAU;GACV,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,iBAAiB,UAAU;IAC/E,OAAO;IACP;GACF,CAAC;EACH,CAAC;CACH,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"overlaySurfaces.native.js","names":[],"sources":["cjs/theme/overlaySurfaces.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\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 __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar overlaySurfaces_exports = {};\n__export(overlaySurfaces_exports, {\n AlertDialogContent: () => AlertDialogContent,\n AlertDialogOverlay: () => AlertDialogOverlay,\n DialogContent: () => DialogContent,\n DialogOverlay: () => DialogOverlay,\n DialogRegionContext: () => DialogRegionContext,\n DialogSheetFaceProvider: () => DialogSheetFaceProvider,\n DialogShowFocus: () => DialogShowFocus,\n PopoverContent: () => PopoverContent,\n SheetBodyProvider: () => SheetBodyProvider,\n dialogScrim: () => dialogScrim,\n overlayScrim: () => overlayScrim,\n sheetGrabber: () => sheetGrabber,\n sheetGrabberClearance: () => sheetGrabberClearance,\n sheetGrabberZone: () => sheetGrabberZone,\n sheetHandle: () => sheetHandle,\n sheetHandleTone: () => sheetHandleTone,\n sheetHandleWidthRatio: () => sheetHandleWidthRatio,\n sheetHandleZone: () => sheetHandleZone,\n sheetScrim: () => sheetScrim,\n useDialogRegionContext: () => useDialogRegionContext,\n useDialogSheetFace: () => useDialogSheetFace,\n useIsInDialogRegion: () => useIsInDialogRegion,\n useIsInSheetBody: () => useIsInSheetBody\n});\nmodule.exports = __toCommonJS(overlaySurfaces_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_keyboardFocusRing = require(\"../keyboardFocusRing\");\nvar import_motion = require(\"./motion\");\nvar import_transitionProps = require(\"./transitionProps\");\nvar import_Surface = require(\"./Surface\");\nvar import_useResolvedKnobs = require(\"./useResolvedKnobs\");\nvar import_layoutTokens = require(\"./layoutTokens\");\nvar import_resolveKnobs = require(\"./resolveKnobs\");\nvar import_react = require(\"react\");\nvar import_web = require(\"@tamagui/web\");\nvar import_tamagui = require(\"tamagui\");\nvar dialogScrim = \"$scrim-dialog\";\nvar sheetScrim = \"$scrim-sheet\";\nvar overlayScrim = dialogScrim;\nvar sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nvar sheetGrabberClearance = 16;\nvar sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nvar sheetHandleWidthRatio = 0.3;\nvar sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nvar sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nvar sheetHandleToneOpen = {\n backgroundColor: \"$color-5\",\n opacity: 1\n};\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nvar overlayFrameFocus = {\n outlineWidth: {\n default: 0,\n focus: 0,\n \"focus-visible\": 0\n },\n outlineStyle: {\n default: \"none\",\n focus: \"none\",\n \"focus-visible\": \"none\"\n }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (var el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n var first = Array.from(container.querySelectorAll(\"*\")).find(function(node) {\n return isTabbableWithin(node, container);\n });\n if (!first) return;\n details.cancel();\n var focused = (0, import_keyboardFocusRing.focusOnOpen)(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return function(details) {\n onOpenAutoFocus === null || onOpenAutoFocus === void 0 ? void 0 : onOpenAutoFocus(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nfunction useDialogShowFocus(onOpenAutoFocus) {\n var { open, contentId } = (0, import_tamagui.useDialogContext)();\n (0, import_react.useEffect)(function() {\n if (!open || !contentId || !import_tamagui.isWeb || typeof document === \"undefined\") return;\n var content = document.getElementById(contentId);\n var focused = document.activeElement;\n if (!content || typeof HTMLElement === \"undefined\" || !(focused instanceof HTMLElement)) return;\n if (!content.contains(focused) || focused.tabIndex >= 0 && (0, import_keyboardFocusRing.wasKeyboardFocus)()) return;\n onOpenAutoFocus((0, import_web.createChangeEventDetails)(\"trigger-focus\"));\n }, [\n open,\n contentId\n ]);\n}\nfunction DialogShowFocus(param) {\n var { onOpenAutoFocus } = param;\n var { contentId } = (0, import_tamagui.useDialogContext)();\n useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));\n return null;\n}\nvar DialogRegionContext = /* @__PURE__ */ (0, import_react.createContext)({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return (0, import_react.useContext)(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nvar IN_DIALOG_REGION = {\n inDialogRegion: true\n};\nvar SheetBodyContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return (0, import_react.useContext)(SheetBodyContext);\n}\nvar DialogSheetFaceContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return (0, import_react.useContext)(DialogSheetFaceContext);\n}\nvar DialogSheetBody = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogSheetBody2(param, ref) {\n var { children } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ref,\n ...knobProps.gap,\n ...{\n \"data-mp-dialog-face\": \"sheet\"\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetFaceContext.Provider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children\n })\n })\n });\n});\nvar overlayEnterExit = {\n opacity: {\n enter: 0,\n exit: 0\n },\n y: {\n enter: -4,\n exit: -4\n },\n scale: {\n enter: 0.97,\n exit: 0.97\n }\n};\nvar DialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n if (useDialogSheetFace()) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetBody, {\n ref,\n children\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n var _ref, _props_maxWidth;\n var { width: windowWidth } = (0, import_tamagui.useWindowDimensions)();\n var room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * (0, import_resolveKnobs.panelPaddingPx)()) : void 0;\n var fit = function fit2(value) {\n return room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n };\n if (room == null) return fallbackMaxWidth == null ? void 0 : {\n maxWidth: fallbackMaxWidth\n };\n return {\n maxWidth: fit((_ref = (_props_maxWidth = props.maxWidth) !== null && _props_maxWidth !== void 0 ? _props_maxWidth : fallbackMaxWidth) !== null && _ref !== void 0 ? _ref : room),\n ...props.minWidth != null ? {\n minWidth: fit(props.minWidth)\n } : void 0,\n ...props.width != null ? {\n width: fit(props.width)\n } : void 0\n };\n}\nvar DialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContentInner2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n var { contentId } = (0, import_tamagui.useDialogContext)();\n var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n useDialogShowFocus(openFocus);\n var windowFit = useWindowFit(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Content, {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar scrimFade = {\n opacity: {\n enter: 0,\n exit: 0\n }\n};\nvar DialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n var sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar AlertDialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nvar AlertDialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContentInner2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"AlertDialogContent\"\n });\n var { contentId } = (0, import_tamagui.useDialogContext)();\n useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));\n var windowFit = useWindowFit(props, import_layoutTokens.ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar AlertDialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar PopoverContent = /* @__PURE__ */ (0, import_react.forwardRef)(function PopoverContent2(param, ref) {\n var { children, onOpenAutoFocus: _onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"PopoverContent\",\n painted: false\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,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,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,0BAA0B,CAAC;AAC/B,SAAS,yBAAyB;CAChC,0BAA0B;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AChE,WAAW;EACX,SAAS;CACX,CAAC;CACD,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,QAAQ;EACxE;EACA,GAAG,UAAU;EACb,GAAG,UAAU;EACb,IAAI,GAAG,uBAAuB,gBAAe,CAAE,UAAU,OAAO,OAAO;EACvE,GAAG;EACH,GAAG;EACH,GAAG;EACH,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,SAAS;GAC5E,SAAS;GACT,UAAU;GACV,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,iBAAiB,UAAU;IAC/E,OAAO;IACP;GACF,CAAC;EACH,CAAC;CACH,CAAC;AACH,CAAC"}
@@ -7,7 +7,7 @@ import { ALERT_READABLE_WIDTH } from "./layoutTokens.mjs";
7
7
  import { panelPaddingPx } from "./resolveKnobs.mjs";
8
8
  import { createContext, forwardRef, useContext, useEffect } from "react";
9
9
  import { createChangeEventDetails } from "@tamagui/web";
10
- import { AlertDialog, Dialog, Popover, YStack, isWeb, useDialogContext, usePopoverContext, useWindowDimensions } from "tamagui";
10
+ import { AlertDialog, Dialog, YStack, isWeb, useDialogContext, useWindowDimensions } from "tamagui";
11
11
  import { jsx } from "react/jsx-runtime";
12
12
 
13
13
  const dialogScrim = "$scrim-dialog";
@@ -286,20 +286,18 @@ const AlertDialogOverlay = forwardRef(function AlertDialogOverlay2({ children, .
286
286
  children
287
287
  });
288
288
  });
289
- const PopoverContent = forwardRef(function PopoverContent2({ children, onOpenAutoFocus, ...props }, ref) {
289
+ const PopoverContent = forwardRef(function PopoverContent2({ children, onOpenAutoFocus: _onOpenAutoFocus, ...props }, ref) {
290
290
  const { knobProps } = useResolvedKnobs({
291
291
  component: "PopoverContent",
292
292
  painted: false
293
293
  });
294
- const { contentId } = usePopoverContext();
295
- return /* @__PURE__ */ jsx(Popover.Content, {
294
+ return /* @__PURE__ */ jsx(YStack, {
296
295
  ref,
297
296
  ...knobProps.elevatedSurface,
298
297
  ...knobProps.containerRadius,
299
298
  ...transitionProps(knobProps.motion.overlay),
300
299
  ...overlayEnterExit,
301
300
  ...overlayFrameFocus,
302
- onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),
303
301
  ...props,
304
302
  children: /* @__PURE__ */ jsx(Surface, {
305
303
  painted: false,
@@ -1 +1 @@
1
- {"version":3,"file":"overlaySurfaces.js","names":[],"sources":["esm/theme/overlaySurfaces.js"],"sourcesContent":["import { focusOnOpen, wasKeyboardFocus } from \"../keyboardFocusRing\";\nimport { scrimFor } from \"./motion\";\nimport { transitionProps } from \"./transitionProps\";\nimport { Surface } from \"./Surface\";\nimport { useResolvedKnobs } from \"./useResolvedKnobs\";\nimport { ALERT_READABLE_WIDTH } from \"./layoutTokens\";\nimport { panelPaddingPx } from \"./resolveKnobs\";\nimport { createContext, forwardRef, useContext, useEffect } from \"react\";\nimport { createChangeEventDetails } from \"@tamagui/web\";\nimport {\n AlertDialog,\n Dialog,\n isWeb,\n Popover,\n useDialogContext,\n usePopoverContext,\n useWindowDimensions,\n YStack\n} from \"tamagui\";\nimport { jsx } from \"react/jsx-runtime\";\nconst dialogScrim = \"$scrim-dialog\";\nconst sheetScrim = \"$scrim-sheet\";\nconst overlayScrim = dialogScrim;\nconst sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nconst sheetGrabberClearance = 16;\nconst sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nconst sheetHandleWidthRatio = 0.3;\nconst sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nconst sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nconst sheetHandleToneOpen = { backgroundColor: \"$color-5\", opacity: 1 };\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nconst overlayFrameFocus = {\n outlineWidth: { default: 0, focus: 0, \"focus-visible\": 0 },\n outlineStyle: { default: \"none\", focus: \"none\", \"focus-visible\": \"none\" }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (let el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n const first = Array.from(container.querySelectorAll(\"*\")).find(\n (node) => isTabbableWithin(node, container)\n );\n if (!first) return;\n details.cancel();\n const focused = focusOnOpen(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return (details) => {\n onOpenAutoFocus?.(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nfunction useDialogShowFocus(onOpenAutoFocus) {\n const { open, contentId } = useDialogContext();\n useEffect(() => {\n if (!open || !contentId || !isWeb || typeof document === \"undefined\") return;\n const content = document.getElementById(contentId);\n const focused = document.activeElement;\n if (!content || typeof HTMLElement === \"undefined\" || !(focused instanceof HTMLElement)) return;\n if (!content.contains(focused) || focused.tabIndex >= 0 && wasKeyboardFocus()) return;\n onOpenAutoFocus(createChangeEventDetails(\"trigger-focus\"));\n }, [open, contentId]);\n}\nfunction DialogShowFocus({ onOpenAutoFocus }) {\n const { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));\n return null;\n}\nconst DialogRegionContext = createContext({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return useContext(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nconst IN_DIALOG_REGION = { inDialogRegion: true };\nconst SheetBodyContext = createContext(false);\nconst SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return useContext(SheetBodyContext);\n}\nconst DialogSheetFaceContext = createContext(false);\nconst DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return useContext(DialogSheetFaceContext);\n}\nconst DialogSheetBody = forwardRef(\n function DialogSheetBody2({ children }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"DialogContent\" });\n return /* @__PURE__ */ jsx(YStack, { ref, ...knobProps.gap, ...{ \"data-mp-dialog-face\": \"sheet\" }, children: /* @__PURE__ */ jsx(DialogSheetFaceContext.Provider, { value: false, children: /* @__PURE__ */ jsx(DialogRegionContext.Provider, { value: IN_DIALOG_REGION, children }) }) });\n }\n);\nconst overlayEnterExit = {\n opacity: { enter: 0, exit: 0 },\n y: { enter: -4, exit: -4 },\n scale: { enter: 0.97, exit: 0.97 }\n};\nconst DialogContent = forwardRef(function DialogContent2({ children, size = \"4\", ...props }, ref) {\n if (useDialogSheetFace()) return /* @__PURE__ */ jsx(DialogSheetBody, { ref, children });\n return /* @__PURE__ */ jsx(Surface, { size, painted: false, elevated: true, children: /* @__PURE__ */ jsx(DialogContentInner, { ref, ...props, children }) });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n const { width: windowWidth } = useWindowDimensions();\n const room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * panelPaddingPx()) : void 0;\n const fit = (value) => room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n if (room == null) return fallbackMaxWidth == null ? void 0 : { maxWidth: fallbackMaxWidth };\n return {\n maxWidth: fit(props.maxWidth ?? fallbackMaxWidth ?? room),\n ...props.minWidth != null ? { minWidth: fit(props.minWidth) } : void 0,\n ...props.width != null ? { width: fit(props.width) } : void 0\n };\n}\nconst DialogContentInner = forwardRef(function DialogContentInner2({ children, onOpenAutoFocus, ...props }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"DialogContent\" });\n const { contentId } = useDialogContext();\n const openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n useDialogShowFocus(openFocus);\n const windowFit = useWindowFit(props);\n return /* @__PURE__ */ jsx(\n Dialog.Content,\n {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ jsx(DialogRegionContext.Provider, { value: IN_DIALOG_REGION, children: /* @__PURE__ */ jsx(SheetBodyContext.Provider, { value: false, children }) })\n }\n );\n});\nconst scrimFade = { opacity: { enter: 0, exit: 0 } };\nconst DialogOverlay = forwardRef(function DialogOverlay2({ children, ...props }, ref) {\n const { knobProps } = useResolvedKnobs();\n const sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ jsx(\n Dialog.Overlay,\n {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n }\n );\n});\nconst AlertDialogContent = forwardRef(\n function AlertDialogContent2({ children, size = \"4\", ...props }, ref) {\n return /* @__PURE__ */ jsx(Surface, { size, painted: false, elevated: true, children: /* @__PURE__ */ jsx(AlertDialogContentInner, { ref, ...props, children }) });\n }\n);\nconst AlertDialogContentInner = forwardRef(function AlertDialogContentInner2({ children, ...props }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"AlertDialogContent\" });\n const { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));\n const windowFit = useWindowFit(props, ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ jsx(\n AlertDialog.Content,\n {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ jsx(DialogRegionContext.Provider, { value: IN_DIALOG_REGION, children: /* @__PURE__ */ jsx(SheetBodyContext.Provider, { value: false, children }) })\n }\n );\n});\nconst AlertDialogOverlay = forwardRef(function AlertDialogOverlay2({ children, ...props }, ref) {\n const { knobProps } = useResolvedKnobs();\n return /* @__PURE__ */ jsx(\n AlertDialog.Overlay,\n {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n }\n );\n});\nconst PopoverContent = forwardRef(\n function PopoverContent2({ children, onOpenAutoFocus, ...props }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"PopoverContent\", painted: false });\n const { contentId } = usePopoverContext();\n return /* @__PURE__ */ jsx(\n Popover.Content,\n {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),\n ...props,\n children: /* @__PURE__ */ jsx(Surface, { painted: false, elevated: true, children: /* @__PURE__ */ jsx(SheetBodyContext.Provider, { value: false, children }) })\n }\n );\n }\n);\nexport {\n AlertDialogContent,\n AlertDialogOverlay,\n DialogContent,\n DialogOverlay,\n DialogRegionContext,\n DialogSheetFaceProvider,\n DialogShowFocus,\n PopoverContent,\n SheetBodyProvider,\n dialogScrim,\n overlayScrim,\n sheetGrabber,\n sheetGrabberClearance,\n sheetGrabberZone,\n sheetHandle,\n sheetHandleTone,\n sheetHandleWidthRatio,\n sheetHandleZone,\n sheetScrim,\n useDialogRegionContext,\n useDialogSheetFace,\n useIsInDialogRegion,\n useIsInSheetBody\n};\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;;;;;;;;;;;AAoBA,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,eAAe;AACrB,MAAM,eAAe;CACnB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc,CAAC;CACf,QAAQ;AACV;AACA,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;CACvB,WAAW;CACX,YAAY;CACZ,QAAQ;AACV;AACA,MAAM,wBAAwB;AAC9B,MAAM,cAAc;CAClB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc;CACd,QAAQ;AACV;AACA,MAAM,kBAAkB;CACtB,WAAW;CACX,YAAY;CACZ,YAAY;AACd;AACA,MAAM,sBAAsB;CAAE,iBAAiB;CAAY,SAAS;AAAE;AACtE,SAAS,gBAAgB,SAAS;CAChC,OAAO;AACT;AACA,MAAM,oBAAoB;CACxB,cAAc;EAAE,SAAS;EAAG,OAAO;EAAG,iBAAiB;CAAE;CACzD,cAAc;EAAE,SAAS;EAAQ,OAAO;EAAQ,iBAAiB;CAAO;AAC1E;AACA,SAAS,iBAAiB,MAAM,WAAW;CACzC,IAAI,KAAK,WAAW,KAAK,KAAK,UAAU,KAAK,YAAY,KAAK,OAAO;CACrE,IAAI,KAAK,UAAU,OAAO;CAC1B,IAAI,OAAO,qBAAqB,eAAe,gBAAgB,oBAAoB,KAAK,SAAS,UAAU;EACzG,OAAO;CACT;CACA,IAAI,iBAAiB,IAAI,CAAC,CAAC,eAAe,UAAU,O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AAC;CAC/K,CACF;AACF,CAAC;AACD,MAAM,qBAAqB,WAAW,SAAS,oBAAoB,EAAE,UAAU,GAAG,SAAS,KAAK;CAC9F,MAAM,EAAE,cAAc,iBAAiB;CACvC,OAAuB,oBACrB,YAAY,SACZ;EACE;EACA,iBAAiB;EACjB,GAAG,gBAAgB,SAAS,UAAU,OAAO,OAAO,CAAC;EACrD,GAAG;EACH,GAAG;EACH;CACF,CACF;AACF,CAAC;AACD,MAAM,iBAAiB,WACrB,SAAS,gBAAgB,EAAE,UAAU,iBAAiB,GAAG,SAAS,KAAK;CACrE,MAAM,EAAE,cAAc,iBAAiB;EAAE,WAAW;EAAkB,SAAS;CAAM,CAAC;CACtF,MAAM,EAAE,cAAc,kBAAkB;CACxC,OAAuB,oBACrB,QAAQ,SACR;EACE;EACA,GAAG,UAAU;EACb,GAAG,UAAU;EACb,GAAG,gBAAgB,UAAU,OAAO,OAAO;EAC3C,GAAG;EACH,GAAG;EACH,iBAAiB,mBAAmB,iBAAiB,SAAS;EAC9D,GAAG;EACH,UAA0B,oBAAI,SAAS;GAAE,SAAS;GAAO,UAAU;GAAM,UAA0B,oBAAI,iBAAiB,UAAU;IAAE,OAAO;IAAO;GAAS,CAAC;EAAE,CAAC;CACjK,CACF;AACF,CACF"}
1
+ {"version":3,"file":"overlaySurfaces.js","names":[],"sources":["esm/theme/overlaySurfaces.js"],"sourcesContent":["import { focusOnOpen, wasKeyboardFocus } from \"../keyboardFocusRing\";\nimport { scrimFor } from \"./motion\";\nimport { transitionProps } from \"./transitionProps\";\nimport { Surface } from \"./Surface\";\nimport { useResolvedKnobs } from \"./useResolvedKnobs\";\nimport { ALERT_READABLE_WIDTH } from \"./layoutTokens\";\nimport { panelPaddingPx } from \"./resolveKnobs\";\nimport { createContext, forwardRef, useContext, useEffect } from \"react\";\nimport { createChangeEventDetails } from \"@tamagui/web\";\nimport {\n AlertDialog,\n Dialog,\n isWeb,\n useDialogContext,\n useWindowDimensions,\n YStack\n} from \"tamagui\";\nimport { jsx } from \"react/jsx-runtime\";\nconst dialogScrim = \"$scrim-dialog\";\nconst sheetScrim = \"$scrim-sheet\";\nconst overlayScrim = dialogScrim;\nconst sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nconst sheetGrabberClearance = 16;\nconst sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nconst sheetHandleWidthRatio = 0.3;\nconst sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nconst sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nconst sheetHandleToneOpen = { backgroundColor: \"$color-5\", opacity: 1 };\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nconst overlayFrameFocus = {\n outlineWidth: { default: 0, focus: 0, \"focus-visible\": 0 },\n outlineStyle: { default: \"none\", focus: \"none\", \"focus-visible\": \"none\" }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (let el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n const first = Array.from(container.querySelectorAll(\"*\")).find(\n (node) => isTabbableWithin(node, container)\n );\n if (!first) return;\n details.cancel();\n const focused = focusOnOpen(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return (details) => {\n onOpenAutoFocus?.(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nfunction useDialogShowFocus(onOpenAutoFocus) {\n const { open, contentId } = useDialogContext();\n useEffect(() => {\n if (!open || !contentId || !isWeb || typeof document === \"undefined\") return;\n const content = document.getElementById(contentId);\n const focused = document.activeElement;\n if (!content || typeof HTMLElement === \"undefined\" || !(focused instanceof HTMLElement)) return;\n if (!content.contains(focused) || focused.tabIndex >= 0 && wasKeyboardFocus()) return;\n onOpenAutoFocus(createChangeEventDetails(\"trigger-focus\"));\n }, [open, contentId]);\n}\nfunction DialogShowFocus({ onOpenAutoFocus }) {\n const { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));\n return null;\n}\nconst DialogRegionContext = createContext({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return useContext(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nconst IN_DIALOG_REGION = { inDialogRegion: true };\nconst SheetBodyContext = createContext(false);\nconst SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return useContext(SheetBodyContext);\n}\nconst DialogSheetFaceContext = createContext(false);\nconst DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return useContext(DialogSheetFaceContext);\n}\nconst DialogSheetBody = forwardRef(\n function DialogSheetBody2({ children }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"DialogContent\" });\n return /* @__PURE__ */ jsx(YStack, { ref, ...knobProps.gap, ...{ \"data-mp-dialog-face\": \"sheet\" }, children: /* @__PURE__ */ jsx(DialogSheetFaceContext.Provider, { value: false, children: /* @__PURE__ */ jsx(DialogRegionContext.Provider, { value: IN_DIALOG_REGION, children }) }) });\n }\n);\nconst overlayEnterExit = {\n opacity: { enter: 0, exit: 0 },\n y: { enter: -4, exit: -4 },\n scale: { enter: 0.97, exit: 0.97 }\n};\nconst DialogContent = forwardRef(function DialogContent2({ children, size = \"4\", ...props }, ref) {\n if (useDialogSheetFace()) return /* @__PURE__ */ jsx(DialogSheetBody, { ref, children });\n return /* @__PURE__ */ jsx(Surface, { size, painted: false, elevated: true, children: /* @__PURE__ */ jsx(DialogContentInner, { ref, ...props, children }) });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n const { width: windowWidth } = useWindowDimensions();\n const room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * panelPaddingPx()) : void 0;\n const fit = (value) => room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n if (room == null) return fallbackMaxWidth == null ? void 0 : { maxWidth: fallbackMaxWidth };\n return {\n maxWidth: fit(props.maxWidth ?? fallbackMaxWidth ?? room),\n ...props.minWidth != null ? { minWidth: fit(props.minWidth) } : void 0,\n ...props.width != null ? { width: fit(props.width) } : void 0\n };\n}\nconst DialogContentInner = forwardRef(function DialogContentInner2({ children, onOpenAutoFocus, ...props }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"DialogContent\" });\n const { contentId } = useDialogContext();\n const openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n useDialogShowFocus(openFocus);\n const windowFit = useWindowFit(props);\n return /* @__PURE__ */ jsx(\n Dialog.Content,\n {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ jsx(DialogRegionContext.Provider, { value: IN_DIALOG_REGION, children: /* @__PURE__ */ jsx(SheetBodyContext.Provider, { value: false, children }) })\n }\n );\n});\nconst scrimFade = { opacity: { enter: 0, exit: 0 } };\nconst DialogOverlay = forwardRef(function DialogOverlay2({ children, ...props }, ref) {\n const { knobProps } = useResolvedKnobs();\n const sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ jsx(\n Dialog.Overlay,\n {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n }\n );\n});\nconst AlertDialogContent = forwardRef(\n function AlertDialogContent2({ children, size = \"4\", ...props }, ref) {\n return /* @__PURE__ */ jsx(Surface, { size, painted: false, elevated: true, children: /* @__PURE__ */ jsx(AlertDialogContentInner, { ref, ...props, children }) });\n }\n);\nconst AlertDialogContentInner = forwardRef(function AlertDialogContentInner2({ children, ...props }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"AlertDialogContent\" });\n const { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));\n const windowFit = useWindowFit(props, ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ jsx(\n AlertDialog.Content,\n {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ jsx(DialogRegionContext.Provider, { value: IN_DIALOG_REGION, children: /* @__PURE__ */ jsx(SheetBodyContext.Provider, { value: false, children }) })\n }\n );\n});\nconst AlertDialogOverlay = forwardRef(function AlertDialogOverlay2({ children, ...props }, ref) {\n const { knobProps } = useResolvedKnobs();\n return /* @__PURE__ */ jsx(\n AlertDialog.Overlay,\n {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n }\n );\n});\nconst PopoverContent = forwardRef(\n function PopoverContent2({ children, onOpenAutoFocus: _onOpenAutoFocus, ...props }, ref) {\n const { knobProps } = useResolvedKnobs({ component: \"PopoverContent\", painted: false });\n return /* @__PURE__ */ jsx(\n YStack,\n {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n children: /* @__PURE__ */ jsx(Surface, { painted: false, elevated: true, children: /* @__PURE__ */ jsx(SheetBodyContext.Provider, { value: false, children }) })\n }\n );\n }\n);\nexport {\n AlertDialogContent,\n AlertDialogOverlay,\n DialogContent,\n DialogOverlay,\n DialogRegionContext,\n DialogSheetFaceProvider,\n DialogShowFocus,\n PopoverContent,\n SheetBodyProvider,\n dialogScrim,\n overlayScrim,\n sheetGrabber,\n sheetGrabberClearance,\n sheetGrabberZone,\n sheetHandle,\n sheetHandleTone,\n sheetHandleWidthRatio,\n sheetHandleZone,\n sheetScrim,\n useDialogRegionContext,\n useDialogSheetFace,\n useIsInDialogRegion,\n useIsInSheetBody\n};\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;;;;;;;;;;;AAkBA,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,eAAe;AACrB,MAAM,eAAe;CACnB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc,CAAC;CACf,QAAQ;AACV;AACA,MAAM,wBAAwB;AAC9B,MAAM,mBAAmB;CACvB,WAAW;CACX,YAAY;CACZ,QAAQ;AACV;AACA,MAAM,wBAAwB;AAC9B,MAAM,cAAc;CAClB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc;CACd,QAAQ;AACV;AACA,MAAM,kBAAkB;CACtB,WAAW;CACX,YAAY;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CACF"}
@@ -8,7 +8,7 @@ import { ALERT_READABLE_WIDTH } from "./layoutTokens.native.js";
8
8
  import { panelPaddingPx } from "./resolveKnobs.native.js";
9
9
  import { createContext, forwardRef, useContext, useEffect } from "react";
10
10
  import { createChangeEventDetails } from "@tamagui/web";
11
- import { AlertDialog, Dialog, Popover, YStack, isWeb, useDialogContext, usePopoverContext, useWindowDimensions } from "tamagui";
11
+ import { AlertDialog, Dialog, YStack, isWeb, useDialogContext, useWindowDimensions } from "tamagui";
12
12
 
13
13
  var dialogScrim = "$scrim-dialog";
14
14
  var sheetScrim = "$scrim-sheet";
@@ -300,20 +300,18 @@ var AlertDialogOverlay = /* @__PURE__ */ forwardRef(function AlertDialogOverlay2
300
300
  });
301
301
  });
302
302
  var PopoverContent = /* @__PURE__ */ forwardRef(function PopoverContent2(param, ref) {
303
- var { children, onOpenAutoFocus, ...props } = param;
303
+ var { children, onOpenAutoFocus: _onOpenAutoFocus, ...props } = param;
304
304
  var { knobProps } = useResolvedKnobs({
305
305
  component: "PopoverContent",
306
306
  painted: false
307
307
  });
308
- var { contentId } = usePopoverContext();
309
- return /* @__PURE__ */ jsx(Popover.Content, {
308
+ return /* @__PURE__ */ jsx(YStack, {
310
309
  ref,
311
310
  ...knobProps.elevatedSurface,
312
311
  ...knobProps.containerRadius,
313
312
  ...transitionProps(knobProps.motion.overlay),
314
313
  ...overlayEnterExit,
315
314
  ...overlayFrameFocus,
316
- onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),
317
315
  ...props,
318
316
  children: /* @__PURE__ */ jsx(Surface, {
319
317
  painted: false,
@@ -1 +1 @@
1
- {"version":3,"file":"overlaySurfaces.native.js","names":[],"sources":["esm/theme/overlaySurfaces.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { focusOnOpen, wasKeyboardFocus } from \"../keyboardFocusRing\";\nimport { scrimFor } from \"./motion\";\nimport { transitionProps } from \"./transitionProps\";\nimport { Surface } from \"./Surface\";\nimport { useResolvedKnobs } from \"./useResolvedKnobs\";\nimport { ALERT_READABLE_WIDTH } from \"./layoutTokens\";\nimport { panelPaddingPx } from \"./resolveKnobs\";\nimport { createContext, forwardRef, useContext, useEffect } from \"react\";\nimport { createChangeEventDetails } from \"@tamagui/web\";\nimport { AlertDialog, Dialog, isWeb, Popover, useDialogContext, usePopoverContext, useWindowDimensions, YStack } from \"tamagui\";\nvar dialogScrim = \"$scrim-dialog\";\nvar sheetScrim = \"$scrim-sheet\";\nvar overlayScrim = dialogScrim;\nvar sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nvar sheetGrabberClearance = 16;\nvar sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nvar sheetHandleWidthRatio = 0.3;\nvar sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nvar sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nvar sheetHandleToneOpen = {\n backgroundColor: \"$color-5\",\n opacity: 1\n};\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nvar overlayFrameFocus = {\n outlineWidth: {\n default: 0,\n focus: 0,\n \"focus-visible\": 0\n },\n outlineStyle: {\n default: \"none\",\n focus: \"none\",\n \"focus-visible\": \"none\"\n }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (var el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n var first = Array.from(container.querySelectorAll(\"*\")).find(function(node) {\n return isTabbableWithin(node, container);\n });\n if (!first) return;\n details.cancel();\n var focused = focusOnOpen(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return function(details) {\n onOpenAutoFocus === null || onOpenAutoFocus === void 0 ? void 0 : onOpenAutoFocus(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nfunction useDialogShowFocus(onOpenAutoFocus) {\n var { open, contentId } = useDialogContext();\n useEffect(function() {\n if (!open || !contentId || !isWeb || typeof document === \"undefined\") return;\n var content = document.getElementById(contentId);\n var focused = document.activeElement;\n if (!content || typeof HTMLElement === \"undefined\" || !(focused instanceof HTMLElement)) return;\n if (!content.contains(focused) || focused.tabIndex >= 0 && wasKeyboardFocus()) return;\n onOpenAutoFocus(createChangeEventDetails(\"trigger-focus\"));\n }, [\n open,\n contentId\n ]);\n}\nfunction DialogShowFocus(param) {\n var { onOpenAutoFocus } = param;\n var { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));\n return null;\n}\nvar DialogRegionContext = /* @__PURE__ */ createContext({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return useContext(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nvar IN_DIALOG_REGION = {\n inDialogRegion: true\n};\nvar SheetBodyContext = /* @__PURE__ */ createContext(false);\nvar SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return useContext(SheetBodyContext);\n}\nvar DialogSheetFaceContext = /* @__PURE__ */ createContext(false);\nvar DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return useContext(DialogSheetFaceContext);\n}\nvar DialogSheetBody = /* @__PURE__ */ forwardRef(function DialogSheetBody2(param, ref) {\n var { children } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"DialogContent\"\n });\n return /* @__PURE__ */ _jsx(YStack, {\n ref,\n ...knobProps.gap,\n ...{\n \"data-mp-dialog-face\": \"sheet\"\n },\n children: /* @__PURE__ */ _jsx(DialogSheetFaceContext.Provider, {\n value: false,\n children: /* @__PURE__ */ _jsx(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children\n })\n })\n });\n});\nvar overlayEnterExit = {\n opacity: {\n enter: 0,\n exit: 0\n },\n y: {\n enter: -4,\n exit: -4\n },\n scale: {\n enter: 0.97,\n exit: 0.97\n }\n};\nvar DialogContent = /* @__PURE__ */ forwardRef(function DialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n if (useDialogSheetFace()) return /* @__PURE__ */ _jsx(DialogSheetBody, {\n ref,\n children\n });\n return /* @__PURE__ */ _jsx(Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ _jsx(DialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n var _ref, _props_maxWidth;\n var { width: windowWidth } = useWindowDimensions();\n var room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * panelPaddingPx()) : void 0;\n var fit = function fit2(value) {\n return room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n };\n if (room == null) return fallbackMaxWidth == null ? void 0 : {\n maxWidth: fallbackMaxWidth\n };\n return {\n maxWidth: fit((_ref = (_props_maxWidth = props.maxWidth) !== null && _props_maxWidth !== void 0 ? _props_maxWidth : fallbackMaxWidth) !== null && _ref !== void 0 ? _ref : room),\n ...props.minWidth != null ? {\n minWidth: fit(props.minWidth)\n } : void 0,\n ...props.width != null ? {\n width: fit(props.width)\n } : void 0\n };\n}\nvar DialogContentInner = /* @__PURE__ */ forwardRef(function DialogContentInner2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"DialogContent\"\n });\n var { contentId } = useDialogContext();\n var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n useDialogShowFocus(openFocus);\n var windowFit = useWindowFit(props);\n return /* @__PURE__ */ _jsx(Dialog.Content, {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ _jsx(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ _jsx(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar scrimFade = {\n opacity: {\n enter: 0,\n exit: 0\n }\n};\nvar DialogOverlay = /* @__PURE__ */ forwardRef(function DialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = useResolvedKnobs();\n var sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ _jsx(Dialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar AlertDialogContent = /* @__PURE__ */ forwardRef(function AlertDialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n return /* @__PURE__ */ _jsx(Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ _jsx(AlertDialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nvar AlertDialogContentInner = /* @__PURE__ */ forwardRef(function AlertDialogContentInner2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"AlertDialogContent\"\n });\n var { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));\n var windowFit = useWindowFit(props, ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ _jsx(AlertDialog.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ _jsx(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ _jsx(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar AlertDialogOverlay = /* @__PURE__ */ forwardRef(function AlertDialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = useResolvedKnobs();\n return /* @__PURE__ */ _jsx(AlertDialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar PopoverContent = /* @__PURE__ */ forwardRef(function PopoverContent2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"PopoverContent\",\n painted: false\n });\n var { contentId } = usePopoverContext();\n return /* @__PURE__ */ _jsx(Popover.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: withHouseOpenFocus(onOpenAutoFocus, contentId),\n ...props,\n children: /* @__PURE__ */ _jsx(Surface, {\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ _jsx(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nexport {\n AlertDialogContent,\n AlertDialogOverlay,\n DialogContent,\n DialogOverlay,\n DialogRegionContext,\n DialogSheetFaceProvider,\n DialogShowFocus,\n PopoverContent,\n SheetBodyProvider,\n dialogScrim,\n overlayScrim,\n sheetGrabber,\n sheetGrabberClearance,\n sheetGrabberZone,\n sheetHandle,\n sheetHandleTone,\n sheetHandleWidthRatio,\n sheetHandleZone,\n sheetScrim,\n useDialogRegionContext,\n useDialogSheetFace,\n useIsInDialogRegion,\n useIsInSheetBody\n};\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;;;;;;;;;;;AAWA,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,IAAI,eAAe;AACnB,IAAI,eAAe;CACjB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc,CAAC;CACf,QAAQ;AACV;AACA,IAAI,wBAAwB;AAC5B,IAAI,mBAAmB;CACrB,WAAW;CACX,YAAY;CACZ,QAAQ;AACV;AACA,IAAI,wBAAwB;AAC5B,IAAI,cAAc;CAChB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc;CACd,QAAQ;AACV;AACA,IAAI,kBAAkB;CACpB,WAAW;CACX,YAAY;CACZ,YAAY;AACd;AACA,IAAI,sBAAsB;CACxB,iBAAiB;CACjB,SAAS;AACX;AACA,SAAS,gBAAgB,SAAS;CAChC,OAAO;AACT;AACA,IAAI,oBAAoB;CACtB,cAAc;EACZ,SAAS;EACT,OAAO;EACP,iBAAiB;CACnB;CACA,cAAc;EACZ,SAAS;EACT,OAAO;EACP,iBAAiB;CACnB;AACF;AACA,SAAS,iBAAiB,MAAM,WAAW;CACzC,IAAI,KAAK,WAAW,KAAK,KAAK,UAAU,KAAK,YAAY,KAAK,OAAO;CACrE,IAAI,KAAK,UAAU,OAAO;CAC1B,IAAI,OAAO,qBAAqB,eAAe,gBAAgB,o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],"sources":["esm/theme/overlaySurfaces.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { focusOnOpen, wasKeyboardFocus } from \"../keyboardFocusRing\";\nimport { scrimFor } from \"./motion\";\nimport { transitionProps } from \"./transitionProps\";\nimport { Surface } from \"./Surface\";\nimport { useResolvedKnobs } from \"./useResolvedKnobs\";\nimport { ALERT_READABLE_WIDTH } from \"./layoutTokens\";\nimport { panelPaddingPx } from \"./resolveKnobs\";\nimport { createContext, forwardRef, useContext, useEffect } from \"react\";\nimport { createChangeEventDetails } from \"@tamagui/web\";\nimport { AlertDialog, Dialog, isWeb, useDialogContext, useWindowDimensions, YStack } from \"tamagui\";\nvar dialogScrim = \"$scrim-dialog\";\nvar sheetScrim = \"$scrim-sheet\";\nvar overlayScrim = dialogScrim;\nvar sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nvar sheetGrabberClearance = 16;\nvar sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nvar sheetHandleWidthRatio = 0.3;\nvar sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nvar sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nvar sheetHandleToneOpen = {\n backgroundColor: \"$color-5\",\n opacity: 1\n};\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nvar overlayFrameFocus = {\n outlineWidth: {\n default: 0,\n focus: 0,\n \"focus-visible\": 0\n },\n outlineStyle: {\n default: \"none\",\n focus: \"none\",\n \"focus-visible\": \"none\"\n }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (var el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n var first = Array.from(container.querySelectorAll(\"*\")).find(function(node) {\n return isTabbableWithin(node, container);\n });\n if (!first) return;\n details.cancel();\n var focused = focusOnOpen(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return function(details) {\n onOpenAutoFocus === null || onOpenAutoFocus === void 0 ? void 0 : onOpenAutoFocus(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nfunction useDialogShowFocus(onOpenAutoFocus) {\n var { open, contentId } = useDialogContext();\n useEffect(function() {\n if (!open || !contentId || !isWeb || typeof document === \"undefined\") return;\n var content = document.getElementById(contentId);\n var focused = document.activeElement;\n if (!content || typeof HTMLElement === \"undefined\" || !(focused instanceof HTMLElement)) return;\n if (!content.contains(focused) || focused.tabIndex >= 0 && wasKeyboardFocus()) return;\n onOpenAutoFocus(createChangeEventDetails(\"trigger-focus\"));\n }, [\n open,\n contentId\n ]);\n}\nfunction DialogShowFocus(param) {\n var { onOpenAutoFocus } = param;\n var { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));\n return null;\n}\nvar DialogRegionContext = /* @__PURE__ */ createContext({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return useContext(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nvar IN_DIALOG_REGION = {\n inDialogRegion: true\n};\nvar SheetBodyContext = /* @__PURE__ */ createContext(false);\nvar SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return useContext(SheetBodyContext);\n}\nvar DialogSheetFaceContext = /* @__PURE__ */ createContext(false);\nvar DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return useContext(DialogSheetFaceContext);\n}\nvar DialogSheetBody = /* @__PURE__ */ forwardRef(function DialogSheetBody2(param, ref) {\n var { children } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"DialogContent\"\n });\n return /* @__PURE__ */ _jsx(YStack, {\n ref,\n ...knobProps.gap,\n ...{\n \"data-mp-dialog-face\": \"sheet\"\n },\n children: /* @__PURE__ */ _jsx(DialogSheetFaceContext.Provider, {\n value: false,\n children: /* @__PURE__ */ _jsx(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children\n })\n })\n });\n});\nvar overlayEnterExit = {\n opacity: {\n enter: 0,\n exit: 0\n },\n y: {\n enter: -4,\n exit: -4\n },\n scale: {\n enter: 0.97,\n exit: 0.97\n }\n};\nvar DialogContent = /* @__PURE__ */ forwardRef(function DialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n if (useDialogSheetFace()) return /* @__PURE__ */ _jsx(DialogSheetBody, {\n ref,\n children\n });\n return /* @__PURE__ */ _jsx(Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ _jsx(DialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n var _ref, _props_maxWidth;\n var { width: windowWidth } = useWindowDimensions();\n var room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * panelPaddingPx()) : void 0;\n var fit = function fit2(value) {\n return room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n };\n if (room == null) return fallbackMaxWidth == null ? void 0 : {\n maxWidth: fallbackMaxWidth\n };\n return {\n maxWidth: fit((_ref = (_props_maxWidth = props.maxWidth) !== null && _props_maxWidth !== void 0 ? _props_maxWidth : fallbackMaxWidth) !== null && _ref !== void 0 ? _ref : room),\n ...props.minWidth != null ? {\n minWidth: fit(props.minWidth)\n } : void 0,\n ...props.width != null ? {\n width: fit(props.width)\n } : void 0\n };\n}\nvar DialogContentInner = /* @__PURE__ */ forwardRef(function DialogContentInner2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"DialogContent\"\n });\n var { contentId } = useDialogContext();\n var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n useDialogShowFocus(openFocus);\n var windowFit = useWindowFit(props);\n return /* @__PURE__ */ _jsx(Dialog.Content, {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ _jsx(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ _jsx(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar scrimFade = {\n opacity: {\n enter: 0,\n exit: 0\n }\n};\nvar DialogOverlay = /* @__PURE__ */ forwardRef(function DialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = useResolvedKnobs();\n var sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ _jsx(Dialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar AlertDialogContent = /* @__PURE__ */ forwardRef(function AlertDialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n return /* @__PURE__ */ _jsx(Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ _jsx(AlertDialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nvar AlertDialogContentInner = /* @__PURE__ */ forwardRef(function AlertDialogContentInner2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"AlertDialogContent\"\n });\n var { contentId } = useDialogContext();\n useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));\n var windowFit = useWindowFit(props, ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ _jsx(AlertDialog.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ _jsx(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ _jsx(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar AlertDialogOverlay = /* @__PURE__ */ forwardRef(function AlertDialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = useResolvedKnobs();\n return /* @__PURE__ */ _jsx(AlertDialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...transitionProps(scrimFor(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar PopoverContent = /* @__PURE__ */ forwardRef(function PopoverContent2(param, ref) {\n var { children, onOpenAutoFocus: _onOpenAutoFocus, ...props } = param;\n var { knobProps } = useResolvedKnobs({\n component: \"PopoverContent\",\n painted: false\n });\n return /* @__PURE__ */ _jsx(YStack, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...transitionProps(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n children: /* @__PURE__ */ _jsx(Surface, {\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ _jsx(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nexport {\n AlertDialogContent,\n AlertDialogOverlay,\n DialogContent,\n DialogOverlay,\n DialogRegionContext,\n DialogSheetFaceProvider,\n DialogShowFocus,\n PopoverContent,\n SheetBodyProvider,\n dialogScrim,\n overlayScrim,\n sheetGrabber,\n sheetGrabberClearance,\n sheetGrabberZone,\n sheetHandle,\n sheetHandleTone,\n sheetHandleWidthRatio,\n sheetHandleZone,\n sheetScrim,\n useDialogRegionContext,\n useDialogSheetFace,\n useIsInDialogRegion,\n useIsInSheetBody\n};\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;;;;;;;;;;;AAWA,IAAI,cAAc;AAClB,IAAI,aAAa;AACjB,IAAI,eAAe;AACnB,IAAI,eAAe;CACjB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc,CAAC;CACf,QAAQ;AACV;AACA,IAAI,wBAAwB;AAC5B,IAAI,mBAAmB;CACrB,WAAW;CACX,YAAY;CACZ,QAAQ;AACV;AACA,IAAI,wBAAwB;AAC5B,IAAI,cAAc;CAChB,OAAO;CACP,QAAQ;CACR,cAAc;CACd,iBAAiB;CACjB,SAAS;CACT,WAAW;CACX,kBAAkB;CAClB,WAAW;CACX,cAAc;CACd,QAAQ;AACV;AACA,IAAI,kBAAkB;CACpB,WAAW;CACX,YAAY;CACZ,YAAY;AACd;AACA,IAAI,sBAAsB;CACxB,iBAAiB;CACjB,SAAS;AACX;AACA,SAAS,gBAAgB,SAAS;CAChC,OAAO;AACT;AACA,IAAI,oBAAoB;CACtB,cAAc;EACZ,SAAS;EACT,OAAO;EACP,iBAAiB;CACnB;CACA,cAAc;EACZ,SAAS;EACT,OAAO;EACP,iBAAiB;CACnB;AACF;AACA,SAAS,iBAAiB,MAAM,WAAW;CACzC,IAAI,KAAK,WAA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H,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/theme",
3
- "version": "10.26.0",
3
+ "version": "10.27.0",
4
4
  "description": "Tamagui theme system for multiplatform.one",
5
5
  "keywords": [
6
6
  "multiplatform",
@@ -163,8 +163,8 @@
163
163
  "access": "public"
164
164
  },
165
165
  "dependencies": {
166
- "@multiplatform.one/platform": "^10.26.0",
167
- "@multiplatform.one/store": "^10.26.0",
166
+ "@multiplatform.one/platform": "^10.27.0",
167
+ "@multiplatform.one/store": "^10.27.0",
168
168
  "@tamagui/animations-react-native": "3.2.3",
169
169
  "@tamagui/colors": "3.2.3",
170
170
  "@tamagui/config": "3.2.3",
@@ -178,8 +178,8 @@
178
178
  },
179
179
  "devDependencies": {
180
180
  "@expo/prebuild-config": "58.0.19",
181
- "@multiplatform.one/config": "10.26.0",
182
- "@multiplatform.one/test-utils": "10.26.0",
181
+ "@multiplatform.one/config": "10.27.0",
182
+ "@multiplatform.one/test-utils": "10.27.0",
183
183
  "@tamagui/animations-css": "3.2.3",
184
184
  "@tamagui/animations-reanimated": "3.2.3",
185
185
  "@tamagui/build": "3.2.3",
@@ -22,9 +22,8 @@ vi.mock("tamagui", async () => {
22
22
  isWeb: true,
23
23
  Dialog: { Content: part("Dialog.Content"), Overlay: part("Dialog.Overlay") },
24
24
  AlertDialog: { Content: part("AlertDialog.Content"), Overlay: part("AlertDialog.Overlay") },
25
- Popover: { Content: part("Popover.Content") },
25
+ YStack: part("YStack"),
26
26
  useDialogContext: () => seen.dialog,
27
- usePopoverContext: () => seen.popover,
28
27
  useWindowDimensions: () => ({ width: seen.width, height: 800 }),
29
28
  };
30
29
  });
@@ -52,7 +51,6 @@ const {
52
51
  DialogContent,
53
52
  DialogOverlay,
54
53
  DialogShowFocus,
55
- PopoverContent,
56
54
  dialogScrim,
57
55
  useIsInDialogRegion,
58
56
  } = await import("./overlaySurfaces");
@@ -69,8 +67,9 @@ function el<K extends keyof HTMLElementTagNameMap>(tag: K, attrs: Record<string,
69
67
  type OpenFocusDetails = TamaguiChangeEventDetails<"trigger-focus", Event>;
70
68
 
71
69
  function openFocus(onOpenAutoFocus?: (details: OpenFocusDetails) => void) {
72
- render(<PopoverContent onOpenAutoFocus={onOpenAutoFocus}>body</PopoverContent>);
73
- return seen.props["Popover.Content"].onOpenAutoFocus as (details: OpenFocusDetails) => void;
70
+ seen.dialog.contentId = seen.popover.contentId;
71
+ render(<DialogContent onOpenAutoFocus={onOpenAutoFocus}>body</DialogContent>);
72
+ return seen.props["Dialog.Content"].onOpenAutoFocus as (details: OpenFocusDetails) => void;
74
73
  }
75
74
 
76
75
  function fire(handler: (details: OpenFocusDetails) => void) {
@@ -12,9 +12,7 @@ import {
12
12
  AlertDialog,
13
13
  Dialog,
14
14
  isWeb,
15
- Popover,
16
15
  useDialogContext,
17
- usePopoverContext,
18
16
  useWindowDimensions,
19
17
  YStack,
20
18
  type DialogContentProps as TamaguiDialogContentProps,
@@ -468,39 +466,37 @@ export const AlertDialogOverlay = forwardRef<
468
466
  });
469
467
 
470
468
  // ── PopoverContent ───────────────────────────────────────────────────────
471
- // OVERLAY_ANCHOR_GAP rule (theme/layoutTokens): free popovers size to
472
- // content, start-aligned to their anchor with the shared gap (the caller's
473
- // tamagui <Popover offset={OVERLAY_ANCHOR_GAP}>), flipping/shifting at
474
- // viewport edges. This frame is the overlay's single surface owner —
475
- // border comes from the elevatedSurface recipe and radius from the
476
- // containerRadius cap spread over it; children must not draw their own
477
- // outer border.
469
+ // FloatingPanel owns anchored placement and viewport collisions.
470
+ // This passive frame applies the elevatedSurface recipe, with its
471
+ // border and elevation, followed by the containerRadius cap.
472
+ // It needs no overlay context when rendered on its own.
473
+ // Popover also accepts it as a content marker; FloatingPanel then
474
+ // paints the overlay's single surface around the marker's children.
475
+ // Children must not draw their own outer border.
478
476
 
479
477
  type PopoverContentProps = ViewProps & {
480
478
  children?: ReactNode;
481
- /** Runs first; `cancel()` skips the house open focus. */
479
+ /** Within Popover, runs first; `cancel()` skips the panel's initial focus. */
482
480
  onOpenAutoFocus?: OpenAutoFocus;
483
481
  };
484
482
 
485
483
  export const PopoverContent = forwardRef<TamaguiElement, PopoverContentProps>(
486
- function PopoverContent({ children, onOpenAutoFocus, ...props }, ref) {
484
+ function PopoverContent({ children, onOpenAutoFocus: _onOpenAutoFocus, ...props }, ref) {
487
485
  const { knobProps } = useResolvedKnobs({ component: "PopoverContent", painted: false });
488
- const { contentId } = usePopoverContext();
489
486
  return (
490
- <Popover.Content
487
+ <YStack
491
488
  ref={ref}
492
489
  {...knobProps.elevatedSurface}
493
490
  {...knobProps.containerRadius}
494
491
  {...transitionProps(knobProps.motion.overlay)}
495
492
  {...overlayEnterExit}
496
493
  {...overlayFrameFocus}
497
- onOpenAutoFocus={withHouseOpenFocus(onOpenAutoFocus, contentId)}
498
494
  {...props}
499
495
  >
500
496
  <Surface painted={false} elevated>
501
497
  <SheetBodyContext.Provider value={false}>{children}</SheetBodyContext.Provider>
502
498
  </Surface>
503
- </Popover.Content>
499
+ </YStack>
504
500
  );
505
501
  },
506
502
  );
@@ -151,7 +151,7 @@ export declare const AlertDialogOverlay: import("react").ForwardRefExoticCompone
151
151
  } & import("react").RefAttributes<TamaguiElement>>;
152
152
  export declare const PopoverContent: import("react").ForwardRefExoticComponent<import("tamagui").StackNonStyleProps & import("@tamagui/web").WithThemeValues<Omit<import("@tamagui/web").StackStyleBase, never>> & import("@tamagui/web").WithFlatVariantValues<{}> & import("@tamagui/web").WithShorthands<import("@tamagui/web").WithThemeValues<import("@tamagui/web").StackStyleBase>> & {
153
153
  children?: ReactNode;
154
- /** Runs first; `cancel()` skips the house open focus. */
154
+ /** Within Popover, runs first; `cancel()` skips the panel's initial focus. */
155
155
  onOpenAutoFocus?: OpenAutoFocus;
156
156
  } & import("react").RefAttributes<TamaguiElement>>;
157
157
  //# sourceMappingURL=overlaySurfaces.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"overlaySurfaces.d.ts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