ivt 0.2.2 → 0.2.4
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/base/index.mjs.map +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/{accordion-CRu13Dha.mjs → accordion-DxayPBXZ.mjs} +2 -2
- package/dist/chunks/{accordion-CRu13Dha.mjs.map → accordion-DxayPBXZ.mjs.map} +1 -1
- package/dist/chunks/{badge-Y1dDJQqr.mjs → badge-BIhNGnoC.mjs} +2 -2
- package/dist/chunks/{badge-Y1dDJQqr.mjs.map → badge-BIhNGnoC.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-5yKezECc.mjs → bundle-mjs-BPxOXzif.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-5yKezECc.mjs.map → bundle-mjs-BPxOXzif.mjs.map} +1 -1
- package/dist/chunks/{button-DoZYnN_T.mjs → button-kxm0Lckx.mjs} +2 -2
- package/dist/chunks/{button-DoZYnN_T.mjs.map → button-kxm0Lckx.mjs.map} +1 -1
- package/dist/chunks/{calendar-Biojbgqw.mjs → calendar-CBJ49e3M.mjs} +2 -2
- package/dist/chunks/{calendar-Biojbgqw.mjs.map → calendar-CBJ49e3M.mjs.map} +1 -1
- package/dist/chunks/check-DlWKp3dT.mjs +2 -0
- package/dist/chunks/{check-CiuxfB_G.mjs.map → check-DlWKp3dT.mjs.map} +1 -1
- package/dist/chunks/chevron-down-CWUqY12V.mjs +2 -0
- package/dist/chunks/{chevron-down-D2iiAjQd.mjs.map → chevron-down-CWUqY12V.mjs.map} +1 -1
- package/dist/chunks/chevron-left-CJfbOy3n.mjs +2 -0
- package/dist/chunks/{chevron-left-DZD565Pc.mjs.map → chevron-left-CJfbOy3n.mjs.map} +1 -1
- package/dist/chunks/chevron-right-CepU0QYJ.mjs +2 -0
- package/dist/chunks/{chevron-right-B9yX7Te0.mjs.map → chevron-right-CepU0QYJ.mjs.map} +1 -1
- package/dist/chunks/{command-DZ0p-kkm.mjs → command-DYCg8FQm.mjs} +2 -2
- package/dist/chunks/{command-DZ0p-kkm.mjs.map → command-DYCg8FQm.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-D9esjvN9.mjs → createLucideIcon-Okp8w8Ue.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-D9esjvN9.mjs.map → createLucideIcon-Okp8w8Ue.mjs.map} +1 -1
- package/dist/chunks/{dialog-B27SKKwf.mjs → dialog-DTcjPj46.mjs} +2 -2
- package/dist/chunks/{dialog-B27SKKwf.mjs.map → dialog-DTcjPj46.mjs.map} +1 -1
- package/dist/chunks/{hover-card-CYdF4tka.mjs → hover-card-T6QvJZH3.mjs} +2 -2
- package/dist/chunks/{hover-card-CYdF4tka.mjs.map → hover-card-T6QvJZH3.mjs.map} +1 -1
- package/dist/chunks/{index-CZZyG4d-.mjs → index-BEptPvC9.mjs} +1 -1
- package/dist/chunks/{index-CZZyG4d-.mjs.map → index-BEptPvC9.mjs.map} +1 -1
- package/dist/chunks/{index-D4QaIJIC.mjs → index-Bmfh-9vj.mjs} +2 -2
- package/dist/chunks/{index-D4QaIJIC.mjs.map → index-Bmfh-9vj.mjs.map} +1 -1
- package/dist/chunks/{index-gINpS7bU.mjs → index-BqVtEtRQ.mjs} +1 -1
- package/dist/chunks/{index-gINpS7bU.mjs.map → index-BqVtEtRQ.mjs.map} +1 -1
- package/dist/chunks/{index-BcouYq7P.mjs → index-BsSBJ3PL.mjs} +2 -2
- package/dist/chunks/{index-BcouYq7P.mjs.map → index-BsSBJ3PL.mjs.map} +1 -1
- package/dist/chunks/{index-ojKRapLJ.mjs → index-C-gmRzgE.mjs} +1 -1
- package/dist/chunks/{index-ojKRapLJ.mjs.map → index-C-gmRzgE.mjs.map} +1 -1
- package/dist/chunks/{index-BD0ct0kD.mjs → index-Cy8Nz9EO.mjs} +1 -1
- package/dist/chunks/{index-BD0ct0kD.mjs.map → index-Cy8Nz9EO.mjs.map} +1 -1
- package/dist/chunks/{index-Bn7EFHMT.mjs → index-DUhfpjqn.mjs} +2 -2
- package/dist/chunks/{index-Bn7EFHMT.mjs.map → index-DUhfpjqn.mjs.map} +1 -1
- package/dist/chunks/{index-DS-C90jw.mjs → index-Di_4GEUt.mjs} +2 -2
- package/dist/chunks/{index-DS-C90jw.mjs.map → index-Di_4GEUt.mjs.map} +1 -1
- package/dist/chunks/{index-DhSQFvS9.mjs → index-DzvdVz0F.mjs} +2 -2
- package/dist/chunks/{index-DhSQFvS9.mjs.map → index-DzvdVz0F.mjs.map} +1 -1
- package/dist/chunks/{index-D9Zwkp9P.mjs → index-Gmu-glAo.mjs} +2 -2
- package/dist/chunks/{index-D9Zwkp9P.mjs.map → index-Gmu-glAo.mjs.map} +1 -1
- package/dist/chunks/{index-BoVEch5q.mjs → index-g796WVS-.mjs} +1 -1
- package/dist/chunks/{index-BoVEch5q.mjs.map → index-g796WVS-.mjs.map} +1 -1
- package/dist/chunks/{index-M45g_qo0.mjs → index-j5UZGMap.mjs} +2 -2
- package/dist/chunks/{index-M45g_qo0.mjs.map → index-j5UZGMap.mjs.map} +1 -1
- package/dist/chunks/{index-BR3_LOr1.mjs → index-jhOC7m1Z.mjs} +2 -2
- package/dist/chunks/{index-BR3_LOr1.mjs.map → index-jhOC7m1Z.mjs.map} +1 -1
- package/dist/chunks/{index-BikeYhoq.mjs → index-pz7_bV3J.mjs} +2 -2
- package/dist/chunks/{index-BikeYhoq.mjs.map → index-pz7_bV3J.mjs.map} +1 -1
- package/dist/chunks/{index-Osi0LLLf.mjs → index-sxa3-G-E.mjs} +2 -2
- package/dist/chunks/{index-Osi0LLLf.mjs.map → index-sxa3-G-E.mjs.map} +1 -1
- package/dist/chunks/{input-U8L0qifT.mjs → input-DyBbEcZb.mjs} +2 -2
- package/dist/chunks/{input-U8L0qifT.mjs.map → input-DyBbEcZb.mjs.map} +1 -1
- package/dist/chunks/{label-L_RZKGdi.mjs → label-7xIUYreG.mjs} +2 -2
- package/dist/chunks/{label-L_RZKGdi.mjs.map → label-7xIUYreG.mjs.map} +1 -1
- package/dist/chunks/{pagination-DWGOl1YM.mjs → pagination-BQCy5ruZ.mjs} +2 -2
- package/dist/chunks/{pagination-DWGOl1YM.mjs.map → pagination-BQCy5ruZ.mjs.map} +1 -1
- package/dist/chunks/{popover-DgBEAa61.mjs → popover-BaOty87a.mjs} +2 -2
- package/dist/chunks/{popover-DgBEAa61.mjs.map → popover-BaOty87a.mjs.map} +1 -1
- package/dist/chunks/{progress-DNp9ADEo.mjs → progress-B01RWEwW.mjs} +2 -2
- package/dist/chunks/{progress-DNp9ADEo.mjs.map → progress-B01RWEwW.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-BTs5WSxO.mjs → scroll-area-DBEmK194.mjs} +2 -2
- package/dist/chunks/{scroll-area-BTs5WSxO.mjs.map → scroll-area-DBEmK194.mjs.map} +1 -1
- package/dist/chunks/{select-DEkouf8i.mjs → select-DluWFNkM.mjs} +2 -2
- package/dist/chunks/{select-DEkouf8i.mjs.map → select-DluWFNkM.mjs.map} +1 -1
- package/dist/chunks/separator-Bj88WMYr.mjs +2 -0
- package/dist/chunks/separator-Bj88WMYr.mjs.map +1 -0
- package/dist/chunks/{skeleton-DxMv3ZHu.mjs → skeleton-BL6dx9Bm.mjs} +2 -2
- package/dist/chunks/{skeleton-DxMv3ZHu.mjs.map → skeleton-BL6dx9Bm.mjs.map} +1 -1
- package/dist/chunks/{sortable-C3LyClHG.mjs → sortable-DrKB22S8.mjs} +2 -2
- package/dist/chunks/{sortable-C3LyClHG.mjs.map → sortable-DrKB22S8.mjs.map} +1 -1
- package/dist/chunks/{table-BPHebMeE.mjs → table-BvtQHwsd.mjs} +2 -2
- package/dist/chunks/{table-BPHebMeE.mjs.map → table-BvtQHwsd.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-Dcib4Fm8.mjs → tslib.es6-1P1xnW5u.mjs} +1 -1
- package/dist/chunks/{tslib.es6-Dcib4Fm8.mjs.map → tslib.es6-1P1xnW5u.mjs.map} +1 -1
- package/dist/chunks/{utils-Uj0fSFoG.mjs → utils-BNmnOQuQ.mjs} +2 -2
- package/dist/chunks/{utils-Uj0fSFoG.mjs.map → utils-BNmnOQuQ.mjs.map} +1 -1
- package/dist/chunks/x-Dnrlrmes.mjs +2 -0
- package/dist/chunks/{x-HCYpfOZx.mjs.map → x-Dnrlrmes.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/icon.svg +7 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.es.js +1 -0
- package/dist/input/index.mjs +1 -1
- package/dist/ivt.css +1 -0
- package/dist/ivt.png +0 -0
- package/dist/label/index.mjs +1 -1
- package/dist/multi-select/index.d.ts +71 -0
- package/dist/multi-select/index.mjs +2 -0
- package/dist/multi-select/index.mjs.map +1 -0
- 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/separator/index.mjs.map +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 +7 -2
- package/dist/chunks/check-CiuxfB_G.mjs +0 -2
- package/dist/chunks/chevron-down-D2iiAjQd.mjs +0 -2
- package/dist/chunks/chevron-left-DZD565Pc.mjs +0 -2
- package/dist/chunks/chevron-right-B9yX7Te0.mjs +0 -2
- package/dist/chunks/x-HCYpfOZx.mjs +0 -2
@@ -1,2 +1,2 @@
|
|
1
1
|
import*as r from"react";import*as i from"react-dom";import{createSlot as t}from"@radix-ui/react-slot";import{jsx as o}from"react/jsx-runtime";var e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((i,e)=>{const a=t(`Primitive.${e}`),n=r.forwardRef((r,i)=>{const{asChild:t,...n}=r,m=t?a:e;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),o(m,{...n,ref:i})});return n.displayName=`Primitive.${e}`,{...i,[e]:n}},{});function a(r,t){r&&i.flushSync(()=>r.dispatchEvent(t))}export{e as P,a as d};
|
2
|
-
//# sourceMappingURL=index-
|
2
|
+
//# sourceMappingURL=index-g796WVS-.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-g796WVS-.mjs","sources":["../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["Primitive","reduce","primitive","node","Slot","createSlot","Node","React","forwardRef","props","forwardedRef","asChild","primitiveProps","Comp","window","Symbol","for","jsx","ref","displayName","dispatchDiscreteCustomEvent","target","event","ReactDOM","flushSync","dispatchEvent"],"mappings":"8IAIA,IAgCMA,EAhCQ,CACZ,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,SACA,OACA,MACA,MAesBC,OAAO,CAACC,EAAWC,KACzC,MAAMC,EAAOC,EAAW,aAAaF,KAC/BG,EAAaC,EAAAC,WAAW,CAACC,EAA2CC,KACxE,MAAMC,QAAEA,KAAYC,GAAmBH,EACjCI,EAAYF,EAAUP,EAAOD,EAMnC,MAJsB,oBAAXW,SACRA,OAAeC,OAAOC,IAAI,cAAe,GAGrCC,EAACJ,EAAA,IAASD,EAAgBM,IAAKR,MAKxC,OAFAJ,EAAKa,YAAc,aAAahB,IAEzB,IAAKD,EAAWC,CAACA,GAAOG,IAC9B,CAAA,GA2CH,SAASc,EAAmDC,EAAqBC,GAC3ED,GAAiBE,EAAAC,UAAU,IAAMH,EAAOI,cAAcH,GAC5D","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{u as t,c as n}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{u as t,c as n}from"./index-pz7_bV3J.mjs";import{P as r,d as s}from"./index-g796WVS-.mjs";import{u as o}from"./index-BqVtEtRQ.mjs";import{jsx as i}from"react/jsx-runtime";import a from"react-dom";import{u}from"./index-C-gmRzgE.mjs";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",m=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),v=e.forwardRef((s,a)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:v,onPointerDownOutside:E,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(m),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=t(a,e=>C(e)),R=Array.from(P.layers),[T]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),k=R.indexOf(T),W=L?R.indexOf(L):-1,B=P.layersWithOutsidePointerEventsDisabled.size>0,S=W>=k,j=function(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!s.current){let t=function(){y(l,r,s,{discrete:!0})};const s={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);s.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>s.current=!0}}(e=>{const t=e.target,n=[...P.branches].some(e=>e.contains(t));S&&!n&&(E?.(e),w?.(e),e.defaultPrevented||h?.())},O),F=function(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!s.current){y(f,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}(e=>{const t=e.target;[...P.branches].some(e=>e.contains(t))||(b?.(e),w?.(e),e.defaultPrevented||h?.())},O);return function(t,n=globalThis?.document){const r=o(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{W===P.layers.size-1&&(v?.(e),!e.defaultPrevented&&h&&(e.preventDefault(),h()))},O),e.useEffect(()=>{if(L)return u&&(0===P.layersWithOutsidePointerEventsDisabled.size&&(c=O.body.style.pointerEvents,O.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(L)),P.layers.add(L),p(),()=>{u&&1===P.layersWithOutsidePointerEventsDisabled.size&&(O.body.style.pointerEvents=c)}},[L,O,u,P]),e.useEffect(()=>()=>{L&&(P.layers.delete(L),P.layersWithOutsidePointerEventsDisabled.delete(L),p())},[L,P]),e.useEffect(()=>{const e=()=>g({});return document.addEventListener(d,e),()=>document.removeEventListener(d,e)},[]),i(r.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:n(s.onFocusCapture,F.onFocusCapture),onBlurCapture:n(s.onBlurCapture,F.onBlurCapture),onPointerDownCapture:n(s.onPointerDownCapture,j.onPointerDownCapture)})});v.displayName="DismissableLayer";var E=e.forwardRef((n,s)=>{const o=e.useContext(m),a=e.useRef(null),u=t(s,a);return e.useEffect(()=>{const e=a.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),i(r.div,{...n,ref:u})});function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?s(o,i):o.dispatchEvent(i)}E.displayName="DismissableLayerBranch";var b=v,w=E,h=e.forwardRef((t,n)=>{const{container:s,...o}=t,[c,d]=e.useState(!1);u(()=>d(!0),[]);const l=s||c&&globalThis?.document?.body;return l?a.createPortal(i(r.div,{...o,ref:n}),l):null});h.displayName="Portal";export{w as B,v as D,h as P,b as R};
|
2
|
+
//# sourceMappingURL=index-j5UZGMap.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-M45g_qo0.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,WAC7B,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,UACnD,CAAGC,GAAezB,EAAAqB,SAAS,CAA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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,WAAuC,CAACC,EAAOC,KAClE,MAAQkG,UAAWC,KAAkBC,GAAgBrG,GAC9CsG,EAASC,GAAoB/G,EAAAqB,UAAS,GAC7C2F,EAAgB,IAAMD,GAAW,GAAO,IACxC,MAAMJ,EAAYC,GAAkBE,GAAWvF,YAAYC,UAAU0D,KACrE,OAAOyB,EACHM,EAASC,aAAazB,EAACC,EAAUC,IAAV,IAAkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,OAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
|
1
|
+
{"version":3,"file":"index-j5UZGMap.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,WAC7B,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,UACnD,CAAGC,GAAezB,EAAAqB,SAAS,CAAA,GAC3BK,EAAeC,EAAgBlB,EAAeU,GAASC,EAAQD,IAC/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,OAAO,QAiEpC,OA/DM1C,EAAA4C,UAAU,KACd,MAAMC,EAAqBC,IACzB,GAAIA,EAAMC,SAAWN,EAA4BO,QAAS,CAGxD,IAASC,EAAT,WACEC,EACErD,EACA0C,EACAY,EACA,CAAEC,UA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C,GAAkBE,GAAWvF,YAAYC,UAAU0D,KACrE,OAAOyB,EACHM,EAASC,aAAazB,EAACC,EAAUC,IAAV,IAAkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,OAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
|
@@ -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-C-gmRzgE.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-jhOC7m1Z.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-jhOC7m1Z.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,EAAgB,KACd,GAAIL,EAAS,CAEXE,EAAQ,CAAEI,MAAON,EAAQO,YAAaC,OAAQR,EAAQS,eAEtD,MAAMC,EAAiB,IAAIC,eAAgBC,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,aAKnB,OAFAE,EAAeS,QAAQnB,EAAS,CAAEoB,IAAK,eAEhC,IAAMV,EAAeW,UAAUrB,GAItCE,OAAQ,IAET,CAACF,IAEGC,CACT","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{u as n}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{u as n}from"./index-C-gmRzgE.mjs";function t(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function r(...e){return n=>{let r=!1;const o=e.map(e=>{const o=t(e,n);return r||"function"!=typeof o||(r=!0),o});if(r)return()=>{for(let n=0;n<o.length;n++){const r=o[n];"function"==typeof r?r():t(e[n],null)}}}}function o(...n){return e.useCallback(r(...n),n)}function u(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}var i=t=>{const{present:r,children:u}=t,i=function(t){const[r,o]=e.useState(),u=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),c=t?"mounted":"unmounted",[f,l]=function(n,t){return e.useReducer((e,n)=>t[e][n]??e,n)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=s(u.current);a.current="mounted"===f?e:"none"},[f]),n(()=>{const e=u.current,n=i.current;if(n!==t){const r=a.current,o=s(e);if(t)l("MOUNT");else if("none"===o||"none"===e?.display)l("UNMOUNT");else{l(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,l]),n(()=>{if(r){let e;const n=r.ownerDocument.defaultView??window,t=t=>{const o=s(u.current).includes(t.animationName);if(t.target===r&&o&&(l("ANIMATION_END"),!i.current)){const t=r.style.animationFillMode;r.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=t)})}},o=e=>{e.target===r&&(a.current=s(u.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",t),r.addEventListener("animationend",t),()=>{n.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",t),r.removeEventListener("animationend",t)}}l("ANIMATION_END")},[r,l]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:e.useCallback(e=>{u.current=e?getComputedStyle(e):null,o(e)},[])}}(r),a="function"==typeof u?u({present:i.isPresent}):e.Children.only(u),c=o(i.ref,function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;if(t)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(a));return"function"==typeof u||i.isPresent?e.cloneElement(a,{ref:c}):null};function s(e){return e?.animationName||"none"}i.displayName="Presence";export{i as P,r as a,u as c,o as u};
|
2
|
+
//# sourceMappingURL=index-pz7_bV3J.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-BikeYhoq.mjs","sources":["../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","current","composeRefs","refs","node","hasCleanup","cleanups","map","cleanup","i","length","useComposedRefs","React","useCallback","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","window","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","usePresence","child","Children","only","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"iEAQA,SAASA,EAAUC,EAAqBC,GACtC,GAAmB,mBAARD,EACT,OAAOA,EAAIC,GACFD,UACTA,EAAIE,QAAUD,EAElB,CAMA,SAASE,KAAkBC,GACzB,OAAQC,IACN,IAAIC,GAAa,EACjB,MAAMC,EAAWH,EAAKI,IAAKR,IACzB,MAAMS,EAAUV,EAAOC,EAAKK,GAI5B,OAHKC,GAAgC,mBAAXG,IACxBH,GAAa,GAERG,IAOT,GAAIH,EACF,MAAO,KACL,IAAA,IAASI,EAAI,EAAGA,EAAIH,EAASI,OAAQD,IAAK,CACxC,MAAMD,EAAUF,EAASG,GACH,mBAAXD,EACTA,IAEAV,EAAOK,EAAKM,GAAI,KAEpB,GAIR,CAMA,SAASE,KAAsBR,GAE7B,OAAaS,EAAAC,YAAYX,KAAeC,GAAOA,EACjD,CCzDA,SAASW,EACPC,EACAC,GACAC,yBAAEA,GAA2B,GAAS,IAEtC,OAAO,SAAqBC,GAG1B,GAFAH,IAAuBG,IAEU,IAA7BD,IAAuCC,EAAMC,iBAC/C,OA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xB,OAAOA,GAAQY,eAAiB,MAClC,CA5IAvC,EAASgE,YAAc","x_google_ignoreList":[0,1,2]}
|
1
|
+
{"version":3,"file":"index-pz7_bV3J.mjs","sources":["../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","current","composeRefs","refs","node","hasCleanup","cleanups","map","cleanup","i","length","useComposedRefs","React","useCallback","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","window","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","usePresence","child","Children","only","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"iEAQA,SAASA,EAAUC,EAAqBC,GACtC,GAAmB,mBAARD,EACT,OAAOA,EAAIC,GACFD,UACTA,EAAIE,QAAUD,EAElB,CAMA,SAASE,KAAkBC,GACzB,OAAQC,IACN,IAAIC,GAAa,EACjB,MAAMC,EAAWH,EAAKI,IAAKR,IACzB,MAAMS,EAAUV,EAAOC,EAAKK,GAI5B,OAHKC,GAAgC,mBAAXG,IACxBH,GAAa,GAERG,IAOT,GAAIH,EACF,MAAO,KACL,IAAA,IAASI,EAAI,EAAGA,EAAIH,EAASI,OAAQD,IAAK,CACxC,MAAMD,EAAUF,EAASG,GACH,mBAAXD,EACTA,IAEAV,EAAOK,EAAKM,GAAI,KAEpB,GAIR,CAMA,SAASE,KAAsBR,GAE7B,OAAaS,EAAAC,YAAYX,KAAeC,GAAOA,EACjD,CCzDA,SAASW,EACPC,EACAC,GACAC,yBAAEA,GAA2B,GAAS,IAEtC,OAAO,SAAqBC,GAG1B,GAFAH,IAAuBG,IAEU,IAA7BD,IAAuCC,EAAMC,iBAC/C,OAAOH,IAAkBE,EAE7B,CACF,CCFA,IAAME,EAAqCC,IACzC,MAAMC,QAAEA,EAAAC,SAASA,GAAaF,EACxBG,EAmBR,SAAqBF,GACnB,MAAOlB,EAAMqB,GAAiBC,EAAAC,WACxBC,EAAkBF,EAAAG,OAAmC,MACrDC,EAAuBJ,EAAAG,OAAOP,G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xC7D,EAAK8D,iBAAiB,kBAAmBV,GACzCpD,EAAK8D,iBAAiB,eAAgBV,GAC/B,KACLJ,EAAYe,aAAahB,GACzB/C,EAAKgE,oBAAoB,iBAAkBH,GAC3C7D,EAAKgE,oBAAoB,kBAAmBZ,GAC5CpD,EAAKgE,oBAAoB,eAAgBZ,IAK3CtB,EAAK,kBAEN,CAAC9B,EAAM8B,IAEH,CACLmC,UAAW,CAAC,UAAW,oBAAoBX,SAASzB,GACpDlC,IAAW2B,EAAAb,YAAaT,IACtBwB,EAAU3B,QAAUG,EAAOkE,iBAAiBlE,GAAQ,KACpDqB,EAAQrB,IACP,IAEP,CAnJmBmE,CAAYjD,GAEvBkD,EACgB,mBAAbjD,EACHA,EAAS,CAAED,QAASE,EAAS6C,YACvB3C,EAAA+C,SAASC,KAAKnD,GAGpBxB,EAAMY,EAAgBa,EAASzB,IAwJvC,SAAuB4E,GAErB,IAAIC,EAASC,OAAOC,yBAAyBH,EAAQtD,MAAO,QAAQ0D,IAChEC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eAC7D,GAAID,EACF,OAAQL,EAAgB5E,IAM1B,GAFA6E,EAASC,OAAOC,yBAAyBH,EAAS,QAAQI,IAC1DC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eACrDD,EACF,OAAOL,EAAQtD,MAAMtB,IAIvB,OAAO4E,EAAQtD,MAAMtB,KAAQ4E,EAAgB5E,GAC/C,CAzK4CmF,CAAcV,IAExD,MADuC,mBAAbjD,GACLC,EAAS6C,UAAkB3C,EAAAyD,aAAaX,EAAO,CAAEzE,QAAS,MA6IjF,SAAS8C,EAAiBE,GACxB,OAAOA,GAAQY,eAAiB,MAClC,CA5IAvC,EAASgE,YAAc","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-C-gmRzgE.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-sxa3-G-E.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-sxa3-G-E.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,aAAU,MAAY,GACrEC,EAAQ,EAEZ,SAASC,EAAMC,GACb,MAAOC,EAAIC,GAAeP,EAAAQ,SAA6BT,KAKvD,OAHAU,EAAgB,KACQF,EAAOG,GAAYA,GAAWC,OAAOR,OAC1D,CAACE,IACuBC,EAAK,SAASA,IAAO,EAClD","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-BNmnOQuQ.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-DyBbEcZb.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input-
|
1
|
+
{"version":3,"file":"input-DyBbEcZb.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","createElement","input","data-slot","cn"],"mappings":"8DAGA,SAASA,GAAMC,UAAEA,EAASC,KAAEA,KAASC,IACpC,OACCC,EAAAC,cAACC,QAAAA,CACAJ,KAAMA,EACNK,YAAU,QACVN,UAAWO,EACV,2WACAP,MAEGE,GAGP"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{c as e}from"./utils-
|
2
|
-
//# sourceMappingURL=label-
|
1
|
+
import{c as e}from"./utils-BNmnOQuQ.mjs";import*as t from"react";import a from"react";import{P as r}from"./index-g796WVS-.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-7xIUYreG.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"label-
|
1
|
+
{"version":3,"file":"label-7xIUYreG.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,WAAqC,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,sBAM/Df,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-BNmnOQuQ.mjs";import a from"react";import{C as t}from"./chevron-left-CJfbOy3n.mjs";import{C as s}from"./chevron-right-CepU0QYJ.mjs";import{c as n}from"./createLucideIcon-Okp8w8Ue.mjs";import{b as c}from"./button-kxm0Lckx.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-BQCy5ruZ.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pagination-
|
1
|
+
{"version":3,"file":"pagination-BQCy5ruZ.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","createElement","nav","aria-label","data-slot","cn","PaginationContent","ul","PaginationItem","li","PaginationLink","isActive","size","a","aria-current","undefined","data-active","buttonVariants","variant","PaginationPrevious","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,EAAAC,cAACC,MAAAA,CACAC,aAAW,aACXC,YAAU,aACVN,UAAWO,EAAG,qCAAsCP,MAChDC,GAGP,CAEA,SAASO,GAAkBR,UAAEA,KAAcC,IAC1C,OACCC,EAAAC,cAACM,KAAAA,CACAH,YAAU,qBACVN,UAAWO,EAAG,mCAAoCP,MAC9CC,GAGP,CAEA,SAASS,MAAoBT,IAC5B,OAAOC,EAAAC,cAACQ,KAAAA,CAAGL,YAAU,qBAAsBL,GAC5C,CAOA,SAASW,GAAeZ,UAAEA,EAASa,SAAEA,EAAQC,KAAEA,EAAO,UAAWb,IAChE,OACCC,EAAAC,cAACY,IAAAA,CACAC,eAAcH,EAAW,YAASI,EAClCX,YAAU,kBACVY,cAAaL,EACbb,UAAWO,EACVY,EAAe,CACdC,QAASP,EAAW,UAAY,QAChCC,SAEDd,MAEGC,GAGP,CAEA,SAASoB,GAAmBrB,UAAEA,KAAcC,IAC3C,OACCC,EAAAC,cAACS,EAAAA,CACAP,aAAW,sBACXS,KAAK,UACLd,UAAWO,EAAG,yBAA0BP,MACpCC,GAEJC,EAAAC,cAACmB,QACDpB,EAAAC,cAACoB,OAAAA,CAAKvB,UAAU,mBAAkB,YAGrC,CAEA,SAASwB,GAAexB,UAAEA,KAAcC,IACvC,OACCC,EAAAC,cAACS,EAAAA,CACAP,aAAW,kBACXS,KAAK,UACLd,UAAWO,EAAG,yBAA0BP,MACpCC,GAEJC,EAAAC,cAACoB,OAAAA,CAAKvB,UAAU,mBAAkB,QAClCE,EAAAC,cAACsB,EAAAA,MAGJ,CAEA,SAASC,GAAmB1B,UAAEA,KAAcC,IAC3C,OACCC,EAAAC,cAACoB,OAAAA,CACAI,eAAAA,EACArB,YAAU,sBACVN,UAAWO,EAAG,0CAA2CP,MACrDC,GAEJC,EAAAC,cAACyB,EAAAA,CAAmB5B,UAAU,WAC9BE,EAAAC,cAACoB,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-BNmnOQuQ.mjs";import*as o from"react";import r from"react";import{u as t,c as n,P as a}from"./index-pz7_bV3J.mjs";import{c as s}from"./index-Cy8Nz9EO.mjs";import{P as i,D as c}from"./index-j5UZGMap.mjs";import{h as d,R as p,u,F as l}from"./index-BsSBJ3PL.mjs";import{u as f}from"./index-sxa3-G-E.mjs";import{c as m,R as v,A as h,C as g,a as P}from"./index-Gmu-glAo.mjs";import{P as C}from"./index-g796WVS-.mjs";import{createSlot as O}from"@radix-ui/react-slot";import{u as w}from"./index-Di_4GEUt.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-BaOty87a.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover-DgBEAa61.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,EAAs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OACEoB,EAAC0B,EAAUC,OAAV,CACCC,KAAK,YACDoE,EACJ7E,IAAKL,EACLgB,QAASC,EAAqBpD,EAAMmD,QAAS,IAAMd,EAAQ/B,cAAa,QAMnEyB,YAAcqF,EAwB3B,SAASlE,EAAS/C,GAChB,OAAOA,EAAO,OAAS,QACzB,CAd2BO,EAAAwB,WACzB,CAAClC,EAAuCmC,KACtC,MAAMlC,eAAEA,KAAmBqH,GAAetH,EACpCQ,EAAcZ,EAAeK,GACnC,OAAOoB,EAAiBkG,EAAhB,IAA0B/G,KAAiB8G,EAAY9E,IAAKL,MAI3DJ,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,EAAuB,KACvBpH,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-BaOty87a.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,aACA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ChB,OAAOA,EAAO,OAAS,QACzB,CAd2BO,EAAAwB,WACzB,CAAClC,EAAuCmC,KACtC,MAAMlC,eAAEA,KAAmBqH,GAAetH,EACpCQ,EAAcZ,EAAeK,GACnC,OAAOoB,EAAiBkG,EAAhB,IAA0B/G,KAAiB8G,EAAY9E,IAAKL,MAI3DJ,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,EAAuB,KACvBpH,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,2 +1,2 @@
|
|
1
|
-
import{c as a}from"./utils-
|
2
|
-
//# sourceMappingURL=progress-
|
1
|
+
import{c as a}from"./utils-BNmnOQuQ.mjs";import*as r from"react";import e from"react";import{c as t}from"./index-Cy8Nz9EO.mjs";import{P as o}from"./index-g796WVS-.mjs";import{jsx as l}from"react/jsx-runtime";var n="Progress",[s,i]=t(n),[u,m]=s(n),d=r.forwardRef((a,r)=>{const{__scopeProgress:e,value:t=null,max:n,getValueLabel:s=v,...i}=a;(n||0===n)&&g(n);const m=g(n)?n:100;null!==t&&N(t,m);const d=N(t,m)?t:null,c=x(d)?s(d,m):void 0;return l(u,{scope:e,value:d,max:m,children:l(o.div,{"aria-valuemax":m,"aria-valuemin":0,"aria-valuenow":x(d)?d:void 0,"aria-valuetext":c,role:"progressbar","data-state":p(d,m),"data-value":d??void 0,"data-max":m,...i,ref:r})})});d.displayName=n;var c="ProgressIndicator",f=r.forwardRef((a,r)=>{const{__scopeProgress:e,...t}=a,n=m(c,e);return l(o.div,{"data-state":p(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...t,ref:r})});function v(a,r){return`${Math.round(a/r*100)}%`}function p(a,r){return null==a?"indeterminate":a===r?"complete":"loading"}function x(a){return"number"==typeof a}function g(a){return x(a)&&!isNaN(a)&&a>0}function N(a,r){return x(a)&&!isNaN(a)&&a<=r&&a>=0}f.displayName=c;var w=d,y=f;function P({className:r,value:t,...o}){return e.createElement(w,{"data-slot":"progress",className:a("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",r),...o},e.createElement(y,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}}))}export{P};
|
2
|
+
//# sourceMappingURL=progress-B01RWEwW.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"progress-
|
1
|
+
{"version":3,"file":"progress-B01RWEwW.mjs","sources":["../../node_modules/@radix-ui/react-progress/dist/index.mjs","../../src/components/ui/progress/progress.tsx"],"sourcesContent":["\"use client\";\n\n// src/progress.tsx\nimport * as React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PROGRESS_NAME = \"Progress\";\nvar DEFAULT_MAX = 100;\nvar [createProgressContext, createProgressScope] = createContextScope(PROGRESS_NAME);\nvar [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);\nvar Progress = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeProgress,\n value: valueProp = null,\n max: maxProp,\n getValueLabel = defaultGetValueLabel,\n ...progressProps\n } = props;\n if ((maxProp || maxProp === 0) && !isValidMaxNumber(maxProp)) {\n console.error(getInvalidMaxError(`${maxProp}`, \"Progress\"));\n }\n const max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX;\n if (valueProp !== null && !isValidValueNumber(valueProp, max)) {\n console.error(getInvalidValueError(`${valueProp}`, \"Progress\"));\n }\n const value = isValidValueNumber(valueProp, max) ? valueProp : null;\n const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;\n return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"aria-valuemax\": max,\n \"aria-valuemin\": 0,\n \"aria-valuenow\": isNumber(value) ? value : void 0,\n \"aria-valuetext\": valueLabel,\n role: \"progressbar\",\n \"data-state\": getProgressState(value, max),\n \"data-value\": value ?? void 0,\n \"data-max\": max,\n ...progressProps,\n ref: forwardedRef\n }\n ) });\n }\n);\nProgress.displayName = PROGRESS_NAME;\nvar INDICATOR_NAME = \"ProgressIndicator\";\nvar ProgressIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeProgress, ...indicatorProps } = props;\n const context = useProgressContext(INDICATOR_NAME, __scopeProgress);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getProgressState(context.value, context.max),\n \"data-value\": context.value ?? void 0,\n \"data-max\": context.max,\n ...indicatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nProgressIndicator.displayName = INDICATOR_NAME;\nfunction defaultGetValueLabel(value, max) {\n return `${Math.round(value / max * 100)}%`;\n}\nfunction getProgressState(value, maxValue) {\n return value == null ? \"indeterminate\" : value === maxValue ? \"complete\" : \"loading\";\n}\nfunction isNumber(value) {\n return typeof value === \"number\";\n}\nfunction isValidMaxNumber(max) {\n return isNumber(max) && !isNaN(max) && max > 0;\n}\nfunction isValidValueNumber(value, max) {\n return isNumber(value) && !isNaN(value) && value <= max && value >= 0;\n}\nfunction getInvalidMaxError(propValue, componentName) {\n return `Invalid prop \\`max\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. Only numbers greater than 0 are valid max values. Defaulting to \\`${DEFAULT_MAX}\\`.`;\n}\nfunction getInvalidValueError(propValue, componentName) {\n return `Invalid prop \\`value\\` of value \\`${propValue}\\` supplied to \\`${componentName}\\`. The \\`value\\` prop must be:\n - a positive number\n - less than the value passed to \\`max\\` (or ${DEFAULT_MAX} if no \\`max\\` prop is set)\n - \\`null\\` or \\`undefined\\` if the progress is indeterminate.\n\nDefaulting to \\`null\\`.`;\n}\nvar Root = Progress;\nvar Indicator = ProgressIndicator;\nexport {\n Indicator,\n Progress,\n ProgressIndicator,\n Root,\n createProgressScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { cn } from \"@/lib/utils\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\nimport React from \"react\";\n\nfunction Progress({\n\tclassName,\n\tvalue,\n\t...props\n}: React.ComponentProps<typeof ProgressPrimitive.Root>) {\n\treturn (\n\t\t<ProgressPrimitive.Root\n\t\t\tdata-slot=\"progress\"\n\t\t\tclassName={cn(\"bg-primary/20 relative h-2 w-full overflow-hidden rounded-full\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ProgressPrimitive.Indicator\n\t\t\t\tdata-slot=\"progress-indicator\"\n\t\t\t\tclassName=\"bg-primary h-full w-full flex-1 transition-all\"\n\t\t\t\tstyle={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n\t\t\t/>\n\t\t</ProgressPrimitive.Root>\n\t);\n}\n\nexport { Progress };\n"],"names":["PROGRESS_NAME","createProgressContext","createProgressScope","createContextScope","ProgressProvider","useProgressContext","Progress","React","forwardRef","props","forwardedRef","__scopeProgress","value","valueProp","max","maxProp","getValueLabel","defaultGetValueLabel","progressProps","isValidMaxNumber","isValidValueNumber","valueLabel","isNumber","jsx","scope","children","Primitive","div","role","getProgressState","ref","displayName","INDICATOR_NAME","ProgressIndicator","indicatorProps","context","Math","round","maxValue","isNaN","Root","Indicator","className","createElement","ProgressPrimitive","data-slot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