@tamagui/popover 1.1.8 → 1.1.9

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.
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -74,11 +78,7 @@ const PopoverAnchor = React.forwardRef(
74
78
  onCustomAnchorAdd();
75
79
  return () => onCustomAnchorRemove();
76
80
  }, [onCustomAnchorAdd, onCustomAnchorRemove]);
77
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, {
78
- ...popperScope,
79
- ...anchorProps,
80
- ref: forwardedRef
81
- });
81
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
82
82
  }
83
83
  );
84
84
  PopoverAnchor.displayName = ANCHOR_NAME;
@@ -88,19 +88,18 @@ const PopoverTrigger = React.forwardRef((props, forwardedRef) => {
88
88
  const context = usePopoverInternalContext(TRIGGER_NAME, __scopePopover);
89
89
  const popperScope = usePopoverScope(__scopePopover);
90
90
  const composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
91
- const trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {
92
- "aria-haspopup": "dialog",
93
- "aria-expanded": context.open,
94
- "data-state": getState(context.open),
95
- ...triggerProps,
96
- ref: composedTriggerRef,
97
- onPress: (0, import_core.composeEventHandlers)(props.onPress, context.onOpenToggle)
98
- });
99
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, {
100
- asChild: true,
101
- ...popperScope,
102
- children: trigger
103
- });
91
+ const trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
+ import_stacks.YStack,
93
+ {
94
+ "aria-haspopup": "dialog",
95
+ "aria-expanded": context.open,
96
+ "data-state": getState(context.open),
97
+ ...triggerProps,
98
+ ref: composedTriggerRef,
99
+ onPress: (0, import_core.composeEventHandlers)(props.onPress, context.onOpenToggle)
100
+ }
101
+ );
102
+ return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, { asChild: true, ...popperScope, children: trigger });
104
103
  });
105
104
  PopoverTrigger.displayName = TRIGGER_NAME;
106
105
  const CONTENT_NAME = "PopoverContent";
@@ -123,9 +122,9 @@ const PopoverContent = React.forwardRef((props, forwardedRef) => {
123
122
  if (content)
124
123
  return (0, import_aria_hidden.hideOthers)(content);
125
124
  }, [context.open]);
126
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentPortal, {
127
- zIndex,
128
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentImpl, {
125
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentPortal, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
126
+ PopoverContentImpl,
127
+ {
129
128
  ...contentModalProps,
130
129
  disableRemoveScroll,
131
130
  ref: composedRefs,
@@ -152,8 +151,8 @@ const PopoverContent = React.forwardRef((props, forwardedRef) => {
152
151
  (event) => event.preventDefault(),
153
152
  { checkDefaultPrevented: false }
154
153
  )
155
- })
156
- });
154
+ }
155
+ ) });
157
156
  });
158
157
  function PopoverContentPortal(props) {
159
158
  const themeName = (0, import_core.useThemeName)();
@@ -161,34 +160,19 @@ function PopoverContentPortal(props) {
161
160
  let contents = props.children;
162
161
  if (import_react_native.Platform.OS === "android") {
163
162
  const popperContext = (0, import_popper.usePopperContext)(CONTENT_NAME, context.popperScope);
164
- contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperProvider, {
165
- ...popperContext,
166
- scope: context.popperScope,
167
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverProviderInternal, {
168
- scope: props.__scopePopover,
169
- ...context,
170
- children: props.children
171
- })
172
- });
163
+ contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperProvider, { ...popperContext, scope: context.popperScope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverProviderInternal, { scope: props.__scopePopover, ...context, children: props.children }) });
173
164
  }
174
165
  const zIndex = props.zIndex ?? 1e3;
175
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, {
176
- zIndex,
177
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Theme, {
178
- forceClassName: true,
179
- name: themeName,
180
- children: [
181
- !!context.open && !context.breakpointActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {
182
- fullscreen: true,
183
- onPress: (0, import_core.composeEventHandlers)(props.onPress, context.onOpenToggle)
184
- }),
185
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, {
186
- zIndex: zIndex + 1,
187
- children: contents
188
- })
189
- ]
190
- })
191
- });
166
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Theme, { forceClassName: true, name: themeName, children: [
167
+ !!context.open && !context.breakpointActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
+ import_stacks.YStack,
169
+ {
170
+ fullscreen: true,
171
+ onPress: (0, import_core.composeEventHandlers)(props.onPress, context.onOpenToggle)
172
+ }
173
+ ),
174
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { zIndex: zIndex + 1, children: contents })
175
+ ] }) });
192
176
  }
193
177
  const PopoverContentImpl = React.forwardRef((props, forwardedRef) => {
194
178
  const {
@@ -216,53 +200,58 @@ const PopoverContentImpl = React.forwardRef((props, forwardedRef) => {
216
200
  }
217
201
  return child;
218
202
  });
219
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, {
220
- hostName: `${context.scopeKey}SheetContents`,
221
- children: childrenWithoutScrollView
222
- });
203
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, { hostName: `${context.scopeKey}SheetContents`, children: childrenWithoutScrollView });
223
204
  }
224
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, {
225
- children: !!context.open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperContent, {
205
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.AnimatePresence, { children: !!context.open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
206
+ import_popper.PopperContent,
207
+ {
226
208
  "data-state": getState(context.open),
227
209
  id: context.contentId,
228
210
  pointerEvents: "auto",
229
211
  ref: forwardedRef,
230
212
  ...popperScope,
231
213
  ...contentProps,
232
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_remove_scroll.RemoveScroll, {
233
- enabled: disableRemoveScroll ? false : context.open,
234
- allowPinchZoom: true,
235
- removeScrollBar: false,
236
- style: {
237
- display: "contents"
238
- },
239
- children: trapFocus === false ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_focus_scope.FocusScope, {
240
- loop: true,
241
- trapped: trapFocus ?? context.open,
242
- onMountAutoFocus: onOpenAutoFocus,
243
- onUnmountAutoFocus: onCloseAutoFocus,
244
- children: import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
245
- style: { display: "contents" },
246
- children
247
- }) : children
248
- })
249
- })
250
- }, context.contentId)
251
- });
214
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
215
+ import_remove_scroll.RemoveScroll,
216
+ {
217
+ enabled: disableRemoveScroll ? false : context.open,
218
+ allowPinchZoom: true,
219
+ removeScrollBar: false,
220
+ style: {
221
+ display: "contents"
222
+ },
223
+ children: trapFocus === false ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
224
+ import_focus_scope.FocusScope,
225
+ {
226
+ loop: true,
227
+ trapped: trapFocus ?? context.open,
228
+ onMountAutoFocus: onOpenAutoFocus,
229
+ onUnmountAutoFocus: onCloseAutoFocus,
230
+ children: import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "contents" }, children }) : children
231
+ }
232
+ )
233
+ }
234
+ )
235
+ },
236
+ context.contentId
237
+ ) });
252
238
  });
253
239
  const CLOSE_NAME = "PopoverClose";
254
240
  const PopoverClose = React.forwardRef(
255
241
  (props, forwardedRef) => {
256
242
  const { __scopePopover, ...closeProps } = props;
257
243
  const context = usePopoverInternalContext(CLOSE_NAME, __scopePopover);
258
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_stacks.YStack, {
259
- ...closeProps,
260
- ref: forwardedRef,
261
- onPress: (0, import_core.composeEventHandlers)(
262
- props.onPress,
263
- () => context.onOpenChange(false)
264
- )
265
- });
244
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
245
+ import_stacks.YStack,
246
+ {
247
+ ...closeProps,
248
+ ref: forwardedRef,
249
+ onPress: (0, import_core.composeEventHandlers)(
250
+ props.onPress,
251
+ () => context.onOpenChange(false)
252
+ )
253
+ }
254
+ );
266
255
  }
267
256
  );
268
257
  PopoverClose.displayName = CLOSE_NAME;
@@ -271,19 +260,12 @@ const PopoverArrow = React.forwardRef(
271
260
  (props, forwardedRef) => {
272
261
  const { __scopePopover, ...arrowProps } = props;
273
262
  const popperScope = usePopoverScope(__scopePopover);
274
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperArrow, {
275
- ...popperScope,
276
- ...arrowProps,
277
- ref: forwardedRef
278
- });
263
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperArrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
279
264
  }
280
265
  );
281
266
  PopoverArrow.displayName = ARROW_NAME;
282
267
  const PopoverScrollView = React.forwardRef((props, ref) => {
283
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.ScrollView, {
284
- ref,
285
- ...props
286
- });
268
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.ScrollView, { ref, ...props });
287
269
  });
288
270
  const Popover = (0, import_core.withStaticProperties)(
289
271
  (props) => {
@@ -299,9 +281,7 @@ const Popover = (0, import_core.withStaticProperties)(
299
281
  const id = __scopePopover ? Object.keys(__scopePopover)[0] : internalId;
300
282
  const { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
301
283
  Contents: React.useCallback(() => {
302
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalHost, {
303
- name: `${id}SheetContents`
304
- });
284
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalHost, { name: `${id}SheetContents` });
305
285
  }, [])
306
286
  });
307
287
  const sheetBreakpoint = when;
@@ -323,6 +303,10 @@ const Popover = (0, import_core.withStaticProperties)(
323
303
  onOpenChange: setOpen
324
304
  });
325
305
  const { getReferenceProps, getFloatingProps } = (0, import_react_dom_interactions.useInteractions)([
306
+ // useFocus(floating.context, {
307
+ // enabled: !breakpointActive,
308
+ // keyboardOnly: true,
309
+ // }),
326
310
  (0, import_react_dom_interactions.useRole)(floating.context, { role: "dialog" }),
327
311
  (0, import_react_dom_interactions.useDismiss)(floating.context, {
328
312
  enabled: !breakpointActive
@@ -356,25 +340,8 @@ const Popover = (0, import_core.withStaticProperties)(
356
340
  onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),
357
341
  onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), [])
358
342
  };
359
- const contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, {
360
- ...popperScope,
361
- stayInFrame: true,
362
- ...restProps,
363
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverProviderInternal, {
364
- ...popoverContext,
365
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverSheetController, {
366
- onOpenChange: setOpen,
367
- __scopePopover,
368
- children
369
- })
370
- })
371
- });
372
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptProvider, {
373
- children: import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, {
374
- value: useFloatingContext,
375
- children: contents
376
- }) : contents
377
- });
343
+ const contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, { ...popperScope, stayInFrame: true, ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverProviderInternal, { ...popoverContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverSheetController, { onOpenChange: setOpen, __scopePopover, children }) }) });
344
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptProvider, { children: import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, { value: useFloatingContext, children: contents }) : contents });
378
345
  },
379
346
  {
380
347
  Anchor: PopoverAnchor,
@@ -399,16 +366,19 @@ const PopoverSheetController = (props) => {
399
366
  const showSheet = useShowPopoverSheet(context);
400
367
  const breakpointActive = context.breakpointActive;
401
368
  const getShowSheet = (0, import_core.useGet)(showSheet);
402
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sheet.SheetController, {
403
- onOpenChange: (val) => {
404
- if (getShowSheet()) {
405
- props.onOpenChange(val);
406
- }
407
- },
408
- open: context.open,
409
- hidden: breakpointActive === false,
410
- children: props.children
411
- });
369
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
370
+ import_sheet.SheetController,
371
+ {
372
+ onOpenChange: (val) => {
373
+ if (getShowSheet()) {
374
+ props.onOpenChange(val);
375
+ }
376
+ },
377
+ open: context.open,
378
+ hidden: breakpointActive === false,
379
+ children: props.children
380
+ }
381
+ );
412
382
  };
413
383
  const useSheetBreakpointActive = (breakpoint) => {
414
384
  const media = (0, import_core.useMedia)();
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/Popover.tsx"],
4
4
  "sourcesContent": ["// adapted from radix-ui popover\n\nimport '@tamagui/polyfill-dev'\n\nimport type { UseFloatingProps } from '@floating-ui/react-dom-interactions'\nimport {\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react-dom-interactions'\nimport { Adapt, useAdaptParent } from '@tamagui/adapt'\nimport { AnimatePresence } from '@tamagui/animate-presence'\nimport { hideOthers } from '@tamagui/aria-hidden'\nimport { useComposedRefs } from '@tamagui/compose-refs'\nimport {\n GestureReponderEvent,\n MediaQueryKey,\n SizeTokens,\n Stack,\n TamaguiElement,\n Theme,\n composeEventHandlers,\n isWeb,\n useEvent,\n useGet,\n useId,\n useMedia,\n useThemeName,\n withStaticProperties,\n} from '@tamagui/core'\nimport type { Scope } from '@tamagui/create-context'\nimport { createContextScope } from '@tamagui/create-context'\nimport { DismissableProps } from '@tamagui/dismissable'\nimport { FloatingOverrideContext } from '@tamagui/floating'\nimport { FocusScope, FocusScopeProps } from '@tamagui/focus-scope'\nimport {\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperArrowProps,\n PopperContent,\n PopperContentProps,\n PopperProps,\n PopperProvider,\n createPopperScope,\n usePopperContext,\n} from '@tamagui/popper'\nimport { Portal, PortalHost, PortalItem } from '@tamagui/portal'\nimport { RemoveScroll, RemoveScrollProps } from '@tamagui/remove-scroll'\nimport { ControlledSheet, SheetController } from '@tamagui/sheet'\nimport { SizableStack, XStack, YStack, YStackProps, ZStack } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\nimport * as React from 'react'\nimport { useEffect } from 'react'\nimport {\n GestureResponderEvent,\n Platform,\n ScrollView,\n ScrollViewProps,\n View,\n} from 'react-native'\n\nconst POPOVER_NAME = 'Popover'\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope }\n\nexport type PopoverProps = PopperProps & {\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<any>\n contentId?: string\n open: boolean\n onOpenChange(open: boolean): void\n onOpenToggle(): void\n hasCustomAnchor: boolean\n onCustomAnchorAdd(): void\n onCustomAnchorRemove(): void\n size?: SizeTokens\n sheetBreakpoint: any\n scopeKey: string\n popperScope: any\n breakpointActive?: boolean\n}\n\nconst [createPopoverContext, createPopoverScopeInternal] = createContextScope(\n POPOVER_NAME,\n [createPopperScope]\n)\nexport const usePopoverScope = createPopperScope()\nexport const createPopoverScope = createPopoverScopeInternal\n\nconst [PopoverProviderInternal, usePopoverInternalContext] =\n createPopoverContext<PopoverContextValue>(POPOVER_NAME)\n\nexport const __PopoverProviderInternal = PopoverProviderInternal\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/\n\nconst ANCHOR_NAME = 'PopoverAnchor'\n\ntype PopoverAnchorElement = HTMLElement | View\nexport type PopoverAnchorProps = YStackProps\n\nexport const PopoverAnchor = React.forwardRef<PopoverAnchorElement, PopoverAnchorProps>(\n (props: ScopedProps<PopoverAnchorProps>, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props\n const context = usePopoverInternalContext(ANCHOR_NAME, __scopePopover)\n const popperScope = usePopoverScope(__scopePopover)\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context\n\n React.useEffect(() => {\n onCustomAnchorAdd()\n return () => onCustomAnchorRemove()\n }, [onCustomAnchorAdd, onCustomAnchorRemove])\n\n return <PopperAnchor {...popperScope} {...anchorProps} ref={forwardedRef} />\n }\n)\n\nPopoverAnchor.displayName = ANCHOR_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/\n\nconst TRIGGER_NAME = 'PopoverTrigger'\n\ntype PopoverTriggerElement = HTMLElement | View\nexport type PopoverTriggerProps = YStackProps\n\nexport const PopoverTrigger = React.forwardRef<\n PopoverTriggerElement,\n PopoverTriggerProps\n>((props: ScopedProps<PopoverTriggerProps>, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props\n const context = usePopoverInternalContext(TRIGGER_NAME, __scopePopover)\n const popperScope = usePopoverScope(__scopePopover)\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef)\n\n const trigger = (\n <YStack\n aria-haspopup=\"dialog\"\n aria-expanded={context.open}\n // TODO not matching\n // aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onPress={composeEventHandlers(props.onPress as any, context.onOpenToggle)}\n />\n )\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperAnchor asChild {...popperScope}>\n {trigger}\n </PopperAnchor>\n )\n})\n\nPopoverTrigger.displayName = TRIGGER_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent'\n\nexport type PopoverContentProps = PopoverContentTypeProps\n\ntype PopoverContentTypeElement = PopoverContentImplElement\n\nexport interface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'disableOutsidePointerEvents'> {\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: RemoveScrollProps['allowPinchZoom']\n}\n\nexport const PopoverContent = React.forwardRef<\n PopoverContentTypeElement,\n PopoverContentTypeProps\n>((props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const {\n allowPinchZoom,\n trapFocus,\n disableRemoveScroll = true,\n zIndex,\n ...contentModalProps\n } = props\n const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover)\n const contentRef = React.useRef<any>(null)\n const composedRefs = useComposedRefs(forwardedRef, contentRef)\n const isRightClickOutsideRef = React.useRef(false)\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n React.useEffect(() => {\n if (!context.open) return\n const content = contentRef.current\n if (content) return hideOthers(content)\n }, [context.open])\n\n return (\n <PopoverContentPortal zIndex={zIndex}>\n <PopoverContentImpl\n {...contentModalProps}\n disableRemoveScroll={disableRemoveScroll}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n trapFocus={trapFocus ?? context.open}\n disableOutsidePointerEvents\n onCloseAutoFocus={composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault()\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus()\n })}\n onPointerDownOutside={composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent\n const ctrlLeftClick =\n originalEvent.button === 0 && originalEvent.ctrlKey === true\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick\n isRightClickOutsideRef.current = isRightClick\n },\n { checkDefaultPrevented: false }\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(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkDefaultPrevented: false }\n )}\n />\n </PopoverContentPortal>\n )\n})\n\nfunction PopoverContentPortal(props: ScopedProps<PopoverContentTypeProps>) {\n const themeName = useThemeName()\n const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover)\n\n // on android we have to re-pass context\n let contents = props.children\n\n if (Platform.OS === 'android') {\n // ok conditional hooks by platform\n const popperContext = usePopperContext(CONTENT_NAME, context.popperScope)\n\n contents = (\n <PopperProvider {...popperContext} scope={context.popperScope}>\n <PopoverProviderInternal scope={props.__scopePopover} {...context}>\n {/* does this need to be props.__scopePopper? */}\n {props.children}\n </PopoverProviderInternal>\n </PopperProvider>\n )\n }\n\n const zIndex = props.zIndex ?? 1000\n\n // Portal the contents and add a transparent bg overlay to handle dismiss on native\n return (\n <Portal zIndex={zIndex}>\n <Theme forceClassName name={themeName}>\n {!!context.open && !context.breakpointActive && (\n <YStack\n fullscreen\n onPress={composeEventHandlers(props.onPress as any, context.onOpenToggle)}\n />\n )}\n <Stack zIndex={(zIndex as number) + 1}>{contents}</Stack>\n </Theme>\n </Portal>\n )\n}\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ElementRef<typeof PopperContent>\n\nexport interface PopoverContentImplProps\n extends PopperContentProps,\n Omit<DismissableProps, 'onDismiss' | 'children'> {\n /**\n * Whether focus should be trapped within the `Popover`\n * (default: false)\n */\n trapFocus?: FocusScopeProps['trapped']\n\n /**\n * Event handler called when auto-focusing on open.\n * Can be prevented.\n */\n onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus']\n\n /**\n * Event handler called when auto-focusing on close.\n * Can be prevented.\n */\n onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus']\n\n disableRemoveScroll?: boolean\n}\n\nconst PopoverContentImpl = React.forwardRef<\n PopoverContentImplElement,\n PopoverContentImplProps\n>((props: ScopedProps<PopoverContentImplProps>, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n children,\n disableRemoveScroll,\n ...contentProps\n } = props\n const popperScope = usePopoverScope(__scopePopover)\n const context = usePopoverInternalContext(CONTENT_NAME, popperScope.__scopePopover)\n\n if (context.breakpointActive) {\n // unwrap the PopoverScrollView if used, as it will use the SheetScrollView if that exists\n const childrenWithoutScrollView = React.Children.toArray(children).map((child) => {\n if (React.isValidElement(child)) {\n if (child.type === PopoverScrollView) {\n return child.props.children\n }\n }\n return child\n })\n\n // doesn't show as popover yet on native, must use as sheet\n return (\n <PortalItem hostName={`${context.scopeKey}SheetContents`}>\n {childrenWithoutScrollView}\n </PortalItem>\n )\n }\n\n // const handleDismiss = React.useCallback((event: GestureResponderEvent) =>{\n // context.onOpenChange(false);\n // }, [])\n // <Dismissable\n // disableOutsidePointerEvents={disableOutsidePointerEvents}\n // // onInteractOutside={onInteractOutside}\n // onEscapeKeyDown={onEscapeKeyDown}\n // // onPointerDownOutside={onPointerDownOutside}\n // // onFocusOutside={onFocusOutside}\n // onDismiss={handleDismiss}\n // >\n\n return (\n <AnimatePresence>\n {!!context.open && (\n <PopperContent\n key={context.contentId}\n data-state={getState(context.open)}\n id={context.contentId}\n pointerEvents=\"auto\"\n ref={forwardedRef}\n {...popperScope}\n {...contentProps}\n >\n <RemoveScroll\n enabled={disableRemoveScroll ? false : context.open}\n allowPinchZoom\n // causes lots of bugs on touch web on site\n removeScrollBar={false}\n style={{\n display: 'contents',\n }}\n >\n {trapFocus === false ? (\n children\n ) : (\n <FocusScope\n loop\n trapped={trapFocus ?? context.open}\n onMountAutoFocus={onOpenAutoFocus}\n onUnmountAutoFocus={onCloseAutoFocus}\n >\n {isWeb ? <div style={{ display: 'contents' }}>{children}</div> : children}\n </FocusScope>\n )}\n </RemoveScroll>\n </PopperContent>\n )}\n </AnimatePresence>\n )\n})\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/\n\nconst CLOSE_NAME = 'PopoverClose'\n\ntype PopoverCloseElement = HTMLElement | View\nexport type PopoverCloseProps = YStackProps\n\nexport const PopoverClose = React.forwardRef<PopoverCloseElement, PopoverCloseProps>(\n (props: ScopedProps<PopoverCloseProps>, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props\n const context = usePopoverInternalContext(CLOSE_NAME, __scopePopover)\n return (\n <YStack\n {...closeProps}\n ref={forwardedRef}\n onPress={composeEventHandlers(props.onPress as any, () =>\n context.onOpenChange(false)\n )}\n />\n )\n }\n)\n\nPopoverClose.displayName = CLOSE_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/\n\nconst ARROW_NAME = 'PopoverArrow'\n\ntype PopoverArrowElement = HTMLElement | View\nexport type PopoverArrowProps = PopperArrowProps\n\nexport const PopoverArrow = React.forwardRef<PopoverArrowElement, PopoverArrowProps>(\n (props: ScopedProps<PopoverArrowProps>, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props\n const popperScope = usePopoverScope(__scopePopover)\n return <PopperArrow {...popperScope} {...arrowProps} ref={forwardedRef} />\n }\n)\n\nPopoverArrow.displayName = ARROW_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverScrollView\n * -----------------------------------------------------------------------------------------------*/\n\nconst PopoverScrollView = React.forwardRef<ScrollView, ScrollViewProps>((props, ref) => {\n return <ScrollView ref={ref} {...props} />\n})\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nexport const Popover = withStaticProperties(\n ((props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n ...restProps\n } = props\n\n const internalId = useId()\n const id = __scopePopover ? Object.keys(__scopePopover)[0] : internalId\n\n const { when, AdaptProvider } = useAdaptParent({\n Contents: React.useCallback(() => {\n return <PortalHost name={`${id}SheetContents`} />\n }, []),\n })\n\n const sheetBreakpoint = when\n const popperScope = usePopoverScope(__scopePopover)\n const triggerRef = React.useRef<TamaguiElement>(null)\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false)\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen || false,\n onChange: onOpenChange,\n transition: true,\n })\n\n const breakpointActive = useSheetBreakpointActive(sheetBreakpoint)\n\n // Custom floating context to override the Popper on web\n const useFloatingContext = React.useCallback(\n (props: UseFloatingProps) => {\n const floating = useFloating({\n ...props,\n open,\n onOpenChange: setOpen,\n })\n const { getReferenceProps, getFloatingProps } = useInteractions([\n // useFocus(floating.context, {\n // enabled: !breakpointActive,\n // keyboardOnly: true,\n // }),\n useRole(floating.context, { role: 'dialog' }),\n useDismiss(floating.context, {\n enabled: !breakpointActive,\n }),\n ])\n return {\n ...floating,\n getReferenceProps,\n getFloatingProps,\n }\n },\n [breakpointActive, open, setOpen]\n )\n\n const popoverContext = {\n scope: __scopePopover,\n scopeKey: id,\n popperScope: popperScope.__scopePopper,\n sheetBreakpoint,\n contentId: useId(),\n triggerRef,\n open,\n breakpointActive,\n onOpenChange: setOpen,\n onOpenToggle: useEvent(() => {\n if (open && breakpointActive) {\n return\n }\n setOpen(!open)\n }),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n }\n\n // debug if changing too often\n // if (process.env.NODE_ENV === 'development') {\n // Object.keys(popoverContext).forEach((key) => {\n // React.useEffect(() => console.log(`changed`, key), [popoverContext[key]])\n // })\n // }\n\n const contents = (\n <Popper {...popperScope} stayInFrame {...restProps}>\n <PopoverProviderInternal {...popoverContext}>\n <PopoverSheetController onOpenChange={setOpen} __scopePopover={__scopePopover}>\n {children}\n </PopoverSheetController>\n </PopoverProviderInternal>\n </Popper>\n )\n\n return (\n <AdaptProvider>\n {isWeb ? (\n <FloatingOverrideContext.Provider value={useFloatingContext as any}>\n {contents}\n </FloatingOverrideContext.Provider>\n ) : (\n contents\n )}\n </AdaptProvider>\n )\n }) as React.FC<PopoverProps>,\n {\n Anchor: PopoverAnchor,\n Arrow: PopoverArrow,\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n Close: PopoverClose,\n Adapt,\n ScrollView: PopoverScrollView,\n Sheet: ControlledSheet,\n }\n)\n\nPopover.displayName = POPOVER_NAME\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed'\n}\n\nconst PopoverSheetController = (\n props: ScopedProps<{\n children: React.ReactNode\n onOpenChange: React.Dispatch<React.SetStateAction<boolean>>\n }>\n) => {\n const context = usePopoverInternalContext(\n 'PopoverSheetController',\n props.__scopePopover\n )\n const showSheet = useShowPopoverSheet(context)\n const breakpointActive = context.breakpointActive\n const getShowSheet = useGet(showSheet)\n return (\n <SheetController\n onOpenChange={(val) => {\n if (getShowSheet()) {\n props.onOpenChange(val)\n }\n }}\n open={context.open}\n hidden={breakpointActive === false}\n >\n {props.children}\n </SheetController>\n )\n}\n\nconst useSheetBreakpointActive = (breakpoint?: MediaQueryKey | null | boolean) => {\n const media = useMedia()\n if (typeof breakpoint === 'boolean' || !breakpoint) {\n return !!breakpoint\n }\n return media[breakpoint]\n}\n\nconst useShowPopoverSheet = (context: PopoverContextValue) => {\n const breakpointActive = useSheetBreakpointActive(context.sheetBreakpoint)\n return context.open === false ? false : breakpointActive\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0HW;AAxHX,0BAAO;AAGP,oCAKO;AACP,mBAAsC;AACtC,8BAAgC;AAChC,yBAA2B;AAC3B,0BAAgC;AAChC,kBAeO;AAEP,4BAAmC;AAEnC,sBAAwC;AACxC,yBAA4C;AAC5C,oBAWO;AACP,oBAA+C;AAC/C,2BAAgD;AAChD,mBAAiD;AACjD,oBAAkE;AAClE,oCAAqC;AACrC,YAAuB;AAEvB,0BAMO;AAEP,MAAM,eAAe;AA0BrB,MAAM,CAAC,sBAAsB,0BAA0B,QAAI;AAAA,EACzD;AAAA,EACA,CAAC,+BAAiB;AACpB;AACO,MAAM,sBAAkB,iCAAkB;AAC1C,MAAM,qBAAqB;AAElC,MAAM,CAAC,yBAAyB,yBAAyB,IACvD,qBAA0C,YAAY;AAEjD,MAAM,4BAA4B;AAMzC,MAAM,cAAc;AAKb,MAAM,gBAAgB,MAAM;AAAA,EACjC,CAAC,OAAwC,iBAAiB;AACxD,UAAM,EAAE,mBAAmB,YAAY,IAAI;AAC3C,UAAM,UAAU,0BAA0B,aAAa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