@tamagui/popover 1.0.1-beta.73 → 1.0.1-beta.76

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.
@@ -1,3 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
1
32
  import "@tamagui/polyfill-dev";
2
33
  import {
3
34
  useDismiss,
@@ -38,7 +69,7 @@ const [PopoverProviderInternal, usePopoverInternalContext] = createPopoverContex
38
69
  const __PopoverProviderInternal = PopoverProviderInternal;
39
70
  const ANCHOR_NAME = "PopoverAnchor";
40
71
  const PopoverAnchor = React.forwardRef((props, forwardedRef) => {
41
- const { __scopePopover, ...anchorProps } = props;
72
+ const _a = props, { __scopePopover } = _a, anchorProps = __objRest(_a, ["__scopePopover"]);
42
73
  const context = usePopoverInternalContext(ANCHOR_NAME, __scopePopover);
43
74
  const popperScope = usePopoverScope(__scopePopover);
44
75
  const { onCustomAnchorAdd, onCustomAnchorRemove } = context;
@@ -46,48 +77,43 @@ const PopoverAnchor = React.forwardRef((props, forwardedRef) => {
46
77
  onCustomAnchorAdd();
47
78
  return () => onCustomAnchorRemove();
48
79
  }, [onCustomAnchorAdd, onCustomAnchorRemove]);
49
- return /* @__PURE__ */ React.createElement(PopperAnchor, {
50
- ...popperScope,
51
- ...anchorProps,
80
+ return /* @__PURE__ */ React.createElement(PopperAnchor, __spreadProps(__spreadValues(__spreadValues({}, popperScope), anchorProps), {
52
81
  ref: forwardedRef
53
- });
82
+ }));
54
83
  });
55
84
  PopoverAnchor.displayName = ANCHOR_NAME;
56
85
  const TRIGGER_NAME = "PopoverTrigger";
57
86
  const PopoverTrigger = React.forwardRef((props, forwardedRef) => {
58
- const { __scopePopover, ...triggerProps } = props;
87
+ const _a = props, { __scopePopover } = _a, triggerProps = __objRest(_a, ["__scopePopover"]);
59
88
  const context = usePopoverInternalContext(TRIGGER_NAME, __scopePopover);
60
89
  const popperScope = usePopoverScope(__scopePopover);
61
90
  const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
62
- const trigger = /* @__PURE__ */ React.createElement(YStack, {
91
+ const trigger = /* @__PURE__ */ React.createElement(YStack, __spreadProps(__spreadValues({
63
92
  "aria-haspopup": "dialog",
64
93
  "aria-expanded": context.open,
65
94
  "aria-controls": context.contentId,
66
- "data-state": getState(context.open),
67
- ...triggerProps,
95
+ "data-state": getState(context.open)
96
+ }, triggerProps), {
68
97
  ref: composedTriggerRef,
69
98
  onPress: composeEventHandlers(props.onPress, context.onOpenToggle)
70
- });
71
- return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React.createElement(PopperAnchor, {
72
- asChild: true,
73
- ...popperScope
74
- }, trigger);
99
+ }));
100
+ return context.hasCustomAnchor ? trigger : /* @__PURE__ */ React.createElement(PopperAnchor, __spreadValues({
101
+ asChild: true
102
+ }, popperScope), trigger);
75
103
  });
76
104
  PopoverTrigger.displayName = TRIGGER_NAME;
77
105
  const CONTENT_NAME = "PopoverContent";
78
106
  const PopoverContent = React.forwardRef((props, forwardedRef) => {
79
107
  const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover);
80
- return context.modal ? /* @__PURE__ */ React.createElement(PopoverContentModal, {
81
- ...props,
108
+ return context.modal ? /* @__PURE__ */ React.createElement(PopoverContentModal, __spreadProps(__spreadValues({}, props), {
82
109
  ref: forwardedRef
83
- }) : /* @__PURE__ */ React.createElement(PopoverContentNonModal, {
84
- ...props,
110
+ })) : /* @__PURE__ */ React.createElement(PopoverContentNonModal, __spreadProps(__spreadValues({}, props), {
85
111
  ref: forwardedRef
86
- });
112
+ }));
87
113
  });
88
114
  PopoverContent.displayName = CONTENT_NAME;
89
115
  const PopoverContentModal = React.forwardRef((props, forwardedRef) => {
90
- const { allowPinchZoom, ...contentModalProps } = props;
116
+ const _a = props, { allowPinchZoom } = _a, contentModalProps = __objRest(_a, ["allowPinchZoom"]);
91
117
  const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover);
92
118
  const contentRef = React.useRef(null);
93
119
  const composedRefs = useComposedRefs(forwardedRef, contentRef);
@@ -96,16 +122,15 @@ const PopoverContentModal = React.forwardRef((props, forwardedRef) => {
96
122
  const PortalWrapper = context.modal ? Portal : React.Fragment;
97
123
  return /* @__PURE__ */ React.createElement(PortalWrapper, null, /* @__PURE__ */ React.createElement(Theme, {
98
124
  name: themeName
99
- }, /* @__PURE__ */ React.createElement(PopoverContentImpl, {
100
- ...contentModalProps,
125
+ }, /* @__PURE__ */ React.createElement(PopoverContentImpl, __spreadProps(__spreadValues({}, contentModalProps), {
101
126
  ref: composedRefs,
102
127
  trapFocus: context.open,
103
128
  disableOutsidePointerEvents: true,
104
129
  onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
105
- var _a;
130
+ var _a2;
106
131
  event.preventDefault();
107
132
  if (!isRightClickOutsideRef.current)
108
- (_a = context.triggerRef.current) == null ? void 0 : _a.focus();
133
+ (_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
109
134
  }),
110
135
  onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
111
136
  const originalEvent = event.detail.originalEvent;
@@ -114,15 +139,14 @@ const PopoverContentModal = React.forwardRef((props, forwardedRef) => {
114
139
  isRightClickOutsideRef.current = isRightClick;
115
140
  }, { checkDefaultPrevented: false }),
116
141
  onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault(), { checkDefaultPrevented: false })
117
- })));
142
+ }))));
118
143
  });
119
144
  const PopoverContentNonModal = React.forwardRef((props, forwardedRef) => {
120
- const { ...contentNonModalProps } = props;
145
+ const contentNonModalProps = __objRest(props, []);
121
146
  const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover);
122
147
  const hasInteractedOutsideRef = React.useRef(false);
123
148
  const PortalWrapper = context.modal ? Portal : React.Fragment;
124
- return /* @__PURE__ */ React.createElement(PortalWrapper, null, /* @__PURE__ */ React.createElement(PopoverContentImpl, {
125
- ...contentNonModalProps,
149
+ return /* @__PURE__ */ React.createElement(PortalWrapper, null, /* @__PURE__ */ React.createElement(PopoverContentImpl, __spreadProps(__spreadValues({}, contentNonModalProps), {
126
150
  ref: forwardedRef,
127
151
  trapFocus: false,
128
152
  disableOutsidePointerEvents: false,
@@ -146,10 +170,10 @@ const PopoverContentNonModal = React.forwardRef((props, forwardedRef) => {
146
170
  if (targetIsTrigger)
147
171
  event.preventDefault();
148
172
  }
149
- }));
173
+ })));
150
174
  });
151
175
  const PopoverContentImpl = React.forwardRef((props, forwardedRef) => {
152
- const {
176
+ const _a = props, {
153
177
  __scopePopover,
154
178
  trapFocus,
155
179
  onOpenAutoFocus,
@@ -158,52 +182,63 @@ const PopoverContentImpl = React.forwardRef((props, forwardedRef) => {
158
182
  onEscapeKeyDown,
159
183
  onPointerDownOutside,
160
184
  onFocusOutside,
161
- onInteractOutside,
162
- ...contentProps
163
- } = props;
185
+ onInteractOutside
186
+ } = _a, contentProps = __objRest(_a, [
187
+ "__scopePopover",
188
+ "trapFocus",
189
+ "onOpenAutoFocus",
190
+ "onCloseAutoFocus",
191
+ "disableOutsidePointerEvents",
192
+ "onEscapeKeyDown",
193
+ "onPointerDownOutside",
194
+ "onFocusOutside",
195
+ "onInteractOutside"
196
+ ]);
164
197
  const context = usePopoverInternalContext(CONTENT_NAME, __scopePopover);
165
198
  const popperScope = usePopoverScope(__scopePopover);
166
- return /* @__PURE__ */ React.createElement(AnimatePresence, null, !!context.open && /* @__PURE__ */ React.createElement(PopperContent, {
199
+ return /* @__PURE__ */ React.createElement(AnimatePresence, null, !!context.open && /* @__PURE__ */ React.createElement(PopperContent, __spreadProps(__spreadValues(__spreadValues({
167
200
  "data-state": getState(context.open),
168
201
  id: context.contentId,
169
- pointerEvents: "auto",
170
- ...popperScope,
171
- ...contentProps,
202
+ pointerEvents: "auto"
203
+ }, popperScope), contentProps), {
172
204
  ref: forwardedRef
173
- }));
205
+ })));
174
206
  });
175
207
  const CLOSE_NAME = "PopoverClose";
176
208
  const PopoverClose = React.forwardRef((props, forwardedRef) => {
177
- const { __scopePopover, ...closeProps } = props;
209
+ const _a = props, { __scopePopover } = _a, closeProps = __objRest(_a, ["__scopePopover"]);
178
210
  const context = usePopoverInternalContext(CLOSE_NAME, __scopePopover);
179
- return /* @__PURE__ */ React.createElement(YStack, {
180
- ...closeProps,
211
+ return /* @__PURE__ */ React.createElement(YStack, __spreadProps(__spreadValues({}, closeProps), {
181
212
  ref: forwardedRef,
182
213
  onPress: composeEventHandlers(props.onPress, () => context.onOpenChange(false))
183
- });
214
+ }));
184
215
  });
185
216
  PopoverClose.displayName = CLOSE_NAME;
186
217
  const ARROW_NAME = "PopoverArrow";
187
218
  const PopoverArrow = React.forwardRef((props, forwardedRef) => {
188
- const { __scopePopover, ...arrowProps } = props;
219
+ const _a = props, { __scopePopover } = _a, arrowProps = __objRest(_a, ["__scopePopover"]);
189
220
  const popperScope = usePopoverScope(__scopePopover);
190
- return /* @__PURE__ */ React.createElement(PopperArrow, {
191
- ...popperScope,
192
- ...arrowProps,
221
+ return /* @__PURE__ */ React.createElement(PopperArrow, __spreadProps(__spreadValues(__spreadValues({}, popperScope), arrowProps), {
193
222
  ref: forwardedRef
194
- });
223
+ }));
195
224
  });
196
225
  PopoverArrow.displayName = ARROW_NAME;
197
226
  const Popover = withStaticProperties((props) => {
198
- const {
227
+ const _a = props, {
199
228
  __scopePopover,
200
229
  children,
201
230
  open: openProp,
202
231
  defaultOpen,
203
232
  onOpenChange,
204
- modal = true,
205
- ...restProps
206
- } = props;
233
+ modal = true
234
+ } = _a, restProps = __objRest(_a, [
235
+ "__scopePopover",
236
+ "children",
237
+ "open",
238
+ "defaultOpen",
239
+ "onOpenChange",
240
+ "modal"
241
+ ]);
207
242
  const popperScope = usePopoverScope(__scopePopover);
208
243
  const triggerRef = React.useRef(null);
209
244
  const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);
@@ -213,29 +248,24 @@ const Popover = withStaticProperties((props) => {
213
248
  onChange: onOpenChange
214
249
  });
215
250
  const useFloatingFn = (props2) => {
216
- const floating = useFloating({
217
- ...props2,
251
+ const floating = useFloating(__spreadProps(__spreadValues({}, props2), {
218
252
  open,
219
253
  onOpenChange: setOpen
220
- });
254
+ }));
221
255
  const { getReferenceProps, getFloatingProps } = useInteractions([
222
256
  useFocus(floating.context),
223
257
  useRole(floating.context, { role: "dialog" }),
224
258
  useDismiss(floating.context)
225
259
  ]);
226
- return {
227
- ...floating,
260
+ return __spreadProps(__spreadValues({}, floating), {
228
261
  getReferenceProps,
229
262
  getFloatingProps
230
- };
263
+ });
231
264
  };
232
265
  const useFloatingContext = React.useCallback(useFloatingFn, [open]);
233
266
  return /* @__PURE__ */ React.createElement(FloatingOverrideContext.Provider, {
234
267
  value: useFloatingContext
235
- }, /* @__PURE__ */ React.createElement(Popper, {
236
- ...popperScope,
237
- ...restProps
238
- }, /* @__PURE__ */ React.createElement(PopoverProviderInternal, {
268
+ }, /* @__PURE__ */ React.createElement(Popper, __spreadValues(__spreadValues({}, popperScope), restProps), /* @__PURE__ */ React.createElement(PopoverProviderInternal, {
239
269
  scope: __scopePopover,
240
270
  contentId: useId(),
241
271
  triggerRef,
@@ -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 {\n useDismiss,\n useFloating,\n useFocus,\n useInteractions,\n useRole,\n} from '@floating-ui/react-dom-interactions'\nimport { AnimatePresence } from '@tamagui/animate-presence'\nimport { useComposedRefs } from '@tamagui/compose-refs'\nimport {\n Theme,\n composeEventHandlers,\n useId,\n useThemeName,\n withStaticProperties,\n} from '@tamagui/core'\nimport type { Scope } from '@tamagui/create-context'\nimport { createContextScope } from '@tamagui/create-context'\n// import { DismissableLayer } from '@tamagui/react-dismissable-layer'\n// import { useFocusGuards } from '@tamagui/react-focus-guards'\n// import { FocusScope } from '@tamagui/react-focus-scope'\nimport {\n FloatingOverrideContext,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n PopperContentProps,\n PopperProps,\n UseFloatingFn,\n createPopperScope,\n} from '@tamagui/popper'\nimport { Portal } from '@tamagui/portal'\nimport { YStack, YStackProps } from '@tamagui/stacks'\nimport { useControllableState } from '@tamagui/use-controllable-state'\n// import { hideOthers } from 'aria-hidden'\nimport * as React from 'react'\nimport { GestureResponderEvent, View } from 'react-native'\n\n// import { RemoveScroll } from 'react-remove-scroll'\n\nconst POPOVER_NAME = 'Popover'\n\ntype ScopedProps<P> = P & { __scopePopover?: Scope }\nconst [createPopoverContext, createPopoverScopeInternal] = createContextScope(POPOVER_NAME, [\n createPopperScope,\n])\nexport const usePopoverScope = createPopperScope()\nexport const createPopoverScope = createPopoverScopeInternal\n\ntype PopoverContextValue = {\n triggerRef: React.RefObject<HTMLButtonElement>\n contentId?: string\n open: boolean\n onOpenChange(open: boolean): void\n onOpenToggle(): void\n hasCustomAnchor: boolean\n onCustomAnchorAdd(): void\n onCustomAnchorRemove(): void\n modal: boolean\n}\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<PopoverTriggerElement, 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 aria-controls={context.contentId}\n data-state={getState(context.open)}\n {...triggerProps}\n ref={composedTriggerRef}\n onPress={composeEventHandlers(props.onPress, context.onOpenToggle)}\n />\n )\n\n return context.hasCustomAnchor ? (\n trigger\n ) : (\n <PopperAnchor asChild {...popperScope}>\n {trigger}\n </PopperAnchor>\n )\n }\n)\n\nPopoverTrigger.displayName = TRIGGER_NAME\n\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/\n\nconst CONTENT_NAME = 'PopoverContent'\n\nexport interface PopoverContentTypeProps\n extends Omit<PopoverContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {\n /**\n * @see https://github.com/theKashey/react-remove-scroll#usage\n */\n allowPinchZoom?: RemoveScrollProps['allowPinchZoom']\n}\n\nexport type PopoverContentProps = PopoverContentTypeProps\n\nexport const PopoverContent = React.forwardRef<PopoverContentTypeElement, PopoverContentProps>(\n (props: ScopedProps<PopoverContentProps>, forwardedRef) => {\n const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover)\n return context.modal ? (\n <PopoverContentModal {...props} ref={forwardedRef} />\n ) : (\n <PopoverContentNonModal {...props} ref={forwardedRef} />\n )\n }\n)\n\nPopoverContent.displayName = CONTENT_NAME\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype RemoveScrollProps = any //React.ComponentProps<typeof RemoveScroll>\ntype PopoverContentTypeElement = PopoverContentImplElement\n\nconst PopoverContentModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const { allowPinchZoom, ...contentModalProps } = props\n const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover)\n const contentRef = React.useRef<HTMLDivElement>(null)\n const composedRefs = useComposedRefs(forwardedRef, contentRef)\n const isRightClickOutsideRef = React.useRef(false)\n const themeName = useThemeName()\n\n // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n // React.useEffect(() => {\n // const content = contentRef.current\n // if (content) return hideOthers(content)\n // }, [])\n\n const PortalWrapper = context.modal ? Portal : React.Fragment\n\n return (\n <PortalWrapper>\n <Theme name={themeName}>\n {/* <RemoveScroll allowPinchZoom={allowPinchZoom}> */}\n <PopoverContentImpl\n {...contentModalProps}\n ref={composedRefs}\n // we make sure we're not trapping once it's been closed\n // (closed !== unmounted when animating out)\n 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 // @ts-expect-error\n const originalEvent = event.detail.originalEvent\n const ctrlLeftClick = 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 </Theme>\n {/* </RemoveScroll> */}\n </PortalWrapper>\n )\n }\n)\n\nconst PopoverContentNonModal = React.forwardRef<PopoverContentTypeElement, PopoverContentTypeProps>(\n (props: ScopedProps<PopoverContentTypeProps>, forwardedRef) => {\n const { ...contentNonModalProps } = props\n const context = usePopoverInternalContext(CONTENT_NAME, props.__scopePopover)\n const hasInteractedOutsideRef = React.useRef(false)\n const PortalWrapper = context.modal ? Portal : React.Fragment\n\n return (\n <PortalWrapper>\n <PopoverContentImpl\n {...contentNonModalProps}\n ref={forwardedRef}\n trapFocus={false}\n disableOutsidePointerEvents={false}\n onCloseAutoFocus={(event) => {\n props.onCloseAutoFocus?.(event)\n\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus()\n // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault()\n }\n\n hasInteractedOutsideRef.current = false\n }}\n onInteractOutside={(event) => {\n props.onInteractOutside?.(event)\n\n if (!event.defaultPrevented) hasInteractedOutsideRef.current = true\n\n // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n //\n // We use `onInteractOutside` as some browsers also\n // focus on pointer down, creating the same issue.\n // @ts-ignore\n const target = event.target as HTMLElement\n const targetIsTrigger = context.triggerRef.current?.contains(target)\n if (targetIsTrigger) event.preventDefault()\n }}\n />\n </PortalWrapper>\n )\n }\n)\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PopoverContentImplElement = React.ElementRef<typeof PopperContent>\n\n// TODO\ntype FocusScopeProps = {\n /**\n * Whether focus should be trapped within the FocusScope\n * (default: false)\n */\n trapped?: boolean\n\n /**\n * Event handler called when auto-focusing on mount.\n * Can be prevented.\n */\n onMountAutoFocus?: (event: GestureResponderEvent) => void\n\n /**\n * Event handler called when auto-focusing on unmount.\n * Can be prevented.\n */\n onUnmountAutoFocus?: (event: GestureResponderEvent) => void\n}\n\ntype DismissableLayerProps = {\n /**\n * When `true`, hover/focus/click interactions will be disabled on elements outside the `DismissableLayer`.\n * Users will need to click twice on outside elements to interact with them:\n * Once to close the `DismissableLayer`, and again to trigger the element.\n */\n disableOutsidePointerEvents?: boolean\n\n /**\n * Event handler called when the escape key is down.\n * Can be prevented.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when the a pointer event happens outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onPointerDownOutside?: (event: GestureResponderEvent) => void\n // onPointerDownOutside?: (event: MouseEvent | TouchEvent) => void\n\n /**\n * Event handler called when the focus moves outside of the `DismissableLayer`.\n * Can be prevented.\n */\n onFocusOutside?: (event: React.FocusEvent) => void\n\n /**\n * Event handler called when an interaction happens outside the `DismissableLayer`.\n * Specifically, when a pointer event happens outside of the `DismissableLayer` or focus moves outside of it.\n * Can be prevented.\n */\n onInteractOutside?: (event: GestureResponderEvent) => void\n // onInteractOutside?: (event: MouseEvent | TouchEvent | React.FocusEvent) => void\n\n /** Callback called when the `DismissableLayer` should be dismissed */\n onDismiss?: () => void\n}\n\nexport interface PopoverContentImplProps\n extends PopperContentProps,\n Omit<DismissableLayerProps, 'onDismiss'> {\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\nconst PopoverContentImpl = React.forwardRef<PopoverContentImplElement, 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 ...contentProps\n } = props\n const context = usePopoverInternalContext(CONTENT_NAME, __scopePopover)\n const popperScope = usePopoverScope(__scopePopover)\n\n // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (beacuse of the `Portal`)\n // useFocusGuards()\n\n // <FocusScope\n // asChild\n // loop\n // trapped={trapFocus}\n // onMountAutoFocus={onOpenAutoFocus}\n // onUnmountAutoFocus={onCloseAutoFocus}\n // >\n // <DismissableLayer\n // asChild\n // disableOutsidePointerEvents={disableOutsidePointerEvents}\n // onInteractOutside={onInteractOutside}\n // onEscapeKeyDown={onEscapeKeyDown}\n // onPointerDownOutside={onPointerDownOutside}\n // onFocusOutside={onFocusOutside}\n // onDismiss={() => context.onOpenChange(false)}\n // >\n return (\n <AnimatePresence>\n {!!context.open && (\n <PopperContent\n data-state={getState(context.open)}\n // role=\"dialog\"\n id={context.contentId}\n pointerEvents=\"auto\"\n {...popperScope}\n {...contentProps}\n ref={forwardedRef}\n />\n )}\n </AnimatePresence>\n )\n // </DismissableLayer>\n // </FocusScope>\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, () => context.onOpenChange(false))}\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 = YStackProps\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 * Popover\n * -----------------------------------------------------------------------------------------------*/\n\nexport type PopoverProps = PopperProps & {\n open?: boolean\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n modal?: boolean\n}\n\nexport const Popover = withStaticProperties(\n ((props: ScopedProps<PopoverProps>) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true,\n ...restProps\n } = props\n const popperScope = usePopoverScope(__scopePopover)\n const triggerRef = React.useRef<HTMLButtonElement>(null)\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false)\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen || false,\n onChange: onOpenChange,\n })\n\n const useFloatingFn: UseFloatingFn = (props) => {\n const floating = useFloating({\n ...props,\n open,\n onOpenChange: setOpen,\n })\n const { getReferenceProps, getFloatingProps } = useInteractions([\n useFocus(floating.context),\n useRole(floating.context, { role: 'dialog' }),\n useDismiss(floating.context),\n ])\n return {\n ...floating,\n getReferenceProps,\n getFloatingProps,\n } as any\n }\n\n const useFloatingContext = React.useCallback(useFloatingFn, [open])\n\n return (\n <FloatingOverrideContext.Provider value={useFloatingContext}>\n <Popper {...popperScope} {...restProps}>\n <PopoverProviderInternal\n scope={__scopePopover}\n contentId={useId()}\n triggerRef={triggerRef}\n open={open}\n onOpenChange={setOpen}\n onOpenToggle={React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen])}\n hasCustomAnchor={hasCustomAnchor}\n onCustomAnchorAdd={React.useCallback(() => setHasCustomAnchor(true), [])}\n onCustomAnchorRemove={React.useCallback(() => setHasCustomAnchor(false), [])}\n modal={modal}\n >\n {children}\n </PopoverProviderInternal>\n </Popper>\n </FloatingOverrideContext.Provider>\n )\n }) as React.FC<PopoverProps>,\n {\n Anchor: PopoverAnchor,\n Arrow: PopoverArrow,\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n Close: PopoverClose,\n }\n)\n\nPopover.displayName = POPOVER_NAME\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction getState(open: boolean) {\n return open ? 'open' : 'closed'\n}\n"],
5
- "mappings": "AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA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": "1.0.1-beta.76",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -22,15 +22,15 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@floating-ui/react-dom-interactions": "^0.5.0",
25
- "@tamagui/animate-presence": "^1.0.1-beta.73",
26
- "@tamagui/compose-refs": "^1.0.1-beta.73",
27
- "@tamagui/core": "^1.0.1-beta.73",
28
- "@tamagui/create-context": "^1.0.1-beta.73",
29
- "@tamagui/polyfill-dev": "^1.0.1-beta.73",
30
- "@tamagui/popper": "^1.0.1-beta.73",
31
- "@tamagui/portal": "^1.0.1-beta.73",
32
- "@tamagui/stacks": "^1.0.1-beta.73",
33
- "@tamagui/use-controllable-state": "^1.0.1-beta.73"
25
+ "@tamagui/animate-presence": "^1.0.1-beta.76",
26
+ "@tamagui/compose-refs": "^1.0.1-beta.76",
27
+ "@tamagui/core": "^1.0.1-beta.76",
28
+ "@tamagui/create-context": "^1.0.1-beta.76",
29
+ "@tamagui/polyfill-dev": "^1.0.1-beta.76",
30
+ "@tamagui/popper": "^1.0.1-beta.76",
31
+ "@tamagui/portal": "^1.0.1-beta.76",
32
+ "@tamagui/stacks": "^1.0.1-beta.76",
33
+ "@tamagui/use-controllable-state": "^1.0.1-beta.76"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "*",
@@ -38,7 +38,7 @@
38
38
  "react-native": "*"
39
39
  },
40
40
  "devDependencies": {
41
- "@tamagui/build": "^1.0.1-beta.73",
41
+ "@tamagui/build": "^1.0.1-beta.76",
42
42
  "@types/react-dom": "^18.0.3",
43
43
  "@types/react-native": "^0.67.3",
44
44
  "react": "*",