@tamagui/popper 2.0.0-rc.8 → 2.0.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/Popper.cjs +519 -416
- package/dist/cjs/Popper.native.js +535 -402
- package/dist/cjs/Popper.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Popper.mjs +491 -390
- package/dist/esm/Popper.mjs.map +1 -1
- package/dist/esm/Popper.native.js +514 -384
- package/dist/esm/Popper.native.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -6
- package/dist/jsx/Popper.mjs +491 -390
- package/dist/jsx/Popper.mjs.map +1 -1
- package/dist/jsx/Popper.native.js +535 -402
- package/dist/jsx/Popper.native.js.map +1 -1
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +7 -5
- package/package.json +15 -19
- package/src/Popper.tsx +319 -133
- package/types/Popper.d.ts +10 -4
- package/types/Popper.d.ts.map +1 -1
- package/dist/cjs/Popper.js +0 -437
- package/dist/cjs/Popper.js.map +0 -6
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/index.js.map +0 -6
- package/dist/esm/Popper.js +0 -438
- package/dist/esm/Popper.js.map +0 -6
- package/dist/jsx/Popper.js +0 -438
- package/dist/jsx/Popper.js.map +0 -6
package/types/Popper.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SizeTokens, TamaguiElement } from '@tamagui/core';
|
|
2
|
-
import {
|
|
2
|
+
import type { PopupTriggerMap } from '@tamagui/floating';
|
|
3
3
|
import type { Coords, OffsetOptions, Placement, SizeOptions, Strategy, UseFloatingReturn } from '@tamagui/floating';
|
|
4
4
|
import { flip, shift } from '@tamagui/floating';
|
|
5
5
|
import type { SizableStackProps, YStackProps } from '@tamagui/stacks';
|
|
@@ -23,12 +23,16 @@ export type PopperContextShared = {
|
|
|
23
23
|
};
|
|
24
24
|
export type PopperContextValue = UseFloatingReturn & PopperContextShared;
|
|
25
25
|
export declare const PopperContextFast: import("@tamagui/core").StyledContext<PopperContextValue>;
|
|
26
|
-
export declare const PopperPositionContext:
|
|
26
|
+
export declare const PopperPositionContext: <VariantProps extends Record<string, any>>(defaultValues?: VariantProps, namespace?: string) => import("@tamagui/core").StyledContext<VariantProps>;
|
|
27
27
|
export declare const usePopperContext: (scope?: string) => PopperContextValue, PopperProviderFast: React.Provider<PopperContextValue> & React.ProviderExoticComponent<Partial<PopperContextValue> & {
|
|
28
28
|
children?: React.ReactNode;
|
|
29
29
|
scope?: string;
|
|
30
30
|
}>;
|
|
31
|
-
export type PopperContextSlowValue =
|
|
31
|
+
export type PopperContextSlowValue = Pick<UseFloatingReturn, 'getReferenceProps' | 'update' | 'refs'> & {
|
|
32
|
+
onHoverReference?: (event: any) => void;
|
|
33
|
+
onLeaveReference?: () => void;
|
|
34
|
+
triggerElements?: PopupTriggerMap;
|
|
35
|
+
};
|
|
32
36
|
export declare const PopperContextSlow: import("@tamagui/core").StyledContext<PopperContextSlowValue>;
|
|
33
37
|
export declare const usePopperContextSlow: (scope?: string) => PopperContextSlowValue, PopperProviderSlow: React.Provider<PopperContextSlowValue> & React.ProviderExoticComponent<Partial<PopperContextSlowValue> & {
|
|
34
38
|
children?: React.ReactNode;
|
|
@@ -55,7 +59,9 @@ export type PopperProps = {
|
|
|
55
59
|
*/
|
|
56
60
|
placement?: Placement;
|
|
57
61
|
/**
|
|
58
|
-
*
|
|
62
|
+
* Shifts content horizontally to stay within viewport.
|
|
63
|
+
* Pass an object to override shift options (mainAxis, crossAxis, padding, etc).
|
|
64
|
+
* Defaults: { mainAxis: true, crossAxis: false, padding: 10 }
|
|
59
65
|
* @see https://floating-ui.com/docs/shift
|
|
60
66
|
*/
|
|
61
67
|
stayInFrame?: ShiftProps | boolean;
|
package/types/Popper.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popper.d.ts","sourceRoot":"","sources":["../src/Popper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popper.d.ts","sourceRoot":"","sources":["../src/Popper.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAa,MAAM,eAAe,CAAA;AAS1E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD,OAAO,KAAK,EACV,MAAM,EAEN,aAAa,EACb,SAAS,EAGT,WAAW,EACX,QAAQ,EACR,iBAAiB,EAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAEL,IAAI,EAIJ,KAAK,EAGN,MAAM,mBAAmB,CAAA;AAE1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,UAAU,GAAG,OAAO,KAAK,SAAS,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,KAAK,CAAA;AACnF,KAAK,SAAS,GAAG,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,MAAM,IAAI,KAAK,IAAI,GAAG,IAAI,GAAG,KAAK,CAAA;AAMjF,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG;QAC7B,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,QAAQ,EAAE,GAAG,CAAA;IACb,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,eAAe,CAAC,EAAE;QAAE,CAAC,EAAE,MA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EAAE,UAAU,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,qBAAqB,CAAA;AAElE,eAAO,MAAM,gBAAgB;;;;8CAgB3B,CAAA;AAgCF,eAAO,MAAM,WAAW;;;2JAoGvB,CAAA"}
|
package/dist/cjs/Popper.js
DELETED
|
@@ -1,437 +0,0 @@
|
|
|
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 Popper_exports = {};
|
|
24
|
-
__export(Popper_exports, {
|
|
25
|
-
Popper: () => Popper,
|
|
26
|
-
PopperAnchor: () => PopperAnchor,
|
|
27
|
-
PopperArrow: () => PopperArrow,
|
|
28
|
-
PopperArrowFrame: () => PopperArrowFrame,
|
|
29
|
-
PopperContent: () => PopperContent,
|
|
30
|
-
PopperContentFrame: () => PopperContentFrame,
|
|
31
|
-
PopperContextFast: () => PopperContextFast,
|
|
32
|
-
PopperContextSlow: () => PopperContextSlow,
|
|
33
|
-
PopperPositionContext: () => PopperPositionContext,
|
|
34
|
-
PopperProvider: () => PopperProvider,
|
|
35
|
-
PopperProviderFast: () => PopperProviderFast,
|
|
36
|
-
PopperProviderSlow: () => PopperProviderSlow,
|
|
37
|
-
setupPopper: () => setupPopper,
|
|
38
|
-
usePopperContext: () => usePopperContext,
|
|
39
|
-
usePopperContextSlow: () => usePopperContextSlow
|
|
40
|
-
});
|
|
41
|
-
module.exports = __toCommonJS(Popper_exports);
|
|
42
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_floating = require("@tamagui/floating"), import_get_token = require("@tamagui/get-token"), import_stacks = require("@tamagui/stacks"), import_start_transition = require("@tamagui/start-transition"), React = __toESM(require("react"), 1), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
-
const PopperContextFast = (0, import_core.createStyledContext)(
|
|
44
|
-
// since we always provide this we can avoid setting here
|
|
45
|
-
{},
|
|
46
|
-
"Popper__"
|
|
47
|
-
), PopperPositionContext = import_core.createStyledContext, { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast, PopperContextSlow = (0, import_core.createStyledContext)(
|
|
48
|
-
// since we always provide this we can avoid setting here
|
|
49
|
-
{},
|
|
50
|
-
"PopperSlow__"
|
|
51
|
-
), { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow, PopperProvider = ({
|
|
52
|
-
scope,
|
|
53
|
-
children,
|
|
54
|
-
...context
|
|
55
|
-
}) => {
|
|
56
|
-
const slowContext = getContextSlow(context);
|
|
57
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProviderFast, { scope, ...context, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProviderSlow, { scope, ...slowContext, children }) });
|
|
58
|
-
};
|
|
59
|
-
function getContextSlow(context) {
|
|
60
|
-
return {
|
|
61
|
-
refs: context.refs,
|
|
62
|
-
size: context.size,
|
|
63
|
-
arrowRef: context.arrowRef,
|
|
64
|
-
arrowStyle: context.arrowStyle,
|
|
65
|
-
onArrowSize: context.onArrowSize,
|
|
66
|
-
hasFloating: context.hasFloating,
|
|
67
|
-
strategy: context.strategy,
|
|
68
|
-
update: context.update,
|
|
69
|
-
context: context.context,
|
|
70
|
-
getFloatingProps: context.getFloatingProps,
|
|
71
|
-
getReferenceProps: context.getReferenceProps,
|
|
72
|
-
open: context.open
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
const checkFloating = void 0, setupOptions = {};
|
|
76
|
-
function setupPopper(options) {
|
|
77
|
-
Object.assign(setupOptions, options);
|
|
78
|
-
}
|
|
79
|
-
function getSideAndAlignFromPlacement(placement) {
|
|
80
|
-
const [side, align = "center"] = placement.split("-");
|
|
81
|
-
return [side, align];
|
|
82
|
-
}
|
|
83
|
-
const transformOriginMiddleware = (options) => ({
|
|
84
|
-
name: "transformOrigin",
|
|
85
|
-
options,
|
|
86
|
-
fn(data) {
|
|
87
|
-
const { placement, rects, middlewareData } = data, isArrowHidden = middlewareData.arrow?.centerOffset !== 0, arrowWidth = isArrowHidden ? 0 : options.arrowWidth, arrowHeight = isArrowHidden ? 0 : options.arrowHeight, [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement), noArrowAlign = { start: "0%", center: "50%", end: "100%" }[placedAlign], arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2, arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;
|
|
88
|
-
let x = "", y = "";
|
|
89
|
-
return placedSide === "bottom" ? (x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`, y = `${-arrowHeight}px`) : placedSide === "top" ? (x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`, y = `${rects.floating.height + arrowHeight}px`) : placedSide === "right" ? (x = `${-arrowHeight}px`, y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`) : placedSide === "left" && (x = `${rects.floating.width + arrowHeight}px`, y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`), { data: { x, y } };
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
function Popper(props) {
|
|
93
|
-
const {
|
|
94
|
-
children,
|
|
95
|
-
size,
|
|
96
|
-
strategy = "absolute",
|
|
97
|
-
placement = "bottom",
|
|
98
|
-
stayInFrame,
|
|
99
|
-
allowFlip,
|
|
100
|
-
offset,
|
|
101
|
-
disableRTL,
|
|
102
|
-
resize,
|
|
103
|
-
passThrough,
|
|
104
|
-
open,
|
|
105
|
-
scope
|
|
106
|
-
} = props, [arrowEl, setArrow] = React.useState(null), [arrowSize, setArrowSize] = React.useState(0), offsetOptions = offset ?? arrowSize, floatingStyle = React.useRef({}), isOpen = passThrough ? !1 : open || !0;
|
|
107
|
-
let floating = (0, import_floating.useFloating)({
|
|
108
|
-
open: isOpen,
|
|
109
|
-
strategy,
|
|
110
|
-
placement,
|
|
111
|
-
sameScrollView: !1,
|
|
112
|
-
// this only takes effect on native
|
|
113
|
-
whileElementsMounted: isOpen ? import_floating.autoUpdate : void 0,
|
|
114
|
-
platform: disableRTL ?? setupOptions.disableRTL ? {
|
|
115
|
-
...import_floating.platform,
|
|
116
|
-
isRTL(element) {
|
|
117
|
-
return !1;
|
|
118
|
-
}
|
|
119
|
-
} : import_floating.platform,
|
|
120
|
-
middleware: [
|
|
121
|
-
stayInFrame ? (0, import_floating.shift)(typeof stayInFrame == "boolean" ? {} : stayInFrame) : null,
|
|
122
|
-
allowFlip ? (0, import_floating.flip)(typeof allowFlip == "boolean" ? {} : allowFlip) : null,
|
|
123
|
-
arrowEl ? (0, import_floating.arrow)({ element: arrowEl }) : null,
|
|
124
|
-
typeof offsetOptions < "u" ? (0, import_floating.offset)(offsetOptions) : null,
|
|
125
|
-
checkFloating,
|
|
126
|
-
resize ? (0, import_floating.size)({
|
|
127
|
-
apply({ availableHeight, availableWidth }) {
|
|
128
|
-
if (passThrough)
|
|
129
|
-
return;
|
|
130
|
-
Object.assign(floatingStyle.current, {
|
|
131
|
-
maxHeight: `${availableHeight}px`,
|
|
132
|
-
maxWidth: `${availableWidth}px`
|
|
133
|
-
});
|
|
134
|
-
const floatingChild = floating.refs.floating.current?.firstChild;
|
|
135
|
-
floatingChild && floatingChild instanceof HTMLElement && Object.assign(floatingChild.style, floatingStyle.current);
|
|
136
|
-
},
|
|
137
|
-
...typeof resize == "object" && resize
|
|
138
|
-
}) : null,
|
|
139
|
-
(0, import_floating.size)({
|
|
140
|
-
apply({ elements, rects, availableWidth, availableHeight }) {
|
|
141
|
-
const { width: anchorWidth, height: anchorHeight } = rects.reference, contentStyle = elements.floating.style;
|
|
142
|
-
contentStyle.setProperty(
|
|
143
|
-
"--tamagui-popper-available-width",
|
|
144
|
-
`${availableWidth}px`
|
|
145
|
-
), contentStyle.setProperty(
|
|
146
|
-
"--tamagui-popper-available-height",
|
|
147
|
-
`${availableHeight}px`
|
|
148
|
-
), contentStyle.setProperty(
|
|
149
|
-
"--tamagui-popper-anchor-width",
|
|
150
|
-
`${anchorWidth}px`
|
|
151
|
-
), contentStyle.setProperty(
|
|
152
|
-
"--tamagui-popper-anchor-height",
|
|
153
|
-
`${anchorHeight}px`
|
|
154
|
-
);
|
|
155
|
-
}
|
|
156
|
-
}),
|
|
157
|
-
transformOriginMiddleware({
|
|
158
|
-
arrowHeight: arrowSize,
|
|
159
|
-
arrowWidth: arrowSize
|
|
160
|
-
})
|
|
161
|
-
].filter(Boolean)
|
|
162
|
-
});
|
|
163
|
-
floating = React.useMemo(() => {
|
|
164
|
-
const og = floating.getFloatingProps;
|
|
165
|
-
return resize && og && (floating.getFloatingProps = (props2) => og({
|
|
166
|
-
...props2,
|
|
167
|
-
style: {
|
|
168
|
-
...props2.style,
|
|
169
|
-
...floatingStyle.current
|
|
170
|
-
}
|
|
171
|
-
})), floating;
|
|
172
|
-
}, [floating, resize ? JSON.stringify(resize) : null]);
|
|
173
|
-
const { middlewareData } = floating, popperContext = React.useMemo(() => ({
|
|
174
|
-
size,
|
|
175
|
-
arrowRef: setArrow,
|
|
176
|
-
arrowStyle: middlewareData.arrow,
|
|
177
|
-
onArrowSize: setArrowSize,
|
|
178
|
-
hasFloating: middlewareData.checkFloating?.hasFloating,
|
|
179
|
-
transformOrigin: middlewareData.transformOrigin,
|
|
180
|
-
open: !!open,
|
|
181
|
-
...floating
|
|
182
|
-
}), [
|
|
183
|
-
open,
|
|
184
|
-
size,
|
|
185
|
-
floating.x,
|
|
186
|
-
floating.y,
|
|
187
|
-
floating.placement,
|
|
188
|
-
JSON.stringify(middlewareData.arrow || null),
|
|
189
|
-
JSON.stringify(middlewareData.transformOrigin || null),
|
|
190
|
-
floating.isPositioned
|
|
191
|
-
]);
|
|
192
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.LayoutMeasurementController, { disable: !isOpen, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProvider, { scope, ...popperContext, children }) });
|
|
193
|
-
}
|
|
194
|
-
const PopperAnchor = import_stacks.YStack.styleable(
|
|
195
|
-
function(props, forwardedRef) {
|
|
196
|
-
const { virtualRef, scope, ...rest } = props, context = usePopperContextSlow(scope), { getReferenceProps, refs, update } = context, ref = React.useRef(null);
|
|
197
|
-
React.useEffect(() => {
|
|
198
|
-
virtualRef && refs.setReference(virtualRef.current);
|
|
199
|
-
}, [virtualRef]);
|
|
200
|
-
const refProps = getReferenceProps?.({
|
|
201
|
-
...rest,
|
|
202
|
-
ref
|
|
203
|
-
}) || null, safeSetReference = React.useCallback(
|
|
204
|
-
(node) => {
|
|
205
|
-
(0, import_start_transition.startTransition)(() => {
|
|
206
|
-
refs.setReference(node);
|
|
207
|
-
});
|
|
208
|
-
},
|
|
209
|
-
[refs.setReference]
|
|
210
|
-
), shouldHandleInHover = import_constants.isWeb && scope, composedRefs = (0, import_compose_refs.useComposedRefs)(
|
|
211
|
-
forwardedRef,
|
|
212
|
-
ref,
|
|
213
|
-
// web handles this onMouseEnter below so it can support multiple targets + hovering
|
|
214
|
-
shouldHandleInHover ? void 0 : safeSetReference
|
|
215
|
-
);
|
|
216
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
217
|
-
import_core.View,
|
|
218
|
-
{
|
|
219
|
-
...rest,
|
|
220
|
-
...refProps,
|
|
221
|
-
ref: composedRefs,
|
|
222
|
-
...shouldHandleInHover && {
|
|
223
|
-
// this helps us with handling scoped poppers with many different targets
|
|
224
|
-
// basically we wait for mouseEnter to ever set a reference and remove it on leave
|
|
225
|
-
// otherwise floating ui gets confused by having >1 reference
|
|
226
|
-
onMouseEnter: (e) => {
|
|
227
|
-
if (ref.current instanceof HTMLElement) {
|
|
228
|
-
if (refs.setReference(ref.current), !refProps)
|
|
229
|
-
return;
|
|
230
|
-
refProps.onPointerEnter?.(e), update();
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
onMouseLeave: (e) => {
|
|
234
|
-
refProps?.onMouseLeave?.(e);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
), PopperContentFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
241
|
-
name: "PopperContent",
|
|
242
|
-
variants: {
|
|
243
|
-
unstyled: {
|
|
244
|
-
false: {
|
|
245
|
-
size: "$true",
|
|
246
|
-
backgroundColor: "$background",
|
|
247
|
-
alignItems: "center"
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
size: {
|
|
251
|
-
"...size": (val, { tokens }) => ({
|
|
252
|
-
padding: tokens.space[val],
|
|
253
|
-
borderRadius: tokens.radius[val]
|
|
254
|
-
})
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
defaultVariants: {
|
|
258
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
259
|
-
}
|
|
260
|
-
}), PopperContent = React.forwardRef(
|
|
261
|
-
function(props, forwardedRef) {
|
|
262
|
-
const {
|
|
263
|
-
scope,
|
|
264
|
-
animatePosition,
|
|
265
|
-
enableAnimationForPositionChange,
|
|
266
|
-
children,
|
|
267
|
-
passThrough,
|
|
268
|
-
...rest
|
|
269
|
-
} = props, animatePos = animatePosition ?? enableAnimationForPositionChange, context = usePopperContext(scope), {
|
|
270
|
-
strategy,
|
|
271
|
-
placement,
|
|
272
|
-
refs,
|
|
273
|
-
x,
|
|
274
|
-
y,
|
|
275
|
-
getFloatingProps,
|
|
276
|
-
size,
|
|
277
|
-
isPositioned,
|
|
278
|
-
transformOrigin
|
|
279
|
-
} = context, safeSetFloating = React.useCallback(
|
|
280
|
-
(node) => {
|
|
281
|
-
(0, import_start_transition.startTransition)(() => {
|
|
282
|
-
refs.setFloating(node);
|
|
283
|
-
});
|
|
284
|
-
},
|
|
285
|
-
[refs.setFloating]
|
|
286
|
-
), contentRefs = (0, import_compose_refs.useComposedRefs)(safeSetFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React.useState(animatePos);
|
|
287
|
-
(0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
288
|
-
needsMeasure && x && y && setNeedsMeasure(!1);
|
|
289
|
-
}, [needsMeasure, animatePos, x, y]);
|
|
290
|
-
const hide = x === 0 && y === 0, disableAnimationProp = (
|
|
291
|
-
// if they want to animate also when re-positioning allow it
|
|
292
|
-
animatePos === "even-when-repositioning" ? needsMeasure : !isPositioned || needsMeasure
|
|
293
|
-
), [disableAnimation, setDisableAnimation] = React.useState(disableAnimationProp);
|
|
294
|
-
React.useEffect(() => {
|
|
295
|
-
setDisableAnimation(disableAnimationProp);
|
|
296
|
-
}, [disableAnimationProp]);
|
|
297
|
-
const frameProps = {
|
|
298
|
-
ref: contentRefs,
|
|
299
|
-
...hide ? {} : { x: x || 0, y: y || 0 },
|
|
300
|
-
top: 0,
|
|
301
|
-
left: 0,
|
|
302
|
-
position: strategy,
|
|
303
|
-
opacity: 1,
|
|
304
|
-
...animatePos && {
|
|
305
|
-
transition: rest.transition,
|
|
306
|
-
animateOnly: disableAnimation ? [] : rest.animateOnly,
|
|
307
|
-
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
308
|
-
animatePresence: !1
|
|
309
|
-
},
|
|
310
|
-
...hide && {
|
|
311
|
-
opacity: 0,
|
|
312
|
-
animateOnly: []
|
|
313
|
-
}
|
|
314
|
-
}, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps, transformOriginStyle = import_constants.isWeb && transformOrigin ? { transformOrigin: `${transformOrigin.x} ${transformOrigin.y}` } : void 0;
|
|
315
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
316
|
-
import_core.View,
|
|
317
|
-
{
|
|
318
|
-
passThrough,
|
|
319
|
-
ref: contentRefs,
|
|
320
|
-
contain: "layout style",
|
|
321
|
-
...passThrough ? null : floatingProps,
|
|
322
|
-
...!passThrough && animatePos && {
|
|
323
|
-
// marker for animation driver to know this is a popper element
|
|
324
|
-
// that needs special handling for position animation interruption
|
|
325
|
-
"data-popper-animate-position": "true"
|
|
326
|
-
},
|
|
327
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
328
|
-
PopperContentFrame,
|
|
329
|
-
{
|
|
330
|
-
passThrough,
|
|
331
|
-
...!passThrough && {
|
|
332
|
-
"data-placement": placement,
|
|
333
|
-
"data-strategy": strategy,
|
|
334
|
-
size,
|
|
335
|
-
...style,
|
|
336
|
-
...transformOriginStyle,
|
|
337
|
-
...rest
|
|
338
|
-
},
|
|
339
|
-
children
|
|
340
|
-
},
|
|
341
|
-
"popper-content-frame"
|
|
342
|
-
)
|
|
343
|
-
}
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
), PopperArrowFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
347
|
-
name: "PopperArrow",
|
|
348
|
-
variants: {
|
|
349
|
-
unstyled: {
|
|
350
|
-
false: {
|
|
351
|
-
borderColor: "$borderColor",
|
|
352
|
-
backgroundColor: "$background",
|
|
353
|
-
position: "relative"
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
},
|
|
357
|
-
defaultVariants: {
|
|
358
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
359
|
-
}
|
|
360
|
-
}), PopperArrowOuterFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
361
|
-
name: "PopperArrowOuter",
|
|
362
|
-
variants: {
|
|
363
|
-
unstyled: {
|
|
364
|
-
false: {
|
|
365
|
-
position: "absolute",
|
|
366
|
-
zIndex: 1e6,
|
|
367
|
-
pointerEvents: "none",
|
|
368
|
-
overflow: "hidden",
|
|
369
|
-
alignItems: "center",
|
|
370
|
-
justifyContent: "center"
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
defaultVariants: {
|
|
375
|
-
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
376
|
-
}
|
|
377
|
-
}), opposites = {
|
|
378
|
-
top: "bottom",
|
|
379
|
-
right: "left",
|
|
380
|
-
bottom: "top",
|
|
381
|
-
left: "right"
|
|
382
|
-
}, PopperArrow = React.forwardRef(
|
|
383
|
-
function(propsIn, forwardedRef) {
|
|
384
|
-
const { scope, animatePosition, transition, ...rest } = propsIn, props = (0, import_core.useProps)(rest), { offset, size: sizeProp, borderWidth = 0, ...arrowProps } = props, context = usePopperContext(scope), sizeVal = typeof sizeProp == "number" ? sizeProp : (0, import_core.getVariableValue)(
|
|
385
|
-
(0, import_get_token.getSpace)(sizeProp ?? context.size, {
|
|
386
|
-
shift: -2,
|
|
387
|
-
bounds: [2]
|
|
388
|
-
})
|
|
389
|
-
), size = Math.max(0, +sizeVal), { placement } = context, refs = (0, import_compose_refs.useComposedRefs)(context.arrowRef, forwardedRef), x = context.arrowStyle?.x || 0, y = context.arrowStyle?.y || 0, primaryPlacement = placement ? placement.split("-")[0] : "top", arrowStyle = { x, y, width: size, height: size }, innerArrowStyle = {}, isVertical = primaryPlacement === "bottom" || primaryPlacement === "top";
|
|
390
|
-
if (primaryPlacement) {
|
|
391
|
-
arrowStyle[isVertical ? "width" : "height"] = size * 2;
|
|
392
|
-
const oppSide = opposites[primaryPlacement];
|
|
393
|
-
oppSide && (arrowStyle[oppSide] = -size, innerArrowStyle[oppSide] = size / 2), (oppSide === "top" || oppSide === "bottom") && (arrowStyle.left = 0), (oppSide === "left" || oppSide === "right") && (arrowStyle.top = 0), (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
394
|
-
context.onArrowSize?.(size);
|
|
395
|
-
}, [size, context.onArrowSize]);
|
|
396
|
-
}
|
|
397
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
398
|
-
PopperArrowOuterFrame,
|
|
399
|
-
{
|
|
400
|
-
ref: refs,
|
|
401
|
-
...arrowStyle,
|
|
402
|
-
...animatePosition && {
|
|
403
|
-
transition,
|
|
404
|
-
animateOnly: ["transform"],
|
|
405
|
-
animatePresence: !1
|
|
406
|
-
},
|
|
407
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
408
|
-
PopperArrowFrame,
|
|
409
|
-
{
|
|
410
|
-
width: size,
|
|
411
|
-
height: size,
|
|
412
|
-
...arrowProps,
|
|
413
|
-
...innerArrowStyle,
|
|
414
|
-
rotate: "45deg",
|
|
415
|
-
...primaryPlacement === "bottom" && {
|
|
416
|
-
borderLeftWidth: borderWidth,
|
|
417
|
-
borderTopWidth: borderWidth
|
|
418
|
-
},
|
|
419
|
-
...primaryPlacement === "top" && {
|
|
420
|
-
borderBottomWidth: borderWidth,
|
|
421
|
-
borderRightWidth: borderWidth
|
|
422
|
-
},
|
|
423
|
-
...primaryPlacement === "right" && {
|
|
424
|
-
borderLeftWidth: borderWidth,
|
|
425
|
-
borderBottomWidth: borderWidth
|
|
426
|
-
},
|
|
427
|
-
...primaryPlacement === "left" && {
|
|
428
|
-
borderTopWidth: borderWidth,
|
|
429
|
-
borderRightWidth: borderWidth
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
)
|
|
433
|
-
}
|
|
434
|
-
);
|
|
435
|
-
}
|
|
436
|
-
);
|
|
437
|
-
//# sourceMappingURL=Popper.js.map
|
package/dist/cjs/Popper.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Popper.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAgC,kCAChC,mBAAiD,+BAEjD,cAOO,0BAWP,kBASO,8BACP,mBAAyB,+BAEzB,gBAAuB,4BACvB,0BAAgC,sCAChC,QAAuB,8BACvB,sBAAyD,yBA4DnD;AApCC,MAAM,wBAAoB;AAAA;AAAA,EAE/B,CAAC;AAAA,EACD;AACF,GAEa,wBAAwB,iCAExB,EAAE,kBAAkB,kBAAkB,UAAU,mBAAmB,IAC9E,mBAQW,wBAAoB;AAAA;AAAA,EAE/B,CAAC;AAAA,EACD;AACF,GAEa,EAAE,kBAAkB,sBAAsB,UAAU,mBAAmB,IAClF,mBAGW,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAA2E;AACzE,QAAM,cAAc,eAAe,OAAO;AAE1C,SACE,4CAAC,sBAAmB,OAAe,GAAG,SACpC,s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AAAA,cACjC,mBAAmB;AAAA,cACnB,kBAAkB;AAAA,YACpB;AAAA,YACC,GAAI,qBAAqB,WAAW;AAAA,cACnC,iBAAiB;AAAA,cACjB,mBAAmB;AAAA,YACrB;AAAA,YACC,GAAI,qBAAqB,UAAU;AAAA,cAClC,gBAAgB;AAAA,cAChB,kBAAkB;AAAA,YACpB;AAAA;AAAA,QACF;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;",
|
|
5
|
-
"names": ["offsetFn", "sizeMiddleware", "props", "TamaguiView"]
|
|
6
|
-
}
|
package/dist/cjs/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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 index_exports = {};
|
|
13
|
-
module.exports = __toCommonJS(index_exports);
|
|
14
|
-
__reExport(index_exports, require("./Popper"), module.exports);
|
|
15
|
-
//# sourceMappingURL=index.js.map
|