ivt 0.1.4 → 0.1.5
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/accordion/index.mjs +1 -1
- package/dist/alert/index.mjs +1 -1
- package/dist/alert-dialog/index.mjs +1 -1
- package/dist/avatar/index.mjs +1 -1
- package/dist/badge/index.mjs +1 -1
- package/dist/base/index.mjs +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/calendar/index.mjs +1 -1
- package/dist/card/index.mjs +1 -1
- package/dist/checkbox/index.mjs +1 -1
- package/dist/chunks/TextWrap-qkVOkHiw.mjs +2 -0
- package/dist/chunks/TextWrap-qkVOkHiw.mjs.map +1 -0
- package/dist/chunks/{accordion-b7tkR278.mjs → accordion-DCSVhB7Z.mjs} +2 -2
- package/dist/chunks/{accordion-b7tkR278.mjs.map → accordion-DCSVhB7Z.mjs.map} +1 -1
- package/dist/chunks/{badge-CGDtT1AM.mjs → badge-D_x3BlPA.mjs} +2 -2
- package/dist/chunks/{badge-CGDtT1AM.mjs.map → badge-D_x3BlPA.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-uUK5gBZL.mjs → bundle-mjs-Dthp4wMi.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-uUK5gBZL.mjs.map → bundle-mjs-Dthp4wMi.mjs.map} +1 -1
- package/dist/chunks/{button-BQuGoSwo.mjs → button-KMRgpiAy.mjs} +2 -2
- package/dist/chunks/{button-BQuGoSwo.mjs.map → button-KMRgpiAy.mjs.map} +1 -1
- package/dist/chunks/{calendar-D6nh7E7c.mjs → calendar-CmSMkDgI.mjs} +2 -2
- package/dist/chunks/{calendar-D6nh7E7c.mjs.map → calendar-CmSMkDgI.mjs.map} +1 -1
- package/dist/chunks/check-BSduI23k.mjs +2 -0
- package/dist/chunks/{check-BTM93edU.mjs.map → check-BSduI23k.mjs.map} +1 -1
- package/dist/chunks/chevron-down-BjVZhjFJ.mjs +2 -0
- package/dist/chunks/{chevron-down-ByXueUKH.mjs.map → chevron-down-BjVZhjFJ.mjs.map} +1 -1
- package/dist/chunks/chevron-left-DjmYjuTW.mjs +2 -0
- package/dist/chunks/{chevron-left-Dj6YqHMd.mjs.map → chevron-left-DjmYjuTW.mjs.map} +1 -1
- package/dist/chunks/chevron-right-DOvHale5.mjs +2 -0
- package/dist/chunks/{chevron-right-D2IT905d.mjs.map → chevron-right-DOvHale5.mjs.map} +1 -1
- package/dist/chunks/{command-B-ANHdE6.mjs → command-DMdzlCRK.mjs} +2 -2
- package/dist/chunks/{command-B-ANHdE6.mjs.map → command-DMdzlCRK.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-KUe_eRSY.mjs → createLucideIcon-BPtXaGDX.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-KUe_eRSY.mjs.map → createLucideIcon-BPtXaGDX.mjs.map} +1 -1
- package/dist/chunks/{dialog-BXMw3pOb.mjs → dialog-DT-LxfeE.mjs} +2 -2
- package/dist/chunks/{dialog-BXMw3pOb.mjs.map → dialog-DT-LxfeE.mjs.map} +1 -1
- package/dist/chunks/{hover-card-DvOyhTNF.mjs → hover-card-D0WoNHd_.mjs} +2 -2
- package/dist/chunks/{hover-card-DvOyhTNF.mjs.map → hover-card-D0WoNHd_.mjs.map} +1 -1
- package/dist/chunks/{index-FVFSIN6j.mjs → index-BE7U1lz3.mjs} +2 -2
- package/dist/chunks/{index-FVFSIN6j.mjs.map → index-BE7U1lz3.mjs.map} +1 -1
- package/dist/chunks/{index-DDy3w3P8.mjs → index-BEeVpO2_.mjs} +1 -1
- package/dist/chunks/{index-DDy3w3P8.mjs.map → index-BEeVpO2_.mjs.map} +1 -1
- package/dist/chunks/{index-CCvvm74Y.mjs → index-BOtb6ofV.mjs} +1 -1
- package/dist/chunks/{index-CCvvm74Y.mjs.map → index-BOtb6ofV.mjs.map} +1 -1
- package/dist/chunks/{index-CEACCVIV.mjs → index-BYaJxqBC.mjs} +2 -2
- package/dist/chunks/{index-CEACCVIV.mjs.map → index-BYaJxqBC.mjs.map} +1 -1
- package/dist/chunks/{index-CsbH4Chn.mjs → index-C8ZqoA88.mjs} +2 -2
- package/dist/chunks/{index-CsbH4Chn.mjs.map → index-C8ZqoA88.mjs.map} +1 -1
- package/dist/chunks/{index-BA0myTwh.mjs → index-CIfe3UIG.mjs} +1 -1
- package/dist/chunks/{index-BA0myTwh.mjs.map → index-CIfe3UIG.mjs.map} +1 -1
- package/dist/chunks/{index-BuuxNXqh.mjs → index-CVg6WODB.mjs} +2 -2
- package/dist/chunks/{index-BuuxNXqh.mjs.map → index-CVg6WODB.mjs.map} +1 -1
- package/dist/chunks/{index-ZlUuVpwn.mjs → index-ChEz--fx.mjs} +1 -1
- package/dist/chunks/{index-ZlUuVpwn.mjs.map → index-ChEz--fx.mjs.map} +1 -1
- package/dist/chunks/{index-Wrq-dJAT.mjs → index-D1WqwlXc.mjs} +2 -2
- package/dist/chunks/{index-Wrq-dJAT.mjs.map → index-D1WqwlXc.mjs.map} +1 -1
- package/dist/chunks/{index-DGdby9BP.mjs → index-DrgyjxdM.mjs} +2 -2
- package/dist/chunks/{index-DGdby9BP.mjs.map → index-DrgyjxdM.mjs.map} +1 -1
- package/dist/chunks/{index-BfrEVNZH.mjs → index-Ds-NL_xb.mjs} +2 -2
- package/dist/chunks/{index-BfrEVNZH.mjs.map → index-Ds-NL_xb.mjs.map} +1 -1
- package/dist/chunks/{index-CFXZ99Xo.mjs → index-DspU1Pyo.mjs} +1 -1
- package/dist/chunks/{index-CFXZ99Xo.mjs.map → index-DspU1Pyo.mjs.map} +1 -1
- package/dist/chunks/{index-CVVWvftS.mjs → index-k-LDQli2.mjs} +2 -2
- package/dist/chunks/{index-CVVWvftS.mjs.map → index-k-LDQli2.mjs.map} +1 -1
- package/dist/chunks/{index-Czv0ydhM.mjs → index-mlVBNiql.mjs} +2 -2
- package/dist/chunks/{index-Czv0ydhM.mjs.map → index-mlVBNiql.mjs.map} +1 -1
- package/dist/chunks/{index-DeHHC7Lr.mjs → index-rHca3YxT.mjs} +2 -2
- package/dist/chunks/{index-DeHHC7Lr.mjs.map → index-rHca3YxT.mjs.map} +1 -1
- package/dist/chunks/{input-DXANRHEg.mjs → input-CjX7cpsJ.mjs} +2 -2
- package/dist/chunks/{input-DXANRHEg.mjs.map → input-CjX7cpsJ.mjs.map} +1 -1
- package/dist/chunks/{label-bMd4Mzbg.mjs → label-B0a5aNu2.mjs} +2 -2
- package/dist/chunks/{label-bMd4Mzbg.mjs.map → label-B0a5aNu2.mjs.map} +1 -1
- package/dist/chunks/{pagination-DdTkX4SE.mjs → pagination-XvM9skZV.mjs} +2 -2
- package/dist/chunks/{pagination-DdTkX4SE.mjs.map → pagination-XvM9skZV.mjs.map} +1 -1
- package/dist/chunks/{popover-CEah8B_Q.mjs → popover-COG3isxJ.mjs} +2 -2
- package/dist/chunks/{popover-CEah8B_Q.mjs.map → popover-COG3isxJ.mjs.map} +1 -1
- package/dist/chunks/{progress-CqZxViuL.mjs → progress-KQNbvdmu.mjs} +2 -2
- package/dist/chunks/{progress-CqZxViuL.mjs.map → progress-KQNbvdmu.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-Bc6fe1gs.mjs → scroll-area-Bof4yc1z.mjs} +2 -2
- package/dist/chunks/{scroll-area-Bc6fe1gs.mjs.map → scroll-area-Bof4yc1z.mjs.map} +1 -1
- package/dist/chunks/{select-CGYt_Y93.mjs → select-rpTSdR8q.mjs} +2 -2
- package/dist/chunks/{select-CGYt_Y93.mjs.map → select-rpTSdR8q.mjs.map} +1 -1
- package/dist/chunks/{skeleton-BdpInwiZ.mjs → skeleton-DwcR7I_w.mjs} +2 -2
- package/dist/chunks/{skeleton-BdpInwiZ.mjs.map → skeleton-DwcR7I_w.mjs.map} +1 -1
- package/dist/chunks/{sortable-CYb9HX1G.mjs → sortable-BKqLwBgJ.mjs} +2 -2
- package/dist/chunks/{sortable-CYb9HX1G.mjs.map → sortable-BKqLwBgJ.mjs.map} +1 -1
- package/dist/chunks/{table-jCCqMuXZ.mjs → table-DapXfoMY.mjs} +2 -2
- package/dist/chunks/{table-jCCqMuXZ.mjs.map → table-DapXfoMY.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-C_EBDYxc.mjs → tslib.es6-D-trMiel.mjs} +1 -1
- package/dist/chunks/{tslib.es6-C_EBDYxc.mjs.map → tslib.es6-D-trMiel.mjs.map} +1 -1
- package/dist/chunks/{utils-DxzrhakI.mjs → utils-BDlXiHS3.mjs} +2 -2
- package/dist/chunks/{utils-DxzrhakI.mjs.map → utils-BDlXiHS3.mjs.map} +1 -1
- package/dist/chunks/x-BIoR0tgq.mjs +2 -0
- package/dist/chunks/{x-BzuwgR7h.mjs.map → x-BIoR0tgq.mjs.map} +1 -1
- package/dist/command/index.mjs +1 -1
- package/dist/data-table/index.mjs +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dropdown-menu/index.mjs +1 -1
- package/dist/dropzone/index.mjs +1 -1
- package/dist/form/index.mjs +1 -1
- package/dist/hover-card/index.mjs +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.mjs +1 -1
- package/dist/label/index.mjs +1 -1
- package/dist/pagination/index.mjs +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/progress/index.mjs +1 -1
- package/dist/scroll-area/index.mjs +1 -1
- package/dist/select/index.mjs +1 -1
- package/dist/separator/index.mjs +1 -1
- package/dist/sheet/index.mjs +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/sortable/index.mjs +1 -1
- package/dist/table/index.mjs +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/tooltip/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunks/TextWrap-BoRBN55H.mjs +0 -2
- package/dist/chunks/TextWrap-BoRBN55H.mjs.map +0 -1
- package/dist/chunks/check-BTM93edU.mjs +0 -2
- package/dist/chunks/chevron-down-ByXueUKH.mjs +0 -2
- package/dist/chunks/chevron-left-Dj6YqHMd.mjs +0 -2
- package/dist/chunks/chevron-right-D2IT905d.mjs +0 -2
- package/dist/chunks/x-BzuwgR7h.mjs +0 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-Wrq-dJAT.mjs","sources":["../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../../node_modules/@radix-ui/react-portal/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","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"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":["originalBodyPointerEvents","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","DismissableLayerContext","React","createContext","layers","Set","layersWithOutsidePointerEventsDisabled","branches","DismissableLayer","forwardRef","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","useContext","node","setNode","useState","ownerDocument","globalThis","document","force","composedRefs","useComposedRefs","Array","from","highestLayerWithOutsidePointerEventsDisabled","slice","highestLayerWithOutsidePointerEventsDisabledIndex","indexOf","index","isBodyPointerEventsDisabled","size","isPointerEventsEnabled","pointerDownOutside","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","useRef","handleClickRef","useEffect","handlePointerDown","event","target","current","handleAndDispatchPointerDownOutsideEvent","handleAndDispatchCustomEvent","eventDetail","discrete","originalEvent","pointerType","removeEventListener","addEventListener","once","timerId","window","setTimeout","clearTimeout","onPointerDownCapture","usePointerDownOutside","isPointerDownOnBranch","some","branch","contains","defaultPrevented","focusOutside","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","onFocusCapture","onBlurCapture","useFocusOutside","onEscapeKeyDownProp","handleKeyDown","key","capture","useEscapeKeydown","preventDefault","body","style","pointerEvents","add","dispatchUpdate","delete","handleUpdate","jsx","Primitive","div","ref","composeEventHandlers","displayName","DismissableLayerBranch","CustomEvent","dispatchEvent","name","handler","detail","bubbles","cancelable","dispatchDiscreteCustomEvent","Root","Branch","Portal","container","containerProp","portalProps","mounted","setMounted","useLayoutEffect","ReactDOM","createPortal"],"mappings":"sQAWA,IAKIA,EAJEC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAIhBC,EAAgCC,EAAAC,cAAc,CAClDC,OAAQ,IAAIC,IACZC,uCAAwC,IAAID,IAC5CE,SAAU,IAAIF,MAuCVG,EAAyBN,EAAAO,YAC7B,CAACC,EAAOC,KACN,MAAMC,4BACJA,GAA8B,EAAAC,gBAC9BA,EAAAC,qBACAA,EAAAC,eACAA,EAAAC,kBACAA,EAAAC,UACAA,KACGC,GACDR,EACES,EAAgBjB,EAAAkB,WAAWnB,IAC1BoB,EAAMC,GAAiBpB,EAAAqB,SAAyC,MACjEC,EAAgBH,GAAMG,eAAiBC,YAAYC,UAChD,CAAAC,GA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EAAI,CAEhC,GACC,CAACF,EAAQZ,WAELoF,EAACC,EAAUC,IAAV,IAAkBnF,EAAOoF,IAAKlE,GAAc,IA0HtD,SAAS4D,IACP,MAAMxC,EAAQ,IAAIkD,YAAYpG,GAC9B4B,SAASyE,cAAcnD,EACzB,CAEA,SAASI,EACPgD,EACAC,EACAC,GACAhD,SAAEA,IAEF,MAAML,EAASqD,EAAO/C,cAAcN,OAC9BD,EAAQ,IAAIkD,YAAYE,EAAM,CAAEG,SAAS,EAAOC,YAAY,EAAMF,WACpED,GAASpD,EAAOS,iBAAiB0C,EAAMC,EAA0B,CAAE1C,MAAM,IAEzEL,EACFmD,EAA4BxD,EAAQD,GAEpCC,EAAOkD,cAAcnD,EAEzB,CA3IAiD,EAAuBD,YA1BH,yBAuKpB,IAAMU,EAAOlG,EACPmG,EAASV,EE1UTW,EAAe1G,EAAAO,YAAuC,CAACC,EAAOC,KAClE,MAAQkG,UAAWC,KAAkBC,GAAgBrG,GAC9CsG,EAASC,GAAoB/G,EAAAqB,UAAS,GAC7C2F,GAAgB,IAAMD,GAAW,IAAO,IACxC,MAAMJ,EAAYC,GAAkBE,GAAWvF,YAAYC,UAAU0D,KACrE,OAAOyB,EACHM,EAASC,aAAazB,EAACC,EAAUC,IAAV,IAAkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,IAAA,IAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
|
1
|
+
{"version":3,"file":"index-D1WqwlXc.mjs","sources":["../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../../node_modules/@radix-ui/react-portal/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","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"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":["originalBodyPointerEvents","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","DismissableLayerContext","React","createContext","layers","Set","layersWithOutsidePointerEventsDisabled","branches","DismissableLayer","forwardRef","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","useContext","node","setNode","useState","ownerDocument","globalThis","document","force","composedRefs","useComposedRefs","Array","from","highestLayerWithOutsidePointerEventsDisabled","slice","highestLayerWithOutsidePointerEventsDisabledIndex","indexOf","index","isBodyPointerEventsDisabled","size","isPointerEventsEnabled","pointerDownOutside","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","useRef","handleClickRef","useEffect","handlePointerDown","event","target","current","handleAndDispatchPointerDownOutsideEvent","handleAndDispatchCustomEvent","eventDetail","discrete","originalEvent","pointerType","removeEventListener","addEventListener","once","timerId","window","setTimeout","clearTimeout","onPointerDownCapture","usePointerDownOutside","isPointerDownOnBranch","some","branch","contains","defaultPrevented","focusOutside","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","onFocusCapture","onBlurCapture","useFocusOutside","onEscapeKeyDownProp","handleKeyDown","key","capture","useEscapeKeydown","preventDefault","body","style","pointerEvents","add","dispatchUpdate","delete","handleUpdate","jsx","Primitive","div","ref","composeEventHandlers","displayName","DismissableLayerBranch","CustomEvent","dispatchEvent","name","handler","detail","bubbles","cancelable","dispatchDiscreteCustomEvent","Root","Branch","Portal","container","containerProp","portalProps","mounted","setMounted","useLayoutEffect","ReactDOM","createPortal"],"mappings":"sQAWA,IAKIA,EAJEC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAIhBC,EAAgCC,EAAAC,cAAc,CAClDC,OAAQ,IAAIC,IACZC,uCAAwC,IAAID,IAC5CE,SAAU,IAAIF,MAuCVG,EAAyBN,EAAAO,YAC7B,CAACC,EAAOC,KACN,MAAMC,4BACJA,GAA8B,EAAAC,gBAC9BA,EAAAC,qBACAA,EAAAC,eACAA,EAAAC,kBACAA,EAAAC,UACAA,KACGC,GACDR,EACES,EAAgBjB,EAAAkB,WAAWnB,IAC1BoB,EAAMC,GAAiBpB,EAAAqB,SAAyC,MACjEC,EAAgBH,GAAMG,eAAiBC,YAAYC,UAChD,CAAAC,GAAezB,EAAAqB,SAAS,CAAA,GAC3BK,EAAeC,EAAgBlB,GAAeU,GAASC,EAAQD,KAC/DjB,EAAS0B,MAAMC,KAAKZ,EAAQf,SAC3B4B,GAAgD,IAAIb,EAAQb,wCAAwC2B,OAAM,GAC3GC,EAAoD9B,EAAO+B,QAAQH,GACnEI,EAAQf,EAAOjB,EAAO+B,QAAQd,IAAQ,EACtCgB,EAA8BlB,EAAQb,uCAAuCgC,KAAO,EACpFC,EAAyBH,GAASF,EAElCM,EAyIV,SACE1B,EACAU,EAA0BC,YAAYC,UAEtC,MAAMe,EAA2BC,EAAe5B,GAC1C6B,EAAoCzC,EAAA0C,QAAO,GAC3CC,EAAuB3C,EAAA0C,QAAO,SAiEpC,OA/DM1C,EAAA4C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D,YA1BH,yBAuKpB,IAAMU,EAAOlG,EACPmG,EAASV,EE1UTW,EAAe1G,EAAAO,YAAuC,CAACC,EAAOC,KAClE,MAAQkG,UAAWC,KAAkBC,GAAgBrG,GAC9CsG,EAASC,GAAoB/G,EAAAqB,UAAS,GAC7C2F,GAAgB,IAAMD,GAAW,IAAO,IACxC,MAAMJ,EAAYC,GAAkBE,GAAWvF,YAAYC,UAAU0D,KACrE,OAAOyB,EACHM,EAASC,aAAazB,EAACC,EAAUC,IAAV,IAAkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,IAAA,IAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as r from"react";import{u as t}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as r from"react";import{u as t}from"./index-CIfe3UIG.mjs";var i=r[" useId ".trim().toString()]||(()=>{}),o=0;function a(a){const[e,n]=r.useState(i());return t((()=>{n((r=>r??String(o++)))}),[a]),e?`radix-${e}`:""}export{a as u};
|
2
|
+
//# sourceMappingURL=index-DrgyjxdM.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-DrgyjxdM.mjs","sources":["../../node_modules/@radix-ui/react-id/dist/index.mjs"],"sourcesContent":["// packages/react/id/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":["useReactId","React","trim","toString","count","useId","deterministicId","id","setId","useState","useLayoutEffect","reactId","String"],"mappings":"iEAIA,IAAMA,EAAcC,EAAc,UAAUC,OAAOC,aAAgB,MAAM,GACrEC,EAAQ,EAEZ,SAASC,EAAMC,GACb,MAAOC,EAAIC,GAAeP,EAAAQ,SAA6BT,KAKvD,OAHAU,GAAgB,KACQF,GAAOG,GAAYA,GAAWC,OAAOR,MAAQ,GAClE,CAACE,IACuBC,EAAK,SAASA,IAAO,EAClD","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{c as o,u as r}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{c as o,u as r}from"./index-BE7U1lz3.mjs";import{createCollection as t}from"@radix-ui/react-collection";import{c as n}from"./index-BOtb6ofV.mjs";import{u as a}from"./index-DrgyjxdM.mjs";import{P as i}from"./index-BEeVpO2_.mjs";import{u as s}from"./index-DspU1Pyo.mjs";import{u}from"./index-mlVBNiql.mjs";import{u as c}from"./index-ChEz--fx.mjs";import{jsx as l}from"react/jsx-runtime";var f="rovingFocusGroup.onEntryFocus",p={bubbles:!1,cancelable:!0},d="RovingFocusGroup",[m,v,b]=t(d),[w,g]=n(d,[b]),[F,I]=w(d),h=e.forwardRef(((e,o)=>l(m.Provider,{scope:e.__scopeRovingFocusGroup,children:l(m.Slot,{scope:e.__scopeRovingFocusGroup,children:l(R,{...e,ref:o})})})));h.displayName=d;var R=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:a,orientation:m,loop:b=!1,dir:w,currentTabStopId:g,defaultCurrentTabStopId:I,onCurrentTabStopIdChange:h,onEntryFocus:R,preventScrollOnEntryFocus:y=!1,...S}=t,x=e.useRef(null),A=r(n,x),E=c(w),[D,C]=u({prop:g,defaultProp:I??null,onChange:h,caller:d}),[j,_]=e.useState(!1),G=s(R),K=v(a),k=e.useRef(!1),[L,P]=e.useState(0);return e.useEffect((()=>{const e=x.current;if(e)return e.addEventListener(f,G),()=>e.removeEventListener(f,G)}),[G]),l(F,{scope:a,orientation:m,dir:E,loop:b,currentTabStopId:D,onItemFocus:e.useCallback((e=>C(e)),[C]),onItemShiftTab:e.useCallback((()=>_(!0)),[]),onFocusableItemAdd:e.useCallback((()=>P((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>P((e=>e-1))),[]),children:l(i.div,{tabIndex:j||0===L?-1:0,"data-orientation":m,...S,ref:A,style:{outline:"none",...t.style},onMouseDown:o(t.onMouseDown,(()=>{k.current=!0})),onFocus:o(t.onFocus,(e=>{const o=!k.current;if(e.target===e.currentTarget&&o&&!j){const o=new CustomEvent(f,p);if(e.currentTarget.dispatchEvent(o),!o.defaultPrevented){const e=K().filter((e=>e.focusable));T([e.find((e=>e.active)),e.find((e=>e.id===D)),...e].filter(Boolean).map((e=>e.ref.current)),y)}}k.current=!1})),onBlur:o(t.onBlur,(()=>_(!1)))})})})),y="RovingFocusGroupItem",S=e.forwardRef(((r,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:u=!1,tabStopId:c,children:f,...p}=r,d=a(),b=c||d,w=I(y,n),g=w.currentTabStopId===b,F=v(n),{onFocusableItemAdd:h,onFocusableItemRemove:R,currentTabStopId:S}=w;return e.useEffect((()=>{if(s)return h(),()=>R()}),[s,h,R]),l(m.ItemSlot,{scope:n,id:b,focusable:s,active:u,children:l(i.span,{tabIndex:g?0:-1,"data-orientation":w.orientation,...p,ref:t,onMouseDown:o(r.onMouseDown,(e=>{s?w.onItemFocus(b):e.preventDefault()})),onFocus:o(r.onFocus,(()=>w.onItemFocus(b))),onKeyDown:o(r.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void w.onItemShiftTab();if(e.target!==e.currentTarget)return;const o=function(e,o,r){const t=function(e,o){return"rtl"!==o?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===o&&["ArrowLeft","ArrowRight"].includes(t)||"horizontal"===o&&["ArrowUp","ArrowDown"].includes(t)?void 0:x[t]}(e,w.orientation,w.dir);if(void 0!==o){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=F().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===o)n.reverse();else if("prev"===o||"next"===o){"prev"===o&&n.reverse();const a=n.indexOf(e.currentTarget);n=w.loop?(t=a+1,(r=n).map(((e,o)=>r[(t+o)%r.length]))):n.slice(a+1)}setTimeout((()=>T(n)))}var r,t})),children:"function"==typeof f?f({isCurrentTabStop:g,hasTabStop:null!=S}):f})})}));S.displayName=y;var x={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function T(e,o=!1){const r=document.activeElement;for(const t of e){if(t===r)return;if(t.focus({preventScroll:o}),document.activeElement!==r)return}}var A=h,E=S;export{E as I,A as R,g as c};
|
2
|
+
//# sourceMappingURL=index-Ds-NL_xb.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-BfrEVNZH.mjs","sources":["../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","caller","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","hasTabStop","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"+ZAaA,IAAMA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAM9CC,EAAa,oBAGZC,EAAYC,EAAeC,GAAyBC,EAGzDJ,IAGKK,EAA+BC,GAA+BC,EACnEP,EACA,CAACG,KA+BIK,EAAqBC,GAC1BJ,EAAkDL,GAK9CU,EAAyBC,EAAAC,YAC7B,CAACC,EAA2CC,IAExCC,EAACd,EAAWe,SAAX,CAAoBC,MAAOJ,EAAMK,wBAChCC,SAAAJ,EAACd,EAAWmB,KAAX,CAAgBH,MAAOJ,EAAMK,wBAC5BC,SAAAJ,EAACM,EAAA,IAAyBR,EAAOS,IAAKR,UAOhDJ,EAAiBa,YAAcvB,EAgB/B,IAAMqB,EAA6BV,EAAAC,YAGjC,CAACC,EAA+CC,KAChD,MAAMI,wBACJA,EAAAM,YACAA,EAAAC,KACAA,GAAO,EAAAC,IACPA,EACAC,iBAAkBC,EAAAC,wBAClBA,EAAAC,yBACAA,EAAAC,aACAA,EAAAC,0BACAA,GAA4B,KACzBC,GACDpB,EACES,EAAYX,EAAAuB,OAAoC,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OAAQC,QAAS,OAC5BC,WAAY,OAAQC,UAAW,OAC/BC,OAAQ,QAASC,KAAM,QACvBC,SAAU,OAAQC,IAAK,QAiBzB,SAAS/C,EAAWgD,EAA2BC,GAAgB,GAC7D,MAAMC,EAA6BC,SAASC,cAC5C,IAAA,MAAWC,KAAaL,EAAY,CAElC,GAAIK,IAAcH,EAA4B,OAE9C,GADAG,EAAUC,MAAM,CAAEL,kBACdE,SAASC,gBAAkBF,EAA4B,MAC7D,CACF,CAUA,IAAMK,EAAOnI,EACPoI,EAAOhD","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index-Ds-NL_xb.mjs","sources":["../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","caller","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","hasTabStop","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"+ZAaA,IAAMA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAM9CC,EAAa,oBAGZC,EAAYC,EAAeC,GAAyBC,EAGzDJ,IAGKK,EAA+BC,GAA+BC,EACnEP,EACA,CAACG,KA+BIK,EAAqBC,GAC1BJ,EAAkDL,GAK9CU,EAAyBC,EAAAC,YAC7B,CAACC,EAA2CC,IAExCC,EAACd,EAAWe,SAAX,CAAoBC,MAAOJ,EAAMK,wBAChCC,SAAAJ,EAACd,EAAWmB,KAAX,CAAgBH,MAAOJ,EAAMK,wBAC5BC,SAAAJ,EAACM,EAAA,IAAyBR,EAAOS,IAAKR,UAOhDJ,EAAiBa,YAAcvB,EAgB/B,IAAMqB,EAA6BV,EAAAC,YAGjC,CAACC,EAA+CC,KAChD,MAAMI,wBACJA,EAAAM,YACAA,EAAAC,KACAA,GAAO,EAAAC,IACPA,EACAC,iBAAkBC,EAAAC,wBAClBA,EAAAC,yBACAA,EAAAC,aACAA,EAAAC,0BACAA,GAA4B,KACzBC,GACDpB,EACES,EAAYX,EAAAuB,OAAoC,MAChDC,EAAeC,EAAgBtB,EAAcQ,GAC7Ce,EAAYC,EAAaZ,IACxBC,EAAkBY,GAAuBC,EAAqB,CACnEC,KAAMb,EACNc,YAAab,GAA2B,KACxCc,SAAUb,EACVc,OAAQ5C,KAEH6C,EAAkBC,GAA6BnC,EAAAoC,UAA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,EAAY,CAElC,GAAIK,IAAcH,EAA4B,OAE9C,GADAG,EAAUC,MAAM,CAAEL,kBACdE,SAASC,gBAAkBF,EAA4B,MAC7D,CACF,CAUA,IAAMK,EAAOnI,EACPoI,EAAOhD","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import*as e from"react";function r(r){const t=e.useRef(r);return e.useEffect((()=>{t.current=r})),e.useMemo((()=>(...e)=>t.current?.(...e)),[])}export{r as u};
|
2
|
-
//# sourceMappingURL=index-
|
2
|
+
//# sourceMappingURL=index-DspU1Pyo.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-DspU1Pyo.mjs","sources":["../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","useRef","useEffect","current","useMemo","args"],"mappings":"wBAMA,SAASA,EAAkDC,GACzD,MAAMC,EAAoBC,EAAAC,OAAOH,GAOjC,OALME,EAAAE,WAAU,KACdH,EAAYI,QAAUL,CAAA,IAIXE,EAAAI,SAAQ,IAAO,IAAIC,IAASN,EAAYI,aAAaE,IAAa,GACjF","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as r from"react";import{P as e}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as r from"react";import{P as e}from"./index-BEeVpO2_.mjs";import{jsx as a}from"react/jsx-runtime";var i=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),o=r.forwardRef(((r,o)=>a(e.span,{...r,ref:o,style:{...i,...r.style}})));o.displayName="VisuallyHidden";var t=o;export{t as R,o as V};
|
2
|
+
//# sourceMappingURL=index-k-LDQli2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-k-LDQli2.mjs","sources":["../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs"],"sourcesContent":["// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["VISUALLY_HIDDEN_STYLES","Object","freeze","position","border","width","height","padding","margin","overflow","clip","whiteSpace","wordWrap","VisuallyHidden","React","forwardRef","props","forwardedRef","jsx","Primitive","span","ref","style","displayName","Root"],"mappings":"yGAOA,IAAMA,EAAyBC,OAAOC,OAAO,CAE3CC,SAAU,WACVC,OAAQ,EACRC,MAAO,EACPC,OAAQ,EACRC,QAAS,EACTC,QAAQ,EACRC,SAAU,SACVC,KAAM,mBACNC,WAAY,SACZC,SAAU,WASNC,EAAuBC,EAAAC,YAC3B,CAACC,EAAOC,IAEJC,EAACC,EAAUC,KAAV,IACKJ,EACJK,IAAKJ,EACLK,MAAO,IAAKtB,KAA2BgB,EAAMM,WAMrDT,EAAeU,YAlBF,iBAsBb,IAAMC,EAAOX","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{u as t}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{u as t}from"./index-CIfe3UIG.mjs";var r=e[" useInsertionEffect ".trim().toString()]||t;function n({prop:t,defaultProp:n,onChange:o=()=>{},caller:u}){const[c,f,s]=function({defaultProp:t,onChange:n}){const[o,u]=e.useState(t),c=e.useRef(o),f=e.useRef(n);return r((()=>{f.current=n}),[n]),e.useEffect((()=>{c.current!==o&&(f.current?.(o),c.current=o)}),[o,c]),[o,u,f]}({defaultProp:n,onChange:o}),a=void 0!==t,i=a?t:c;{const r=e.useRef(void 0!==t);e.useEffect((()=>{const e=r.current;if(e!==a){}r.current=a}),[a,u])}const p=e.useCallback((e=>{if(a){const r=function(e){return"function"==typeof e}(e)?e(t):e;r!==t&&s.current?.(r)}else f(e)}),[a,t,f,s]);return[i,p]}export{n as u};
|
2
|
+
//# sourceMappingURL=index-mlVBNiql.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-mlVBNiql.mjs","sources":["../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useInsertionEffect","React","trim","toString","useLayoutEffect","useControllableState","prop","defaultProp","onChange","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","value","setValue","useState","prevValueRef","useRef","current","useEffect","useUncontrolledState","isControlled","isControlledRef","wasControlled","useCallback","nextValue","isFunction"],"mappings":"iEAIA,IAAMA,EACHC,EAAc,uBAAuBC,OAAOC,aAAeC,EAYvD,SAASC,GAAwBC,KACtCA,EAAAC,YACAA,EAAAC,SACAA,EAAW,OAAMC,OACjBA,IAEA,MAAOC,EAAkBC,EAAqBC,GA4ChD,UAAiCL,YAC/BA,EAAAC,SACAA,IAMA,MAAOK,EAAOC,GAAkBb,EAAAc,SAASR,GACnCS,EAAqBf,EAAAgB,OAAOJ,GAE5BD,EAAoBX,EAAAgB,OAAOT,GAYjC,OAXAR,GAAmB,KACjBY,EAAYM,QAAUV,CAAA,GACrB,CAACA,IAEEP,EAAAkB,WAAU,KACVH,EAAaE,UAAYL,IAC3BD,EAAYM,UAAUL,GACtBG,EAAaE,QAAUL,EACzB,GACC,CAACA,EAAOG,IAEJ,CAACH,EAAOC,EAAUF,EAC3B,CApE+DQ,CAAqB,CAChFb,cACAC,aAEIa,OAAwB,IAATf,EACfO,EAAQQ,EAAef,EAAOI,EAMO,CACzC,MAAMY,EAAwBrB,EAAAgB,YAAgB,IAATX,GAC/BL,EAAAkB,WAAU,KACd,MAAMI,EAAgBD,EAAgBJ,QACtC,GAAIK,IAAkBF,EAAc,CAMpC,CACAC,EAAgBJ,QAAUG,CAAA,GACzB,CAACA,EAAcZ,GACpB,CAGA,MAAMK,EAAiBb,EAAAuB,aACpBC,IACC,GAAIJ,EAAc,CAChB,MAAMR,EAwCd,SAAoBA,GAClB,MAAwB,mBAAVA,CAChB,CA1CsBa,CAAWD,GAAaA,EAAUnB,GAAQmB,EACpDZ,IAAUP,GACZM,EAAYM,UAAUL,QAGxBF,EAAoBc,EACtB,GAEF,CAACJ,EAAcf,EAAMK,EAAqBC,IAG5C,MAAO,CAACC,EAAOC,EACjB","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{u as r}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{u as r}from"./index-CIfe3UIG.mjs";function t(t){const[i,o]=e.useState(void 0);return r((()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let i,s;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,s=t.blockSize}else i=t.offsetWidth,s=t.offsetHeight;o({width:i,height:s})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}o(void 0)}),[t]),i}export{t as u};
|
2
|
+
//# sourceMappingURL=index-rHca3YxT.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-rHca3YxT.mjs","sources":["../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/use-size.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useSize","element","size","setSize","React","useState","useLayoutEffect","width","offsetWidth","height","offsetHeight","resizeObserver","ResizeObserver","entries","Array","isArray","length","entry","borderSizeEntry","borderSize","observe","box","unobserve"],"mappings":"iEAKA,SAASA,EAAQC,GACf,MAAOC,EAAMC,GAAiBC,EAAAC,cAAwD,GAgDtF,OA9CAC,GAAgB,KACd,GAAIL,EAAS,CAEXE,EAAQ,CAAEI,MAAON,EAAQO,YAAaC,OAAQR,EAAQS,eAEtD,MAAMC,EAAiB,IAAIC,gBAAgBC,IACzC,IAAKC,MAAMC,QAAQF,GACjB,OAKF,IAAKA,EAAQG,OACX,OAGF,MAAMC,EAAQJ,EAAQ,GACtB,IAAIN,EACAE,EAEJ,GAAI,kBAAmBQ,EAAO,CAC5B,MAAMC,EAAkBD,EAAqB,cAEvCE,EAAaL,MAAMC,QAAQG,GAAmBA,EAAgB,GAAKA,EACzEX,EAAQY,EAAuB,WAC/BV,EAASU,EAAsB,eAI/BZ,EAAQN,EAAQO,YAChBC,EAASR,EAAQS,aAGnBP,EAAQ,CAAEI,QAAOE,UAAQ,IAK3B,OAFAE,EAAeS,QAAQnB,EAAS,CAAEoB,IAAK,eAEhC,IAAMV,EAAeW,UAAUrB,GAItCE,OAAQ,EACV,GACC,CAACF,IAEGC,CACT","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{c as e}from"./utils-
|
2
|
-
//# sourceMappingURL=input-
|
1
|
+
import{c as e}from"./utils-BDlXiHS3.mjs";import t from"react";function r({className:r,type:o,...i}){return t.createElement("input",{type:o,"data-slot":"input",className:e("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),...i})}export{r as I};
|
2
|
+
//# sourceMappingURL=input-CjX7cpsJ.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input-
|
1
|
+
{"version":3,"file":"input-CjX7cpsJ.mjs","sources":["../../src/components/ui/input/input.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport React from \"react\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n\treturn (\n\t\t<input\n\t\t\ttype={type}\n\t\t\tdata-slot=\"input\"\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Input };\n"],"names":["Input","className","type","props","React","input","data-slot","cn"],"mappings":"8DAGA,SAASA,GAAMC,UAAEA,EAASC,KAAEA,KAASC,IACpC,OACCC,EAACC,cAAAA,QAAAA,CACAH,KAAMA,EACNI,YAAU,QACVL,UAAWM,EACV,2WACAN,MAEGE,GAGP"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{c as e}from"./utils-
|
2
|
-
//# sourceMappingURL=label-
|
1
|
+
import{c as e}from"./utils-BDlXiHS3.mjs";import*as t from"react";import a from"react";import{P as r}from"./index-BEeVpO2_.mjs";import{jsx as o}from"react/jsx-runtime";var s=t.forwardRef(((e,t)=>o(r.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));s.displayName="Label";var n=s;function l({className:t,...r}){return a.createElement(n,{"data-slot":"label",className:e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}export{l as L};
|
2
|
+
//# sourceMappingURL=label-B0a5aNu2.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"label-
|
1
|
+
{"version":3,"file":"label-B0a5aNu2.mjs","sources":["../../node_modules/@radix-ui/react-label/dist/index.mjs","../../src/components/ui/label/label.tsx"],"sourcesContent":["\"use client\";\n\n// src/label.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Label\";\nvar Label = React.forwardRef((props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.label,\n {\n ...props,\n ref: forwardedRef,\n onMouseDown: (event) => {\n const target = event.target;\n if (target.closest(\"button, input, select, textarea\")) return;\n props.onMouseDown?.(event);\n if (!event.defaultPrevented && event.detail > 1) event.preventDefault();\n }\n }\n );\n});\nLabel.displayName = NAME;\nvar Root = Label;\nexport {\n Label,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","import { cn } from \"@/lib/utils\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport React from \"react\";\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n\treturn (\n\t\t<LabelPrimitive.Root\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\n"],"names":["Label","React","forwardRef","props","forwardedRef","jsx","Primitive","label","ref","onMouseDown","event","target","closest","defaultPrevented","detail","preventDefault","displayName","Root","className","createElement","LabelPrimitive","data-slot","cn"],"mappings":"uKAOA,IAMMA,EAAcC,EAAAC,YAAqC,CAACC,EAAOC,IAE7DC,EAACC,EAAUC,MAAV,IACKJ,EACJK,IAAKJ,EACLK,YAAcC,IAEGA,EAAMC,OACVC,QAAQ,qCAEnBT,EAAMM,cAAcC,IAEfA,EAAMG,kBAAoBH,EAAMI,OAAS,GAAGJ,EAAMK,iBAAe,MAM9Ef,EAAMgB,YAxBO,QA4Bb,IAAMC,EAAOjB,EC/Bb,SAASA,GAAMkB,UAAEA,KAAcf,IAC9B,OACCF,EAAAkB,cAACC,EAAmB,CACnBC,YAAU,QACVH,UAAWI,EACV,sNACAJ,MAEGf,GAGP","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{c as e}from"./utils-
|
2
|
-
//# sourceMappingURL=pagination-
|
1
|
+
import{c as e}from"./utils-BDlXiHS3.mjs";import a from"react";import{C as t}from"./chevron-left-DjmYjuTW.mjs";import{C as s}from"./chevron-right-DOvHale5.mjs";import{c as n}from"./createLucideIcon-BPtXaGDX.mjs";import{b as c}from"./button-KMRgpiAy.mjs";const l=n("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function r({className:t,...s}){return a.createElement("nav",{"aria-label":"pagination","data-slot":"pagination",className:e("mx-auto flex w-full justify-center",t),...s})}function i({className:t,...s}){return a.createElement("ul",{"data-slot":"pagination-content",className:e("flex flex-row items-center gap-1",t),...s})}function m({...e}){return a.createElement("li",{"data-slot":"pagination-item",...e})}function o({className:t,isActive:s,size:n="icon",...l}){return a.createElement("a",{"aria-current":s?"page":void 0,"data-slot":"pagination-link","data-active":s,className:e(c({variant:s?"outline":"ghost",size:n}),t),...l})}function p({className:s,...n}){return a.createElement(o,{"aria-label":"Go to previous page",size:"default",className:e("gap-1 px-2.5 sm:pl-2.5",s),...n},a.createElement(t,null),a.createElement("span",{className:"hidden sm:block"},"Previous"))}function u({className:t,...n}){return a.createElement(o,{"aria-label":"Go to next page",size:"default",className:e("gap-1 px-2.5 sm:pr-2.5",t),...n},a.createElement("span",{className:"hidden sm:block"},"Next"),a.createElement(s,null))}function f({className:t,...s}){return a.createElement("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:e("flex size-9 items-center justify-center",t),...s},a.createElement(l,{className:"size-4"}),a.createElement("span",{className:"sr-only"},"More pages"))}export{r as P,i as a,o as b,m as c,p as d,u as e,f};
|
2
|
+
//# sourceMappingURL=pagination-XvM9skZV.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pagination-
|
1
|
+
{"version":3,"file":"pagination-XvM9skZV.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/ellipsis.js","../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }]\n];\nconst Ellipsis = createLucideIcon(\"Ellipsis\", __iconNode);\n\nexport { __iconNode, Ellipsis as default };\n//# sourceMappingURL=ellipsis.js.map\n","import { type Button, buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\";\nimport React from \"react\";\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n\treturn (\n\t\t<nav\n\t\t\taria-label=\"pagination\"\n\t\t\tdata-slot=\"pagination\"\n\t\t\tclassName={cn(\"mx-auto flex w-full justify-center\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tdata-slot=\"pagination-content\"\n\t\t\tclassName={cn(\"flex flex-row items-center gap-1\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n\treturn <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n\tReact.ComponentProps<\"a\">;\n\nfunction PaginationLink({ className, isActive, size = \"icon\", ...props }: PaginationLinkProps) {\n\treturn (\n\t\t<a\n\t\t\taria-current={isActive ? \"page\" : undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\n\t\t\t\tbuttonVariants({\n\t\t\t\t\tvariant: isActive ? \"outline\" : \"ghost\",\n\t\t\t\t\tsize,\n\t\t\t\t}),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to previous page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 px-2.5 sm:pl-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon />\n\t\t\t<span className=\"hidden sm:block\">Previous</span>\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to next page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 px-2.5 sm:pr-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"hidden sm:block\">Next</span>\n\t\t\t<ChevronRightIcon />\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\taria-hidden\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\tclassName={cn(\"flex size-9 items-center justify-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon className=\"size-4\" />\n\t\t\t<span className=\"sr-only\">More pages</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationLink,\n\tPaginationItem,\n\tPaginationPrevious,\n\tPaginationNext,\n\tPaginationEllipsis,\n};\n"],"names":["Ellipsis","createLucideIcon","cx","cy","r","key","Pagination","className","props","React","nav","aria-label","data-slot","cn","PaginationContent","ul","PaginationItem","li","PaginationLink","isActive","size","a","aria-current","undefined","data-active","buttonVariants","variant","PaginationPrevious","createElement","ChevronLeftIcon","span","PaginationNext","ChevronRightIcon","PaginationEllipsis","aria-hidden","MoreHorizontalIcon"],"mappings":"6PAGO,MAiBDA,EAAWC,EAAiB,WAjBE,CAClC,CAAC,SAAU,CAAEC,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKC,IAAK,WAC9C,CAAC,SAAU,CAAEH,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKC,IAAK,WAC9C,CAAC,SAAU,CAAEH,GAAI,IAAKC,GAAI,KAAMC,EAAG,IAAKC,IAAK,aCD/C,SAASC,GAAWC,UAAEA,KAAcC,IACnC,OACCC,EAACC,cAAAA,MAAAA,CACAC,aAAW,aACXC,YAAU,aACVL,UAAWM,EAAG,qCAAsCN,MAChDC,GAGP,CAEA,SAASM,GAAkBP,UAAEA,KAAcC,IAC1C,OACCC,EAACM,cAAAA,KAAAA,CACAH,YAAU,qBACVL,UAAWM,EAAG,mCAAoCN,MAC9CC,GAGP,CAEA,SAASQ,MAAoBR,IAC5B,OAAOC,EAACQ,cAAAA,KAAAA,CAAGL,YAAU,qBAAsBJ,GAC5C,CAOA,SAASU,GAAeX,UAAEA,EAASY,SAAEA,EAAQC,KAAEA,EAAO,UAAWZ,IAChE,OACCC,EAACY,cAAAA,IAAAA,CACAC,eAAcH,EAAW,YAASI,EAClCX,YAAU,kBACVY,cAAaL,EACbZ,UAAWM,EACVY,EAAe,CACdC,QAASP,EAAW,UAAY,QAChCC,SAEDb,MAEGC,GAGP,CAEA,SAASmB,GAAmBpB,UAAEA,KAAcC,IAC3C,OACCC,EAACS,cAAAA,EAAAA,CACAP,aAAW,sBACXS,KAAK,UACLb,UAAWM,EAAG,yBAA0BN,MACpCC,GAEJC,EAAAmB,cAACC,QACDpB,EAACqB,cAAAA,OAAAA,CAAKvB,UAAU,mBAAkB,YAGrC,CAEA,SAASwB,GAAexB,UAAEA,KAAcC,IACvC,OACCC,EAACS,cAAAA,EAAAA,CACAP,aAAW,kBACXS,KAAK,UACLb,UAAWM,EAAG,yBAA0BN,MACpCC,GAEJC,EAACqB,cAAAA,OAAAA,CAAKvB,UAAU,mBAAkB,QAClCE,EAACuB,cAAAA,EAAAA,MAGJ,CAEA,SAASC,GAAmB1B,UAAEA,KAAcC,IAC3C,OACCC,EAACqB,cAAAA,OAAAA,CACAI,eAAAA,EACAtB,YAAU,sBACVL,UAAWM,EAAG,0CAA2CN,MACrDC,GAEJC,EAAC0B,cAAAA,EAAAA,CAAmB5B,UAAU,WAC9BE,EAACqB,cAAAA,OAAAA,CAAKvB,UAAU,WAAU,cAG7B","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{c as e}from"./utils-
|
2
|
-
//# sourceMappingURL=popover-
|
1
|
+
import{c as e}from"./utils-BDlXiHS3.mjs";import*as o from"react";import r from"react";import{u as t,c as n,P as a}from"./index-BE7U1lz3.mjs";import{c as s}from"./index-BOtb6ofV.mjs";import{P as i,D as c}from"./index-D1WqwlXc.mjs";import{h as d,R as p,u,F as l}from"./index-CVg6WODB.mjs";import{u as f}from"./index-DrgyjxdM.mjs";import{c as m,R as v,A as h,C as g,a as P}from"./index-C8ZqoA88.mjs";import{P as C}from"./index-BEeVpO2_.mjs";import{createSlot as O}from"@radix-ui/react-slot";import{u as w}from"./index-mlVBNiql.mjs";import{jsx as x}from"react/jsx-runtime";var R="Popover",[b,_]=s(R,[m]),A=m(),[F,y]=b(R),E=e=>{const{__scopePopover:r,children:t,open:n,defaultOpen:a,onOpenChange:s,modal:i=!1}=e,c=A(r),d=o.useRef(null),[p,u]=o.useState(!1),[l,m]=w({prop:n,defaultProp:a??!1,onChange:s,caller:R});return x(v,{...c,children:x(F,{scope:r,contentId:f(),triggerRef:d,open:l,onOpenChange:m,onOpenToggle:o.useCallback((()=>m((e=>!e))),[m]),hasCustomAnchor:p,onCustomAnchorAdd:o.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:o.useCallback((()=>u(!1)),[]),modal:i,children:t})})};E.displayName=R;var D="PopoverAnchor",j=o.forwardRef(((e,r)=>{const{__scopePopover:t,...n}=e,a=y(D,t),s=A(t),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=a;return o.useEffect((()=>(i(),()=>c())),[i,c]),x(h,{...s,...n,ref:r})}));j.displayName=D;var k="PopoverTrigger",N=o.forwardRef(((e,o)=>{const{__scopePopover:r,...a}=e,s=y(k,r),i=A(r),c=t(o,s.triggerRef),d=x(C.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":H(s.open),...a,ref:c,onClick:n(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?d:x(h,{asChild:!0,...i,children:d})}));N.displayName=k;var I="PopoverPortal",[M,z]=b(I,{forceMount:void 0}),K=e=>{const{__scopePopover:o,forceMount:r,children:t,container:n}=e,s=y(I,o);return x(M,{scope:o,forceMount:r,children:x(a,{present:r||s.open,children:x(i,{asChild:!0,container:n,children:t})})})};K.displayName=I;var T="PopoverContent",S=o.forwardRef(((e,o)=>{const r=z(T,e.__scopePopover),{forceMount:t=r.forceMount,...n}=e,s=y(T,e.__scopePopover);return x(a,{present:t||s.open,children:s.modal?x(Z,{...n,ref:o}):x(q,{...n,ref:o})})}));S.displayName=T;var U=O("PopoverContent.RemoveScroll"),Z=o.forwardRef(((e,r)=>{const a=y(T,e.__scopePopover),s=o.useRef(null),i=t(r,s),c=o.useRef(!1);return o.useEffect((()=>{const e=s.current;if(e)return d(e)}),[]),x(p,{as:U,allowPinchZoom:!0,children:x(B,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:n(e.onCloseAutoFocus,(e=>{e.preventDefault(),c.current||a.triggerRef.current?.focus()})),onPointerDownOutside:n(e.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,r=0===o.button&&!0===o.ctrlKey,t=2===o.button||r;c.current=t}),{checkForDefaultPrevented:!1}),onFocusOutside:n(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),q=o.forwardRef(((e,r)=>{const t=y(T,e.__scopePopover),n=o.useRef(!1),a=o.useRef(!1);return x(B,{...e,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||t.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,"pointerdown"===o.detail.originalEvent.type&&(a.current=!0));const r=o.target,s=t.triggerRef.current?.contains(r);s&&o.preventDefault(),"focusin"===o.detail.originalEvent.type&&a.current&&o.preventDefault()}})})),B=o.forwardRef(((e,o)=>{const{__scopePopover:r,trapFocus:t,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,...m}=e,v=y(T,r),h=A(r);return u(),x(l,{asChild:!0,loop:!0,trapped:t,onMountAutoFocus:n,onUnmountAutoFocus:a,children:x(c,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:p,onDismiss:()=>v.onOpenChange(!1),children:x(g,{"data-state":H(v.open),role:"dialog",id:v.contentId,...h,...m,ref:o,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),G="PopoverClose";o.forwardRef(((e,o)=>{const{__scopePopover:r,...t}=e,a=y(G,r);return x(C.button,{type:"button",...t,ref:o,onClick:n(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=G;function H(e){return e?"open":"closed"}o.forwardRef(((e,o)=>{const{__scopePopover:r,...t}=e,n=A(r);return x(P,{...n,...t,ref:o})})).displayName="PopoverArrow";var J=E,L=j,Q=N,V=K,W=S;function X({...e}){return r.createElement(J,{"data-slot":"popover",...e})}function Y({...e}){return r.createElement(Q,{"data-slot":"popover-trigger",...e})}function $({className:o,align:t="center",sideOffset:n=4,...a}){return r.createElement(V,null,r.createElement(W,{"data-slot":"popover-content",align:t,sideOffset:n,className:e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 cursor-pointer rounded-md border p-4 shadow-md outline-none",o),...a}))}function ee({...e}){return r.createElement(L,{"data-slot":"popover-anchor",...e})}export{X as P,Y as a,$ as b,ee as c};
|
2
|
+
//# sourceMappingURL=popover-COG3isxJ.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover-CEah8B_Q.mjs","sources":["../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/components/ui/popover/popover.tsx"],"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","import { cn } from \"@/lib/utils\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = \"center\",\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 cursor-pointer rounded-md border p-4 shadow-md outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","open","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React","useRef","hasCustomAnchor","setHasCustomAnchor","useState","setOpen","useControllableState","prop","defaultProp","onChange","caller","jsx","PopperPrimitive.Root","scope","contentId","useId","onOpenToggle","useCallback","prevOpen","onCustomAnchorAdd","onCustomAnchorRemove","displayName","ANCHOR_NAME","PopoverAnchor","forwardRef","forwardedRef","anchorProps","context","useEffect","PopperPrimitive.Anchor","ref","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","button","type","getState","onClick","composeEventHandlers","asChild","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","PopoverPortal","container","Presence","present","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","current","hideOthers","RemoveScroll","as","allowPinchZoom","PopoverContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","isRightClick","checkForDefaultPrevented","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","onEscapeKeyDown","useFocusGuards","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","onDismiss","PopperPrimitive.Content","role","id","style","CLOSE_NAME","closeProps","arrowProps","PopperPrimitive.Arrow","Root","Anchor","Trigger","Portal","Content","createElement","PopoverPrimitive","data-slot","className","align","sideOffset","cn"],"mappings":"yjBAwBA,IAAMA,EAAe,WAGdC,EAAsBC,GAAsBC,EAAmBH,EAAc,CAClFI,IAEIC,EAAiBD,KAchBE,EAAiBC,GACtBN,EAA0CD,GAUtCQ,EAAmCC,IACvC,MAAMC,eACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAcZ,EAAeK,GAC7BQ,EAAmBC,EAAAC,OAA0B,OAC5CC,EAAiBC,GAA4BH,EAAAI,UAAS,IACtDX,EAAMY,GAAWC,EAAqB,CAC3CC,KAAMb,EACNc,YAAab,IAAe,EAC5Bc,SAAUb,EACVc,OAAQ7B,IAGV,OACE8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iBkG,EAAhB,IAA0B/G,KAAiB8G,EAAY9E,IAAKL,GAAc,IAIzEJ,YAdM,eAsBnB,IAAMyF,EAAOzH,EACP0H,EAASxF,EACTyF,EAAUhF,EACViF,EAASjE,EACTkE,EAAU5D,EC/ehB,SAASjE,MAAaC,IACrB,OAAOU,EAAAmH,cAACC,EAAqB,CAACC,YAAU,aAAc/H,GACvD,CAEA,SAAS0C,MAAoB1C,IAC5B,OAAOU,EAAAmH,cAACC,EAAwB,CAACC,YAAU,qBAAsB/H,GAClE,CAEA,SAASgE,GAAegE,UACvBA,EAASC,MACTA,EAAQ,SAAQC,WAChBA,EAAa,KACVlI,IAEH,OACCU,gBAACoH,EACA,KAAApH,EAAAmH,cAACC,EAAwB,CACxBC,YAAU,kBACVE,MAAOA,EACPC,WAAYA,EACZF,UAAWG,EACV,4bACAH,MAEGhI,IAIR,CAEA,SAASiC,OAAmBjC,IAC3B,OAAOU,EAAAmH,cAACC,EAAuB,CAACC,YAAU,oBAAqB/H,GAChE","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"popover-COG3isxJ.mjs","sources":["../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/components/ui/popover/popover.tsx"],"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","import { cn } from \"@/lib/utils\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\n\nfunction Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n\treturn <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n\treturn <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n\tclassName,\n\talign = \"center\",\n\tsideOffset = 4,\n\t...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n\treturn (\n\t\t<PopoverPrimitive.Portal>\n\t\t\t<PopoverPrimitive.Content\n\t\t\t\tdata-slot=\"popover-content\"\n\t\t\t\talign={align}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 cursor-pointer rounded-md border p-4 shadow-md outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</PopoverPrimitive.Portal>\n\t);\n}\n\nfunction PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n\treturn <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />;\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["POPOVER_NAME","createPopoverContext","createPopoverScope","createContextScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","props","__scopePopover","children","open","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","React","useRef","hasCustomAnchor","setHasCustomAnchor","useState","setOpen","useControllableState","prop","defaultProp","onChange","caller","jsx","PopperPrimitive.Root","scope","contentId","useId","onOpenToggle","useCallback","prevOpen","onCustomAnchorAdd","onCustomAnchorRemove","displayName","ANCHOR_NAME","PopoverAnchor","forwardRef","forwardedRef","anchorProps","context","useEffect","PopperPrimitive.Anchor","ref","TRIGGER_NAME","PopoverTrigger","triggerProps","composedTriggerRef","useComposedRefs","trigger","Primitive","button","type","getState","onClick","composeEventHandlers","asChild","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","PopoverPortal","container","Presence","present","PortalPrimitive","CONTENT_NAME","PopoverContent","portalContext","contentProps","PopoverContentModal","PopoverContentNonModal","Slot","createSlot","contentRef","composedRefs","isRightClickOutsideRef","content","current","hideOthers","RemoveScroll","as","allowPinchZoom","PopoverContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","isRightClick","checkForDefaultPrevented","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","onEscapeKeyDown","useFocusGuards","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","onDismiss","PopperPrimitive.Content","role","id","style","CLOSE_NAME","closeProps","arrowProps","PopperPrimitive.Arrow","Root","Anchor","Trigger","Portal","Content","createElement","PopoverPrimitive","data-slot","className","align","sideOffset","cn"],"mappings":"yjBAwBA,IAAMA,EAAe,WAGdC,EAAsBC,GAAsBC,EAAmBH,EAAc,CAClFI,IAEIC,EAAiBD,KAchBE,EAAiBC,GACtBN,EAA0CD,GAUtCQ,EAAmCC,IACvC,MAAMC,eACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAcZ,EAAeK,GAC7BQ,EAAmBC,EAAAC,OAA0B,OAC5CC,EAAiBC,GAA4BH,EAAAI,UAAS,IACtDX,EAAMY,GAAWC,EAAqB,CAC3CC,KAAMb,EACNc,YAAab,IAAe,EAC5Bc,SAAUb,EACVc,OAAQ7B,IAGV,OACE8B,EAAiBC,EAAhB,IAAyBd,EACxBN,SAAAmB,EAACxB,EAAA,CACC0B,MAAOtB,EACPuB,UAAWC,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