@tamagui/popover 1.68.6 → 1.69.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.
- package/dist/cjs/Popover.js +111 -90
- package/dist/cjs/Popover.js.map +1 -1
- package/dist/cjs/Popover.native.js +111 -90
- package/dist/cjs/Popover.native.js.map +1 -1
- package/dist/esm/Popover.js +110 -89
- package/dist/esm/Popover.js.map +1 -1
- package/dist/jsx/Popover.js +93 -82
- package/dist/jsx/Popover.js.map +1 -1
- package/dist/jsx/Popover.native.js +94 -83
- package/dist/jsx/Popover.native.js.map +1 -1
- package/package.json +18 -18
- package/src/Popover.tsx +178 -132
- package/types/Popover.d.ts +29 -9
- package/types/Popover.d.ts.map +1 -1
package/dist/cjs/Popover.js
CHANGED
|
@@ -33,77 +33,80 @@ __export(Popover_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Popover_exports);
|
|
35
35
|
var import_polyfill_dev = require("@tamagui/polyfill-dev"), import_adapt = require("@tamagui/adapt"), import_animate = require("@tamagui/animate"), import_aria_hidden = require("@tamagui/aria-hidden"), import_compose_refs = require("@tamagui/compose-refs"), import_core = require("@tamagui/core"), import_floating = require("@tamagui/floating"), import_focus_scope = require("@tamagui/focus-scope"), import_popper = require("@tamagui/popper"), import_portal = require("@tamagui/portal"), import_remove_scroll = require("@tamagui/remove-scroll"), import_sheet = require("@tamagui/sheet"), import_stacks = require("@tamagui/stacks"), import_use_controllable_state = require("@tamagui/use-controllable-state"), React = __toESM(require("react")), import_react_freeze = require("react-freeze"), import_react_native = require("react-native"), import_useFloatingContext = require("./useFloatingContext"), import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
const PopoverContext = (0, import_core.createStyledContext)({}), usePopoverContext =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
const POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = React.forwardRef(function(props, forwardedRef) {
|
|
37
|
+
const { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
38
|
+
return React.useEffect(() => (onCustomAnchorAdd(), () => onCustomAnchorRemove()), [onCustomAnchorAdd, onCustomAnchorRemove]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
+
import_popper.PopperAnchor,
|
|
40
|
+
{
|
|
41
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
42
|
+
...rest,
|
|
43
|
+
ref: forwardedRef
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}), PopoverTrigger = React.forwardRef(function(props, forwardedRef) {
|
|
47
|
+
const { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef), trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
+
import_core.View,
|
|
49
|
+
{
|
|
50
|
+
"aria-haspopup": "dialog",
|
|
51
|
+
"aria-expanded": context.open,
|
|
52
|
+
"data-state": getState(context.open),
|
|
53
|
+
...rest,
|
|
54
|
+
ref: composedTriggerRef,
|
|
55
|
+
onPress: (0, import_core.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, { __scopePopper: __scopePopover || POPOVER_SCOPE, asChild: !0, children: trigger });
|
|
59
|
+
}), PopoverContent = import_popper.PopperContentFrame.extractable(
|
|
60
|
+
React.forwardRef(function(props, forwardedRef) {
|
|
61
|
+
const {
|
|
62
|
+
allowPinchZoom,
|
|
63
|
+
trapFocus,
|
|
64
|
+
disableRemoveScroll = !0,
|
|
65
|
+
zIndex,
|
|
66
|
+
__scopePopover,
|
|
67
|
+
...contentImplProps
|
|
68
|
+
} = props, context = usePopoverContext(__scopePopover), contentRef = React.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React.useRef(!1);
|
|
69
|
+
return React.useEffect(() => {
|
|
70
|
+
if (!context.open)
|
|
71
|
+
return;
|
|
72
|
+
const content = contentRef.current;
|
|
73
|
+
if (content)
|
|
74
|
+
return (0, import_aria_hidden.hideOthers)(content);
|
|
75
|
+
}, [context.open]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentPortal, { __scopePopover, zIndex: props.zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { pointerEvents: context.open ? "auto" : "none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
|
+
PopoverContentImpl,
|
|
45
77
|
{
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
78
|
+
...contentImplProps,
|
|
79
|
+
disableRemoveScroll,
|
|
80
|
+
ref: composedRefs,
|
|
81
|
+
__scopePopover,
|
|
82
|
+
trapFocus: trapFocus ?? context.open,
|
|
83
|
+
disableOutsidePointerEvents: !0,
|
|
84
|
+
onCloseAutoFocus: (0, import_core.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
|
85
|
+
var _a;
|
|
86
|
+
event.preventDefault(), isRightClickOutsideRef.current || (_a = context.triggerRef.current) == null || _a.focus();
|
|
87
|
+
}),
|
|
88
|
+
onPointerDownOutside: (0, import_core.composeEventHandlers)(
|
|
89
|
+
props.onPointerDownOutside,
|
|
90
|
+
(event) => {
|
|
91
|
+
const originalEvent = event.detail.originalEvent, ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === !0, isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
92
|
+
isRightClickOutsideRef.current = isRightClick;
|
|
93
|
+
},
|
|
94
|
+
{ checkDefaultPrevented: !1 }
|
|
95
|
+
),
|
|
96
|
+
onFocusOutside: (0, import_core.composeEventHandlers)(
|
|
97
|
+
props.onFocusOutside,
|
|
98
|
+
(event) => event.preventDefault(),
|
|
99
|
+
{ checkDefaultPrevented: !1 }
|
|
100
|
+
)
|
|
52
101
|
}
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
), PopoverContent = import_popper.PopperContentFrame.extractable(
|
|
57
|
-
React.forwardRef(
|
|
58
|
-
function(props, forwardedRef) {
|
|
59
|
-
const {
|
|
60
|
-
allowPinchZoom,
|
|
61
|
-
trapFocus,
|
|
62
|
-
disableRemoveScroll = !0,
|
|
63
|
-
zIndex,
|
|
64
|
-
...contentImplProps
|
|
65
|
-
} = props, context = usePopoverContext(), contentRef = React.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React.useRef(!1);
|
|
66
|
-
return React.useEffect(() => {
|
|
67
|
-
if (!context.open)
|
|
68
|
-
return;
|
|
69
|
-
const content = contentRef.current;
|
|
70
|
-
if (content)
|
|
71
|
-
return (0, import_aria_hidden.hideOthers)(content);
|
|
72
|
-
}, [context.open]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentPortal, { zIndex: props.zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { pointerEvents: context.open ? "auto" : "none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
73
|
-
PopoverContentImpl,
|
|
74
|
-
{
|
|
75
|
-
...contentImplProps,
|
|
76
|
-
disableRemoveScroll,
|
|
77
|
-
ref: composedRefs,
|
|
78
|
-
trapFocus: trapFocus ?? context.open,
|
|
79
|
-
disableOutsidePointerEvents: !0,
|
|
80
|
-
onCloseAutoFocus: (0, import_core.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
|
81
|
-
var _a;
|
|
82
|
-
event.preventDefault(), isRightClickOutsideRef.current || (_a = context.triggerRef.current) == null || _a.focus();
|
|
83
|
-
}),
|
|
84
|
-
onPointerDownOutside: (0, import_core.composeEventHandlers)(
|
|
85
|
-
props.onPointerDownOutside,
|
|
86
|
-
(event) => {
|
|
87
|
-
const originalEvent = event.detail.originalEvent, ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === !0, isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
88
|
-
isRightClickOutsideRef.current = isRightClick;
|
|
89
|
-
},
|
|
90
|
-
{ checkDefaultPrevented: !1 }
|
|
91
|
-
),
|
|
92
|
-
onFocusOutside: (0, import_core.composeEventHandlers)(
|
|
93
|
-
props.onFocusOutside,
|
|
94
|
-
(event) => event.preventDefault(),
|
|
95
|
-
{ checkDefaultPrevented: !1 }
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
) }) });
|
|
99
|
-
}
|
|
100
|
-
)
|
|
102
|
+
) }) });
|
|
103
|
+
})
|
|
101
104
|
);
|
|
102
105
|
function PopoverRepropagateContext(props) {
|
|
103
106
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperContext.Provider, { ...props.popperContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, { ...props.context, children: props.children }) });
|
|
104
107
|
}
|
|
105
108
|
function PopoverContentPortal(props) {
|
|
106
|
-
const zIndex = props.zIndex ?? 15e4, context = usePopoverContext(), popperContext = (0, import_popper.usePopperContext)(), themeName = (0, import_core.useThemeName)();
|
|
109
|
+
const { __scopePopover } = props, zIndex = props.zIndex ?? 15e4, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core.useThemeName)();
|
|
107
110
|
let contents = props.children;
|
|
108
111
|
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverRepropagateContext, { popperContext, context, children: props.children })), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Theme, { forceClassName: !0, name: themeName, children: [
|
|
109
112
|
!!context.open && !context.breakpointActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -119,6 +122,7 @@ function PopoverContentPortal(props) {
|
|
|
119
122
|
const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
120
123
|
const {
|
|
121
124
|
trapFocus,
|
|
125
|
+
__scopePopover,
|
|
122
126
|
onOpenAutoFocus,
|
|
123
127
|
onCloseAutoFocus,
|
|
124
128
|
disableOutsidePointerEvents,
|
|
@@ -131,13 +135,20 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
131
135
|
disableRemoveScroll,
|
|
132
136
|
freezeContentsWhenHidden,
|
|
133
137
|
...contentProps
|
|
134
|
-
} = props, context = usePopoverContext(), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(), [isFullyHidden, setIsFullyHidden] = React.useState(!context.open), contents = React.useMemo(() => import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "contents" }, children }) : children, [children]);
|
|
138
|
+
} = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), [isFullyHidden, setIsFullyHidden] = React.useState(!context.open), contents = React.useMemo(() => import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "contents" }, children }) : children, [children]);
|
|
135
139
|
if (open && isFullyHidden && setIsFullyHidden(!1), !keepChildrenMounted && isFullyHidden)
|
|
136
140
|
return null;
|
|
137
141
|
if (context.breakpointActive) {
|
|
138
142
|
const childrenWithoutScrollView = React.Children.toArray(children).map((child) => React.isValidElement(child) && child.type === import_react_native.ScrollView ? child.props.children : child);
|
|
139
143
|
let content = childrenWithoutScrollView;
|
|
140
|
-
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
|
+
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
145
|
+
import_popper.PopperContext.Provider,
|
|
146
|
+
{
|
|
147
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
148
|
+
...popperContext,
|
|
149
|
+
children: childrenWithoutScrollView
|
|
150
|
+
}
|
|
151
|
+
)), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, { hostName: `${context.id}PopoverContents`, children: content });
|
|
141
152
|
}
|
|
142
153
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
143
154
|
import_animate.Animate,
|
|
@@ -155,6 +166,7 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
155
166
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
156
167
|
import_popper.PopperContent,
|
|
157
168
|
{
|
|
169
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
158
170
|
"data-state": getState(open),
|
|
159
171
|
id: context.contentId,
|
|
160
172
|
ref: forwardedRef,
|
|
@@ -191,33 +203,39 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
191
203
|
}), FreezeToLastContents = (props) => {
|
|
192
204
|
const last = React.useRef();
|
|
193
205
|
return props.freeze || (last.current = props.children), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_freeze.Freeze, { placeholder: last.current, ...props });
|
|
194
|
-
}, PopoverClose = React.forwardRef(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
onPress
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
206
|
+
}, PopoverClose = React.forwardRef(function(props, forwardedRef) {
|
|
207
|
+
const { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
209
|
+
import_stacks.YStack,
|
|
210
|
+
{
|
|
211
|
+
...rest,
|
|
212
|
+
ref: forwardedRef,
|
|
213
|
+
componentName: "PopoverClose",
|
|
214
|
+
onPress: (0, import_core.composeEventHandlers)(
|
|
215
|
+
props.onPress,
|
|
216
|
+
() => context.onOpenChange(!1)
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}), PopoverArrow = React.forwardRef(function(props, forwardedRef) {
|
|
221
|
+
const { __scopePopover, ...rest } = props;
|
|
222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
223
|
+
import_popper.PopperArrow,
|
|
224
|
+
{
|
|
225
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
226
|
+
componentName: "PopoverArrow",
|
|
227
|
+
...rest,
|
|
228
|
+
ref: forwardedRef
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
}), Popover = (0, import_core.withStaticProperties)(
|
|
215
232
|
function(props) {
|
|
216
233
|
const {
|
|
217
234
|
children,
|
|
218
235
|
open: openProp,
|
|
219
236
|
defaultOpen,
|
|
220
237
|
onOpenChange,
|
|
238
|
+
__scopePopover,
|
|
221
239
|
keepChildrenMounted,
|
|
222
240
|
...restProps
|
|
223
241
|
} = props, id = React.useId(), { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
@@ -241,7 +259,7 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
241
259
|
onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(!0), []),
|
|
242
260
|
onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(!1), []),
|
|
243
261
|
keepChildrenMounted
|
|
244
|
-
}, contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, { stayInFrame: !0, ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, { ...popoverContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverSheetController, { onOpenChange: setOpen, children }) }) });
|
|
262
|
+
}, contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, { __scopePopper: __scopePopover || POPOVER_SCOPE, stayInFrame: !0, ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, { scope: __scopePopover, ...popoverContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverSheetController, { onOpenChange: setOpen, children }) }) });
|
|
245
263
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptProvider, { children: import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, { value: floatingContext, children: contents }) : contents });
|
|
246
264
|
},
|
|
247
265
|
{
|
|
@@ -258,8 +276,11 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
258
276
|
function getState(open) {
|
|
259
277
|
return open ? "open" : "closed";
|
|
260
278
|
}
|
|
261
|
-
const PopoverSheetController = (
|
|
262
|
-
|
|
279
|
+
const PopoverSheetController = ({
|
|
280
|
+
__scopePopover,
|
|
281
|
+
...props
|
|
282
|
+
}) => {
|
|
283
|
+
const context = usePopoverContext(__scopePopover), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core.useGet)(showSheet);
|
|
263
284
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
264
285
|
import_sheet.SheetController,
|
|
265
286
|
{
|
package/dist/cjs/Popover.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 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AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP;AAAA,IACA,YAAY;AAAA,IACZ,OAAO,mBAAM;AAAA,EACf;AACF;AAIA,SAAS,SAAS,MAAe;AAC/B,SAAO,OAAO,SAAS;AACzB;AAEA,MAAM,yBAAyB,CAAC;AAAA,EAC9B;AAAA,EACA,GAAG;AACL,MAGO;AACL,QAAM,UAAU,kBAAkB,cAAc,GAC1C,YAAY,oBAAoB,OAAO,GACvC,mBAAmB,QAAQ,kBAC3B,mBAAe,oBAAO,SAAS;AAErC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAc,CAAC,QAAQ;AACrB,QAAI,aAAa,KACf,MAAM,aAAa,GAAG;AAAA,MAE1B;AAAA,MACA,MAAM,QAAQ;AAAA,MACd,QAAQ,qBAAqB;AAAA,MAE5B,gBAAM;AAAA;AAAA,EACT;AAEJ,GAEM,2BAA2B,CAAC,eAAgD;AAChF,QAAM,YAAQ,sBAAS;AACvB,SAAI,OAAO,cAAe,aAAa,CAAC,aAC/B,CAAC,CAAC,aAEJ,MAAM,UAAU;AACzB,GAEM,sBAAsB,CAAC,YAAiC;AAC5D,QAAM,mBAAmB,yBAAyB,QAAQ,eAAe;AACzE,SAAO,QAAQ,SAAS,KAAQ,KAAQ;AAC1C;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -34,77 +34,80 @@ __export(Popover_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(Popover_exports);
|
|
36
36
|
var import_polyfill_dev = require("@tamagui/polyfill-dev"), import_adapt = require("@tamagui/adapt"), import_animate = require("@tamagui/animate"), import_aria_hidden = require("@tamagui/aria-hidden"), import_compose_refs = require("@tamagui/compose-refs"), import_core = require("@tamagui/core"), import_floating = require("@tamagui/floating"), import_focus_scope = require("@tamagui/focus-scope"), import_popper = require("@tamagui/popper"), import_portal = require("@tamagui/portal"), import_remove_scroll = require("@tamagui/remove-scroll"), import_sheet = require("@tamagui/sheet"), import_stacks = require("@tamagui/stacks"), import_use_controllable_state = require("@tamagui/use-controllable-state"), React = __toESM(require("react")), import_react_freeze = require("react-freeze"), import_react_native = require("react-native"), import_useFloatingContext = require("./useFloatingContext"), import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
-
const PopoverContext = (0, import_core.createStyledContext)({}), usePopoverContext =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
37
|
+
const POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = React.forwardRef(function(props, forwardedRef) {
|
|
38
|
+
const { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
39
|
+
return React.useEffect(() => (onCustomAnchorAdd(), () => onCustomAnchorRemove()), [onCustomAnchorAdd, onCustomAnchorRemove]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
import_popper.PopperAnchor,
|
|
41
|
+
{
|
|
42
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
43
|
+
...rest,
|
|
44
|
+
ref: forwardedRef
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}), PopoverTrigger = React.forwardRef(function(props, forwardedRef) {
|
|
48
|
+
const { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef), trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
49
|
+
import_core.View,
|
|
50
|
+
{
|
|
51
|
+
"aria-haspopup": "dialog",
|
|
52
|
+
"aria-expanded": context.open,
|
|
53
|
+
"data-state": getState(context.open),
|
|
54
|
+
...rest,
|
|
55
|
+
ref: composedTriggerRef,
|
|
56
|
+
onPress: (0, import_core.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, { __scopePopper: __scopePopover || POPOVER_SCOPE, asChild: !0, children: trigger });
|
|
60
|
+
}), PopoverContent = import_popper.PopperContentFrame.extractable(
|
|
61
|
+
React.forwardRef(function(props, forwardedRef) {
|
|
62
|
+
const {
|
|
63
|
+
allowPinchZoom,
|
|
64
|
+
trapFocus,
|
|
65
|
+
disableRemoveScroll = !0,
|
|
66
|
+
zIndex,
|
|
67
|
+
__scopePopover,
|
|
68
|
+
...contentImplProps
|
|
69
|
+
} = props, context = usePopoverContext(__scopePopover), contentRef = React.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React.useRef(!1);
|
|
70
|
+
return React.useEffect(() => {
|
|
71
|
+
if (!context.open)
|
|
72
|
+
return;
|
|
73
|
+
const content = contentRef.current;
|
|
74
|
+
if (content)
|
|
75
|
+
return (0, import_aria_hidden.hideOthers)(content);
|
|
76
|
+
}, [context.open]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentPortal, { __scopePopover, zIndex: props.zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { pointerEvents: context.open ? "auto" : "none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
PopoverContentImpl,
|
|
46
78
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
79
|
+
...contentImplProps,
|
|
80
|
+
disableRemoveScroll,
|
|
81
|
+
ref: composedRefs,
|
|
82
|
+
__scopePopover,
|
|
83
|
+
trapFocus: trapFocus ?? context.open,
|
|
84
|
+
disableOutsidePointerEvents: !0,
|
|
85
|
+
onCloseAutoFocus: (0, import_core.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
|
86
|
+
var _a;
|
|
87
|
+
event.preventDefault(), isRightClickOutsideRef.current || (_a = context.triggerRef.current) == null || _a.focus();
|
|
88
|
+
}),
|
|
89
|
+
onPointerDownOutside: (0, import_core.composeEventHandlers)(
|
|
90
|
+
props.onPointerDownOutside,
|
|
91
|
+
(event) => {
|
|
92
|
+
const originalEvent = event.detail.originalEvent, ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === !0, isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
93
|
+
isRightClickOutsideRef.current = isRightClick;
|
|
94
|
+
},
|
|
95
|
+
{ checkDefaultPrevented: !1 }
|
|
96
|
+
),
|
|
97
|
+
onFocusOutside: (0, import_core.composeEventHandlers)(
|
|
98
|
+
props.onFocusOutside,
|
|
99
|
+
(event) => event.preventDefault(),
|
|
100
|
+
{ checkDefaultPrevented: !1 }
|
|
101
|
+
)
|
|
53
102
|
}
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
), PopoverContent = import_popper.PopperContentFrame.extractable(
|
|
58
|
-
React.forwardRef(
|
|
59
|
-
function(props, forwardedRef) {
|
|
60
|
-
const {
|
|
61
|
-
allowPinchZoom,
|
|
62
|
-
trapFocus,
|
|
63
|
-
disableRemoveScroll = !0,
|
|
64
|
-
zIndex,
|
|
65
|
-
...contentImplProps
|
|
66
|
-
} = props, context = usePopoverContext(), contentRef = React.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React.useRef(!1);
|
|
67
|
-
return React.useEffect(() => {
|
|
68
|
-
if (!context.open)
|
|
69
|
-
return;
|
|
70
|
-
const content = contentRef.current;
|
|
71
|
-
if (content)
|
|
72
|
-
return (0, import_aria_hidden.hideOthers)(content);
|
|
73
|
-
}, [context.open]), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContentPortal, { zIndex: props.zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { pointerEvents: context.open ? "auto" : "none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
-
PopoverContentImpl,
|
|
75
|
-
{
|
|
76
|
-
...contentImplProps,
|
|
77
|
-
disableRemoveScroll,
|
|
78
|
-
ref: composedRefs,
|
|
79
|
-
trapFocus: trapFocus ?? context.open,
|
|
80
|
-
disableOutsidePointerEvents: !0,
|
|
81
|
-
onCloseAutoFocus: (0, import_core.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
|
82
|
-
var _a;
|
|
83
|
-
event.preventDefault(), isRightClickOutsideRef.current || (_a = context.triggerRef.current) == null || _a.focus();
|
|
84
|
-
}),
|
|
85
|
-
onPointerDownOutside: (0, import_core.composeEventHandlers)(
|
|
86
|
-
props.onPointerDownOutside,
|
|
87
|
-
(event) => {
|
|
88
|
-
const originalEvent = event.detail.originalEvent, ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === !0, isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
89
|
-
isRightClickOutsideRef.current = isRightClick;
|
|
90
|
-
},
|
|
91
|
-
{ checkDefaultPrevented: !1 }
|
|
92
|
-
),
|
|
93
|
-
onFocusOutside: (0, import_core.composeEventHandlers)(
|
|
94
|
-
props.onFocusOutside,
|
|
95
|
-
(event) => event.preventDefault(),
|
|
96
|
-
{ checkDefaultPrevented: !1 }
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
) }) });
|
|
100
|
-
}
|
|
101
|
-
)
|
|
103
|
+
) }) });
|
|
104
|
+
})
|
|
102
105
|
);
|
|
103
106
|
function PopoverRepropagateContext(props) {
|
|
104
107
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperContext.Provider, { ...props.popperContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, { ...props.context, children: props.children }) });
|
|
105
108
|
}
|
|
106
109
|
function PopoverContentPortal(props) {
|
|
107
|
-
const zIndex = props.zIndex ?? 15e4, context = usePopoverContext(), popperContext = (0, import_popper.usePopperContext)(), themeName = (0, import_core.useThemeName)();
|
|
110
|
+
const { __scopePopover } = props, zIndex = props.zIndex ?? 15e4, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core.useThemeName)();
|
|
108
111
|
let contents = props.children;
|
|
109
112
|
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverRepropagateContext, { popperContext, context, children: props.children })), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.Portal, { zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Theme, { forceClassName: !0, name: themeName, children: [
|
|
110
113
|
!!context.open && !context.breakpointActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -120,6 +123,7 @@ function PopoverContentPortal(props) {
|
|
|
120
123
|
const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
121
124
|
const {
|
|
122
125
|
trapFocus,
|
|
126
|
+
__scopePopover,
|
|
123
127
|
onOpenAutoFocus,
|
|
124
128
|
onCloseAutoFocus,
|
|
125
129
|
disableOutsidePointerEvents,
|
|
@@ -132,13 +136,20 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
132
136
|
disableRemoveScroll,
|
|
133
137
|
freezeContentsWhenHidden,
|
|
134
138
|
...contentProps
|
|
135
|
-
} = props, context = usePopoverContext(), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(), [isFullyHidden, setIsFullyHidden] = React.useState(!context.open), contents = React.useMemo(() => import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "contents" }, children }) : children, [children]);
|
|
139
|
+
} = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), [isFullyHidden, setIsFullyHidden] = React.useState(!context.open), contents = React.useMemo(() => import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "contents" }, children }) : children, [children]);
|
|
136
140
|
if (open && isFullyHidden && setIsFullyHidden(!1), !keepChildrenMounted && isFullyHidden)
|
|
137
141
|
return null;
|
|
138
142
|
if (context.breakpointActive) {
|
|
139
143
|
const childrenWithoutScrollView = React.Children.toArray(children).map((child) => React.isValidElement(child) && child.type === import_react_native.ScrollView ? child.props.children : child);
|
|
140
144
|
let content = childrenWithoutScrollView;
|
|
141
|
-
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
145
|
+
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
146
|
+
import_popper.PopperContext.Provider,
|
|
147
|
+
{
|
|
148
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
149
|
+
...popperContext,
|
|
150
|
+
children: childrenWithoutScrollView
|
|
151
|
+
}
|
|
152
|
+
)), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalItem, { hostName: `${context.id}PopoverContents`, children: content });
|
|
142
153
|
}
|
|
143
154
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
144
155
|
import_animate.Animate,
|
|
@@ -156,6 +167,7 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
156
167
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
157
168
|
import_popper.PopperContent,
|
|
158
169
|
{
|
|
170
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
159
171
|
"data-state": getState(open),
|
|
160
172
|
id: context.contentId,
|
|
161
173
|
ref: forwardedRef,
|
|
@@ -192,33 +204,39 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
192
204
|
}), FreezeToLastContents = (props) => {
|
|
193
205
|
const last = React.useRef();
|
|
194
206
|
return props.freeze || (last.current = props.children), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_freeze.Freeze, { placeholder: last.current, ...props });
|
|
195
|
-
}, PopoverClose = React.forwardRef(
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
onPress
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
207
|
+
}, PopoverClose = React.forwardRef(function(props, forwardedRef) {
|
|
208
|
+
const { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
210
|
+
import_stacks.YStack,
|
|
211
|
+
{
|
|
212
|
+
...rest,
|
|
213
|
+
ref: forwardedRef,
|
|
214
|
+
componentName: "PopoverClose",
|
|
215
|
+
onPress: (0, import_core.composeEventHandlers)(
|
|
216
|
+
props.onPress,
|
|
217
|
+
() => context.onOpenChange(!1)
|
|
218
|
+
)
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
}), PopoverArrow = React.forwardRef(function(props, forwardedRef) {
|
|
222
|
+
const { __scopePopover, ...rest } = props;
|
|
223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
224
|
+
import_popper.PopperArrow,
|
|
225
|
+
{
|
|
226
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
227
|
+
componentName: "PopoverArrow",
|
|
228
|
+
...rest,
|
|
229
|
+
ref: forwardedRef
|
|
230
|
+
}
|
|
231
|
+
);
|
|
232
|
+
}), Popover = (0, import_core.withStaticProperties)(
|
|
216
233
|
function(props) {
|
|
217
234
|
const {
|
|
218
235
|
children,
|
|
219
236
|
open: openProp,
|
|
220
237
|
defaultOpen,
|
|
221
238
|
onOpenChange,
|
|
239
|
+
__scopePopover,
|
|
222
240
|
keepChildrenMounted,
|
|
223
241
|
...restProps
|
|
224
242
|
} = props, id = React.useId(), { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
@@ -242,7 +260,7 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
242
260
|
onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(!0), []),
|
|
243
261
|
onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(!1), []),
|
|
244
262
|
keepChildrenMounted
|
|
245
|
-
}, contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, { stayInFrame: !0, ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, { ...popoverContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverSheetController, { onOpenChange: setOpen, children }) }) });
|
|
263
|
+
}, contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.Popper, { __scopePopper: __scopePopover || POPOVER_SCOPE, stayInFrame: !0, ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, { scope: __scopePopover, ...popoverContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverSheetController, { onOpenChange: setOpen, children }) }) });
|
|
246
264
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AdaptProvider, { children: import_core.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, { value: floatingContext, children: contents }) : contents });
|
|
247
265
|
},
|
|
248
266
|
{
|
|
@@ -259,8 +277,11 @@ const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
|
259
277
|
function getState(open) {
|
|
260
278
|
return open ? "open" : "closed";
|
|
261
279
|
}
|
|
262
|
-
const PopoverSheetController = (
|
|
263
|
-
|
|
280
|
+
const PopoverSheetController = ({
|
|
281
|
+
__scopePopover,
|
|
282
|
+
...props
|
|
283
|
+
}) => {
|
|
284
|
+
const context = usePopoverContext(__scopePopover), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core.useGet)(showSheet);
|
|
264
285
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
265
286
|
import_sheet.SheetController,
|
|
266
287
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Popover.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAO,kCAEP,eAAsC,2BACtC,iBAAwB,6BACxB,qBAA2B,iCAC3B,sBAAgC,kCAChC,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAO,kCAEP,eAAsC,2BACtC,iBAAwB,6BACxB,qBAA2B,iCAC3B,sBAAgC,kCAChC,cAiBO,0BAEP,kBAAwC,8BACxC,qBAA4C,iCAC5C,gBAWO,4BACP,gBAA+C,4BAC/C,uBAAgD,mCAChD,eAAuC,2BACvC,gBAAoC,4BACpC,gCAAqC,4CACrC,QAAuB,2BACvB,sBAAuB,yBACvB,sBAAqC,yBAErC,4BAAmC,iCAuD/B;AA1BJ,MAAM,gBAAgB,gBAET,qBAAiB,iCAAyC,CAAC,CAAQ,GAEnE,oBAAoB,eAAe,kBAQnC,gBAAgB,MAAM,WAGjC,SAAuB,OAA+C,cAAc;AACpF,QAAM,EAAE,gBAAgB,GAAG,KAAK,IAAI,OAC9B,UAAU,kBAAkB,cAAc,GAC1C,EAAE,mBAAmB,qBAAqB,IAAI,WAAW,CAAC;AAEhE,eAAM,UAAU,O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