ivt 0.0.6 → 0.0.8
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.d.ts +13 -0
- package/dist/alert/index.mjs +2 -0
- package/dist/alert/index.mjs.map +1 -0
- package/dist/badge/index.mjs +1 -1
- package/dist/base/index.mjs +1 -1
- package/dist/button/index.d.ts +4 -3
- package/dist/button/index.mjs +1 -1
- package/dist/calendar/index.d.ts +2 -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/{Combination-w1gWj54H.mjs → Combination-W7MqZ_Hi.mjs} +2 -2
- package/dist/chunks/{Combination-w1gWj54H.mjs.map → Combination-W7MqZ_Hi.mjs.map} +1 -1
- package/dist/chunks/{TextWrap-CjH4DiRJ.mjs → TextWrap-DXb_IArn.mjs} +2 -2
- package/dist/chunks/{TextWrap-CjH4DiRJ.mjs.map → TextWrap-DXb_IArn.mjs.map} +1 -1
- package/dist/chunks/{accordion-B9KfEWUD.mjs → accordion-BkKUFALV.mjs} +2 -2
- package/dist/chunks/{accordion-B9KfEWUD.mjs.map → accordion-BkKUFALV.mjs.map} +1 -1
- package/dist/chunks/{bundle-mjs-WLX8GCHw.mjs → bundle-mjs-C3r6LTMu.mjs} +1 -1
- package/dist/chunks/{bundle-mjs-WLX8GCHw.mjs.map → bundle-mjs-C3r6LTMu.mjs.map} +1 -1
- package/dist/chunks/{button-C25JgpF1.mjs → button-J9QJjZR3.mjs} +2 -2
- package/dist/chunks/{button-C25JgpF1.mjs.map → button-J9QJjZR3.mjs.map} +1 -1
- package/dist/chunks/{calendar-Bg8q2q0f.mjs → calendar-CpSFl0ZA.mjs} +2 -2
- package/dist/chunks/calendar-CpSFl0ZA.mjs.map +1 -0
- package/dist/chunks/check-Cw3k9ze2.mjs +2 -0
- package/dist/chunks/{check-B7qxEGdi.mjs.map → check-Cw3k9ze2.mjs.map} +1 -1
- package/dist/chunks/chevron-down-SgYbeVsA.mjs +2 -0
- package/dist/chunks/{chevron-down-C5QWUB1b.mjs.map → chevron-down-SgYbeVsA.mjs.map} +1 -1
- package/dist/chunks/chevron-left-C9WH97cq.mjs +2 -0
- package/dist/chunks/{chevron-left-yZO8_iYx.mjs.map → chevron-left-C9WH97cq.mjs.map} +1 -1
- package/dist/chunks/chevron-right-z-Gpb3tJ.mjs +2 -0
- package/dist/chunks/{chevron-right-DX1OAykB.mjs.map → chevron-right-z-Gpb3tJ.mjs.map} +1 -1
- package/dist/chunks/{command-BdZ-rcJh.mjs → command-Cn6cW4ey.mjs} +2 -2
- package/dist/chunks/{command-BdZ-rcJh.mjs.map → command-Cn6cW4ey.mjs.map} +1 -1
- package/dist/chunks/{createLucideIcon-CRElQpLA.mjs → createLucideIcon-CCTYlGRq.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-CRElQpLA.mjs.map → createLucideIcon-CCTYlGRq.mjs.map} +1 -1
- package/dist/chunks/{dialog-BEfPREgp.mjs → dialog-84gPnARn.mjs} +2 -2
- package/dist/chunks/{dialog-BEfPREgp.mjs.map → dialog-84gPnARn.mjs.map} +1 -1
- package/dist/chunks/{index-oT2uIdb1.mjs → index-BMeOAQa0.mjs} +1 -1
- package/dist/chunks/{index-oT2uIdb1.mjs.map → index-BMeOAQa0.mjs.map} +1 -1
- package/dist/chunks/{index-ClSqYyO3.mjs → index-BozdVf2c.mjs} +1 -1
- package/dist/chunks/{index-ClSqYyO3.mjs.map → index-BozdVf2c.mjs.map} +1 -1
- package/dist/chunks/{index-CN1SA0_I.mjs → index-CRKe0ftd.mjs} +1 -1
- package/dist/chunks/{index-CN1SA0_I.mjs.map → index-CRKe0ftd.mjs.map} +1 -1
- package/dist/chunks/{index-DP22y5yX.mjs → index-D21jAuso.mjs} +2 -2
- package/dist/chunks/{index-DP22y5yX.mjs.map → index-D21jAuso.mjs.map} +1 -1
- package/dist/chunks/{index-BFX-PqV0.mjs → index-DAtAm2O6.mjs} +2 -2
- package/dist/chunks/{index-BFX-PqV0.mjs.map → index-DAtAm2O6.mjs.map} +1 -1
- package/dist/chunks/{index-CIU1Xq1J.mjs → index-DH1By_Zj.mjs} +2 -2
- package/dist/chunks/{index-CIU1Xq1J.mjs.map → index-DH1By_Zj.mjs.map} +1 -1
- package/dist/chunks/{index-DM6C2fpF.mjs → index-DK7FUAZ_.mjs} +2 -2
- package/dist/chunks/{index-DM6C2fpF.mjs.map → index-DK7FUAZ_.mjs.map} +1 -1
- package/dist/chunks/{index-D1rtromL.mjs → index-DXxGdDWz.mjs} +1 -1
- package/dist/chunks/{index-D1rtromL.mjs.map → index-DXxGdDWz.mjs.map} +1 -1
- package/dist/chunks/{index-DyAmMjEH.mjs → index-Da2Voh4L.mjs} +2 -2
- package/dist/chunks/{index-DyAmMjEH.mjs.map → index-Da2Voh4L.mjs.map} +1 -1
- package/dist/chunks/{index-COE6uEyP.mjs → index-bAaQHUTs.mjs} +2 -2
- package/dist/chunks/{index-COE6uEyP.mjs.map → index-bAaQHUTs.mjs.map} +1 -1
- package/dist/chunks/{index-46Dn4Q--.mjs → index-sWdSJK6N.mjs} +2 -2
- package/dist/chunks/{index-46Dn4Q--.mjs.map → index-sWdSJK6N.mjs.map} +1 -1
- package/dist/chunks/{index-CYJu5yO5.mjs → index-zXhEqHj6.mjs} +2 -2
- package/dist/chunks/{index-CYJu5yO5.mjs.map → index-zXhEqHj6.mjs.map} +1 -1
- package/dist/chunks/{input-D7H1CxUv.mjs → input-CiTqqv7y.mjs} +2 -2
- package/dist/chunks/{input-D7H1CxUv.mjs.map → input-CiTqqv7y.mjs.map} +1 -1
- package/dist/chunks/{label-Cue4yhAm.mjs → label-BVlWhsMo.mjs} +2 -2
- package/dist/chunks/{label-Cue4yhAm.mjs.map → label-BVlWhsMo.mjs.map} +1 -1
- package/dist/chunks/{pagination-BYLwRYiM.mjs → pagination-Cq13xFx9.mjs} +2 -2
- package/dist/chunks/{pagination-BYLwRYiM.mjs.map → pagination-Cq13xFx9.mjs.map} +1 -1
- package/dist/chunks/{popover-fxWu9ghI.mjs → popover-Dx3GwSWI.mjs} +2 -2
- package/dist/chunks/{popover-fxWu9ghI.mjs.map → popover-Dx3GwSWI.mjs.map} +1 -1
- package/dist/chunks/{progress-CKxTxjba.mjs → progress-DTaMhT2Q.mjs} +2 -2
- package/dist/chunks/{progress-CKxTxjba.mjs.map → progress-DTaMhT2Q.mjs.map} +1 -1
- package/dist/chunks/{scroll-area-DSDAk121.mjs → scroll-area-CIcOa5xE.mjs} +2 -2
- package/dist/chunks/{scroll-area-DSDAk121.mjs.map → scroll-area-CIcOa5xE.mjs.map} +1 -1
- package/dist/chunks/{select-BtEQWkQs.mjs → select-5taZD8E7.mjs} +2 -2
- package/dist/chunks/{select-BtEQWkQs.mjs.map → select-5taZD8E7.mjs.map} +1 -1
- package/dist/chunks/{skeleton-DsvXPbHg.mjs → skeleton-DJgw8MK9.mjs} +2 -2
- package/dist/chunks/{skeleton-DsvXPbHg.mjs.map → skeleton-DJgw8MK9.mjs.map} +1 -1
- package/dist/chunks/{sortable-D4tl3H9D.mjs → sortable-ScSu9Lzj.mjs} +2 -2
- package/dist/chunks/{sortable-D4tl3H9D.mjs.map → sortable-ScSu9Lzj.mjs.map} +1 -1
- package/dist/chunks/{table-Cql47amq.mjs → table-B6ikl9UC.mjs} +2 -2
- package/dist/chunks/{table-Cql47amq.mjs.map → table-B6ikl9UC.mjs.map} +1 -1
- package/dist/chunks/{tslib.es6-C59-pKsO.mjs → tslib.es6-CXC0d48h.mjs} +1 -1
- package/dist/chunks/{tslib.es6-C59-pKsO.mjs.map → tslib.es6-CXC0d48h.mjs.map} +1 -1
- package/dist/chunks/{utils-Dd3mX7Lt.mjs → utils-Bj8IkZBZ.mjs} +2 -2
- package/dist/chunks/{utils-Dd3mX7Lt.mjs.map → utils-Bj8IkZBZ.mjs.map} +1 -1
- package/dist/chunks/x-DjIxAhMt.mjs +2 -0
- package/dist/chunks/{x-CYyikW5M.mjs.map → x-DjIxAhMt.mjs.map} +1 -1
- package/dist/command/index.mjs +1 -1
- package/dist/data-table/index.d.ts +1 -0
- package/dist/data-table/index.mjs +1 -1
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/dialog/index.mjs +1 -1
- package/dist/dropdown-menu/index.mjs +1 -1
- package/dist/dropzone/index.d.ts +13 -2
- package/dist/dropzone/index.mjs +2 -2
- package/dist/dropzone/index.mjs.map +1 -1
- package/dist/form/index.mjs +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/index/index.d.ts +1 -1
- package/dist/index.css +1 -7
- package/dist/input/index.mjs +1 -1
- package/dist/label/index.mjs +1 -1
- package/dist/pagination/index.mjs +1 -1
- package/dist/popover/index.mjs +1 -1
- package/dist/progress/index.mjs +1 -1
- package/dist/scroll-area/index.mjs +1 -1
- package/dist/select/index.mjs +1 -1
- package/dist/separator/index.mjs +1 -1
- package/dist/sheet/index.mjs +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/sortable/index.mjs +1 -1
- package/dist/table/index.mjs +1 -1
- package/dist/tabs/index.mjs +1 -1
- package/dist/toast/index.d.ts +2 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/toast/index.mjs.map +1 -1
- package/dist/tooltip/index.mjs +1 -1
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +9 -4
- package/dist/chunks/calendar-Bg8q2q0f.mjs.map +0 -1
- package/dist/chunks/check-B7qxEGdi.mjs +0 -2
- package/dist/chunks/chevron-down-C5QWUB1b.mjs +0 -2
- package/dist/chunks/chevron-left-yZO8_iYx.mjs +0 -2
- package/dist/chunks/chevron-right-DX1OAykB.mjs +0 -2
- package/dist/chunks/x-CYyikW5M.mjs +0 -2
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{b as r}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{b as r}from"./index-BozdVf2c.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-DK7FUAZ_.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-DK7FUAZ_.mjs","sources":["../../node_modules/@radix-ui/react-use-size/dist/index.mjs"],"sourcesContent":["// packages/react/use-size/src/useSize.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nfunction useSize(element) {\n const [size, setSize] = React.useState(void 0);\n useLayoutEffect(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\nexport {\n useSize\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useSize","element","size","setSize","React","useState","useLayoutEffect","width","offsetWidth","height","offsetHeight","resizeObserver","ResizeObserver","entries","Array","isArray","length","entry","borderSizeEntry","borderSize","observe","box","unobserve"],"mappings":"iEAKA,SAASA,EAAQC,GACf,MAAOC,EAAMC,GAAiBC,EAAAC,cAAwD,GAgDtF,OA9CAC,GAAgB,KACd,GAAIL,EAAS,CAEXE,EAAQ,CAAEI,MAAON,EAAQO,YAAaC,OAAQR,EAAQS,eAEtD,MAAMC,EAAiB,IAAIC,gBAAgBC,IACzC,IAAKC,MAAMC,QAAQF,GACjB,OAKF,IAAKA,EAAQG,OACX,OAGF,MAAMC,EAAQJ,EAAQ,GACtB,IAAIN,EACAE,EAEJ,GAAI,kBAAmBQ,EAAO,CAC5B,MAAMC,EAAkBD,EAAqB,cAEvCE,EAAaL,MAAMC,QAAQG,GAAmBA,EAAgB,GAAKA,EACzEX,EAAQY,EAAuB,WAC/BV,EAASU,EAAsB,eAI/BZ,EAAQN,EAAQO,YAChBC,EAASR,EAAQS,aAGnBP,EAAQ,CAAEI,QAAOE,UAAQ,IAK3B,OAFAE,EAAeS,QAAQnB,EAAS,CAAEoB,IAAK,eAEhC,IAAMV,EAAeW,UAAUrB,GAItCE,OAAQ,EACV,GACC,CAACF,IAEGC,CACT","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import*as e from"react";import{jsx as t}from"react/jsx-runtime";function r(r,n){const o=e.createContext(n),c=r=>{const{children:n,...c}=r,s=e.useMemo((()=>c),Object.values(c));return t(o.Provider,{value:s,children:n})};return c.displayName=r+"Provider",[c,function(t){const c=e.useContext(o);if(c)return c;if(void 0!==n)return n;throw new Error(`\`${t}\` must be used within \`${r}\``)}]}function n(r,n=[]){let c=[];const s=()=>{const t=c.map((t=>e.createContext(t)));return function(n){const o=n?.[r]||t;return e.useMemo((()=>({[`__scope${r}`]:{...n,[r]:o}})),[n,o])}};return s.scopeName=r,[function(n,o){const s=e.createContext(o),u=c.length;c=[...c,o];const i=n=>{const{scope:o,children:c,...i}=n,a=o?.[r]?.[u]||s,m=e.useMemo((()=>i),Object.values(i));return t(a.Provider,{value:m,children:c})};return i.displayName=n+"Provider",[i,function(t,c){const i=c?.[r]?.[u]||s,a=e.useContext(i);if(a)return a;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},o(s,...n)]}function o(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=n.reduce(((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]})),{});return e.useMemo((()=>({[`__scope${r.scopeName}`]:o})),[o])}};return n.scopeName=r.scopeName,n}export{r as a,n as c};
|
2
|
-
//# sourceMappingURL=index-
|
2
|
+
//# sourceMappingURL=index-DXxGdDWz.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-DXxGdDWz.mjs","sources":["../../node_modules/@radix-ui/react-context/dist/index.mjs"],"sourcesContent":["// packages/react/context/src/createContext.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createContext","rootComponentName","defaultContext","Context","React","Provider","props","children","context","value","useMemo","Object","values","jsx","displayName","consumerName","useContext","Error","createContextScope","scopeName","createContextScopeDeps","defaultContexts","createScope","scopeContexts","map","scope","contexts","BaseContext","index","length","composeContextScopes","scopes","baseScope","scopeHooks","useScope","overrideScopes","nextScopes","reduce"],"mappings":"gEAEA,SAASA,EACPC,EACAC,GAEA,MAAMC,EAAgBC,EAAAJ,cAA4CE,GAE5DG,EAAwEC,IAC5E,MAAMC,SAAEA,KAAaC,GAA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OA,EAEzC,MAAM,IAAIe,MAAM,KAAKF,6BAAwCd,MAC/D,EAGF,EAoBuB6B,EAAqBR,KAAgBF,GAC9D,CAMA,SAASU,KAAwBC,GAC/B,MAAMC,EAAYD,EAAO,GACzB,GAAsB,IAAlBA,EAAOF,OAAc,OAAOG,EAEhC,MAAMV,EAA2B,KAC/B,MAAMW,EAAaF,EAAOP,KAAKF,IAAiB,CAC9CY,SAAUZ,IACVH,UAAWG,EAAYH,cAGzB,OAAO,SAA2BgB,GAChC,MAAMC,EAAaH,EAAWI,QAAO,CAACD,GAAcF,WAAUf,gBAMrD,IAAKiB,KAFOF,EAASC,GACI,UAAUhB,QAEzC,IAEH,OAAaf,EAAAM,SAAQ,KAAO,CAAE,CAAC,UAAUsB,EAAUb,aAAciB,KAAe,CAACA,GACnF,CAAA,EAIF,OADAd,EAAYH,UAAYa,EAAUb,UAC3BG,CACT","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as r from"react";import{b as t}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as r from"react";import{b as t}from"./index-BozdVf2c.mjs";var o=r["useId".toString()]||(()=>{}),a=0;function e(e){const[i,n]=r.useState(o());return t((()=>{n((r=>r??String(a++)))}),[e]),i?`radix-${i}`:""}export{e as u};
|
2
|
+
//# sourceMappingURL=index-Da2Voh4L.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-Da2Voh4L.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\".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","toString","count","useId","deterministicId","id","setId","useState","useLayoutEffect","reactId","String"],"mappings":"iEAIA,IAAMA,EAAcC,EAAc,QAAQC,aAAU,MAAY,GAC5DC,EAAQ,EAEZ,SAASC,EAAMC,GACb,MAAOC,EAAIC,GAAeN,EAAAO,SAA6BR,KAKvD,OAHAS,GAAgB,KACQF,GAAOG,GAAYA,GAAWC,OAAOR,MAAQ,GAClE,CAACE,IACuBC,EAAK,SAASA,IAAO,EAClD","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{a as t,u as n,c as r,b as s}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{a as t,u as n,c as r,b as s}from"./index-BozdVf2c.mjs";import{P as o,d as i}from"./index-CRKe0ftd.mjs";import{jsx as a}from"react/jsx-runtime";import u from"react-dom";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",v=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=e.forwardRef(((s,i)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:m,onPointerDownOutside:E,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(v),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=n(i,(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,F=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){y(l,s,n,{discrete:!0})};const n={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,s]),{onPointerDownCapture:()=>o.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),z=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){y(f,s,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(n,r=globalThis?.document){const s=t(n);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&s(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[s,r])}((e=>{W===P.layers.size-1&&(m?.(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)}),[]),a(o.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:r(s.onFocusCapture,z.onFocusCapture),onBlurCapture:r(s.onBlurCapture,z.onBlurCapture),onPointerDownCapture:r(s.onPointerDownCapture,F.onPointerDownCapture)})}));m.displayName="DismissableLayer";var E=e.forwardRef(((t,r)=>{const s=e.useContext(v),i=e.useRef(null),u=n(r,i);return e.useEffect((()=>{const e=i.current;if(e)return s.branches.add(e),()=>{s.branches.delete(e)}}),[s.branches]),a(o.div,{...t,ref:u})}));function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?i(s,o):s.dispatchEvent(o)}E.displayName="DismissableLayerBranch";var b=m,w=E,h=e.forwardRef(((t,n)=>{const{container:r,...i}=t,[c,d]=e.useState(!1);s((()=>d(!0)),[]);const l=r||c&&globalThis?.document?.body;return l?u.createPortal(a(o.div,{...i,ref:n}),l):null}));h.displayName="Portal";export{w as B,m as D,h as P,b as R};
|
2
|
+
//# sourceMappingURL=index-bAaQHUTs.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-COE6uEyP.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// packages/react/dismissable-layer/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/useEscapeKeydown.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// packages/react/portal/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":"uMAWA,IAKIA,EAJEC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAIhBC,EAAgCC,EAAAC,cAAc,CAClDC,OAAQ,IAAIC,IACZC,uCAAwC,IAAID,IAC5CE,SAAU,IAAIF,MAuCVG,EAAyBN,EAAAO,YAC7B,CAACC,EAAOC,KACN,MAAMC,4BACJA,GAA8B,EAAAC,gBAC9BA,EAAAC,qBACAA,EAAAC,eACAA,EAAAC,kBACAA,EAAAC,UACAA,KACGC,GACDR,EACES,EAAgBjB,EAAAkB,WAAWnB,IAC1BoB,EAAMC,GAAiBpB,EAAAqB,SAAyC,MACjEC,EAAgBH,GAAMG,eAAiBC,YAAYC,UAChD,CAAAC,GAAezB,EAAAqB,SAAS,CAAA,GAC3BK,EAAeC,EAAgBlB,GAAeU,GAASC,EAAQD,KAC/DjB,EAAS0B,MAAMC,KAAKZ,EAAQf,SAC3B4B,GAAgD,IAAIb,EAAQb,wCAAwC2B,OAAM,GAC3GC,EAAoD9B,EAAO+B,QAAQH,GACnEI,EAAQf,EAAOjB,EAAO+B,QAAQd,IAAQ,EACtCgB,EAA8BlB,EAAQb,uCAAuCgC,KAAO,EACpFC,EAAyBH,GAASF,EAElCM,EAyIV,SACE1B,EACAU,EAA0BC,YAAYC,UAEtC,MAAMe,EAA2BC,EAAe5B,GAC1C6B,EAAoCzC,EAAA0C,QAAO,GAC3CC,EAAuB3C,EAAA0C,QAAO,SAiEpC,OA/DM1C,EAAA4C,WAAU,KACd,MAAMC,EAAqBC,IACzB,GAAIA,EAAMC,SAAWN,EAA4BO,QAAS,CAGxD,IAASC,EAAT,WACEC,EACErD,EACA0C,EACAY,EACA,CAAEC,UAAU,GAEhB,EATA,MAAMD,EAAc,CAAEE,cAAeP,GAuBX,UAAtBA,EAAMQ,aACRhC,EA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O,IACxC,MAAMJ,EAAYC,GAAkBE,GAAWvF,YAAYC,UAAU0D,KACrE,OAAOyB,EACHM,EAASC,aAAazB,EAACC,EAAUC,IAAV,IAAkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,IAAA,IAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
|
1
|
+
{"version":3,"file":"index-bAaQHUTs.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// packages/react/dismissable-layer/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/useEscapeKeydown.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// packages/react/portal/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":"uMAWA,IAKIA,EAJEC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAIhBC,EAAgCC,EAAAC,cAAc,CAClDC,OAAQ,IAAIC,IACZC,uCAAwC,IAAID,IAC5CE,SAAU,IAAIF,MAuCVG,EAAyBN,EAAAO,YAC7B,CAACC,EAAOC,KACN,MAAMC,4BACJA,GAA8B,EAAAC,gBAC9BA,EAAAC,qBACAA,EAAAC,eACAA,EAAAC,kBACAA,EAAAC,UACAA,KACGC,GACDR,EACES,EAAgBjB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ACd,MAAMzB,EAAOyE,EAAI5C,QACjB,GAAI7B,EAEF,OADAF,EAAQZ,SAASgF,IAAIlE,GACd,KACLF,EAAQZ,SAASkF,OAAOpE,EAAI,CAEhC,GACC,CAACF,EAAQZ,WAELoF,EAACC,EAAUC,IAAV,IAAkBnF,EAAOoF,IAAKlE,GAAc,IA0HtD,SAAS4D,IACP,MAAMxC,EAAQ,IAAIkD,YAAYpG,GAC9B4B,SAASyE,cAAcnD,EACzB,CAEA,SAASI,EACPgD,EACAC,EACAC,GACAhD,SAAEA,IAEF,MAAML,EAASqD,EAAO/C,cAAcN,OAC9BD,EAAQ,IAAIkD,YAAYE,EAAM,CAAEG,SAAS,EAAOC,YAAY,EAAMF,WACpED,GAASpD,EAAOS,iBAAiB0C,EAAMC,EAA0B,CAAE1C,MAAM,IAEzEL,EACFmD,EAA4BxD,EAAQD,GAEpCC,EAAOkD,cAAcnD,EAEzB,CA3IAiD,EAAuBD,YA1BH,yBAuKpB,IAAMU,EAAOlG,EACPmG,EAASV,EE1UTW,EAAe1G,EAAAO,YAAuC,CAACC,EAAOC,KAClE,MAAQkG,UAAWC,KAAkBC,GAAgBrG,GAC9CsG,EAASC,GAAoB/G,EAAAqB,UAAS,GAC7C2F,GAAgB,IAAMD,GAAW,IAAO,IACxC,MAAMJ,EAAYC,GAAkBE,GAAWvF,YAAYC,UAAU0D,KACrE,OAAOyB,EACHM,EAASC,aAAazB,EAACC,EAAUC,IAAV,IAAkBkB,EAAajB,IAAKnF,IAAkBkG,GAC7E,IAAA,IAGND,EAAOZ,YArBa","x_google_ignoreList":[0,1,2]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{a as t}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{a as t}from"./index-BozdVf2c.mjs";function n({prop:n,defaultProp:o,onChange:r=()=>{}}){const[u,a]=function({defaultProp:n,onChange:o}){const r=e.useState(n),[u]=r,a=e.useRef(u),f=t(o);return e.useEffect((()=>{a.current!==u&&(f(u),a.current=u)}),[u,a,f]),r}({defaultProp:o,onChange:r}),f=void 0!==n,s=f?n:u,c=t(r);return[s,e.useCallback((e=>{if(f){const t="function"==typeof e?e(n):e;t!==n&&c(t)}else a(e)}),[f,n,a,c])]}export{n as u};
|
2
|
+
//# sourceMappingURL=index-sWdSJK6N.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-sWdSJK6N.mjs","sources":["../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// packages/react/use-controllable-state/src/useControllableState.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = useCallbackRef(onChange);\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = React.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = React.useRef(value);\n const handleChange = useCallbackRef(onChange);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\nexport {\n useControllableState\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useControllableState","prop","defaultProp","onChange","uncontrolledProp","setUncontrolledProp","uncontrolledState","React","useState","value","prevValueRef","useRef","handleChange","useCallbackRef","useEffect","current","useUncontrolledState","isControlled","useCallback","nextValue"],"mappings":"iEAWA,SAASA,GAAwBC,KAC/BA,EAAAC,YACAA,EAAAC,SACAA,EAAW,SAEX,MAAOC,EAAkBC,GAqB3B,UAAiCH,YAC/BA,EAAAC,SACAA,IAEA,MAAMG,EAA0BC,EAAAC,SAAwBN,IACjDO,GAASH,EACVI,EAAqBH,EAAAI,OAAOF,GAC5BG,EAAeC,EAAeV,GASpC,OAPMI,EAAAO,WAAU,KACVJ,EAAaK,UAAYN,IAC3BG,EAAaH,GACbC,EAAaK,QAAUN,EACzB,GACC,CAACA,EAAOC,EAAcE,IAElBN,CACT,CAtCkDU,CAAqB,CAAEd,cAAaC,aAC9Ec,OAAwB,IAAThB,EACfQ,EAAQQ,EAAehB,EAAOG,EAC9BQ,EAAeC,EAAeV,GAepC,MAAO,CAACM,EAboEF,EAAAW,aACzEC,IACC,GAAIF,EAAc,CAChB,MACMR,EAA6B,mBAAdU,EADNA,EACwClB,GAAQkB,EAC3DV,IAAUR,GAAMW,EAAaH,QAEjCJ,EAAoBc,EACtB,GAEF,CAACF,EAAchB,EAAMI,EAAqBO,IAI9C","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{c as o,u as r,a as t}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{c as o,u as r,a as t}from"./index-BozdVf2c.mjs";import{createCollection as n}from"@radix-ui/react-collection";import{c as a}from"./index-DXxGdDWz.mjs";import{u as s}from"./index-Da2Voh4L.mjs";import{P as i}from"./index-CRKe0ftd.mjs";import{u}from"./index-sWdSJK6N.mjs";import{u as c}from"./index-BMeOAQa0.mjs";import{jsx as l}from"react/jsx-runtime";var f="rovingFocusGroup.onEntryFocus",d={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[m,v,b]=n(p),[w,g]=a(p,[b]),[F,I]=w(p),R=e.forwardRef(((e,o)=>l(m.Provider,{scope:e.__scopeRovingFocusGroup,children:l(m.Slot,{scope:e.__scopeRovingFocusGroup,children:l(h,{...e,ref:o})})})));R.displayName=p;var h=e.forwardRef(((n,a)=>{const{__scopeRovingFocusGroup:s,orientation:p,loop:m=!1,dir:b,currentTabStopId:w,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:I,onEntryFocus:R,preventScrollOnEntryFocus:h=!1,...y}=n,x=e.useRef(null),A=r(a,x),T=c(b),[E=null,D]=u({prop:w,defaultProp:g,onChange:I}),[C,_]=e.useState(!1),j=t(R),G=v(s),K=e.useRef(!1),[k,L]=e.useState(0);return e.useEffect((()=>{const e=x.current;if(e)return e.addEventListener(f,j),()=>e.removeEventListener(f,j)}),[j]),l(F,{scope:s,orientation:p,dir:T,loop:m,currentTabStopId:E,onItemFocus:e.useCallback((e=>D(e)),[D]),onItemShiftTab:e.useCallback((()=>_(!0)),[]),onFocusableItemAdd:e.useCallback((()=>L((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>L((e=>e-1))),[]),children:l(i.div,{tabIndex:C||0===k?-1:0,"data-orientation":p,...y,ref:A,style:{outline:"none",...n.style},onMouseDown:o(n.onMouseDown,(()=>{K.current=!0})),onFocus:o(n.onFocus,(e=>{const o=!K.current;if(e.target===e.currentTarget&&o&&!C){const o=new CustomEvent(f,d);if(e.currentTarget.dispatchEvent(o),!o.defaultPrevented){const e=G().filter((e=>e.focusable));S([e.find((e=>e.active)),e.find((e=>e.id===E)),...e].filter(Boolean).map((e=>e.ref.current)),h)}}K.current=!1})),onBlur:o(n.onBlur,(()=>_(!1)))})})})),y="RovingFocusGroupItem",x=e.forwardRef(((r,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:u=!1,tabStopId:c,...f}=r,d=s(),p=c||d,b=I(y,n),w=b.currentTabStopId===p,g=v(n),{onFocusableItemAdd:F,onFocusableItemRemove:R}=b;return e.useEffect((()=>{if(a)return F(),()=>R()}),[a,F,R]),l(m.ItemSlot,{scope:n,id:p,focusable:a,active:u,children:l(i.span,{tabIndex:w?0:-1,"data-orientation":b.orientation,...f,ref:t,onMouseDown:o(r.onMouseDown,(e=>{a?b.onItemFocus(p):e.preventDefault()})),onFocus:o(r.onFocus,(()=>b.onItemFocus(p))),onKeyDown:o(r.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void b.onItemShiftTab();if(e.target!==e.currentTarget)return;const o=function(e,o,r){const t=function(e,o){return"rtl"!==o?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===o&&["ArrowLeft","ArrowRight"].includes(t)||"horizontal"===o&&["ArrowUp","ArrowDown"].includes(t)?void 0:A[t]}(e,b.orientation,b.dir);if(void 0!==o){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=g().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===o)n.reverse();else if("prev"===o||"next"===o){"prev"===o&&n.reverse();const a=n.indexOf(e.currentTarget);n=b.loop?(t=a+1,(r=n).map(((e,o)=>r[(t+o)%r.length]))):n.slice(a+1)}setTimeout((()=>S(n)))}var r,t}))})})}));x.displayName=y;var A={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S(e,o=!1){const r=document.activeElement;for(const t of e){if(t===r)return;if(t.focus({preventScroll:o}),document.activeElement!==r)return}}var T=R,E=x;export{E as I,T as R,g as c};
|
2
|
+
//# sourceMappingURL=index-zXhEqHj6.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-CYJu5yO5.mjs","sources":["../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"6XAaA,IAAMA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAM9CC,EAAa,oBAGZC,EAAYC,EAAeC,GAAyBC,EAGzDJ,IAGKK,EAA+BC,GAA+BC,EACnEP,EACA,CAACG,KA+BIK,EAAqBC,GAC1BJ,EAAkDL,GAK9CU,EAAyBC,EAAAC,YAC7B,CAACC,EAA2CC,IAExCC,EAACd,EAAWe,SAAX,CAAoBC,MAAOJ,EAAMK,wBAChCC,SAAAJ,EAACd,EAAWmB,KAAX,CAAgBH,MAAOJ,EAAMK,wBAC5BC,SAAAJ,EAACM,EAAA,IAAyBR,EAAO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C1C,CAMAQ,YAAW,IAAMtC,EAAW4B,IAC9B,CAgDZ,IAAsBK,EAAYD,CAhDtB,OAEJ,IAMRxB,EAAqBtE,YAAcqE,EAKnC,IAAMgB,EAAuD,CAC3DgB,UAAW,OAAQC,QAAS,OAC5BC,WAAY,OAAQC,UAAW,OAC/BC,OAAQ,QAASC,KAAM,QACvBC,SAAU,OAAQC,IAAK,QAiBzB,SAAS9C,EAAW+C,EAA2BC,GAAgB,GAC7D,MAAMC,EAA6BC,SAASC,cAC5C,IAAA,MAAWC,KAAaL,EAAY,CAElC,GAAIK,IAAcH,EAA4B,OAE9C,GADAG,EAAUC,MAAM,CAAEL,kBACdE,SAASC,gBAAkBF,EAA4B,MAC7D,CACF,CAUA,IAAMK,EAAOjI,EACPkI,EAAO/C","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index-zXhEqHj6.mjs","sources":["../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"6XAaA,IAAMA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAM9CC,EAAa,oBAGZC,EAAYC,EAAeC,GAAyBC,EAGzDJ,IAGKK,EAA+BC,GAA+BC,EACnEP,EACA,CAACG,KA+BIK,EAAqBC,GAC1BJ,EAAkDL,GAK9CU,EAAyBC,EAAAC,YAC7B,CAACC,EAA2CC,IAExCC,EAACd,EAAWe,SAAX,CAAoBC,MAAOJ,EAAMK,wBAChCC,SAAAJ,EAACd,EAAWmB,KAAX,CAAgBH,MAAOJ,EAAMK,wBAC5BC,SAAAJ,EAACM,EAAA,IAAyBR,EAAOS,IAAKR,UAOhDJ,EAAiBa,YAAcvB,EAgB/B,IAAMqB,EAA6BV,EAAAC,YAGjC,CAACC,EAA+CC,KAChD,MAAMI,wBACJA,EAAAM,YACAA,EAAAC,KACAA,GAAO,EAAAC,IACPA,EACAC,iBAAkBC,EAAAC,wBAClBA,EAAAC,yBACAA,EAAAC,aACAA,EAAAC,0BACAA,GAA4B,KACzBC,GACDpB,EACES,EAAYX,EAAAuB,OAAoC,MAChDC,EAAeC,EAAgBtB,EAAcQ,GAC7Ce,EAAYC,EAAaZ,IACxBC,EAAmB,KAAMY,GAAuBC,EAAqB,CAC1EC,KAAMb,EACNc,YAAab,EACbc,SAAUb,KA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ASC,gBAAkBF,EAA4B,MAC7D,CACF,CAUA,IAAMK,EAAOjI,EACPkI,EAAO/C","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{c as t}from"./utils-
|
2
|
-
//# sourceMappingURL=input-
|
1
|
+
import*as e from"react";import{c as t}from"./utils-Bj8IkZBZ.mjs";function r({className:r,type:o,...i}){return e.createElement("input",{type:o,"data-slot":"input",className: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",r),...i})}export{r as I};
|
2
|
+
//# sourceMappingURL=input-CiTqqv7y.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"input-
|
1
|
+
{"version":3,"file":"input-CiTqqv7y.mjs","sources":["../../src/components/ui/input/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"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 className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"names":["Input","className","type","props","React","input","data-slot","cn"],"mappings":"iEAIA,SAASA,GAAMC,UAAEA,EAASC,KAAEA,KAASC,IACnC,OACEC,EAACC,cAAAA,QAAAA,CACCH,KAAMA,EACNI,YAAU,QACVL,UAAWM,EACT,2WACAN,MAEEE,GAGV"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{P as t}from"./index-
|
2
|
-
//# sourceMappingURL=label-
|
1
|
+
import*as e from"react";import{P as t}from"./index-CRKe0ftd.mjs";import{jsx as a}from"react/jsx-runtime";import{c as r}from"./utils-Bj8IkZBZ.mjs";var o=e.forwardRef(((e,r)=>a(t.label,{...e,ref:r,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));o.displayName="Label";var s=o;function n({className:t,...a}){return e.createElement(s,{"data-slot":"label",className:r("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),...a})}export{n as L};
|
2
|
+
//# sourceMappingURL=label-BVlWhsMo.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"label-
|
1
|
+
{"version":3,"file":"label-BVlWhsMo.mjs","sources":["../../node_modules/@radix-ui/react-label/dist/index.mjs","../../src/components/ui/label/label.tsx"],"sourcesContent":["\"use client\";\n\n// packages/react/label/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 * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Label({\n className,\n ...props\n}: React.ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"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 className,\n )}\n {...props}\n />\n );\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":"kJAOA,IAMMA,EAAcC,EAAAC,YAAqC,CAACC,EAAOC,IAE7DC,EAACC,EAAUC,MAAV,IACKJ,EACJK,IAAKJ,EACLK,YAAcC,IAEGA,EAAMC,OACVC,QAAQ,qCAEnBT,EAAMM,cAAcC,IAEfA,EAAMG,kBAAoBH,EAAMI,OAAS,GAAGJ,EAAMK,iBAAe,MAM9Ef,EAAMgB,YAxBO,QA4Bb,IAAMC,EAAOjB,EC9Bb,SAASA,GAAMkB,UACbA,KACGf,IAEH,OACEF,EAAAkB,cAACC,EAAmB,CAClBC,YAAU,QACVH,UAAWI,EACT,sNACAJ,MAEEf,GAGV","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{c as a}from"./utils-
|
2
|
-
//# sourceMappingURL=pagination-
|
1
|
+
import*as e from"react";import{c as a}from"./utils-Bj8IkZBZ.mjs";import{C as t}from"./chevron-left-C9WH97cq.mjs";import{C as s}from"./chevron-right-z-Gpb3tJ.mjs";import{c as n}from"./createLucideIcon-CCTYlGRq.mjs";import{b as c}from"./button-J9QJjZR3.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 e.createElement("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:a("mx-auto flex w-full justify-center",t),...s})}function i({className:t,...s}){return e.createElement("ul",{"data-slot":"pagination-content",className:a("flex flex-row items-center gap-1",t),...s})}function o({...a}){return e.createElement("li",{"data-slot":"pagination-item",...a})}function m({className:t,isActive:s,size:n="icon",...l}){return e.createElement("a",{"aria-current":s?"page":void 0,"data-slot":"pagination-link","data-active":s,className:a(c({variant:s?"outline":"ghost",size:n}),t),...l})}function p({className:s,...n}){return e.createElement(m,{"aria-label":"Go to previous page",size:"default",className:a("gap-1 px-2.5 sm:pl-2.5",s),...n},e.createElement(t,null),e.createElement("span",{className:"hidden sm:block"},"Previous"))}function u({className:t,...n}){return e.createElement(m,{"aria-label":"Go to next page",size:"default",className:a("gap-1 px-2.5 sm:pr-2.5",t),...n},e.createElement("span",{className:"hidden sm:block"},"Next"),e.createElement(s,null))}function f({className:t,...s}){return e.createElement("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:a("flex size-9 items-center justify-center",t),...s},e.createElement(l,{className:"size-4"}),e.createElement("span",{className:"sr-only"},"More pages"))}export{r as P,i as a,m as b,o as c,p as d,u as e,f};
|
2
|
+
//# sourceMappingURL=pagination-Cq13xFx9.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pagination-
|
1
|
+
{"version":3,"file":"pagination-Cq13xFx9.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 * as React from \"react\";\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n MoreHorizontalIcon,\n} from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button, buttonVariants } from \"@/components/ui/button\";\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({\n className,\n ...props\n}: React.ComponentProps<\"ul\">) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"flex flex-row items-center gap-1\", className)}\n {...props}\n />\n );\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">;\n\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? \"outline\" : \"ghost\",\n size,\n }),\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction PaginationPrevious({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"gap-1 px-2.5 sm:pl-2.5\", className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({\n className,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"gap-1 px-2.5 sm:pr-2.5\", className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\"flex size-9 items-center justify-center\", className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"names":["Ellipsis","createLucideIcon","cx","cy","r","key","Pagination","className","props","React","nav","role","aria-label","data-slot","cn","PaginationContent","ul","PaginationItem","li","PaginationLink","isActive","size","a","aria-current","undefined","data-active","buttonVariants","variant","PaginationPrevious","createElement","ChevronLeftIcon","span","PaginationNext","ChevronRightIcon","PaginationEllipsis","aria-hidden","MoreHorizontalIcon"],"mappings":"gQAGO,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,aCI/C,SAASC,GAAWC,UAAEA,KAAcC,IAClC,OACEC,EAACC,cAAAA,MAAAA,CACCC,KAAK,aACLC,aAAW,aACXC,YAAU,aACVN,UAAWO,EAAG,qCAAsCP,MAChDC,GAGV,CAEA,SAASO,GAAkBR,UACzBA,KACGC,IAEH,OACEC,EAACO,cAAAA,KAAAA,CACCH,YAAU,qBACVN,UAAWO,EAAG,mCAAoCP,MAC9CC,GAGV,CAEA,SAASS,MAAoBT,IAC3B,OAAOC,EAACS,cAAAA,KAAAA,CAAGL,YAAU,qBAAsBL,GAC7C,CAOA,SAASW,GAAeZ,UACtBA,EAASa,SACTA,EAAQC,KACRA,EAAO,UACJb,IAEH,OACEC,EAACa,cAAAA,IAAAA,CACCC,eAAcH,EAAW,YAASI,EAClCX,YAAU,kBACVY,cAAaL,EACbb,UAAWO,EACTY,EAAe,CACbC,QAASP,EAAW,UAAY,QAChCC,SAEFd,MAEEC,GAGV,CAEA,SAASoB,GAAmBrB,UAC1BA,KACGC,IAEH,OACEC,EAACU,cAAAA,EAAAA,CACCP,aAAW,sBACXS,KAAK,UACLd,UAAWO,EAAG,yBAA0BP,MACpCC,GAEJC,EAAAoB,cAACC,QACDrB,EAACsB,cAAAA,OAAAA,CAAKxB,UAAU,mBAAkB,YAGxC,CAEA,SAASyB,GAAezB,UACtBA,KACGC,IAEH,OACEC,EAACU,cAAAA,EAAAA,CACCP,aAAW,kBACXS,KAAK,UACLd,UAAWO,EAAG,yBAA0BP,MACpCC,GAEJC,EAACsB,cAAAA,OAAAA,CAAKxB,UAAU,mBAAkB,QAClCE,EAACwB,cAAAA,EAAAA,MAGP,CAEA,SAASC,GAAmB3B,UAC1BA,KACGC,IAEH,OACEC,EAACsB,cAAAA,OAAAA,CACCI,eAAAA,EACAtB,YAAU,sBACVN,UAAWO,EAAG,0CAA2CP,MACrDC,GAEJC,EAAC2B,cAAAA,EAAAA,CAAmB7B,UAAU,WAC9BE,EAACsB,cAAAA,OAAAA,CAAKxB,UAAU,WAAU,cAGhC","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{u as o,c as t,P as r}from"./index-
|
2
|
-
//# sourceMappingURL=popover-
|
1
|
+
import*as e from"react";import{u as o,c as t,P as r}from"./index-BozdVf2c.mjs";import{c as n}from"./index-DXxGdDWz.mjs";import{P as a,D as s}from"./index-bAaQHUTs.mjs";import{h as i,R as c,u as d,F as p}from"./Combination-W7MqZ_Hi.mjs";import{u}from"./index-Da2Voh4L.mjs";import{c as l,R as f,A as m,C as v,a as h}from"./index-DH1By_Zj.mjs";import{P as g}from"./index-CRKe0ftd.mjs";import{Slot as P}from"@radix-ui/react-slot";import{u as C}from"./index-sWdSJK6N.mjs";import{jsx as O}from"react/jsx-runtime";import{c as b}from"./utils-Bj8IkZBZ.mjs";var w="Popover",[x,R]=n(w,[l]),_=l(),[A,F]=x(w),y=o=>{const{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:s,modal:i=!1}=o,c=_(t),d=e.useRef(null),[p,l]=e.useState(!1),[m=!1,v]=C({prop:n,defaultProp:a,onChange:s});return O(f,{...c,children:O(A,{scope:t,contentId:u(),triggerRef:d,open:m,onOpenChange:v,onOpenToggle:e.useCallback((()=>v((e=>!e))),[v]),hasCustomAnchor:p,onCustomAnchorAdd:e.useCallback((()=>l(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>l(!1)),[]),modal:i,children:r})})};y.displayName=w;var E="PopoverAnchor",D=e.forwardRef(((o,t)=>{const{__scopePopover:r,...n}=o,a=F(E,r),s=_(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=a;return e.useEffect((()=>(i(),()=>c())),[i,c]),O(m,{...s,...n,ref:t})}));D.displayName=E;var j="PopoverTrigger",k=e.forwardRef(((e,r)=>{const{__scopePopover:n,...a}=e,s=F(j,n),i=_(n),c=o(r,s.triggerRef),d=O(g.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":B(s.open),...a,ref:c,onClick:t(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?d:O(m,{asChild:!0,...i,children:d})}));k.displayName=j;var N="PopoverPortal",[I,M]=x(N,{forceMount:void 0}),z=e=>{const{__scopePopover:o,forceMount:t,children:n,container:s}=e,i=F(N,o);return O(I,{scope:o,forceMount:t,children:O(r,{present:t||i.open,children:O(a,{asChild:!0,container:s,children:n})})})};z.displayName=N;var K="PopoverContent",T=e.forwardRef(((e,o)=>{const t=M(K,e.__scopePopover),{forceMount:n=t.forceMount,...a}=e,s=F(K,e.__scopePopover);return O(r,{present:n||s.open,children:s.modal?O(S,{...a,ref:o}):O(U,{...a,ref:o})})}));T.displayName=K;var S=e.forwardRef(((r,n)=>{const a=F(K,r.__scopePopover),s=e.useRef(null),d=o(n,s),p=e.useRef(!1);return e.useEffect((()=>{const e=s.current;if(e)return i(e)}),[]),O(c,{as:P,allowPinchZoom:!0,children:O(Z,{...r,ref:d,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:t(r.onCloseAutoFocus,(e=>{e.preventDefault(),p.current||a.triggerRef.current?.focus()})),onPointerDownOutside:t(r.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey,r=2===o.button||t;p.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:t(r.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),U=e.forwardRef(((o,t)=>{const r=F(K,o.__scopePopover),n=e.useRef(!1),a=e.useRef(!1);return O(Z,{...o,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{o.onCloseAutoFocus?.(e),e.defaultPrevented||(n.current||r.triggerRef.current?.focus(),e.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:e=>{o.onInteractOutside?.(e),e.defaultPrevented||(n.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const t=e.target,s=r.triggerRef.current?.contains(t);s&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),Z=e.forwardRef(((e,o)=>{const{__scopePopover:t,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:f,...m}=e,h=F(K,t),g=_(t);return d(),O(p,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:O(s,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:O(v,{"data-state":B(h.open),role:"dialog",id:h.contentId,...g,...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)"}})})})})),q="PopoverClose";e.forwardRef(((e,o)=>{const{__scopePopover:r,...n}=e,a=F(q,r);return O(g.button,{type:"button",...n,ref:o,onClick:t(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=q;function B(e){return e?"open":"closed"}e.forwardRef(((e,o)=>{const{__scopePopover:t,...r}=e,n=_(t);return O(h,{...n,...r,ref:o})})).displayName="PopoverArrow";var G=y,H=D,J=k,L=z,Q=T;function V({...o}){return e.createElement(G,{"data-slot":"popover",...o})}function W({...o}){return e.createElement(J,{"data-slot":"popover-trigger",...o})}function X({className:o,align:t="center",sideOffset:r=4,...n}){return e.createElement(L,null,e.createElement(Q,{"data-slot":"popover-content",align:t,sideOffset:r,className:b("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),...n}))}function Y({...o}){return e.createElement(H,{"data-slot":"popover-anchor",...o})}export{V as P,W as a,X as b,Y as c};
|
2
|
+
//# sourceMappingURL=popover-Dx3GwSWI.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"popover-fxWu9ghI.mjs","sources":["../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/components/ui/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\n// packages/react/popover/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 { Slot } 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 = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\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 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 * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"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 className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <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","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","contentRef","composedRefs","isRightClickOutsideRef","content","current","hideOthers","RemoveScroll","as","Slot","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":"oiBAwBA,IAAMA,EAAe,WAGdC,EAAsBC,GAAsBC,EAAmBH,EAAc,CAClFI,IAEIC,EAAiBD,KAchBE,EAAiBC,GACtBN,EAA0CD,GAUtCQ,EAAmCC,IACvC,MAAMC,eACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAcZ,EAAeK,GAC7BQ,E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uB,YACzB,CAACjC,EAAuCkC,KACtC,MAAMjC,eAAEA,KAAmBmH,GAAepH,EACpCQ,EAAcZ,EAAeK,GACnC,OAAOmB,EAAiBiG,EAAhB,IAA0B7G,KAAiB4G,EAAY7E,IAAKL,GAAc,IAIzEJ,YAdM,eAsBnB,IAAMwF,EAAOvH,EACPwH,EAASvF,EACTwF,EAAU/E,EACVgF,EAAShE,EACTiE,EAAU3D,EC3ehB,SAAShE,MACJC,IAEH,OAAOU,EAAAiH,cAACC,EAAqB,CAACC,YAAU,aAAc7H,GACxD,CAEA,SAASyC,MACJzC,IAEH,OAAOU,EAAAiH,cAACC,EAAwB,CAACC,YAAU,qBAAsB7H,GACnE,CAEA,SAAS+D,GAAe+D,UACtBA,EAASC,MACTA,EAAQ,SAAQC,WAChBA,EAAa,KACVhI,IAEH,OACEU,gBAACkH,EACC,KAAAlH,EAAAiH,cAACC,EAAwB,CACvBC,YAAU,kBACVE,MAAOA,EACPC,WAAYA,EACZF,UAAWG,EACT,4bACAH,MAEE9H,IAIZ,CAEA,SAASgC,MACJhC,IAEH,OAAOU,EAAAiH,cAACC,EAAuB,CAACC,YAAU,oBAAqB7H,GACjE","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"popover-Dx3GwSWI.mjs","sources":["../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../src/components/ui/popover/popover.tsx"],"sourcesContent":["\"use client\";\n\n// packages/react/popover/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 { Slot } 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 = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\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 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 * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nfunction PopoverTrigger({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"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 className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n}\n\nfunction PopoverAnchor({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <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","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","contentRef","composedRefs","isRightClickOutsideRef","content","current","hideOthers","RemoveScroll","as","Slot","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":"oiBAwBA,IAAMA,EAAe,WAGdC,EAAsBC,GAAsBC,EAAmBH,EAAc,CAClFI,IAEIC,EAAiBD,KAchBE,EAAiBC,GACtBN,EAA0CD,GAUtCQ,EAAmCC,IACvC,MAAMC,eACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAcZ,EAAeK,GAC7BQ,EAAmBC,EAAAC,OAA0B,OAC5CC,EAAiBC,GAA4BH,EAAAI,UAAS,IACtDX,GAAO,EAAOY,GAAWC,EAAqB,CACnDC,KAAMb,EACNc,YAAab,EACbc,SAAUb,IAGZ,OACEc,EAAiBC,EAAhB,IAAyBb,EACxBN,SAAAkB,EAACvB,EAAA,CACCyB,MAAOrB,EACPsB,UAAWC,IACXf,aACAN,OACAG,aAAcS,EACdU,aAAoBf,EAAAgB,aAAY,IAAMX,GAASY,IAAcA,KAAW,CAACZ,IACzEH,kBAC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