@tamagui/popover 1.116.1 → 1.116.3
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 +343 -0
- package/dist/cjs/index.js +16 -0
- package/dist/cjs/useFloatingContext.js +74 -0
- package/package.json +20 -20
- package/types/Popover.d.ts +1 -19
- package/types/Popover.d.ts.map +1 -1
- package/dist/cjs/useFloatingContext.native.cjs +0 -38
- package/dist/cjs/useFloatingContext.native.cjs.map +0 -6
- /package/dist/cjs/{Popover.cjs.map → Popover.js.map} +0 -0
- /package/dist/cjs/{index.cjs.map → index.js.map} +0 -0
- /package/dist/cjs/{useFloatingContext.cjs.map → useFloatingContext.js.map} +0 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var Popover_exports = {};
|
|
24
|
+
__export(Popover_exports, {
|
|
25
|
+
Popover: () => Popover,
|
|
26
|
+
PopoverAnchor: () => PopoverAnchor,
|
|
27
|
+
PopoverArrow: () => PopoverArrow,
|
|
28
|
+
PopoverClose: () => PopoverClose,
|
|
29
|
+
PopoverContent: () => PopoverContent,
|
|
30
|
+
PopoverContext: () => PopoverContext,
|
|
31
|
+
PopoverTrigger: () => PopoverTrigger,
|
|
32
|
+
usePopoverContext: () => usePopoverContext
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Popover_exports);
|
|
35
|
+
var import_polyfill_dev = require("@tamagui/polyfill-dev"), import_adapt = require("@tamagui/adapt"), import_animate = require("@tamagui/animate"), import_animate_presence = require("@tamagui/animate-presence"), import_aria_hidden = require("@tamagui/aria-hidden"), import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_floating = require("@tamagui/floating"), import_focus_scope = require("@tamagui/focus-scope"), import_helpers = require("@tamagui/helpers"), 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_native = require("react-native-web"), import_useFloatingContext = require("./useFloatingContext"), import_jsx_runtime = require("react/jsx-runtime");
|
|
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), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
48
|
+
if (!props.children) return null;
|
|
49
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
50
|
+
import_core.View,
|
|
51
|
+
{
|
|
52
|
+
"aria-expanded": context.open,
|
|
53
|
+
"data-state": getState(context.open),
|
|
54
|
+
...rest,
|
|
55
|
+
ref: composedTriggerRef,
|
|
56
|
+
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
if (anchorTo) {
|
|
60
|
+
const virtualRef = {
|
|
61
|
+
current: {
|
|
62
|
+
getBoundingClientRect: () => import_constants.isWeb ? DOMRect.fromRect(anchorTo) : anchorTo,
|
|
63
|
+
...!import_constants.isWeb && {
|
|
64
|
+
measure: (c) => c(anchorTo?.x, anchorTo?.y, anchorTo?.width, anchorTo?.height),
|
|
65
|
+
measureInWindow: (c) => c(anchorTo?.x, anchorTo?.y, anchorTo?.width, anchorTo?.height)
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
import_popper.PopperAnchor,
|
|
71
|
+
{
|
|
72
|
+
virtualRef,
|
|
73
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
74
|
+
children: trigger
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperAnchor, { __scopePopper: __scopePopover || POPOVER_SCOPE, asChild: !0, children: trigger });
|
|
79
|
+
}), PopoverContent = import_popper.PopperContentFrame.extractable(
|
|
80
|
+
React.forwardRef(function(props, forwardedRef) {
|
|
81
|
+
const {
|
|
82
|
+
allowPinchZoom,
|
|
83
|
+
trapFocus,
|
|
84
|
+
disableRemoveScroll = !0,
|
|
85
|
+
zIndex,
|
|
86
|
+
__scopePopover,
|
|
87
|
+
...contentImplProps
|
|
88
|
+
} = props, context = usePopoverContext(__scopePopover), contentRef = React.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React.useRef(!1), [isFullyHidden, setIsFullyHidden] = React.useState(!context.open);
|
|
89
|
+
return context.open && isFullyHidden && setIsFullyHidden(!1), React.useEffect(() => {
|
|
90
|
+
if (!context.open) return;
|
|
91
|
+
const content = contentRef.current;
|
|
92
|
+
if (content) return (0, import_aria_hidden.hideOthers)(content);
|
|
93
|
+
}, [context.open]), !context.keepChildrenMounted && isFullyHidden ? null : /* @__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)(
|
|
94
|
+
PopoverContentImpl,
|
|
95
|
+
{
|
|
96
|
+
...contentImplProps,
|
|
97
|
+
disableRemoveScroll,
|
|
98
|
+
ref: composedRefs,
|
|
99
|
+
setIsFullyHidden,
|
|
100
|
+
__scopePopover,
|
|
101
|
+
trapFocus: trapFocus ?? context.open,
|
|
102
|
+
disableOutsidePointerEvents: !0,
|
|
103
|
+
onCloseAutoFocus: (0, import_helpers.composeEventHandlers)(props.onCloseAutoFocus, (event) => {
|
|
104
|
+
event.preventDefault(), isRightClickOutsideRef.current || context.triggerRef.current?.focus();
|
|
105
|
+
}),
|
|
106
|
+
onPointerDownOutside: (0, import_helpers.composeEventHandlers)(
|
|
107
|
+
props.onPointerDownOutside,
|
|
108
|
+
(event) => {
|
|
109
|
+
const originalEvent = event.detail.originalEvent, ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === !0, isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
110
|
+
isRightClickOutsideRef.current = isRightClick;
|
|
111
|
+
},
|
|
112
|
+
{ checkDefaultPrevented: !1 }
|
|
113
|
+
),
|
|
114
|
+
onFocusOutside: (0, import_helpers.composeEventHandlers)(
|
|
115
|
+
props.onFocusOutside,
|
|
116
|
+
(event) => event.preventDefault(),
|
|
117
|
+
{ checkDefaultPrevented: !1 }
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
) }) });
|
|
121
|
+
})
|
|
122
|
+
);
|
|
123
|
+
function PopoverRepropagateContext(props) {
|
|
124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popper.PopperContext.Provider, { scope: props.scope, ...props.popperContext, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverContext.Provider, { ...props.context, children: props.children }) });
|
|
125
|
+
}
|
|
126
|
+
function PopoverContentPortal(props) {
|
|
127
|
+
const { __scopePopover } = props, zIndex = props.zIndex ?? 15e4, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core.useThemeName)();
|
|
128
|
+
let contents = props.children;
|
|
129
|
+
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
130
|
+
PopoverRepropagateContext,
|
|
131
|
+
{
|
|
132
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
133
|
+
popperContext,
|
|
134
|
+
context,
|
|
135
|
+
children: props.children
|
|
136
|
+
}
|
|
137
|
+
)), /* @__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: [
|
|
138
|
+
!!context.open && !context.breakpointActive && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
139
|
+
import_stacks.YStack,
|
|
140
|
+
{
|
|
141
|
+
fullscreen: !0,
|
|
142
|
+
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
contents
|
|
146
|
+
] }) });
|
|
147
|
+
}
|
|
148
|
+
const PopoverContentImpl = React.forwardRef(function(props, forwardedRef) {
|
|
149
|
+
const {
|
|
150
|
+
trapFocus,
|
|
151
|
+
__scopePopover,
|
|
152
|
+
onOpenAutoFocus,
|
|
153
|
+
onCloseAutoFocus,
|
|
154
|
+
disableOutsidePointerEvents,
|
|
155
|
+
disableFocusScope,
|
|
156
|
+
onEscapeKeyDown,
|
|
157
|
+
onPointerDownOutside,
|
|
158
|
+
onFocusOutside,
|
|
159
|
+
onInteractOutside,
|
|
160
|
+
children,
|
|
161
|
+
disableRemoveScroll,
|
|
162
|
+
freezeContentsWhenHidden,
|
|
163
|
+
setIsFullyHidden,
|
|
164
|
+
...contentProps
|
|
165
|
+
} = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), handleExitComplete = React.useCallback(() => {
|
|
166
|
+
setIsFullyHidden?.(!0);
|
|
167
|
+
}, [setIsFullyHidden]);
|
|
168
|
+
if (context.breakpointActive) {
|
|
169
|
+
const childrenWithoutScrollView = React.Children.toArray(children).map((child) => React.isValidElement(child) && child.type === import_react_native.ScrollView ? child.props.children : child);
|
|
170
|
+
let content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.ResetPresence, { children: childrenWithoutScrollView });
|
|
171
|
+
return (import_react_native.Platform.OS === "android" || import_react_native.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
172
|
+
import_popper.PopperContext.Provider,
|
|
173
|
+
{
|
|
174
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
175
|
+
...popperContext,
|
|
176
|
+
children: childrenWithoutScrollView
|
|
177
|
+
}
|
|
178
|
+
)), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptPortalContents, { children: content });
|
|
179
|
+
}
|
|
180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
181
|
+
import_animate.Animate,
|
|
182
|
+
{
|
|
183
|
+
type: "presence",
|
|
184
|
+
present: !!open,
|
|
185
|
+
keepChildrenMounted,
|
|
186
|
+
onExitComplete: handleExitComplete,
|
|
187
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
188
|
+
import_popper.PopperContent,
|
|
189
|
+
{
|
|
190
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
191
|
+
"data-state": getState(open),
|
|
192
|
+
id: context.contentId,
|
|
193
|
+
ref: forwardedRef,
|
|
194
|
+
...contentProps,
|
|
195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
196
|
+
import_remove_scroll.RemoveScroll,
|
|
197
|
+
{
|
|
198
|
+
enabled: disableRemoveScroll ? !1 : open,
|
|
199
|
+
allowPinchZoom: !0,
|
|
200
|
+
removeScrollBar: !1,
|
|
201
|
+
style: dspContentsStyle,
|
|
202
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_animate_presence.ResetPresence, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
203
|
+
import_focus_scope.FocusScope,
|
|
204
|
+
{
|
|
205
|
+
loop: !0,
|
|
206
|
+
enabled: disableFocusScope ? !1 : open,
|
|
207
|
+
trapped: trapFocus,
|
|
208
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
209
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
210
|
+
children: import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: dspContentsStyle, children }) : children
|
|
211
|
+
}
|
|
212
|
+
) })
|
|
213
|
+
}
|
|
214
|
+
)
|
|
215
|
+
},
|
|
216
|
+
context.contentId
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}), dspContentsStyle = {
|
|
221
|
+
display: "contents"
|
|
222
|
+
}, PopoverClose = React.forwardRef(function(props, forwardedRef) {
|
|
223
|
+
const { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
225
|
+
import_stacks.YStack,
|
|
226
|
+
{
|
|
227
|
+
...rest,
|
|
228
|
+
ref: forwardedRef,
|
|
229
|
+
componentName: "PopoverClose",
|
|
230
|
+
onPress: (0, import_helpers.composeEventHandlers)(
|
|
231
|
+
props.onPress,
|
|
232
|
+
() => context.onOpenChange(!1, "press")
|
|
233
|
+
)
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
}), PopoverArrow = import_popper.PopperArrow.styleable(
|
|
237
|
+
function(props, forwardedRef) {
|
|
238
|
+
const { __scopePopover, ...rest } = props;
|
|
239
|
+
return (0, import_adapt.useAdaptIsActive)() ? null : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
240
|
+
import_popper.PopperArrow,
|
|
241
|
+
{
|
|
242
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
243
|
+
componentName: "PopoverArrow",
|
|
244
|
+
...rest,
|
|
245
|
+
ref: forwardedRef
|
|
246
|
+
}
|
|
247
|
+
);
|
|
248
|
+
}
|
|
249
|
+
), Popover = (0, import_helpers.withStaticProperties)(
|
|
250
|
+
React.forwardRef(
|
|
251
|
+
function(props, ref) {
|
|
252
|
+
const id = React.useId();
|
|
253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_adapt.AdaptParent, { scope: `${id}PopoverContents`, portal: !0, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverInner, { ref, id, ...props }) });
|
|
254
|
+
}
|
|
255
|
+
),
|
|
256
|
+
{
|
|
257
|
+
Anchor: PopoverAnchor,
|
|
258
|
+
Arrow: PopoverArrow,
|
|
259
|
+
Trigger: PopoverTrigger,
|
|
260
|
+
Content: PopoverContent,
|
|
261
|
+
Close: PopoverClose,
|
|
262
|
+
Adapt: import_adapt.Adapt,
|
|
263
|
+
ScrollView: import_react_native.ScrollView,
|
|
264
|
+
Sheet: import_sheet.Sheet.Controlled
|
|
265
|
+
}
|
|
266
|
+
), PopoverInner = React.forwardRef(function(props, forwardedRef) {
|
|
267
|
+
const {
|
|
268
|
+
children,
|
|
269
|
+
open: openProp,
|
|
270
|
+
defaultOpen,
|
|
271
|
+
onOpenChange,
|
|
272
|
+
__scopePopover,
|
|
273
|
+
keepChildrenMounted,
|
|
274
|
+
hoverable,
|
|
275
|
+
disableFocus,
|
|
276
|
+
id,
|
|
277
|
+
...restProps
|
|
278
|
+
} = props, triggerRef = React.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React.useState(!1), viaRef = React.useRef(), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
279
|
+
prop: openProp,
|
|
280
|
+
defaultProp: defaultOpen || !1,
|
|
281
|
+
onChange: (val) => {
|
|
282
|
+
onOpenChange?.(val, viaRef.current);
|
|
283
|
+
}
|
|
284
|
+
}), handleOpenChange = (0, import_core.useEvent)((val, via) => {
|
|
285
|
+
viaRef.current = via, setOpen(val);
|
|
286
|
+
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
287
|
+
open,
|
|
288
|
+
setOpen: handleOpenChange,
|
|
289
|
+
disable: isAdapted,
|
|
290
|
+
hoverable,
|
|
291
|
+
disableFocus
|
|
292
|
+
}), [anchorTo, setAnchorToRaw] = React.useState(), setAnchorTo = (0, import_core.createShallowSetState)(
|
|
293
|
+
setAnchorToRaw
|
|
294
|
+
);
|
|
295
|
+
React.useImperativeHandle(forwardedRef, () => ({
|
|
296
|
+
anchorTo: setAnchorTo,
|
|
297
|
+
toggle: () => setOpen((prev) => !prev),
|
|
298
|
+
open: () => setOpen(!0),
|
|
299
|
+
close: () => setOpen(!1),
|
|
300
|
+
setOpen
|
|
301
|
+
}));
|
|
302
|
+
const popoverContext = {
|
|
303
|
+
id,
|
|
304
|
+
contentId: React.useId(),
|
|
305
|
+
triggerRef,
|
|
306
|
+
open,
|
|
307
|
+
breakpointActive: isAdapted,
|
|
308
|
+
onOpenChange: handleOpenChange,
|
|
309
|
+
onOpenToggle: (0, import_core.useEvent)(() => {
|
|
310
|
+
open && isAdapted || setOpen(!open);
|
|
311
|
+
}),
|
|
312
|
+
hasCustomAnchor,
|
|
313
|
+
anchorTo,
|
|
314
|
+
onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(!0), []),
|
|
315
|
+
onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(!1), []),
|
|
316
|
+
keepChildrenMounted
|
|
317
|
+
}, 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 }) }) });
|
|
318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, { value: floatingContext, children: contents }) : contents });
|
|
319
|
+
});
|
|
320
|
+
function getState(open) {
|
|
321
|
+
return open ? "open" : "closed";
|
|
322
|
+
}
|
|
323
|
+
const PopoverSheetController = ({
|
|
324
|
+
__scopePopover,
|
|
325
|
+
...props
|
|
326
|
+
}) => {
|
|
327
|
+
const context = usePopoverContext(__scopePopover), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core.useGet)(showSheet);
|
|
328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
329
|
+
import_sheet.SheetController,
|
|
330
|
+
{
|
|
331
|
+
onOpenChange: (val) => {
|
|
332
|
+
getShowSheet() && props.onOpenChange?.(val);
|
|
333
|
+
},
|
|
334
|
+
open: context.open,
|
|
335
|
+
hidden: breakpointActive === !1,
|
|
336
|
+
children: props.children
|
|
337
|
+
}
|
|
338
|
+
);
|
|
339
|
+
}, useShowPopoverSheet = (context) => {
|
|
340
|
+
const isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
341
|
+
return context.open === !1 ? !1 : isAdapted;
|
|
342
|
+
};
|
|
343
|
+
//# sourceMappingURL=Popover.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
9
|
+
return to;
|
|
10
|
+
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
11
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
12
|
+
var src_exports = {};
|
|
13
|
+
module.exports = __toCommonJS(src_exports);
|
|
14
|
+
__reExport(src_exports, require("./Popover"), module.exports);
|
|
15
|
+
__reExport(src_exports, require("./useFloatingContext"), module.exports);
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
16
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
17
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
18
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
19
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
21
|
+
mod
|
|
22
|
+
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
|
+
var useFloatingContext_exports = {};
|
|
24
|
+
__export(useFloatingContext_exports, {
|
|
25
|
+
useFloatingContext: () => useFloatingContext
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(useFloatingContext_exports);
|
|
28
|
+
var import_react = __toESM(require("react")), import_react2 = require("@floating-ui/react");
|
|
29
|
+
const useFloatingContext = ({
|
|
30
|
+
open,
|
|
31
|
+
setOpen,
|
|
32
|
+
disable,
|
|
33
|
+
disableFocus,
|
|
34
|
+
hoverable
|
|
35
|
+
}) => import_react.default.useCallback(
|
|
36
|
+
(props) => {
|
|
37
|
+
const floating = (0, import_react2.useFloating)({
|
|
38
|
+
...props,
|
|
39
|
+
open,
|
|
40
|
+
onOpenChange: (val, event) => {
|
|
41
|
+
const type = event?.type === "mousemove" || event?.type === "mouseenter" || event?.type === "mouseleave" ? "hover" : "press";
|
|
42
|
+
setOpen(val, type);
|
|
43
|
+
}
|
|
44
|
+
}), { getReferenceProps, getFloatingProps } = (0, import_react2.useInteractions)([
|
|
45
|
+
hoverable ? (0, import_react2.useHover)(floating.context, {
|
|
46
|
+
enabled: !disable && hoverable,
|
|
47
|
+
handleClose: (0, import_react2.safePolygon)({
|
|
48
|
+
requireIntent: !0,
|
|
49
|
+
blockPointerEvents: !0,
|
|
50
|
+
buffer: 1
|
|
51
|
+
}),
|
|
52
|
+
...hoverable && typeof hoverable == "object" && hoverable
|
|
53
|
+
}) : (0, import_react2.useHover)(floating.context, {
|
|
54
|
+
enabled: !1
|
|
55
|
+
}),
|
|
56
|
+
(0, import_react2.useFocus)(floating.context, {
|
|
57
|
+
enabled: !disable && !disableFocus,
|
|
58
|
+
visibleOnly: !0
|
|
59
|
+
}),
|
|
60
|
+
(0, import_react2.useRole)(floating.context, { role: "dialog" }),
|
|
61
|
+
(0, import_react2.useDismiss)(floating.context, {
|
|
62
|
+
enabled: !disable
|
|
63
|
+
})
|
|
64
|
+
]);
|
|
65
|
+
return {
|
|
66
|
+
...floating,
|
|
67
|
+
open,
|
|
68
|
+
getReferenceProps,
|
|
69
|
+
getFloatingProps
|
|
70
|
+
};
|
|
71
|
+
},
|
|
72
|
+
[open, setOpen, disable, disableFocus, hoverable]
|
|
73
|
+
);
|
|
74
|
+
//# sourceMappingURL=useFloatingContext.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/popover",
|
|
3
|
-
"version": "1.116.
|
|
3
|
+
"version": "1.116.3",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -35,31 +35,31 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@floating-ui/react": "^0.26.24",
|
|
38
|
-
"@tamagui/adapt": "1.116.
|
|
39
|
-
"@tamagui/animate": "1.116.
|
|
40
|
-
"@tamagui/aria-hidden": "1.116.
|
|
41
|
-
"@tamagui/compose-refs": "1.116.
|
|
42
|
-
"@tamagui/constants": "1.116.
|
|
43
|
-
"@tamagui/core": "1.116.
|
|
44
|
-
"@tamagui/dismissable": "1.116.
|
|
45
|
-
"@tamagui/floating": "1.116.
|
|
46
|
-
"@tamagui/focus-scope": "1.116.
|
|
47
|
-
"@tamagui/helpers": "1.116.
|
|
48
|
-
"@tamagui/polyfill-dev": "1.116.
|
|
49
|
-
"@tamagui/popper": "1.116.
|
|
50
|
-
"@tamagui/portal": "1.116.
|
|
51
|
-
"@tamagui/remove-scroll": "1.116.
|
|
52
|
-
"@tamagui/scroll-view": "1.116.
|
|
53
|
-
"@tamagui/sheet": "1.116.
|
|
54
|
-
"@tamagui/stacks": "1.116.
|
|
55
|
-
"@tamagui/use-controllable-state": "1.116.
|
|
38
|
+
"@tamagui/adapt": "1.116.3",
|
|
39
|
+
"@tamagui/animate": "1.116.3",
|
|
40
|
+
"@tamagui/aria-hidden": "1.116.3",
|
|
41
|
+
"@tamagui/compose-refs": "1.116.3",
|
|
42
|
+
"@tamagui/constants": "1.116.3",
|
|
43
|
+
"@tamagui/core": "1.116.3",
|
|
44
|
+
"@tamagui/dismissable": "1.116.3",
|
|
45
|
+
"@tamagui/floating": "1.116.3",
|
|
46
|
+
"@tamagui/focus-scope": "1.116.3",
|
|
47
|
+
"@tamagui/helpers": "1.116.3",
|
|
48
|
+
"@tamagui/polyfill-dev": "1.116.3",
|
|
49
|
+
"@tamagui/popper": "1.116.3",
|
|
50
|
+
"@tamagui/portal": "1.116.3",
|
|
51
|
+
"@tamagui/remove-scroll": "1.116.3",
|
|
52
|
+
"@tamagui/scroll-view": "1.116.3",
|
|
53
|
+
"@tamagui/sheet": "1.116.3",
|
|
54
|
+
"@tamagui/stacks": "1.116.3",
|
|
55
|
+
"@tamagui/use-controllable-state": "1.116.3",
|
|
56
56
|
"react-freeze": "^1.0.3"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"react": "*"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@tamagui/build": "1.116.
|
|
62
|
+
"@tamagui/build": "1.116.3",
|
|
63
63
|
"react": "^18.2.0 || ^19.0.0",
|
|
64
64
|
"react-native": "0.74.1"
|
|
65
65
|
},
|
package/types/Popover.d.ts
CHANGED
|
@@ -290,25 +290,7 @@ export declare const Popover: React.ForwardRefExoticComponent<PopperProps & {
|
|
|
290
290
|
};
|
|
291
291
|
ScrollView: typeof ScrollView;
|
|
292
292
|
Sheet: React.FunctionComponent<Omit<import("@tamagui/sheet").SheetProps, "open" | "onOpenChange"> & React.RefAttributes<import("react-native").View>> & {
|
|
293
|
-
Frame: import("react").ForwardRefExoticComponent<
|
|
294
|
-
elevation?: number | import("@tamagui/core").SizeTokens | undefined;
|
|
295
|
-
fullscreen?: boolean | undefined;
|
|
296
|
-
inset?: number | import("@tamagui/core").SizeTokens | {
|
|
297
|
-
top?: number;
|
|
298
|
-
bottom?: number;
|
|
299
|
-
left?: number;
|
|
300
|
-
right?: number;
|
|
301
|
-
} | undefined;
|
|
302
|
-
unstyled?: boolean | undefined;
|
|
303
|
-
}>, keyof {
|
|
304
|
-
disableHideBottomOverflow?: boolean;
|
|
305
|
-
adjustPaddingForOffscreenContent?: boolean;
|
|
306
|
-
}> & {
|
|
307
|
-
disableHideBottomOverflow?: boolean;
|
|
308
|
-
adjustPaddingForOffscreenContent?: boolean;
|
|
309
|
-
} & {
|
|
310
|
-
__scopeSheet?: import("@tamagui/create-context").Scope<any>;
|
|
311
|
-
} & import("react").RefAttributes<unknown>>;
|
|
293
|
+
Frame: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
|
|
312
294
|
Overlay: import("react").MemoExoticComponent<(propsIn: import("@tamagui/sheet/types/types").SheetScopedProps<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
313
295
|
elevation?: number | import("@tamagui/core").SizeTokens | undefined;
|
|
314
296
|
fullscreen?: boolean | undefined;
|
package/types/Popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../src/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAOvD,OAAO,KAAK,EAAe,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAWxF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAG3D,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACZ,MAAM,iBAAiB,CAAA;AAWxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAG/D,OAAO,KAAK,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esc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
6
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
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.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
-
value: mod,
|
|
27
|
-
enumerable: !0
|
|
28
|
-
}) : target, mod)),
|
|
29
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
30
|
-
value: !0
|
|
31
|
-
}), mod);
|
|
32
|
-
var useFloatingContext_native_exports = {};
|
|
33
|
-
__export(useFloatingContext_native_exports, {
|
|
34
|
-
useFloatingContext: () => useFloatingContext
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(useFloatingContext_native_exports);
|
|
37
|
-
var import_react = __toESM(require("react"));
|
|
38
|
-
const useFloatingContext = () => import_react.default.useCallback(() => {}, []);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|