@sparrowengg/integrations-templates-frontend 7.0.0-bulkify.7 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/contact-import/components/contact-import-mapping.js +5 -0
- package/dist/cjs/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/cjs/integration-template/components/dashboard-constants.js +1 -0
- package/dist/cjs/integration-template/components/dashboard-constants.js.map +1 -1
- package/dist/cjs/integration-template/components/dashboard.js +17 -1
- package/dist/cjs/integration-template/components/dashboard.js.map +1 -1
- package/dist/cjs/node_modules/@internationalized/date/dist/private/CalendarDate.js +32 -8
- package/dist/cjs/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.js +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.js +2 -1
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +5 -2
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.js +15 -5
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.js +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-popover/dist/index.js +1 -1
- 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 +58 -15
- package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.js +2 -1
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.js +38 -5
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js +71 -37
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +2 -2
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.js +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/cjs/node_modules/dayjs/dayjs.min.js.map +1 -1
- package/dist/cjs/triggers/components/EventSetup.js +1 -2
- package/dist/cjs/triggers/components/EventSetup.js.map +1 -1
- package/dist/es/contact-import/components/contact-import-mapping.js +5 -0
- package/dist/es/contact-import/components/contact-import-mapping.js.map +1 -1
- package/dist/es/integration-template/components/dashboard-constants.js +1 -0
- package/dist/es/integration-template/components/dashboard-constants.js.map +1 -1
- package/dist/es/integration-template/components/dashboard.js +17 -1
- package/dist/es/integration-template/components/dashboard.js.map +1 -1
- package/dist/es/node_modules/@internationalized/date/dist/private/CalendarDate.js +32 -8
- package/dist/es/node_modules/@internationalized/date/dist/private/CalendarDate.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js +1 -1
- package/dist/es/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-context/dist/index.js +2 -1
- package/dist/es/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +5 -2
- package/dist/es/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js +15 -5
- package/dist/es/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-id/dist/index.js +1 -1
- package/dist/es/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-popover/dist/index.js +1 -1
- 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 +53 -10
- package/dist/es/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-portal/dist/index.js +2 -2
- package/dist/es/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-presence/dist/index.js +35 -2
- package/dist/es/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-slot/dist/index.js +72 -38
- package/dist/es/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +2 -2
- package/dist/es/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js +1 -1
- package/dist/es/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/es/node_modules/dayjs/dayjs.min.js +1 -1
- package/dist/es/node_modules/dayjs/dayjs.min.js.map +1 -1
- package/dist/es/triggers/components/EventSetup.js +1 -2
- package/dist/es/triggers/components/EventSetup.js.map +1 -1
- package/dist/index.d.ts +3 -4
- package/package.json +1 -1
|
@@ -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 && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\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;AAC7B,IAAI,uBAAuB,GAAG,KAAK,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,GAAG,KAAK,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,GAAG,KAAK,CAAC,UAAU,CAAC,uBAAuB,CAAC;AAC7D,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;AAChD,IAAI,MAAM,aAAa,GAAG,IAAI,EAAE,aAAa,IAAI,UAAU,EAAE,QAAQ;AACrE,IAAI,MAAM,GAAG,KAAK,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;AACxC,IAAI,MAAM,YAAY,GAAG,eAAe,CAAC,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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
|
+
{"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;AAC7B,IAAI,uBAAuB,GAAG,KAAK,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,GAAG,KAAK,CAAC,UAAU;AACvC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3B,IAAI,MAAM;AACV,MAA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,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,17 +1,27 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
var count = 0;
|
|
4
|
+
var guards = null;
|
|
4
5
|
function useFocusGuards() {
|
|
5
6
|
React.useEffect(() => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
if (!guards) {
|
|
8
|
+
guards = { start: createFocusGuard(), end: createFocusGuard() };
|
|
9
|
+
}
|
|
10
|
+
const { start, end } = guards;
|
|
11
|
+
if (document.body.firstElementChild !== start) {
|
|
12
|
+
document.body.insertAdjacentElement("afterbegin", start);
|
|
13
|
+
}
|
|
14
|
+
if (document.body.lastElementChild !== end) {
|
|
15
|
+
document.body.insertAdjacentElement("beforeend", end);
|
|
16
|
+
}
|
|
9
17
|
count++;
|
|
10
18
|
return () => {
|
|
11
19
|
if (count === 1) {
|
|
12
|
-
|
|
20
|
+
guards?.start.remove();
|
|
21
|
+
guards?.end.remove();
|
|
22
|
+
guards = null;
|
|
13
23
|
}
|
|
14
|
-
count
|
|
24
|
+
count = Math.max(0, count - 1);
|
|
15
25
|
};
|
|
16
26
|
}, []);
|
|
17
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nvar guards = null;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n if (!guards) {\n guards = { start: createFocusGuard(), end: createFocusGuard() };\n }\n const { start, end } = guards;\n if (document.body.firstElementChild !== start) {\n document.body.insertAdjacentElement(\"afterbegin\", start);\n }\n if (document.body.lastElementChild !== end) {\n document.body.insertAdjacentElement(\"beforeend\", end);\n }\n count++;\n return () => {\n if (count === 1) {\n guards?.start.remove();\n guards?.end.remove();\n guards = null;\n }\n count = Math.max(0, count - 1);\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;AAIA,IAAI,KAAK,GAAG,CAAC;AACb,IAAI,MAAM,GAAG,IAAI;AAKjB,SAAS,cAAc,GAAG;AAC1B,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AACxB,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,MAAM,MAAM,GAAG,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,GAAG,EAAE,gBAAgB,EAAE,EAAE;AACrE,IAAI;AACJ,IAAI,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,MAAM;AACjC,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,iBAAiB,KAAK,KAAK,EAAE;AACnD,MAAM,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,YAAY,EAAE,KAAK,CAAC;AAC9D,IAAI;AACJ,IAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,gBAAgB,KAAK,GAAG,EAAE;AAChD,MAAM,QAAQ,CAAC,IAAI,CAAC,qBAAqB,CAAC,WAAW,EAAE,GAAG,CAAC;AAC3D,IAAI;AACJ,IAAI,KAAK,EAAE;AACX,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,KAAK,KAAK,CAAC,EAAE;AACvB,QAAQ,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE;AAC9B,QAAQ,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;AAC5B,QAAQ,MAAM,GAAG,IAAI;AACrB,MAAM;AACN,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;AACpC,IAAI,CAAC;AACL,EAAE,CAAC,EAAE,EAAE,CAAC;AACR;AACA,SAAS,gBAAgB,GAAG;AAC5B,EAAE,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;AAChD,EAAE,OAAO,CAAC,YAAY,CAAC,wBAAwB,EAAE,EAAE,CAAC;AACpD,EAAE,OAAO,CAAC,QAAQ,GAAG,CAAC;AACtB,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM;AAChC,EAAE,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG;AAC7B,EAAE,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO;AAClC,EAAE,OAAO,CAAC,KAAK,CAAC,aAAa,GAAG,MAAM;AACtC,EAAE,OAAO,OAAO;AAChB;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useLayoutEffect as useLayoutEffect2 } from '../../react-use-layout-effect/dist/index.js';
|
|
3
3
|
|
|
4
|
-
//
|
|
4
|
+
// src/id.tsx
|
|
5
5
|
var useReactId = React[" useId ".trim().toString()] || (() => void 0);
|
|
6
6
|
var count = 0;
|
|
7
7
|
function useId(deterministicId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-id/dist/index.mjs"],"sourcesContent":["//
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-id/dist/index.mjs"],"sourcesContent":["// src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect"],"mappings":";;;AAAA;AAGA,IAAI,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,MAAM,MAAM,CAAC;AACrE,IAAI,KAAK,GAAG,CAAC;AACb,SAAS,KAAK,CAAC,eAAe,EAAE;AAChC,EAAE,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;AAClD,EAAEA,gBAAe,CAAC,MAAM;AACxB,IAA0B,KAAK,CAAC,CAAC,OAAO,KAAK,OAAO,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;AACxE,EAAE,CAAC,EAAE,CAAC,eAAe,CAAC,CAAC;AACvB,EAAE,OAAO,eAAe,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC;AACrD;;;;","x_google_ignoreList":[0]}
|
|
@@ -86,7 +86,7 @@ var PopoverTrigger = React.forwardRef(
|
|
|
86
86
|
type: "button",
|
|
87
87
|
"aria-haspopup": "dialog",
|
|
88
88
|
"aria-expanded": context.open,
|
|
89
|
-
"aria-controls": context.contentId,
|
|
89
|
+
"aria-controls": context.open ? context.contentId : void 0,
|
|
90
90
|
"data-state": getState(context.open),
|
|
91
91
|
...triggerProps,
|
|
92
92
|
ref: composedTriggerRef,
|
|
@@ -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.contentId,\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,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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]}
|
|
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,KA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SAAS,CAAC,MAAM;AACtB,MAAM;AACN,QAAQ,IAAI,EAAE,QAAQ;AACtB,QAAQ,GAAG,UAAU;AACrB,QAAQ,GAAG,EAAE,YAAY;AACzB,QAAQ,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]}
|
|
@@ -16,7 +16,18 @@ var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
|
16
16
|
var Popper = (props) => {
|
|
17
17
|
const { __scopePopper, children } = props;
|
|
18
18
|
const [anchor, setAnchor] = React.useState(null);
|
|
19
|
-
|
|
19
|
+
const [placementState, setPlacementState] = React.useState(void 0);
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
PopperProvider,
|
|
22
|
+
{
|
|
23
|
+
scope: __scopePopper,
|
|
24
|
+
anchor,
|
|
25
|
+
onAnchorChange: setAnchor,
|
|
26
|
+
placementState,
|
|
27
|
+
setPlacementState,
|
|
28
|
+
children
|
|
29
|
+
}
|
|
30
|
+
);
|
|
20
31
|
};
|
|
21
32
|
Popper.displayName = POPPER_NAME;
|
|
22
33
|
var ANCHOR_NAME = "PopperAnchor";
|
|
@@ -25,16 +36,40 @@ var PopperAnchor = React.forwardRef(
|
|
|
25
36
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
26
37
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
27
38
|
const ref = React.useRef(null);
|
|
28
|
-
const
|
|
39
|
+
const onAnchorChange = context.onAnchorChange;
|
|
40
|
+
const callbackRef = React.useCallback(
|
|
41
|
+
(node) => {
|
|
42
|
+
ref.current = node;
|
|
43
|
+
if (node) {
|
|
44
|
+
onAnchorChange(node);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
[onAnchorChange]
|
|
48
|
+
);
|
|
49
|
+
const composedRefs = useComposedRefs(forwardedRef, callbackRef);
|
|
29
50
|
const anchorRef = React.useRef(null);
|
|
30
51
|
React.useEffect(() => {
|
|
52
|
+
if (!virtualRef) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
31
55
|
const previousAnchor = anchorRef.current;
|
|
32
|
-
anchorRef.current = virtualRef
|
|
56
|
+
anchorRef.current = virtualRef.current;
|
|
33
57
|
if (previousAnchor !== anchorRef.current) {
|
|
34
|
-
|
|
58
|
+
onAnchorChange(anchorRef.current);
|
|
35
59
|
}
|
|
36
60
|
});
|
|
37
|
-
|
|
61
|
+
const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);
|
|
62
|
+
const placedSide = sideAndAlign?.[0];
|
|
63
|
+
const placedAlign = sideAndAlign?.[1];
|
|
64
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(
|
|
65
|
+
Primitive.div,
|
|
66
|
+
{
|
|
67
|
+
"data-radix-popper-side": placedSide,
|
|
68
|
+
"data-radix-popper-align": placedAlign,
|
|
69
|
+
...anchorProps,
|
|
70
|
+
ref: composedRefs
|
|
71
|
+
}
|
|
72
|
+
);
|
|
38
73
|
}
|
|
39
74
|
);
|
|
40
75
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
@@ -50,7 +85,7 @@ var PopperContent = React.forwardRef(
|
|
|
50
85
|
alignOffset = 0,
|
|
51
86
|
arrowPadding = 0,
|
|
52
87
|
avoidCollisions = true,
|
|
53
|
-
collisionBoundary
|
|
88
|
+
collisionBoundary,
|
|
54
89
|
collisionPadding: collisionPaddingProp = 0,
|
|
55
90
|
sticky = "partial",
|
|
56
91
|
hideWhenDetached = false,
|
|
@@ -67,11 +102,11 @@ var PopperContent = React.forwardRef(
|
|
|
67
102
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
68
103
|
const desiredPlacement = side + (align !== "center" ? "-" + align : "");
|
|
69
104
|
const collisionPadding = typeof collisionPaddingProp === "number" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };
|
|
70
|
-
const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];
|
|
71
|
-
const hasExplicitBoundaries = boundary.length > 0;
|
|
105
|
+
const boundary = collisionBoundary ? Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary] : void 0;
|
|
106
|
+
const hasExplicitBoundaries = boundary !== void 0 && boundary.length > 0;
|
|
72
107
|
const detectOverflowOptions = {
|
|
73
108
|
padding: collisionPadding,
|
|
74
|
-
boundary: boundary
|
|
109
|
+
boundary: boundary?.filter(isNotNull),
|
|
75
110
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
76
111
|
altBoundary: hasExplicitBoundaries
|
|
77
112
|
};
|
|
@@ -113,6 +148,13 @@ var PopperContent = React.forwardRef(
|
|
|
113
148
|
hideWhenDetached && hide({ strategy: "referenceHidden", ...detectOverflowOptions })
|
|
114
149
|
]
|
|
115
150
|
});
|
|
151
|
+
const setPlacementState = context.setPlacementState;
|
|
152
|
+
useLayoutEffect2(() => {
|
|
153
|
+
setPlacementState(placement);
|
|
154
|
+
return () => {
|
|
155
|
+
setPlacementState(void 0);
|
|
156
|
+
};
|
|
157
|
+
}, [placement, setPlacementState]);
|
|
116
158
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
117
159
|
const handlePlaced = useCallbackRef(onPlaced);
|
|
118
160
|
useLayoutEffect2(() => {
|
|
@@ -138,7 +180,7 @@ var PopperContent = React.forwardRef(
|
|
|
138
180
|
// keep off the page when measuring
|
|
139
181
|
minWidth: "max-content",
|
|
140
182
|
zIndex: contentZIndex,
|
|
141
|
-
|
|
183
|
+
"--radix-popper-transform-origin": [
|
|
142
184
|
middlewareData.transformOrigin?.x,
|
|
143
185
|
middlewareData.transformOrigin?.y
|
|
144
186
|
].join(" "),
|
|
@@ -156,6 +198,7 @@ var PopperContent = React.forwardRef(
|
|
|
156
198
|
{
|
|
157
199
|
scope: __scopePopper,
|
|
158
200
|
placedSide,
|
|
201
|
+
placedAlign,
|
|
159
202
|
onArrowChange: setArrow,
|
|
160
203
|
arrowX,
|
|
161
204
|
arrowY,
|
|
@@ -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 return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\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 composedRefs = useComposedRefs(forwardedRef, ref);\n const anchorRef = React.useRef(null);\n React.useEffect(() => {\n const previousAnchor = anchorRef.current;\n anchorRef.current = virtualRef?.current || ref.current;\n if (previousAnchor !== anchorRef.current) {\n context.onAnchorChange(anchorRef.current);\n }\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\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({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\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 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,IAA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,IAAI,CAAC,MAAM,IAAI,UAAU,KAAK,OAAO,EAAE;AACvC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;AAC7B,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 = 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,GAAG,KAAK,CAAC,UAAU;AACnC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK;AAC3B,IAAI,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK;AAC/D,IAAI,MAAM,OAAO,GAAG,gBAAgB,CAAC,WAAW,EAAE,aAAa,CAAC;AAChE,IAAI,MAAM,GAAG,GAAG,KA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AACT,IAAC,MAAM,GAAG;AACV,IAAC,OAAO,GAAG;AACX,IAAC,KAAK,GAAG;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import * as ReactDOM from 'react-dom';
|
|
3
3
|
import { Primitive } from '../../react-primitive/dist/index.js';
|
|
4
4
|
import { useLayoutEffect as useLayoutEffect2 } from '../../react-use-layout-effect/dist/index.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -10,7 +10,7 @@ var Portal = React.forwardRef((props, forwardedRef) => {
|
|
|
10
10
|
const [mounted, setMounted] = React.useState(false);
|
|
11
11
|
useLayoutEffect2(() => setMounted(true), []);
|
|
12
12
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
13
|
-
return container ?
|
|
13
|
+
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
14
14
|
});
|
|
15
15
|
Portal.displayName = PORTAL_NAME;
|
|
16
16
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useLayoutEffect"],"mappings":";;;;;;AAQA,IAAI,WAAW,GAAG,QAAQ;AACvB,IAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK;AACvD,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,WAAW,EAAE,GAAG,KAAK;AAC5D,EAAE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC;AACrD,EAAEA,gBAAe,CAAC,MAAM,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;AAC7C,EAAE,MAAM,SAAS,GAAG,aAAa,IAAI,OAAO,IAAI,UAAU,EAAE,QAAQ,EAAE,IAAI;AAC1E,EAAE,OAAO,SAAS,GAAG,QAAQ,CAAC,YAAY,iBAAiB,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,GAAG,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC,EAAE,SAAS,CAAC,GAAG,IAAI;AACvI,CAAC;AACD,MAAM,CAAC,WAAW,GAAG,WAAW;;;;","x_google_ignoreList":[0]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useComposedRefs } from '../../react-compose-refs/dist/index.js';
|
|
3
2
|
import { useLayoutEffect as useLayoutEffect2 } from '../../react-use-layout-effect/dist/index.js';
|
|
4
3
|
|
|
5
4
|
function useStateMachine(initialState, machine) {
|
|
@@ -14,7 +13,7 @@ var Presence = (props) => {
|
|
|
14
13
|
const { present, children } = props;
|
|
15
14
|
const presence = usePresence(present);
|
|
16
15
|
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
|
|
17
|
-
const ref =
|
|
16
|
+
const ref = useStableComposedRefs(presence.ref, getElementRef(child));
|
|
18
17
|
const forceMount = typeof children === "function";
|
|
19
18
|
return forceMount || presence.isPresent ? React.cloneElement(child, { ref }) : null;
|
|
20
19
|
};
|
|
@@ -110,6 +109,40 @@ function usePresence(present) {
|
|
|
110
109
|
}, [])
|
|
111
110
|
};
|
|
112
111
|
}
|
|
112
|
+
function setRef(ref, value) {
|
|
113
|
+
if (typeof ref === "function") {
|
|
114
|
+
return ref(value);
|
|
115
|
+
} else if (ref !== null && ref !== void 0) {
|
|
116
|
+
ref.current = value;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function useStableComposedRefs(...refs) {
|
|
120
|
+
const refsRef = React.useRef(refs);
|
|
121
|
+
refsRef.current = refs;
|
|
122
|
+
return React.useCallback((node) => {
|
|
123
|
+
const currentRefs = refsRef.current;
|
|
124
|
+
let hasCleanup = false;
|
|
125
|
+
const cleanups = currentRefs.map((ref) => {
|
|
126
|
+
const cleanup = setRef(ref, node);
|
|
127
|
+
if (!hasCleanup && typeof cleanup === "function") {
|
|
128
|
+
hasCleanup = true;
|
|
129
|
+
}
|
|
130
|
+
return cleanup;
|
|
131
|
+
});
|
|
132
|
+
if (hasCleanup) {
|
|
133
|
+
return () => {
|
|
134
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
135
|
+
const cleanup = cleanups[i];
|
|
136
|
+
if (typeof cleanup === "function") {
|
|
137
|
+
cleanup();
|
|
138
|
+
} else {
|
|
139
|
+
setRef(currentRefs[i], null);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
}, []);
|
|
145
|
+
}
|
|
113
146
|
function getAnimationName(styles) {
|
|
114
147
|
return styles?.animationName || "none";
|
|
115
148
|
}
|