@sparrowengg/integrations-templates-frontend 8.0.1 → 8.0.2
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/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +113 -20
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-popover/dist/index.js +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.js +16 -5
- package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +113 -20
- package/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-popover/dist/index.js +1 -0
- package/dist/es/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-popper/dist/index.js +16 -5
- package/dist/es/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -35,12 +35,19 @@ var originalBodyPointerEvents;
|
|
|
35
35
|
var DismissableLayerContext = React__namespace.createContext({
|
|
36
36
|
layers: /* @__PURE__ */ new Set(),
|
|
37
37
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
38
|
-
branches: /* @__PURE__ */ new Set()
|
|
38
|
+
branches: /* @__PURE__ */ new Set(),
|
|
39
|
+
// Outside elements that belong to a layer's own dismiss affordance (eg, a
|
|
40
|
+
// dialog overlay). Pressing them should dismiss the layer regardless of
|
|
41
|
+
// whether or not they stop propagation.
|
|
42
|
+
//
|
|
43
|
+
// See https://github.com/radix-ui/primitives/issues/3346
|
|
44
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
39
45
|
});
|
|
40
46
|
var DismissableLayer = React__namespace.forwardRef(
|
|
41
47
|
(props, forwardedRef) => {
|
|
42
48
|
const {
|
|
43
49
|
disableOutsidePointerEvents = false,
|
|
50
|
+
deferPointerDownOutside = false,
|
|
44
51
|
onEscapeKeyDown,
|
|
45
52
|
onPointerDownOutside,
|
|
46
53
|
onFocusOutside,
|
|
@@ -59,15 +66,32 @@ var DismissableLayer = React__namespace.forwardRef(
|
|
|
59
66
|
const index$4 = node ? layers.indexOf(node) : -1;
|
|
60
67
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
61
68
|
const isPointerEventsEnabled = index$4 >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
const isDeferredPointerDownOutsideRef = React__namespace.useRef(false);
|
|
70
|
+
const pointerDownOutside = usePointerDownOutside(
|
|
71
|
+
(event) => {
|
|
72
|
+
const target = event.target;
|
|
73
|
+
if (!(target instanceof Node)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const isPointerDownOnBranch = [...context.branches].some(
|
|
77
|
+
(branch) => branch.contains(target)
|
|
78
|
+
);
|
|
79
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
80
|
+
onPointerDownOutside?.(event);
|
|
81
|
+
onInteractOutside?.(event);
|
|
82
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
ownerDocument,
|
|
86
|
+
deferPointerDownOutside,
|
|
87
|
+
isDeferredPointerDownOutsideRef,
|
|
88
|
+
dismissableSurfaces: context.dismissableSurfaces
|
|
89
|
+
}
|
|
90
|
+
);
|
|
70
91
|
const focusOutside = useFocusOutside((event) => {
|
|
92
|
+
if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
71
95
|
const target = event.target;
|
|
72
96
|
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
73
97
|
if (isFocusInBranch) return;
|
|
@@ -154,35 +178,94 @@ var DismissableLayerBranch = React__namespace.forwardRef((props, forwardedRef) =
|
|
|
154
178
|
return /* @__PURE__ */ jsxRuntime.jsx(index$2.Primitive.div, { ...props, ref: composedRefs });
|
|
155
179
|
});
|
|
156
180
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
157
|
-
function usePointerDownOutside(onPointerDownOutside,
|
|
181
|
+
function usePointerDownOutside(onPointerDownOutside, args) {
|
|
182
|
+
const {
|
|
183
|
+
ownerDocument = globalThis?.document,
|
|
184
|
+
deferPointerDownOutside = false,
|
|
185
|
+
isDeferredPointerDownOutsideRef,
|
|
186
|
+
dismissableSurfaces
|
|
187
|
+
} = args;
|
|
158
188
|
const handlePointerDownOutside = index$4.useCallbackRef(onPointerDownOutside);
|
|
159
189
|
const isPointerInsideReactTreeRef = React__namespace.useRef(false);
|
|
190
|
+
const isPointerDownOutsideRef = React__namespace.useRef(false);
|
|
191
|
+
const interceptedOutsideInteractionEventsRef = React__namespace.useRef(/* @__PURE__ */ new Map());
|
|
160
192
|
const handleClickRef = React__namespace.useRef(() => {
|
|
161
193
|
});
|
|
162
194
|
React__namespace.useEffect(() => {
|
|
195
|
+
function resetOutsideInteraction() {
|
|
196
|
+
isPointerDownOutsideRef.current = false;
|
|
197
|
+
isDeferredPointerDownOutsideRef.current = false;
|
|
198
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
199
|
+
}
|
|
200
|
+
function isOutsideInteractionIntercepted() {
|
|
201
|
+
return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);
|
|
202
|
+
}
|
|
203
|
+
function handleInteractionCapture(event) {
|
|
204
|
+
if (!isPointerDownOutsideRef.current) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const target = event.target;
|
|
208
|
+
const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target));
|
|
209
|
+
if (!isDismissableSurface) {
|
|
210
|
+
interceptedOutsideInteractionEventsRef.current.set(event.type, true);
|
|
211
|
+
}
|
|
212
|
+
if (event.type === "click") {
|
|
213
|
+
window.setTimeout(() => {
|
|
214
|
+
if (isPointerDownOutsideRef.current) {
|
|
215
|
+
handleClickRef.current();
|
|
216
|
+
}
|
|
217
|
+
}, 0);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function handleInteractionBubble(event) {
|
|
221
|
+
if (isPointerDownOutsideRef.current) {
|
|
222
|
+
interceptedOutsideInteractionEventsRef.current.set(event.type, false);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
163
225
|
const handlePointerDown = (event) => {
|
|
164
226
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
165
227
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
228
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
229
|
+
const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();
|
|
230
|
+
resetOutsideInteraction();
|
|
231
|
+
if (!wasOutsideInteractionIntercepted) {
|
|
232
|
+
handleAndDispatchCustomEvent(
|
|
233
|
+
POINTER_DOWN_OUTSIDE,
|
|
234
|
+
handlePointerDownOutside,
|
|
235
|
+
eventDetail,
|
|
236
|
+
{ discrete: true }
|
|
237
|
+
);
|
|
238
|
+
}
|
|
172
239
|
};
|
|
173
240
|
const eventDetail = { originalEvent: event };
|
|
174
|
-
|
|
241
|
+
isPointerDownOutsideRef.current = true;
|
|
242
|
+
isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;
|
|
243
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
244
|
+
if (!deferPointerDownOutside || event.button !== 0) {
|
|
245
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
|
246
|
+
} else {
|
|
175
247
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
176
248
|
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
177
249
|
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
178
|
-
} else {
|
|
179
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
180
250
|
}
|
|
181
251
|
} else {
|
|
182
252
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
253
|
+
resetOutsideInteraction();
|
|
183
254
|
}
|
|
184
255
|
isPointerInsideReactTreeRef.current = false;
|
|
185
256
|
};
|
|
257
|
+
const outsideInteractionEvents = [
|
|
258
|
+
"pointerup",
|
|
259
|
+
"mousedown",
|
|
260
|
+
"mouseup",
|
|
261
|
+
"touchstart",
|
|
262
|
+
"touchend",
|
|
263
|
+
"click"
|
|
264
|
+
];
|
|
265
|
+
for (const eventName of outsideInteractionEvents) {
|
|
266
|
+
ownerDocument.addEventListener(eventName, handleInteractionCapture, true);
|
|
267
|
+
ownerDocument.addEventListener(eventName, handleInteractionBubble);
|
|
268
|
+
}
|
|
186
269
|
const timerId = window.setTimeout(() => {
|
|
187
270
|
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
188
271
|
}, 0);
|
|
@@ -190,8 +273,18 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
190
273
|
window.clearTimeout(timerId);
|
|
191
274
|
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
192
275
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
276
|
+
for (const eventName of outsideInteractionEvents) {
|
|
277
|
+
ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);
|
|
278
|
+
ownerDocument.removeEventListener(eventName, handleInteractionBubble);
|
|
279
|
+
}
|
|
193
280
|
};
|
|
194
|
-
}, [
|
|
281
|
+
}, [
|
|
282
|
+
ownerDocument,
|
|
283
|
+
handlePointerDownOutside,
|
|
284
|
+
deferPointerDownOutside,
|
|
285
|
+
isDeferredPointerDownOutsideRef,
|
|
286
|
+
dismissableSurfaces
|
|
287
|
+
]);
|
|
195
288
|
return {
|
|
196
289
|
// ensures we check React component tree (not just DOM tree)
|
|
197
290
|
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents) {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["React","useComposedRefs","index","useEscapeKeydown","jsx","Primitive","composeEventHandlers","useCallbackRef","dispatchDiscreteCustomEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,sBAAsB,GAAG,kBAAkB;AAC/C,IAAI,cAAc,GAAG,yBAAyB;AAC9C,IAAI,oBAAoB,GAAG,qCAAqC;AAChE,IAAI,aAAa,GAAG,+BAA+B;AACnD,IAAI,yBAAyB;AAC7B,IAAI,uBAAuB,GAAGA,gBAAK,CAAC,aAAa,CAAC;AAClD,EAAE,MAAM,kBAAkB,IAAI,GAAG,EAAE;AACnC,EAAE,sCAAsC,kBAAkB,IAAI,GAAG,EAAE;AACnE,EAAE,QAAQ,kBAAkB,IAAI,GAAG;AACnC,CAAC,CAAC;AACC,IAAC,gBAAgB,GAAGA,gBAAK,CAAC,UAAU;AACvC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3B,IAAI,MAAM;AACV,MAAM,2BAA2B,GAAG,KAAK;AACzC,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,cAAc;AACpB,MAAM,iBAAiB;AACvB,MAAM,SAAS;AACf,MAAM,GAAG;AACT,KAAK,GAAG,KAAK;AACb,IAAI,MAAM,OAAO,GAAGA,gBAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC;AAC7D,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAGA,gBAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AAChD,IAAI,MAAM,aAAa,GAAG,IAAI,EAAE,aAAa,IAAI,UAAU,EAAE,QAAQ;AACrE,IAAI,MAAM,GAAG,KAAK,CAAC,GAAGA,gBAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AACxC,I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AAC;AAC1E,EAAE,CAAC,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;AACzC,EAAE,OAAO;AACT,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC,OAAO,GAAG,IAAI;AAClE,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC,OAAO,GAAG;AAC7D,GAAG;AACH;AACA,SAAS,cAAc,GAAG;AAC1B,EAAE,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,cAAc,CAAC;AAC/C,EAAE,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC/B;AACA,SAAS,4BAA4B,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE;AAC3E,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM;AAC5C,EAAE,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACnF,EAAE,IAAI,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACrE,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAIQ,mCAA2B,CAAC,MAAM,EAAE,KAAK,CAAC;AAC9C,EAAE,CAAC,MAAM;AACT,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AAC/B,EAAE;AACF;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set(),\n // Outside elements that belong to a layer's own dismiss affordance (eg, a\n // dialog overlay). Pressing them should dismiss the layer regardless of\n // whether or not they stop propagation.\n //\n // See https://github.com/radix-ui/primitives/issues/3346\n dismissableSurfaces: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n deferPointerDownOutside = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const isDeferredPointerDownOutsideRef = React.useRef(false);\n const pointerDownOutside = usePointerDownOutside(\n (event) => {\n const target = event.target;\n if (!(target instanceof Node)) {\n return;\n }\n const isPointerDownOnBranch = [...context.branches].some(\n (branch) => branch.contains(target)\n );\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n },\n {\n ownerDocument,\n deferPointerDownOutside,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces: context.dismissableSurfaces\n }\n );\n const focusOutside = useFocusOutside((event) => {\n if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) {\n return;\n }\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents) {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction useDismissableLayerSurface() {\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n React.useEffect(() => {\n if (!node) {\n return;\n }\n context.dismissableSurfaces.add(node);\n return () => {\n context.dismissableSurfaces.delete(node);\n };\n }, [node, context.dismissableSurfaces]);\n return setNode;\n}\nfunction usePointerDownOutside(onPointerDownOutside, args) {\n const {\n ownerDocument = globalThis?.document,\n deferPointerDownOutside = false,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces\n } = args;\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const isPointerDownOutsideRef = React.useRef(false);\n const interceptedOutsideInteractionEventsRef = React.useRef(/* @__PURE__ */ new Map());\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n function resetOutsideInteraction() {\n isPointerDownOutsideRef.current = false;\n isDeferredPointerDownOutsideRef.current = false;\n interceptedOutsideInteractionEventsRef.current.clear();\n }\n function isOutsideInteractionIntercepted() {\n return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);\n }\n function handleInteractionCapture(event) {\n if (!isPointerDownOutsideRef.current) {\n return;\n }\n const target = event.target;\n const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target));\n if (!isDismissableSurface) {\n interceptedOutsideInteractionEventsRef.current.set(event.type, true);\n }\n if (event.type === \"click\") {\n window.setTimeout(() => {\n if (isPointerDownOutsideRef.current) {\n handleClickRef.current();\n }\n }, 0);\n }\n }\n function handleInteractionBubble(event) {\n if (isPointerDownOutsideRef.current) {\n interceptedOutsideInteractionEventsRef.current.set(event.type, false);\n }\n }\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();\n resetOutsideInteraction();\n if (!wasOutsideInteractionIntercepted) {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n isPointerDownOutsideRef.current = true;\n isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;\n interceptedOutsideInteractionEventsRef.current.clear();\n if (!deferPointerDownOutside || event.button !== 0) {\n handleAndDispatchPointerDownOutsideEvent2();\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n resetOutsideInteraction();\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const outsideInteractionEvents = [\n \"pointerup\",\n \"mousedown\",\n \"mouseup\",\n \"touchstart\",\n \"touchend\",\n \"click\"\n ];\n for (const eventName of outsideInteractionEvents) {\n ownerDocument.addEventListener(eventName, handleInteractionCapture, true);\n ownerDocument.addEventListener(eventName, handleInteractionBubble);\n }\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n for (const eventName of outsideInteractionEvents) {\n ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);\n ownerDocument.removeEventListener(eventName, handleInteractionBubble);\n }\n };\n }, [\n ownerDocument,\n handlePointerDownOutside,\n deferPointerDownOutside,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces\n ]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root,\n useDismissableLayerSurface\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["React","useComposedRefs","index","useEscapeKeydown","jsx","Primitive","composeEventHandlers","useCallbackRef","dispatchDiscreteCustomEvent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,sBAAsB,GAAG,kBAAkB;AAC/C,IAAI,cAAc,GAAG,yBAAyB;AAC9C,IAAI,oBAAoB,GAAG,qCAAqC;AAChE,IAAI,aAAa,GAAG,+BAA+B;AACnD,IAAI,yBAAyB;AAC7B,IAAI,uBAAuB,GAAGA,gBAAK,CAAC,aAAa,CAAC;AAClD,EAAE,MAAM,kBAAkB,IAAI,GAAG,EAAE;AACnC,EAAE,sCAAsC,kBAAkB,IAAI,GAAG,EAAE;AACnE,EAAE,QAAQ,kBAAkB,IAAI,GAAG,EAAE;AACrC;AACA;AACA;AACA;AACA;AACA,EAAE,mBAAmB,kBAAkB,IAAI,GAAG;AAC9C,CAAC,CAAC;AACC,IAAC,gBAAgB,GAAGA,gBAAK,CAAC,UAAU;AACvC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3B,IAAI,MAAM;AACV,MAAM,2BAA2B,GAAG,KAAK;AACzC,MAAM,uBAAuB,GAAG,KAAK;AACrC,MAAM,eAAe;AACrB,MAAM,oBAAoB;AAC1B,MAAM,cAAc;AACpB,MAAM,iBAAiB;AACvB,MAAM,SAAS;AACf,MAAM,GAAG;AACT,KAAK,GAAG,KAAK;AACb,IAAI,MAAM,OAAO,GAAGA,gBAAK,CAAC,UAAU,CA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AE;AAC3E,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM;AAC5C,EAAE,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACnF,EAAE,IAAI,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACrE,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAIQ,mCAA2B,CAAC,MAAM,EAAE,KAAK,CAAC;AAC9C,EAAE,CAAC,MAAM;AACT,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AAC/B,EAAE;AACF;;;;;","x_google_ignoreList":[0]}
|
|
@@ -254,6 +254,7 @@ var PopoverContentImpl = React__namespace.forwardRef(
|
|
|
254
254
|
onPointerDownOutside,
|
|
255
255
|
onFocusOutside,
|
|
256
256
|
onDismiss: () => context.onOpenChange(false),
|
|
257
|
+
deferPointerDownOutside: true,
|
|
257
258
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
258
259
|
index$1.Content,
|
|
259
260
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContextScope","createPopperScope","React","useControllableState","jsx","PopperPrimitive.Root","useId","PopperPrimitive.Anchor","useComposedRefs","Primitive","composeEventHandlers","Presence","PortalPrimitive","createSlot","hideOthers","RemoveScroll","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","PopperPrimitive.Arrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,YAAY,GAAG,SAAS;AAC5B,IAAI,CAAC,oBAAwC,CAAC,GAAGA,0BAAkB,CAAC,YAAY,EAAE;AAClF,EAAEC;AACF,CAAC,CAAC;AACF,IAAI,cAAc,GAAGA,yBAAiB,EAAE;AACxC,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,GAAG,oBAAoB,CAAC,YAAY,CAAC;AAC1E,IAAC,OAAO,GAAG,CAAC,KAAK,KAAK;AACzB,EAAE,MAAM;AACR,IAAI,cAAc;AAClB,IAAI,QAAQ;AACZ,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,KAAK,GAAG;AACZ,GAAG,GAAG,KAAK;AACX,EAAE,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC;AACpD,EAAE,MAAM,UAAU,GAAGC,gBAAK,CAAC,MAAM,CAAC,IAAI,CAAC;AACvC,EAAE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAGA,gBAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AACrE,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAGC,4BAAoB,CAAC;AAC/C,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,WAAW,EAAE,WAAW,IAAI,KAAK;AACrC,IAAI,QAAQ,EAAE,YAAY;AAC1B,IAAI,MAAM,EAAE;AACZ,GAAG,CAAC;AACJ,EAAE,uBAAuBC,cAAG,CAACC,YAAoB,EAAE,EAAE,GAAG,WAAW,EAAE,QAAQ,kBAAkBD,cAAG;AAClG,IAAI,eAAe;AACnB,IAAI;AACJ,MAAM,KAAK,EAAE,cAAc;AAC3B,MAAM,SAAS,EAAEE,aAAK,EA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ACrC,SAAS,QAAQ,CAAC,IAAI,EAAE;AACxB,EAAE,OAAO,IAAI,GAAG,MAAM,GAAG,QAAQ;AACjC;AACG,IAAC,KAAK,GAAG;AAGT,IAAC,MAAM,GAAG;AACV,IAAC,QAAQ,GAAG;AACZ,IAAC,KAAK,GAAG;AACT,IAAC,MAAM,GAAG;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n deferPointerDownOutside: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContextScope","createPopperScope","React","useControllableState","jsx","PopperPrimitive.Root","useId","PopperPrimitive.Anchor","useComposedRefs","Primitive","composeEventHandlers","Presence","PortalPrimitive","createSlot","hideOthers","RemoveScroll","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","PopperPrimitive.Arrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,IAAI,YAAY,GAAG,SAAS;AAC5B,IAAI,CAAC,oBAAwC,CAAC,GAAGA,0BAAkB,CAAC,YAAY,EAAE;AAClF,EAAEC;AACF,CAAC,CAAC;AACF,IAAI,cAAc,GAAGA,yBAAiB,EAAE;AACxC,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,GAAG,oBAAoB,CAAC,YAAY,CAAC;AAC1E,IAAC,OAAO,GAAG,CAAC,KAAK,KAAK;AACzB,EAAE,MAAM;AACR,IAAI,cAAc;AAClB,IAAI,QAAQ;AACZ,IAAI,IAAI,EAAE,QAA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,IAAI,uBAAuBE,cAAG;AAC9B,MAAMK,iBAAS,CAAC,MAAM;AACtB,MAAM;AACN,QAAQ,IAAI,EAAE,QAAQ;AACtB,QAAQ,GAAG,UAAU;AACrB,QAAQ,GAAG,EAAE,YAAY;AACzB,QAAQ,OAAO,EAAEC,4BAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC;AACtF;AACA,KAAK;AACL,EAAE;AACF;AACA,YAAY,CAAC,WAAW,GAAG,UAAU;AACrC,IAAI,UAAU,GAAG,cAAc;AAC5B,IAAC,YAAY,GAAGR,gBAAK,CAAC,UAAU;AACnC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3B,IAAI,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK;AACnD,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC;AACtD,IAAI,uBAAuBE,cAAG,CAACgB,aAAqB,EAAE,EAAE,GAAG,WAAW,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAC3G,EAAE;AACF;AACA,YAAY,CAAC,WAAW,GAAG,UAAU;AACrC,SAAS,QAAQ,CAAC,IAAI,EAAE;AACxB,EAAE,OAAO,IAAI,GAAG,MAAM,GAAG,QAAQ;AACjC;AACG,IAAC,KAAK,GAAG;AAGT,IAAC,MAAM,GAAG;AACV,IAAC,QAAQ,GAAG;AACZ,IAAC,KAAK,GAAG;AACT,IAAC,MAAM,GAAG;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -106,7 +106,7 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
106
106
|
alignOffset = 0,
|
|
107
107
|
arrowPadding = 0,
|
|
108
108
|
avoidCollisions = true,
|
|
109
|
-
collisionBoundary,
|
|
109
|
+
collisionBoundary = [],
|
|
110
110
|
collisionPadding: collisionPaddingProp = 0,
|
|
111
111
|
sticky = "partial",
|
|
112
112
|
hideWhenDetached = false,
|
|
@@ -123,11 +123,11 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
123
123
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
124
124
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
125
125
|
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
|
|
126
|
-
const boundary =
|
|
127
|
-
const hasExplicitBoundaries = boundary
|
|
126
|
+
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
|
|
127
|
+
const hasExplicitBoundaries = boundary.length > 0;
|
|
128
128
|
const detectOverflowOptions = {
|
|
129
129
|
padding: collisionPadding,
|
|
130
|
-
boundary: boundary
|
|
130
|
+
boundary: boundary.filter(isNotNull),
|
|
131
131
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
132
132
|
altBoundary: hasExplicitBoundaries
|
|
133
133
|
};
|
|
@@ -166,7 +166,18 @@ var PopperContent = React__namespace.forwardRef(
|
|
|
166
166
|
}),
|
|
167
167
|
arrow && floatingUi_reactDom.arrow({ element: arrow, padding: arrowPadding }),
|
|
168
168
|
transformOrigin({ arrowWidth, arrowHeight }),
|
|
169
|
-
hideWhenDetached && floatingUi_reactDom.hide({
|
|
169
|
+
hideWhenDetached && floatingUi_reactDom.hide({
|
|
170
|
+
strategy: "referenceHidden",
|
|
171
|
+
...detectOverflowOptions,
|
|
172
|
+
// `hide` detects whether the anchor (reference) is clipped, so when
|
|
173
|
+
// no explicit `collisionBoundary` is set we fall back to Floating
|
|
174
|
+
// UI's default clipping ancestors (e.g. a scrollable menu). This
|
|
175
|
+
// lets an occluded submenu hide once its anchor scrolls out of view
|
|
176
|
+
// (#3237). The collision/size middlewares deliberately keep the
|
|
177
|
+
// viewport-based default to avoid clamping content rendered inside
|
|
178
|
+
// transformed or overflow-clipping portal containers.
|
|
179
|
+
boundary: hasExplicitBoundaries ? detectOverflowOptions.boundary : void 0
|
|
180
|
+
})
|
|
170
181
|
]
|
|
171
182
|
});
|
|
172
183
|
const setPlacementState = context.setPlacementState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n const [placementState, setPlacementState] = React.useState(void 0);\n return /* @__PURE__ */ jsx(\n PopperProvider,\n {\n scope: __scopePopper,\n anchor,\n onAnchorChange: setAnchor,\n placementState,\n setPlacementState,\n children\n }\n );\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const onAnchorChange = context.onAnchorChange;\n const callbackRef = React.useCallback(\n (node) => {\n ref.current = node;\n if (node) {\n onAnchorChange(node);\n }\n },\n [onAnchorChange]\n );\n const composedRefs = useComposedRefs(forwardedRef, callbackRef);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n if (!virtualRef) {\n return;\n }\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef.current;\n if (previousAnchor !== anchorRef.current) {\n onAnchorChange(anchorRef.current);\n }\n });\n const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);\n const placedSide = sideAndAlign?.[0];\n const placedAlign = sideAndAlign?.[1];\n return virtualRef ? null : /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-popper-side\": placedSide,\n \"data-radix-popper-align\": placedAlign,\n ...anchorProps,\n ref: composedRefs\n }\n );\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary,\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = collisionBoundary ? Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary] : void 0;\n const hasExplicitBoundaries = boundary !== void 0 && boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary?.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const setPlacementState = context.setPlacementState;\n useLayoutEffect(() => {\n setPlacementState(placement);\n return () => {\n setPlacementState(void 0);\n };\n }, [placement, setPlacementState]);\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n \"--radix-popper-transform-origin\": [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n placedAlign,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContextScope","React","jsx","useComposedRefs","Primitive","useSize","useFloating","autoUpdate","offset","shift","limitShift","flip","size","floatingUIarrow","hide","useLayoutEffect","useCallbackRef","ArrowPrimitive.Root"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,WAAW,GAAG,QAAQ;AACvB,IAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,GAAGA,0BAAkB,CAAC,WAAW;AAC7E,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,mBAAmB,CAAC,WAAW,CAAC;AACtE,IAAC,MAAM,GAAG,CAAC,KAAK,KAAK;AACxB,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,KAAK;AAC3C,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGC,gBAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AAClD,EAAE,MAAM,CAAC,cAAc,EAAE,iBAAiB,C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C7B,MAAM,CAAC,GAAG,aAAa,GAAG,YAAY,GAAG,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC;AAC5D,IAAI,CAAC,MAAM,IAAI,UAAU,KAAK,MAAM,EAAE;AACtC,MAAM,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,WAAW,CAAC,EAAE,CAAC;AACnD,MAAM,CAAC,GAAG,aAAa,GAAG,YAAY,GAAG,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC;AAC5D,IAAI;AACJ,IAAI,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;AAC7B,EAAE;AACF,CAAC,CAAC;AACF,SAAS,4BAA4B,CAAC,SAAS,EAAE;AACjD,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;AACvD,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;AACtB;AACG,IAAC,KAAK,GAAG;AACT,IAAC,MAAM,GAAG;AACV,IAAC,OAAO,GAAG;AACX,IAAC,KAAK,GAAG;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n const [placementState, setPlacementState] = React.useState(void 0);\n return /* @__PURE__ */ jsx(\n PopperProvider,\n {\n scope: __scopePopper,\n anchor,\n onAnchorChange: setAnchor,\n placementState,\n setPlacementState,\n children\n }\n );\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const onAnchorChange = context.onAnchorChange;\n const callbackRef = React.useCallback(\n (node) => {\n ref.current = node;\n if (node) {\n onAnchorChange(node);\n }\n },\n [onAnchorChange]\n );\n const composedRefs = useComposedRefs(forwardedRef, callbackRef);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n if (!virtualRef) {\n return;\n }\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef.current;\n if (previousAnchor !== anchorRef.current) {\n onAnchorChange(anchorRef.current);\n }\n });\n const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);\n const placedSide = sideAndAlign?.[0];\n const placedAlign = sideAndAlign?.[1];\n return virtualRef ? null : /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-popper-side\": placedSide,\n \"data-radix-popper-align\": placedAlign,\n ...anchorProps,\n ref: composedRefs\n }\n );\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({\n strategy: \"referenceHidden\",\n ...detectOverflowOptions,\n // `hide` detects whether the anchor (reference) is clipped, so when\n // no explicit `collisionBoundary` is set we fall back to Floating\n // UI's default clipping ancestors (e.g. a scrollable menu). This\n // lets an occluded submenu hide once its anchor scrolls out of view\n // (#3237). The collision/size middlewares deliberately keep the\n // viewport-based default to avoid clamping content rendered inside\n // transformed or overflow-clipping portal containers.\n boundary: hasExplicitBoundaries ? detectOverflowOptions.boundary : void 0\n })\n ]\n });\n const setPlacementState = context.setPlacementState;\n useLayoutEffect(() => {\n setPlacementState(placement);\n return () => {\n setPlacementState(void 0);\n };\n }, [placement, setPlacementState]);\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n \"--radix-popper-transform-origin\": [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n placedAlign,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContextScope","React","jsx","useComposedRefs","Primitive","useSize","useFloating","autoUpdate","offset","shift","limitShift","flip","size","floatingUIarrow","hide","useLayoutEffect","useCallbackRef","ArrowPrimitive.Root"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAI,WAAW,GAAG,QAAQ;AACvB,IAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,GAAGA,0BAAkB,CAAC,WAAW;AAC7E,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,mBAAmB,CAAC,WAAW,CAAC;AACtE,IAAC,MAAM,GAAG,CAAC,KAAK,KAAK;AACxB,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,KAAK;AAC3C,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGC,gBAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AAClD,EAAE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAGA,gBAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;AACpE,EAAE,uBAAuBC,cAAG;AAC5B,IAAI,cAAc;AAClB,IAAI;AACJ,MAAM,KAAK,EAAE,aAAa;AAC1B,MAAM,MAAM;AACZ,MAAM,cAAc,EAAE,SAAS;AAC/B,MAAM,cAAc;AACpB,MAAM,iBAAiB;AACvB,MAAM;AACN;AACA,GAAG;AACH;AACA,MAAM,CAAC,WAAW,GAAG,WAAW;AAChC,IAAI,WAAW,GAAG,cAAc;AAC7B,IAAC,YAAY,GAAGD,gBAAK,CAA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AAC,EAAE,YAAY,CAAC,EAAE,CAAC;AAC5D,IAAI;AACJ,IAAI,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE;AAC7B,EAAE;AACF,CAAC,CAAC;AACF,SAAS,4BAA4B,CAAC,SAAS,EAAE;AACjD,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;AACvD,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;AACtB;AACG,IAAC,KAAK,GAAG;AACT,IAAC,MAAM,GAAG;AACV,IAAC,OAAO,GAAG;AACX,IAAC,KAAK,GAAG;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -14,12 +14,19 @@ var originalBodyPointerEvents;
|
|
|
14
14
|
var DismissableLayerContext = React.createContext({
|
|
15
15
|
layers: /* @__PURE__ */ new Set(),
|
|
16
16
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
17
|
-
branches: /* @__PURE__ */ new Set()
|
|
17
|
+
branches: /* @__PURE__ */ new Set(),
|
|
18
|
+
// Outside elements that belong to a layer's own dismiss affordance (eg, a
|
|
19
|
+
// dialog overlay). Pressing them should dismiss the layer regardless of
|
|
20
|
+
// whether or not they stop propagation.
|
|
21
|
+
//
|
|
22
|
+
// See https://github.com/radix-ui/primitives/issues/3346
|
|
23
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
18
24
|
});
|
|
19
25
|
var DismissableLayer = React.forwardRef(
|
|
20
26
|
(props, forwardedRef) => {
|
|
21
27
|
const {
|
|
22
28
|
disableOutsidePointerEvents = false,
|
|
29
|
+
deferPointerDownOutside = false,
|
|
23
30
|
onEscapeKeyDown,
|
|
24
31
|
onPointerDownOutside,
|
|
25
32
|
onFocusOutside,
|
|
@@ -38,15 +45,32 @@ var DismissableLayer = React.forwardRef(
|
|
|
38
45
|
const index = node ? layers.indexOf(node) : -1;
|
|
39
46
|
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
40
47
|
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
const isDeferredPointerDownOutsideRef = React.useRef(false);
|
|
49
|
+
const pointerDownOutside = usePointerDownOutside(
|
|
50
|
+
(event) => {
|
|
51
|
+
const target = event.target;
|
|
52
|
+
if (!(target instanceof Node)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const isPointerDownOnBranch = [...context.branches].some(
|
|
56
|
+
(branch) => branch.contains(target)
|
|
57
|
+
);
|
|
58
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
59
|
+
onPointerDownOutside?.(event);
|
|
60
|
+
onInteractOutside?.(event);
|
|
61
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
ownerDocument,
|
|
65
|
+
deferPointerDownOutside,
|
|
66
|
+
isDeferredPointerDownOutsideRef,
|
|
67
|
+
dismissableSurfaces: context.dismissableSurfaces
|
|
68
|
+
}
|
|
69
|
+
);
|
|
49
70
|
const focusOutside = useFocusOutside((event) => {
|
|
71
|
+
if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
50
74
|
const target = event.target;
|
|
51
75
|
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
52
76
|
if (isFocusInBranch) return;
|
|
@@ -133,35 +157,94 @@ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
|
133
157
|
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
134
158
|
});
|
|
135
159
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
136
|
-
function usePointerDownOutside(onPointerDownOutside,
|
|
160
|
+
function usePointerDownOutside(onPointerDownOutside, args) {
|
|
161
|
+
const {
|
|
162
|
+
ownerDocument = globalThis?.document,
|
|
163
|
+
deferPointerDownOutside = false,
|
|
164
|
+
isDeferredPointerDownOutsideRef,
|
|
165
|
+
dismissableSurfaces
|
|
166
|
+
} = args;
|
|
137
167
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
138
168
|
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
169
|
+
const isPointerDownOutsideRef = React.useRef(false);
|
|
170
|
+
const interceptedOutsideInteractionEventsRef = React.useRef(/* @__PURE__ */ new Map());
|
|
139
171
|
const handleClickRef = React.useRef(() => {
|
|
140
172
|
});
|
|
141
173
|
React.useEffect(() => {
|
|
174
|
+
function resetOutsideInteraction() {
|
|
175
|
+
isPointerDownOutsideRef.current = false;
|
|
176
|
+
isDeferredPointerDownOutsideRef.current = false;
|
|
177
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
178
|
+
}
|
|
179
|
+
function isOutsideInteractionIntercepted() {
|
|
180
|
+
return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);
|
|
181
|
+
}
|
|
182
|
+
function handleInteractionCapture(event) {
|
|
183
|
+
if (!isPointerDownOutsideRef.current) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
const target = event.target;
|
|
187
|
+
const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target));
|
|
188
|
+
if (!isDismissableSurface) {
|
|
189
|
+
interceptedOutsideInteractionEventsRef.current.set(event.type, true);
|
|
190
|
+
}
|
|
191
|
+
if (event.type === "click") {
|
|
192
|
+
window.setTimeout(() => {
|
|
193
|
+
if (isPointerDownOutsideRef.current) {
|
|
194
|
+
handleClickRef.current();
|
|
195
|
+
}
|
|
196
|
+
}, 0);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function handleInteractionBubble(event) {
|
|
200
|
+
if (isPointerDownOutsideRef.current) {
|
|
201
|
+
interceptedOutsideInteractionEventsRef.current.set(event.type, false);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
142
204
|
const handlePointerDown = (event) => {
|
|
143
205
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
144
206
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
207
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
208
|
+
const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();
|
|
209
|
+
resetOutsideInteraction();
|
|
210
|
+
if (!wasOutsideInteractionIntercepted) {
|
|
211
|
+
handleAndDispatchCustomEvent(
|
|
212
|
+
POINTER_DOWN_OUTSIDE,
|
|
213
|
+
handlePointerDownOutside,
|
|
214
|
+
eventDetail,
|
|
215
|
+
{ discrete: true }
|
|
216
|
+
);
|
|
217
|
+
}
|
|
151
218
|
};
|
|
152
219
|
const eventDetail = { originalEvent: event };
|
|
153
|
-
|
|
220
|
+
isPointerDownOutsideRef.current = true;
|
|
221
|
+
isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;
|
|
222
|
+
interceptedOutsideInteractionEventsRef.current.clear();
|
|
223
|
+
if (!deferPointerDownOutside || event.button !== 0) {
|
|
224
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
|
225
|
+
} else {
|
|
154
226
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
155
227
|
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
156
228
|
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
157
|
-
} else {
|
|
158
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
159
229
|
}
|
|
160
230
|
} else {
|
|
161
231
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
232
|
+
resetOutsideInteraction();
|
|
162
233
|
}
|
|
163
234
|
isPointerInsideReactTreeRef.current = false;
|
|
164
235
|
};
|
|
236
|
+
const outsideInteractionEvents = [
|
|
237
|
+
"pointerup",
|
|
238
|
+
"mousedown",
|
|
239
|
+
"mouseup",
|
|
240
|
+
"touchstart",
|
|
241
|
+
"touchend",
|
|
242
|
+
"click"
|
|
243
|
+
];
|
|
244
|
+
for (const eventName of outsideInteractionEvents) {
|
|
245
|
+
ownerDocument.addEventListener(eventName, handleInteractionCapture, true);
|
|
246
|
+
ownerDocument.addEventListener(eventName, handleInteractionBubble);
|
|
247
|
+
}
|
|
165
248
|
const timerId = window.setTimeout(() => {
|
|
166
249
|
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
167
250
|
}, 0);
|
|
@@ -169,8 +252,18 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
169
252
|
window.clearTimeout(timerId);
|
|
170
253
|
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
171
254
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
255
|
+
for (const eventName of outsideInteractionEvents) {
|
|
256
|
+
ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);
|
|
257
|
+
ownerDocument.removeEventListener(eventName, handleInteractionBubble);
|
|
258
|
+
}
|
|
172
259
|
};
|
|
173
|
-
}, [
|
|
260
|
+
}, [
|
|
261
|
+
ownerDocument,
|
|
262
|
+
handlePointerDownOutside,
|
|
263
|
+
deferPointerDownOutside,
|
|
264
|
+
isDeferredPointerDownOutsideRef,
|
|
265
|
+
dismissableSurfaces
|
|
266
|
+
]);
|
|
174
267
|
return {
|
|
175
268
|
// ensures we check React component tree (not just DOM tree)
|
|
176
269
|
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents) {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;;;AAUA,IAAI,sBAAsB,GAAG,kBAAkB;AAC/C,IAAI,cAAc,GAAG,yBAAyB;AAC9C,IAAI,oBAAoB,GAAG,qCAAqC;AAChE,IAAI,aAAa,GAAG,+BAA+B;AACnD,IAAI,yBAAyB;A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C,aAAa,CAAC,MAAM;AAC5C,EAAE,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACnF,EAAE,IAAI,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACrE,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,2BAA2B,CAAC,MAAM,EAAE,KAAK,CAAC;AAC9C,EAAE,CAAC,MAAM;AACT,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AAC/B,EAAE;AACF;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set(),\n // Outside elements that belong to a layer's own dismiss affordance (eg, a\n // dialog overlay). Pressing them should dismiss the layer regardless of\n // whether or not they stop propagation.\n //\n // See https://github.com/radix-ui/primitives/issues/3346\n dismissableSurfaces: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n deferPointerDownOutside = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const isDeferredPointerDownOutsideRef = React.useRef(false);\n const pointerDownOutside = usePointerDownOutside(\n (event) => {\n const target = event.target;\n if (!(target instanceof Node)) {\n return;\n }\n const isPointerDownOnBranch = [...context.branches].some(\n (branch) => branch.contains(target)\n );\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n },\n {\n ownerDocument,\n deferPointerDownOutside,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces: context.dismissableSurfaces\n }\n );\n const focusOutside = useFocusOutside((event) => {\n if (deferPointerDownOutside && isDeferredPointerDownOutsideRef.current) {\n return;\n }\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents) {\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction useDismissableLayerSurface() {\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n React.useEffect(() => {\n if (!node) {\n return;\n }\n context.dismissableSurfaces.add(node);\n return () => {\n context.dismissableSurfaces.delete(node);\n };\n }, [node, context.dismissableSurfaces]);\n return setNode;\n}\nfunction usePointerDownOutside(onPointerDownOutside, args) {\n const {\n ownerDocument = globalThis?.document,\n deferPointerDownOutside = false,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces\n } = args;\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const isPointerDownOutsideRef = React.useRef(false);\n const interceptedOutsideInteractionEventsRef = React.useRef(/* @__PURE__ */ new Map());\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n function resetOutsideInteraction() {\n isPointerDownOutsideRef.current = false;\n isDeferredPointerDownOutsideRef.current = false;\n interceptedOutsideInteractionEventsRef.current.clear();\n }\n function isOutsideInteractionIntercepted() {\n return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);\n }\n function handleInteractionCapture(event) {\n if (!isPointerDownOutsideRef.current) {\n return;\n }\n const target = event.target;\n const isDismissableSurface = target instanceof Node && [...dismissableSurfaces].some((surface) => surface.contains(target));\n if (!isDismissableSurface) {\n interceptedOutsideInteractionEventsRef.current.set(event.type, true);\n }\n if (event.type === \"click\") {\n window.setTimeout(() => {\n if (isPointerDownOutsideRef.current) {\n handleClickRef.current();\n }\n }, 0);\n }\n }\n function handleInteractionBubble(event) {\n if (isPointerDownOutsideRef.current) {\n interceptedOutsideInteractionEventsRef.current.set(event.type, false);\n }\n }\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n const wasOutsideInteractionIntercepted = isOutsideInteractionIntercepted();\n resetOutsideInteraction();\n if (!wasOutsideInteractionIntercepted) {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n }\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n isPointerDownOutsideRef.current = true;\n isDeferredPointerDownOutsideRef.current = deferPointerDownOutside && event.button === 0;\n interceptedOutsideInteractionEventsRef.current.clear();\n if (!deferPointerDownOutside || event.button !== 0) {\n handleAndDispatchPointerDownOutsideEvent2();\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n resetOutsideInteraction();\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const outsideInteractionEvents = [\n \"pointerup\",\n \"mousedown\",\n \"mouseup\",\n \"touchstart\",\n \"touchend\",\n \"click\"\n ];\n for (const eventName of outsideInteractionEvents) {\n ownerDocument.addEventListener(eventName, handleInteractionCapture, true);\n ownerDocument.addEventListener(eventName, handleInteractionBubble);\n }\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n for (const eventName of outsideInteractionEvents) {\n ownerDocument.removeEventListener(eventName, handleInteractionCapture, true);\n ownerDocument.removeEventListener(eventName, handleInteractionBubble);\n }\n };\n }, [\n ownerDocument,\n handlePointerDownOutside,\n deferPointerDownOutside,\n isDeferredPointerDownOutsideRef,\n dismissableSurfaces\n ]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root,\n useDismissableLayerSurface\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;;;AAUA,IAAI,sBAAsB,GAAG,kBAAkB;AAC/C,IAAI,cAAc,GAAG,yBAAyB;AAC9C,IAAI,oBAAoB,GAAG,qCAAqC;AAChE,IAAI,aAAa,GAAG,+BAA+B;AACnD,IAAI,yBAAyB;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CAAC,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC;AAC1D,IAAI,OAAO,MAAM,aAAa,CAAC,mBAAmB,CAAC,SAAS,EAAE,WAAW,CAAC;AAC1E,EAAE,CAAC,EAAE,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;AACzC,EAAE,OAAO;AACT,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC,OAAO,GAAG,IAAI;AAClE,IAAI,aAAa,EAAE,MAAM,yBAAyB,CAAC,OAAO,GAAG;AAC7D,GAAG;AACH;AACA,SAAS,cAAc,GAAG;AAC1B,EAAE,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,cAAc,CAAC;AAC/C,EAAE,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AAC/B;AACA,SAAS,4BAA4B,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE;AAC3E,EAAE,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,MAAM;AAC5C,EAAE,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACnF,EAAE,IAAI,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACrE,EAAE,IAAI,QAAQ,EAAE;AAChB,IAAI,2BAA2B,CAAC,MAAM,EAAE,KAAK,CAAC;AAC9C,EAAE,CAAC,MAAM;AACT,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;AAC/B,EAAE;AACF;;;;","x_google_ignoreList":[0]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PopperPrimitive.Root","PopperPrimitive.Anchor","PortalPrimitive","RemoveScroll","PopperPrimitive.Content","PopperPrimitive.Arrow"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,IAAI,YAAY,GAAG,SAAS;AAC5B,IAAI,CAAC,oBAAwC,CAAC,GAAG,kBAAkB,CAAC,YAAY,EAAE;AAClF,EAAE;AACF,CAAC,CAAC;AACF,IAAI,cAAc,GAAG,iBAAiB,EAAE;AACxC,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,GAAG,oBAAoB,CAAC,YAAY,CAAC;AAC1E,IAAC,OAAO,GAAG,CAAC,KAAK,KAAK;AACzB,EAAE,MAAM;AACR,IAAI,cAAc;AAClB,IAAI,QAAQ;AACZ,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,KAAK,GAAG;AACZ,GAAG,GAAG,KAAK;AACX,EAAE,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC;AACpD,EAAE,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;AACvC,EAAE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AACrE,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,oBAAoB,CAAC;AAC/C,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,WAAW,EAAE,WAAW,IAAI,KAAK;AACrC,IAAI,QAAQ,EAAE,YAAY;AAC1B,IAAI,MAAM,EAAE;AACZ,GAAG,CAAC;AACJ,EAAE,uBAA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E,YAAY,EAAE,CAAC;AAC3G,EAAE;AACF;AACA,YAAY,CAAC,WAAW,GAAG,UAAU;AACrC,SAAS,QAAQ,CAAC,IAAI,EAAE;AACxB,EAAE,OAAO,IAAI,GAAG,MAAM,GAAG,QAAQ;AACjC;AACG,IAAC,KAAK,GAAG;AAGT,IAAC,MAAM,GAAG;AACV,IAAC,QAAQ,GAAG;AACZ,IAAC,KAAK,GAAG;AACT,IAAC,MAAM,GAAG;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: POPOVER_NAME\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar Slot = createSlot(\"PopoverContent.RemoveScroll\");\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n deferPointerDownOutside: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["PopperPrimitive.Root","PopperPrimitive.Anchor","PortalPrimitive","RemoveScroll","PopperPrimitive.Content","PopperPrimitive.Arrow"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,IAAI,YAAY,GAAG,SAAS;AAC5B,IAAI,CAAC,oBAAwC,CAAC,GAAG,kBAAkB,CAAC,YAAY,EAAE;AAClF,EAAE;AACF,CAAC,CAAC;AACF,IAAI,cAAc,GAAG,iBAAiB,EAAE;AACxC,IAAI,CAAC,eAAe,EAAE,iBAAiB,CAAC,GAAG,oBAAoB,CAAC,YAAY,CAAC;AAC1E,IAAC,OAAO,GAAG,CAAC,KAAK,KAAK;AACzB,EAAE,MAAM;AACR,IAAI,cAAc;AAClB,IAAI,QAAQ;AACZ,IAAI,IAAI,EAAE,QAAQ;AAClB,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,KAAK,GAAG;AACZ,GAA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OAAO,EAAE,oBAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC;AACtF;AACA,KAAK;AACL,EAAE;AACF;AACA,YAAY,CAAC,WAAW,GAAG,UAAU;AACrC,IAAI,UAAU,GAAG,cAAc;AAC5B,IAAC,YAAY,GAAG,KAAK,CAAC,UAAU;AACnC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3B,IAAI,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK;AACnD,IAAI,MAAM,WAAW,GAAG,cAAc,CAAC,cAAc,CAAC;AACtD,IAAI,uBAAuB,GAAG,CAACC,KAAqB,EAAE,EAAE,GAAG,WAAW,EAAE,GAAG,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAC3G,EAAE;AACF;AACA,YAAY,CAAC,WAAW,GAAG,UAAU;AACrC,SAAS,QAAQ,CAAC,IAAI,EAAE;AACxB,EAAE,OAAO,IAAI,GAAG,MAAM,GAAG,QAAQ;AACjC;AACG,IAAC,KAAK,GAAG;AAGT,IAAC,MAAM,GAAG;AACV,IAAC,QAAQ,GAAG;AACZ,IAAC,KAAK,GAAG;AACT,IAAC,MAAM,GAAG;;;;","x_google_ignoreList":[0]}
|
|
@@ -85,7 +85,7 @@ var PopperContent = React.forwardRef(
|
|
|
85
85
|
alignOffset = 0,
|
|
86
86
|
arrowPadding = 0,
|
|
87
87
|
avoidCollisions = true,
|
|
88
|
-
collisionBoundary,
|
|
88
|
+
collisionBoundary = [],
|
|
89
89
|
collisionPadding: collisionPaddingProp = 0,
|
|
90
90
|
sticky = "partial",
|
|
91
91
|
hideWhenDetached = false,
|
|
@@ -102,11 +102,11 @@ var PopperContent = React.forwardRef(
|
|
|
102
102
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
103
103
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
104
104
|
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
|
|
105
|
-
const boundary =
|
|
106
|
-
const hasExplicitBoundaries = boundary
|
|
105
|
+
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
|
|
106
|
+
const hasExplicitBoundaries = boundary.length > 0;
|
|
107
107
|
const detectOverflowOptions = {
|
|
108
108
|
padding: collisionPadding,
|
|
109
|
-
boundary: boundary
|
|
109
|
+
boundary: boundary.filter(isNotNull),
|
|
110
110
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
111
111
|
altBoundary: hasExplicitBoundaries
|
|
112
112
|
};
|
|
@@ -145,7 +145,18 @@ var PopperContent = React.forwardRef(
|
|
|
145
145
|
}),
|
|
146
146
|
arrow$1 && arrow({ element: arrow$1, padding: arrowPadding }),
|
|
147
147
|
transformOrigin({ arrowWidth, arrowHeight }),
|
|
148
|
-
hideWhenDetached && hide({
|
|
148
|
+
hideWhenDetached && hide({
|
|
149
|
+
strategy: "referenceHidden",
|
|
150
|
+
...detectOverflowOptions,
|
|
151
|
+
// `hide` detects whether the anchor (reference) is clipped, so when
|
|
152
|
+
// no explicit `collisionBoundary` is set we fall back to Floating
|
|
153
|
+
// UI's default clipping ancestors (e.g. a scrollable menu). This
|
|
154
|
+
// lets an occluded submenu hide once its anchor scrolls out of view
|
|
155
|
+
// (#3237). The collision/size middlewares deliberately keep the
|
|
156
|
+
// viewport-based default to avoid clamping content rendered inside
|
|
157
|
+
// transformed or overflow-clipping portal containers.
|
|
158
|
+
boundary: hasExplicitBoundaries ? detectOverflowOptions.boundary : void 0
|
|
159
|
+
})
|
|
149
160
|
]
|
|
150
161
|
});
|
|
151
162
|
const setPlacementState = context.setPlacementState;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n const [placementState, setPlacementState] = React.useState(void 0);\n return /* @__PURE__ */ jsx(\n PopperProvider,\n {\n scope: __scopePopper,\n anchor,\n onAnchorChange: setAnchor,\n placementState,\n setPlacementState,\n children\n }\n );\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const onAnchorChange = context.onAnchorChange;\n const callbackRef = React.useCallback(\n (node) => {\n ref.current = node;\n if (node) {\n onAnchorChange(node);\n }\n },\n [onAnchorChange]\n );\n const composedRefs = useComposedRefs(forwardedRef, callbackRef);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n if (!virtualRef) {\n return;\n }\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef.current;\n if (previousAnchor !== anchorRef.current) {\n onAnchorChange(anchorRef.current);\n }\n });\n const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);\n const placedSide = sideAndAlign?.[0];\n const placedAlign = sideAndAlign?.[1];\n return virtualRef ? null : /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-popper-side\": placedSide,\n \"data-radix-popper-align\": placedAlign,\n ...anchorProps,\n ref: composedRefs\n }\n );\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary,\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = collisionBoundary ? Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary] : void 0;\n const hasExplicitBoundaries = boundary !== void 0 && boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary?.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const setPlacementState = context.setPlacementState;\n useLayoutEffect(() => {\n setPlacementState(placement);\n return () => {\n setPlacementState(void 0);\n };\n }, [placement, setPlacementState]);\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n \"--radix-popper-transform-origin\": [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n placedAlign,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["arrow","floatingUIarrow","useLayoutEffect","ArrowPrimitive.Root"],"mappings":";;;;;;;;;;;;AAyBA,IAAI,WAAW,GAAG,QAAQ;AACvB,IAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,GAAG,kBAAkB,CAAC,WAAW;AAC7E,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,mBAAmB,CAAC,WAAW,CAAC;AACtE,IAAC,MAAM,GAAG,CAAC,KAAK,KAAK;AACxB,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,KAAK;AAC3C,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AAClD,EAAE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;AACpE,EAAE,uBAAuB,GAAG;AAC5B,IAAI,cAAc;AAClB,IAAI;AACJ,MAAM,KAAK,EAAE,aAAa;AAC1B,MAAM,MAAM;AACZ,MAAM,cAAc,EAAE,SAAS;AAC/B,MAAM,cAAc;AACpB,MAAM,iBAAiB;AACvB,MAAM;AACN;AACA,GAAG;AACH;AACA,MAAM,CAAC,WAAW,GAAG,WAAW;AAChC,IAAI,WAAW,GAAG,cAAc;AAC7B,IAAC,YAAY,G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AC7B,EAAE;AACF,CAAC,CAAC;AACF,SAAS,4BAA4B,CAAC,SAAS,EAAE;AACjD,EAAE,MAAM,CAAC,IAAI,EAAE,KAAK,GAAG,QAAQ,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;AACvD,EAAE,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC;AACtB;AACG,IAAC,KAAK,GAAG;AACT,IAAC,MAAM,GAAG;AACV,IAAC,OAAO,GAAG;AACX,IAAC,KAAK,GAAG;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n const [placementState, setPlacementState] = React.useState(void 0);\n return /* @__PURE__ */ jsx(\n PopperProvider,\n {\n scope: __scopePopper,\n anchor,\n onAnchorChange: setAnchor,\n placementState,\n setPlacementState,\n children\n }\n );\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const onAnchorChange = context.onAnchorChange;\n const callbackRef = React.useCallback(\n (node) => {\n ref.current = node;\n if (node) {\n onAnchorChange(node);\n }\n },\n [onAnchorChange]\n );\n const composedRefs = useComposedRefs(forwardedRef, callbackRef);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n if (!virtualRef) {\n return;\n }\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef.current;\n if (previousAnchor !== anchorRef.current) {\n onAnchorChange(anchorRef.current);\n }\n });\n const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);\n const placedSide = sideAndAlign?.[0];\n const placedAlign = sideAndAlign?.[1];\n return virtualRef ? null : /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-radix-popper-side\": placedSide,\n \"data-radix-popper-align\": placedAlign,\n ...anchorProps,\n ref: composedRefs\n }\n );\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({\n strategy: \"referenceHidden\",\n ...detectOverflowOptions,\n // `hide` detects whether the anchor (reference) is clipped, so when\n // no explicit `collisionBoundary` is set we fall back to Floating\n // UI's default clipping ancestors (e.g. a scrollable menu). This\n // lets an occluded submenu hide once its anchor scrolls out of view\n // (#3237). The collision/size middlewares deliberately keep the\n // viewport-based default to avoid clamping content rendered inside\n // transformed or overflow-clipping portal containers.\n boundary: hasExplicitBoundaries ? detectOverflowOptions.boundary : void 0\n })\n ]\n });\n const setPlacementState = context.setPlacementState;\n useLayoutEffect(() => {\n setPlacementState(placement);\n return () => {\n setPlacementState(void 0);\n };\n }, [placement, setPlacementState]);\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n \"--radix-popper-transform-origin\": [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n placedAlign,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["arrow","floatingUIarrow","useLayoutEffect","ArrowPrimitive.Root"],"mappings":";;;;;;;;;;;;AAyBA,IAAI,WAAW,GAAG,QAAQ;AACvB,IAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,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