ivt 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.d.ts +5 -5
- package/dist/accordion/index.mjs +1 -1
- package/dist/alert/index.d.ts +4 -4
- package/dist/alert/index.mjs +1 -1
- package/dist/alert/index.mjs.map +1 -1
- package/dist/avatar/index.d.ts +9 -0
- package/dist/avatar/index.mjs +2 -0
- package/dist/avatar/index.mjs.map +1 -0
- package/dist/badge/index.d.ts +6 -2
- package/dist/badge/index.mjs +1 -1
- package/dist/badge/index.mjs.map +1 -1
- package/dist/base/index.d.ts +15 -4
- package/dist/base/index.mjs +1 -1
- package/dist/base/index.mjs.map +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/calendar/index.d.ts +2 -2
- package/dist/calendar/index.mjs +1 -1
- package/dist/card/index.d.ts +8 -8
- package/dist/card/index.mjs +1 -1
- package/dist/card/index.mjs.map +1 -1
- package/dist/checkbox/index.d.ts +2 -2
- package/dist/checkbox/index.mjs +1 -1
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chunks/Combination-CaCdPc0V.mjs +2 -0
- package/dist/chunks/{Combination-W7MqZ_Hi.mjs.map → Combination-CaCdPc0V.mjs.map} +1 -1
- package/dist/chunks/{TextWrap-DXb_IArn.mjs → TextWrap-23P8STqb.mjs} +2 -2
- package/dist/chunks/TextWrap-23P8STqb.mjs.map +1 -0
- package/dist/chunks/accordion-pKx1Q4tK.mjs +2 -0
- package/dist/chunks/{accordion-BkKUFALV.mjs.map → accordion-pKx1Q4tK.mjs.map} +1 -1
- package/dist/chunks/badge-Cy4rR7ko.mjs +2 -0
- package/dist/chunks/badge-Cy4rR7ko.mjs.map +1 -0
- package/dist/chunks/bundle-mjs-E0baekTQ.mjs +2 -0
- package/dist/chunks/bundle-mjs-E0baekTQ.mjs.map +1 -0
- package/dist/chunks/{button-J9QJjZR3.mjs → button-L19W2fGF.mjs} +2 -2
- package/dist/chunks/button-L19W2fGF.mjs.map +1 -0
- package/dist/chunks/calendar-BQrtnevv.mjs +2 -0
- package/dist/chunks/{calendar-CpSFl0ZA.mjs.map → calendar-BQrtnevv.mjs.map} +1 -1
- package/dist/chunks/check-1SKm0QUI.mjs +2 -0
- package/dist/chunks/{check-Cw3k9ze2.mjs.map → check-1SKm0QUI.mjs.map} +1 -1
- package/dist/chunks/chevron-down-i6P9lr6K.mjs +2 -0
- package/dist/chunks/{chevron-down-SgYbeVsA.mjs.map → chevron-down-i6P9lr6K.mjs.map} +1 -1
- package/dist/chunks/chevron-left-kY7-JEU4.mjs +2 -0
- package/dist/chunks/{chevron-left-C9WH97cq.mjs.map → chevron-left-kY7-JEU4.mjs.map} +1 -1
- package/dist/chunks/chevron-right-BCy8nVMg.mjs +2 -0
- package/dist/chunks/{chevron-right-z-Gpb3tJ.mjs.map → chevron-right-BCy8nVMg.mjs.map} +1 -1
- package/dist/chunks/command-BLs86fLx.mjs +2 -0
- package/dist/chunks/command-BLs86fLx.mjs.map +1 -0
- package/dist/chunks/{createLucideIcon-CCTYlGRq.mjs → createLucideIcon-NXzoJfn7.mjs} +1 -1
- package/dist/chunks/{createLucideIcon-CCTYlGRq.mjs.map → createLucideIcon-NXzoJfn7.mjs.map} +1 -1
- package/dist/chunks/dialog-BDBNWwYT.mjs +2 -0
- package/dist/chunks/dialog-BDBNWwYT.mjs.map +1 -0
- package/dist/chunks/hover-card-BjXLQEhK.mjs +2 -0
- package/dist/chunks/hover-card-BjXLQEhK.mjs.map +1 -0
- package/dist/chunks/{index-CRKe0ftd.mjs → index-5xCD9zck.mjs} +1 -1
- package/dist/chunks/{index-CRKe0ftd.mjs.map → index-5xCD9zck.mjs.map} +1 -1
- package/dist/chunks/index-BXYIPnYd.mjs +2 -0
- package/dist/chunks/{index-zXhEqHj6.mjs.map → index-BXYIPnYd.mjs.map} +1 -1
- package/dist/chunks/index-B_Oam-QU.mjs +2 -0
- package/dist/chunks/{index-DH1By_Zj.mjs.map → index-B_Oam-QU.mjs.map} +1 -1
- package/dist/chunks/{index-DXxGdDWz.mjs → index-BkrjWCcN.mjs} +1 -1
- package/dist/chunks/{index-DXxGdDWz.mjs.map → index-BkrjWCcN.mjs.map} +1 -1
- package/dist/chunks/index-BzUzK8k1.mjs +2 -0
- package/dist/chunks/index-BzUzK8k1.mjs.map +1 -0
- package/dist/chunks/index-CBuWa3V_.mjs +2 -0
- package/dist/chunks/index-CBuWa3V_.mjs.map +1 -0
- package/dist/chunks/{index-DAtAm2O6.mjs → index-CRTXCtD-.mjs} +2 -2
- package/dist/chunks/{index-DAtAm2O6.mjs.map → index-CRTXCtD-.mjs.map} +1 -1
- package/dist/chunks/{index-DK7FUAZ_.mjs → index-Cj8SbPde.mjs} +2 -2
- package/dist/chunks/{index-DK7FUAZ_.mjs.map → index-Cj8SbPde.mjs.map} +1 -1
- package/dist/chunks/index-DFm8Tejm.mjs +2 -0
- package/dist/chunks/{index-bAaQHUTs.mjs.map → index-DFm8Tejm.mjs.map} +1 -1
- package/dist/chunks/{index-D21jAuso.mjs → index-DU2SqYv7.mjs} +2 -2
- package/dist/chunks/{index-D21jAuso.mjs.map → index-DU2SqYv7.mjs.map} +1 -1
- package/dist/chunks/{index-BMeOAQa0.mjs → index-DXDEMoyA.mjs} +1 -1
- package/dist/chunks/{index-BMeOAQa0.mjs.map → index-DXDEMoyA.mjs.map} +1 -1
- package/dist/chunks/index-DagWVwpf.mjs +2 -0
- package/dist/chunks/{index-Da2Voh4L.mjs.map → index-DagWVwpf.mjs.map} +1 -1
- package/dist/chunks/{index-sWdSJK6N.mjs → index-VNeBf_qQ.mjs} +2 -2
- package/dist/chunks/{index-sWdSJK6N.mjs.map → index-VNeBf_qQ.mjs.map} +1 -1
- package/dist/chunks/input-CIOLnRPP.mjs +2 -0
- package/dist/chunks/input-CIOLnRPP.mjs.map +1 -0
- package/dist/chunks/label-JzY_9HXj.mjs +2 -0
- package/dist/chunks/label-JzY_9HXj.mjs.map +1 -0
- package/dist/chunks/pagination-Duu8Xw3w.mjs +2 -0
- package/dist/chunks/pagination-Duu8Xw3w.mjs.map +1 -0
- package/dist/chunks/popover-CstNJ6EN.mjs +2 -0
- package/dist/chunks/{popover-Dx3GwSWI.mjs.map → popover-CstNJ6EN.mjs.map} +1 -1
- package/dist/chunks/progress-sKEf-fjz.mjs +2 -0
- package/dist/chunks/{progress-DTaMhT2Q.mjs.map → progress-sKEf-fjz.mjs.map} +1 -1
- package/dist/chunks/scroll-area-B-ktzHvu.mjs +2 -0
- package/dist/chunks/{scroll-area-CIcOa5xE.mjs.map → scroll-area-B-ktzHvu.mjs.map} +1 -1
- package/dist/chunks/select-DqeznJec.mjs +2 -0
- package/dist/chunks/select-DqeznJec.mjs.map +1 -0
- package/dist/chunks/skeleton-cSOJ-vH8.mjs +2 -0
- package/dist/chunks/skeleton-cSOJ-vH8.mjs.map +1 -0
- package/dist/chunks/{sortable-ScSu9Lzj.mjs → sortable-BX5MRGOc.mjs} +2 -2
- package/dist/chunks/{sortable-ScSu9Lzj.mjs.map → sortable-BX5MRGOc.mjs.map} +1 -1
- package/dist/chunks/table-BGjJ1DhO.mjs +2 -0
- package/dist/chunks/table-BGjJ1DhO.mjs.map +1 -0
- package/dist/chunks/{tslib.es6-CXC0d48h.mjs → tslib.es6-DnJNy3VA.mjs} +1 -1
- package/dist/chunks/{tslib.es6-CXC0d48h.mjs.map → tslib.es6-DnJNy3VA.mjs.map} +1 -1
- package/dist/chunks/{utils-Bj8IkZBZ.mjs → utils-C6LYO_CH.mjs} +2 -2
- package/dist/chunks/utils-C6LYO_CH.mjs.map +1 -0
- package/dist/chunks/x-DjF9gicP.mjs +2 -0
- package/dist/chunks/{x-DjIxAhMt.mjs.map → x-DjF9gicP.mjs.map} +1 -1
- package/dist/command/index.d.ts +11 -11
- package/dist/command/index.mjs +1 -1
- package/dist/data-table/index.d.ts +8 -2
- package/dist/data-table/index.mjs +1 -1
- package/dist/data-table/index.mjs.map +1 -1
- package/dist/dialog/index.d.ts +11 -11
- package/dist/dialog/index.mjs +1 -1
- package/dist/dropdown-menu/index.d.ts +16 -16
- package/dist/dropdown-menu/index.mjs +1 -1
- package/dist/dropdown-menu/index.mjs.map +1 -1
- package/dist/dropzone/index.mjs +1 -1
- package/dist/dropzone/index.mjs.map +1 -1
- package/dist/form/index.d.ts +2 -2
- package/dist/form/index.mjs +1 -1
- package/dist/form/index.mjs.map +1 -1
- package/dist/hover-card/index.d.ts +9 -0
- package/dist/hover-card/index.mjs +2 -0
- package/dist/hover-card/index.mjs.map +1 -0
- package/dist/icon/index.mjs +1 -1
- package/dist/icon/index.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/input/index.d.ts +2 -2
- package/dist/input/index.mjs +1 -1
- package/dist/label/index.d.ts +2 -2
- package/dist/label/index.mjs +1 -1
- package/dist/pagination/index.d.ts +8 -8
- package/dist/pagination/index.mjs +1 -1
- package/dist/popover/index.d.ts +5 -5
- package/dist/popover/index.mjs +1 -1
- package/dist/progress/index.d.ts +2 -2
- package/dist/progress/index.mjs +1 -1
- package/dist/scroll-area/index.d.ts +3 -3
- package/dist/scroll-area/index.mjs +1 -1
- package/dist/select/index.d.ts +11 -11
- package/dist/select/index.mjs +1 -1
- package/dist/separator/index.d.ts +2 -2
- package/dist/separator/index.mjs +1 -1
- package/dist/separator/index.mjs.map +1 -1
- package/dist/sheet/index.d.ts +9 -9
- package/dist/sheet/index.mjs +1 -1
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/sonner/index.d.ts +5 -0
- package/dist/sonner/index.mjs +2 -0
- package/dist/sonner/index.mjs.map +1 -0
- package/dist/sortable/index.mjs +1 -1
- package/dist/table/index.d.ts +9 -9
- package/dist/table/index.mjs +1 -1
- package/dist/tabs/index.d.ts +5 -5
- package/dist/tabs/index.mjs +1 -1
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/toast/index.mjs +1 -1
- package/dist/toast/index.mjs.map +1 -1
- package/dist/tooltip/index.d.ts +5 -5
- package/dist/tooltip/index.mjs +1 -1
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +39 -8
- package/dist/chunks/Combination-W7MqZ_Hi.mjs +0 -2
- package/dist/chunks/TextWrap-DXb_IArn.mjs.map +0 -1
- package/dist/chunks/accordion-BkKUFALV.mjs +0 -2
- package/dist/chunks/bundle-mjs-C3r6LTMu.mjs +0 -2
- package/dist/chunks/bundle-mjs-C3r6LTMu.mjs.map +0 -1
- package/dist/chunks/button-J9QJjZR3.mjs.map +0 -1
- package/dist/chunks/calendar-CpSFl0ZA.mjs +0 -2
- package/dist/chunks/check-Cw3k9ze2.mjs +0 -2
- package/dist/chunks/chevron-down-SgYbeVsA.mjs +0 -2
- package/dist/chunks/chevron-left-C9WH97cq.mjs +0 -2
- package/dist/chunks/chevron-right-z-Gpb3tJ.mjs +0 -2
- package/dist/chunks/command-Cn6cW4ey.mjs +0 -2
- package/dist/chunks/command-Cn6cW4ey.mjs.map +0 -1
- package/dist/chunks/dialog-84gPnARn.mjs +0 -2
- package/dist/chunks/dialog-84gPnARn.mjs.map +0 -1
- package/dist/chunks/index-BozdVf2c.mjs +0 -2
- package/dist/chunks/index-BozdVf2c.mjs.map +0 -1
- package/dist/chunks/index-DH1By_Zj.mjs +0 -2
- package/dist/chunks/index-Da2Voh4L.mjs +0 -2
- package/dist/chunks/index-bAaQHUTs.mjs +0 -2
- package/dist/chunks/index-zXhEqHj6.mjs +0 -2
- package/dist/chunks/input-CiTqqv7y.mjs +0 -2
- package/dist/chunks/input-CiTqqv7y.mjs.map +0 -1
- package/dist/chunks/label-BVlWhsMo.mjs +0 -2
- package/dist/chunks/label-BVlWhsMo.mjs.map +0 -1
- package/dist/chunks/pagination-Cq13xFx9.mjs +0 -2
- package/dist/chunks/pagination-Cq13xFx9.mjs.map +0 -1
- package/dist/chunks/popover-Dx3GwSWI.mjs +0 -2
- package/dist/chunks/progress-DTaMhT2Q.mjs +0 -2
- package/dist/chunks/scroll-area-CIcOa5xE.mjs +0 -2
- package/dist/chunks/select-5taZD8E7.mjs +0 -2
- package/dist/chunks/select-5taZD8E7.mjs.map +0 -1
- package/dist/chunks/skeleton-DJgw8MK9.mjs +0 -2
- package/dist/chunks/skeleton-DJgw8MK9.mjs.map +0 -1
- package/dist/chunks/table-B6ikl9UC.mjs +0 -2
- package/dist/chunks/table-B6ikl9UC.mjs.map +0 -1
- package/dist/chunks/utils-Bj8IkZBZ.mjs.map +0 -1
- package/dist/chunks/x-DjIxAhMt.mjs +0 -2
@@ -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-BkrjWCcN.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-BkrjWCcN.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,GAAYF,EAG3BG,EAAcL,EAAAM,SAAQ,IAAMF,GAASG,OAAOC,OAAOJ,IACzD,OAAOK,EAACV,EAAQE,SAAR,CAAiBI,QAAeF,YAAS,EAanD,OAVAF,EAASS,YAAcb,EAAoB,WAUpC,CAACI,EARR,SAAoBU,GAClB,MAAMP,EAAgBJ,EAAAY,WAAWb,GACjC,GAAIK,EAAS,OAAOA,EACpB,QAAuB,IAAnBN,EAA8B,OAAOA,EAEzC,MAAM,IAAIe,MAAM,KAAKF,6BAAwCd,MAC/D,EAGF,CAaA,SAASiB,EAAmBC,EAAmBC,EAAwC,IACrF,I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iB,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]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{a as n}from"./index-CBuWa3V_.mjs";function t(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function r(...e){return n=>{let r=!1;const o=e.map((e=>{const o=t(e,n);return r||"function"!=typeof o||(r=!0),o}));if(r)return()=>{for(let n=0;n<o.length;n++){const r=o[n];"function"==typeof r?r():t(e[n],null)}}}}function o(...n){return e.useCallback(r(...n),n)}function i(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}var u=t=>{const{present:r,children:i}=t,u=function(t){const[r,o]=e.useState(),i=e.useRef({}),u=e.useRef(t),s=e.useRef("none"),c=t?"mounted":"unmounted",[f,l]=function(n,t){return e.useReducer(((e,n)=>t[e][n]??e),n)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=a(i.current);s.current="mounted"===f?e:"none"}),[f]),n((()=>{const e=i.current,n=u.current;if(n!==t){const r=s.current,o=a(e);if(t)l("MOUNT");else if("none"===o||"none"===e?.display)l("UNMOUNT");else{l(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}u.current=t}}),[t,l]),n((()=>{if(r){let e;const n=r.ownerDocument.defaultView??window,t=t=>{const o=a(i.current).includes(t.animationName);if(t.target===r&&o&&(l("ANIMATION_END"),!u.current)){const t=r.style.animationFillMode;r.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=t)}))}},o=e=>{e.target===r&&(s.current=a(i.current))};return r.addEventListener("animationstart",o),r.addEventListener("animationcancel",t),r.addEventListener("animationend",t),()=>{n.clearTimeout(e),r.removeEventListener("animationstart",o),r.removeEventListener("animationcancel",t),r.removeEventListener("animationend",t)}}l("ANIMATION_END")}),[r,l]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:e.useCallback((e=>{e&&(i.current=getComputedStyle(e)),o(e)}),[])}}(r),s="function"==typeof i?i({present:u.isPresent}):e.Children.only(i),c=o(u.ref,function(e){let n=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning;if(t)return e.ref;if(n=Object.getOwnPropertyDescriptor(e,"ref")?.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t)return e.props.ref;return e.props.ref||e.ref}(s));return"function"==typeof i||u.isPresent?e.cloneElement(s,{ref:c}):null};function a(e){return e?.animationName||"none"}u.displayName="Presence";export{u as P,r as a,i as c,o as u};
|
2
|
+
//# sourceMappingURL=index-BzUzK8k1.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-BzUzK8k1.mjs","sources":["../../node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../node_modules/@radix-ui/primitive/dist/index.mjs","../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["// packages/react/compose-refs/src/composeRefs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nexport {\n composeEventHandlers\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/presence/src/Presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// packages/react/presence/src/useStateMachine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef({});\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Presence\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["setRef","ref","value","current","composeRefs","refs","node","hasCleanup","cleanups","map","cleanup","i","length","useComposedRefs","React","useCallback","composeEventHandlers","originalEventHandler","ourEventHandler","checkForDefaultPrevented","event","defaultPrevented","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","useRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","useEffect","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","display","timeoutId","ownerWindow","ownerDocument","defaultView","window","handleAnimationEnd","isCurrentAnimation","includes","animationName","target","currentFillMode","style","animationFillMode","setTimeout","handleAnimationStart","addEventListener","clearTimeout","removeEventListener","isPresent","getComputedStyle","usePresence","child","Children","only","element","getter","Object","getOwnPropertyDescriptor","get","mayWarn","isReactWarning","getElementRef","cloneElement","displayName"],"mappings":"iEAQA,SAASA,EAAUC,EAAqBC,GACtC,GAAmB,mBAARD,EACT,OAAOA,EAAIC,GACFD,UACTA,EAAIE,QAAUD,EAElB,CAMA,SAASE,KAAkBC,GACzB,OAAQC,IACN,IAAIC,GAAa,EACjB,MAAMC,EAAWH,EAAKI,KAAKR,IACzB,MAAMS,EAAUV,EAAOC,EAAKK,GAI5B,OAHKC,GAAgC,mBAAXG,IACxBH,GAAa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AyBH,EAAQtD,MAAO,QAAQ0D,IAChEC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eAC7D,GAAID,EACF,OAAQL,EAAgB5E,IAM1B,GAFA6E,EAASC,OAAOC,yBAAyBH,EAAS,QAAQI,IAC1DC,EAAUJ,GAAU,mBAAoBA,GAAUA,EAAOK,eACrDD,EACF,OAAOL,EAAQtD,MAAMtB,IAIvB,OAAO4E,EAAQtD,MAAMtB,KAAQ4E,EAAgB5E,GAC/C,CAzK4CmF,CAAcV,IAExD,MADuC,mBAAbjD,GACLC,EAAS6C,UAAkB3C,EAAAyD,aAAaX,EAAO,CAAEzE,QAAS,IAAA,EA6IjF,SAAS8C,EAAiBE,GACxB,OAAOA,GAAQY,eAAiB,MAClC,CA5IAvC,EAASgE,YAAc","x_google_ignoreList":[0,1,2]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-CBuWa3V_.mjs","sources":["../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/useCallbackRef.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/useLayoutEffect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","useRef","useEffect","current","useMemo","args","useLayoutEffect","Boolean","globalThis","document"],"mappings":"wBAMA,SAASA,EAAkDC,GACzD,MAAMC,EAAoBC,EAAAC,OAAOH,GAOjC,OALME,EAAAE,WAAU,KACdH,EAAYI,QAAUL,CAAA,IAIXE,EAAAI,SAAQ,IAAO,IAAIC,IAASN,EAAYI,aAAaE,IAAa,GACjF,CCNMC,IAAAA,EAAkBC,QAAQC,YAAYC,UAAkBT,EAAAM,gBAAkB","x_google_ignoreList":[0,1]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as r from"react";import{P as a}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as r from"react";import{P as a}from"./index-5xCD9zck.mjs";import{jsx as e}from"react/jsx-runtime";var i=r.forwardRef(((r,i)=>e(a.span,{...r,ref:i,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...r.style}})));i.displayName="VisuallyHidden";var o=i;export{o as R,i as V};
|
2
|
+
//# sourceMappingURL=index-CRTXCtD-.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-CRTXCtD-.mjs","sources":["../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs"],"sourcesContent":["// packages/react/visually-hidden/src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: {\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\",\n ...props.style\n }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["VisuallyHidden","React","forwardRef","props","forwardedRef","jsx","Primitive","span","ref","style","position","border","width","height","padding","margin","overflow","clip","whiteSpace","wordWrap","displayName","Root"],"mappings":"yGAOA,IAMMA,EAAuBC,EAAAC,YAC3B,CAACC,EAAOC,IAEJC,EAACC,EAAUC,KAAV,IACKJ,EACJK,IAAKJ,EACLK,MAAO,CAELC,SAAU,WACVC,OAAQ,EACRC,MAAO,EACPC,OAAQ,EACRC,QAAS,EACTC,QAAQ,EACRC,SAAU,SACVC,KAAM,mBACNC,WAAY,SACZC,SAAU,YACPhB,EAAMM,WAOnBT,EAAeoB,YA/BF,iBAmCb,IAAMC,EAAOrB","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import*as e from"react";import{
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{a as r}from"./index-CBuWa3V_.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-Cj8SbPde.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-Cj8SbPde.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]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{u as t,c as n}from"./index-BzUzK8k1.mjs";import{P as r,d as s}from"./index-5xCD9zck.mjs";import{u as o,a as i}from"./index-CBuWa3V_.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=t(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(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!s.current){let t=function(){y(l,r,s,{discrete:!0})};const s={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);s.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>s.current=!0}}((e=>{const t=e.target,n=[...P.branches].some((e=>e.contains(t)));S&&!n&&(E?.(e),w?.(e),e.defaultPrevented||h?.())}),O),j=function(t,n=globalThis?.document){const r=o(t),s=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!s.current){y(f,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(t,n=globalThis?.document){const r=o(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{W===P.layers.size-1&&(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(r.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:n(s.onFocusCapture,j.onFocusCapture),onBlurCapture:n(s.onBlurCapture,j.onBlurCapture),onPointerDownCapture:n(s.onPointerDownCapture,F.onPointerDownCapture)})}));m.displayName="DismissableLayer";var E=e.forwardRef(((n,s)=>{const o=e.useContext(v),i=e.useRef(null),u=t(s,i);return e.useEffect((()=>{const e=i.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}}),[o.branches]),a(r.div,{...n,ref:u})}));function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?s(o,i):o.dispatchEvent(i)}E.displayName="DismissableLayerBranch";var b=m,w=E,h=e.forwardRef(((t,n)=>{const{container:s,...o}=t,[c,d]=e.useState(!1);i((()=>d(!0)),[]);const l=s||c&&globalThis?.document?.body;return l?u.createPortal(a(r.div,{...o,ref:n}),l):null}));h.displayName="Portal";export{w as B,m as D,h as P,b as R};
|
2
|
+
//# sourceMappingURL=index-DFm8Tejm.mjs.map
|
@@ -1 +1 @@
|
|
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,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eC,EAAgBlB,EAAcmF,GAYnD,OAVM5F,EAAA4C,WAAU,KACd,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
|
+
{"version":3,"file":"index-DFm8Tejm.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":"yOAWA,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,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AIkD,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{c as o,P as t,u as n}from"./index-
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{c as o,P as t,u as n}from"./index-BzUzK8k1.mjs";import{c as r,a}from"./index-BkrjWCcN.mjs";import{u as i}from"./index-DagWVwpf.mjs";import{u as s}from"./index-VNeBf_qQ.mjs";import{P as c,D as l}from"./index-DFm8Tejm.mjs";import{h as u,R as d,u as p,F as f}from"./Combination-CaCdPc0V.mjs";import{P as m}from"./index-5xCD9zck.mjs";import{Slot as g}from"@radix-ui/react-slot";import{jsx as D,jsxs as h,Fragment as R}from"react/jsx-runtime";var _="Dialog",[v,y]=r(_),[b,C]=v(_),I=o=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:c,modal:l=!0}=o,u=e.useRef(null),d=e.useRef(null),[p=!1,f]=s({prop:r,defaultProp:a,onChange:c});return D(b,{scope:t,triggerRef:u,contentRef:d,contentId:i(),titleId:i(),descriptionId:i(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:n})};I.displayName=_;var w="DialogTrigger",O=e.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,i=C(w,r),s=n(t,i.triggerRef);return D(m.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":V(i.open),...a,ref:s,onClick:o(e.onClick,i.onOpenToggle)})}));O.displayName=w;var F="DialogPortal",[N,P]=v(F,{forceMount:void 0}),x=o=>{const{__scopeDialog:n,forceMount:r,children:a,container:i}=o,s=C(F,n);return D(N,{scope:n,forceMount:r,children:e.Children.map(a,(e=>D(t,{present:r||s.open,children:D(c,{asChild:!0,container:i,children:e})})))})};x.displayName=F;var E="DialogOverlay",A=e.forwardRef(((e,o)=>{const n=P(E,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(E,e.__scopeDialog);return i.modal?D(t,{present:r||i.open,children:D(M,{...a,ref:o})}):null}));A.displayName=E;var M=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(E,t);return D(d,{as:g,allowPinchZoom:!0,shards:[r.contentRef],children:D(m.div,{"data-state":V(r.open),...n,ref:o,style:{pointerEvents:"auto",...n.style}})})})),j="DialogContent",k=e.forwardRef(((e,o)=>{const n=P(j,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=C(j,e.__scopeDialog);return D(t,{present:r||i.open,children:i.modal?D(T,{...a,ref:o}):D($,{...a,ref:o})})}));k.displayName=j;var T=e.forwardRef(((t,r)=>{const a=C(j,t.__scopeDialog),i=e.useRef(null),s=n(r,a.contentRef,i);return e.useEffect((()=>{const e=i.current;if(e)return u(e)}),[]),D(W,{...t,ref:s,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:o(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.triggerRef.current?.focus()})),onPointerDownOutside:o(t.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey;(2===o.button||t)&&e.preventDefault()})),onFocusOutside:o(t.onFocusOutside,(e=>e.preventDefault()))})})),$=e.forwardRef(((o,t)=>{const n=C(j,o.__scopeDialog),r=e.useRef(!1),a=e.useRef(!1);return D(W,{...o,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{o.onCloseAutoFocus?.(e),e.defaultPrevented||(r.current||n.triggerRef.current?.focus(),e.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:e=>{o.onInteractOutside?.(e),e.defaultPrevented||(r.current=!0,"pointerdown"===e.detail.originalEvent.type&&(a.current=!0));const t=e.target,i=n.triggerRef.current?.contains(t);i&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&a.current&&e.preventDefault()}})})),W=e.forwardRef(((o,t)=>{const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:s,...c}=o,u=C(j,r),d=e.useRef(null),m=n(t,d);return p(),h(R,{children:[D(f,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:i,onUnmountAutoFocus:s,children:D(l,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":V(u.open),...c,ref:m,onDismiss:()=>u.onOpenChange(!1)})}),h(R,{children:[D(J,{titleId:u.titleId}),D(L,{contentRef:d,descriptionId:u.descriptionId})]})]})})),B="DialogTitle",S=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(B,t);return D(m.h2,{id:r.titleId,...n,ref:o})}));S.displayName=B;var q="DialogDescription",H=e.forwardRef(((e,o)=>{const{__scopeDialog:t,...n}=e,r=C(q,t);return D(m.p,{id:r.descriptionId,...n,ref:o})}));H.displayName=q;var K="DialogClose",U=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=C(K,n);return D(m.button,{type:"button",...r,ref:t,onClick:o(e.onClick,(()=>a.onOpenChange(!1)))})}));function V(e){return e?"open":"closed"}U.displayName=K;var Z="DialogTitleWarning",[z,G]=a(Z,{contentName:j,titleName:B,docsSlug:"dialog"}),J=({titleId:o})=>{const t=G(Z),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return e.useEffect((()=>{if(o){document.getElementById(o)||console.error(n)}}),[n,o]),null},L=({contentRef:o,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${G("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=o.current?.getAttribute("aria-describedby");if(t&&e){document.getElementById(t)||console.warn(n)}}),[n,o,t]),null},Q=I,X=O,Y=x,ee=A,oe=k,te=S,ne=H,re=U;export{re as C,ne as D,ee as O,Y as P,Q as R,te as T,oe as a,X as b};
|
2
|
+
//# sourceMappingURL=index-DU2SqYv7.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-D21jAuso.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__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 }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\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 DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__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 role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\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);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","RemoveScroll","as","Slot","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","console","error","describedById","getAttribute","warn","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"qdAsBA,IAAMA,EAAc,UAGbC,EAAqBC,GAAqBC,EAAmBH,IAc7DI,EAAgBC,GAAoBJ,EAAwCD,GAU7EM,EAAiCC,IACrC,MAAMC,cACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAmBC,EAAAC,OAA0B,MAC7CC,EAAmBF,EAAAC,OAA6B,OAC/CP,GAAO,EAAOS,GAAWC,EAAqB,CACnDC,KAAMV,EACNW,YAAaV,EACbW,SAAUV,IAGZ,OACEW,EAACpB,EAAA,CACCqB,MAAOjB,EACPO,aACAG,aACAQ,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACfjB,OACAG,aAAcM,EACdW,aAAoBd,EAAAe,aAAY,IAAMZ,GAASa,IAAcA,KAAW,CAACb,IACzEL,QAECL,YAAA,EAKPH,EAAO2B,YAAcjC,EAMrB,IAAMkC,EAAe,gBAMfC,EAAsBnB,EAAAoB,YAC1B,CAAC7B,EAAwC8B,KACvC,MAAM7B,cAAEA,KAAkB8B,GAAiB/B,EACrCgC,EAAUlC,EAAiB6B,EAAc1B,GACzCgC,EAAqBC,EAAgBJ,EAAcE,EAAQxB,YACjE,OACES,EAACkB,EAAUC,OAAV,CACCC,KAAK,SACL,gBAAc,SACd,gBAAeL,EAAQ7B,KACvB,gBAAe6B,EAAQb,UACvB,aAAYmB,EAASN,EAAQ7B,SACzB4B,EACJQ,IAAKN,EACLO,QAASC,EAAqBzC,EAAMwC,QAASR,EAAQT,eAAY,IAMzEK,EAAcF,YAAcC,EAM5B,IAAMe,EAAc,gBAGbC,EAAgBC,GAAoB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EAAS,CACMgH,SAASC,eAAejH,IAC1BkH,QAAQC,MAAMJ,EAC/B,IACC,CAACA,EAAS/G,IAEN,IAAA,EAUH2F,EAAwD,EAAGrG,aAAYW,oBAC3E,MACM8G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMvH,EAAAiE,WAAU,KACd,MAAM+D,EAAgB9H,EAAWiE,SAAS8D,aAAa,oBAEvD,GAAIpH,GAAiBmH,EAAe,CACXJ,SAASC,eAAehH,IAC1BiH,QAAQI,KAAKP,EACpC,IACC,CAACA,EAASzH,EAAYW,IAElB,IAAA,EAGHsH,EAAO7I,EACP8I,EAAUjH,EACVkH,EAAShG,EACTiG,GAAUvF,EACVwF,GAAU3E,EACV4E,GAAQ/B,EACRgC,GAAc5B,EACd6B,GAAQzB","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index-DU2SqYv7.mjs","sources":["../../node_modules/@radix-ui/react-dialog/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dialog/src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__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 }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\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 DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__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 role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\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);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DIALOG_NAME","createDialogContext","createDialogScope","createContextScope","DialogProvider","useDialogContext","Dialog","props","__scopeDialog","children","open","openProp","defaultOpen","onOpenChange","modal","triggerRef","React","useRef","contentRef","setOpen","useControllableState","prop","defaultProp","onChange","jsx","scope","contentId","useId","titleId","descriptionId","onOpenToggle","useCallback","prevOpen","displayName","TRIGGER_NAME","DialogTrigger","forwardRef","forwardedRef","triggerProps","context","composedTriggerRef","useComposedRefs","Primitive","button","type","getState","ref","onClick","composeEventHandlers","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","DialogPortal","container","Children","map","child","Presence","present","PortalPrimitive","asChild","OVERLAY_NAME","DialogOverlay","portalContext","overlayProps","DialogOverlayImpl","RemoveScroll","as","Slot","allowPinchZoom","shards","div","style","pointerEvents","CONTENT_NAME","DialogContent","contentProps","DialogContentModal","DialogContentNonModal","composedRefs","useEffect","content","current","hideOthers","DialogContentImpl","trapFocus","disableOutsidePointerEvents","onCloseAutoFocus","event","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","ctrlKey","onFocusOutside","hasInteractedOutsideRef","hasPointerDownOutsideRef","defaultPrevented","onInteractOutside","target","targetIsTrigger","contains","onOpenAutoFocus","useFocusGuards","jsxs","Fragment","FocusScope","loop","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","role","id","onDismiss","TitleWarning","DescriptionWarning","TITLE_NAME","DialogTitle","titleProps","h2","DESCRIPTION_NAME","DialogDescription","descriptionProps","p","CLOSE_NAME","DialogClose","closeProps","TITLE_WARNING_NAME","WarningProvider","useWarningContext","createContext","contentName","titleName","docsSlug","titleWarningContext","MESSAGE","document","getElementById","console","error","describedById","getAttribute","warn","Root","Trigger","Portal","Overlay","Content","Title","Description","Close"],"mappings":"qdAsBA,IAAMA,EAAc,UAGbC,EAAqBC,GAAqBC,EAAmBH,IAc7DI,EAAgBC,GAAoBJ,EAAwCD,GAU7EM,EAAiCC,IACrC,MAAMC,cACJA,EAAAC,SACAA,EACAC,KAAMC,EAAAC,YACNA,EAAAC,aACAA,EAAAC,MACAA,GAAQ,GACNP,EACEQ,EAAmBC,EAAAC,OAA0B,MAC7CC,EAAmBF,EAAAC,OAA6B,OAC/CP,GAAO,EAAOS,GAAWC,EAAqB,CACnDC,KAAMV,EACNW,YAAaV,EACbW,SAAUV,IAGZ,OACEW,EAACpB,EAAA,CACCqB,MAAOjB,EACPO,aACAG,aACAQ,UAAWC,IACXC,QAASD,IACTE,cAAeF,IACfjB,OACAG,aAAcM,EACdW,aAAoBd,EAAAe,aAAY,IAAMZ,GAASa,IAAcA,KAAW,CAACb,IACzEL,QAECL,YAAA,EAKPH,EAAO2B,YAAcjC,EAMrB,IAAMkC,EAAe,gBAMfC,EAAsBnB,EAAAoB,YAC1B,CAAC7B,EAAwC8B,KACvC,MAAM7B,cAAEA,KAAkB8B,GAAiB/B,EACrCgC,EAAUlC,EAAiB6B,EAAc1B,GACzCgC,EAAqBC,EAAgBJ,EAAcE,EAAQxB,YACjE,OACES,EAACkB,EAAUC,OAAV,CACCC,KAAK,SACL,gBAAc,SACd,gBAAeL,EAAQ7B,KACvB,gBAAe6B,EAAQb,UACvB,aAAYmB,EAASN,EAAQ7B,SACzB4B,EACJQ,IAAKN,EACLO,QAASC,EAAqBzC,EAAMwC,QAASR,EAAQT,eAAY,IAMzEK,EAAcF,YAAcC,EAM5B,IAAMe,EAAc,gBAGbC,EAAgBC,GAAoBlD,EAAwCgD,EAAa,CAC9FG,gBAAY,IAiBRC,EAA6C9C,IACjD,MAAMC,cAAEA,EAAA4C,WAAeA,EAAA3C,SAAYA,EAAA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GrG,aAAYW,oBAC3E,MACM8G,EAAU,6EADkBN,EARH,4BASwFE,gBAWvH,OATMvH,EAAAiE,WAAU,KACd,MAAM+D,EAAgB9H,EAAWiE,SAAS8D,aAAa,oBAEvD,GAAIpH,GAAiBmH,EAAe,CACXJ,SAASC,eAAehH,IAC1BiH,QAAQI,KAAKP,EACpC,IACC,CAACA,EAASzH,EAAYW,IAElB,IAAA,EAGHsH,EAAO7I,EACP8I,EAAUjH,EACVkH,EAAShG,EACTiG,GAAUvF,EACVwF,GAAU3E,EACV4E,GAAQ/B,EACRgC,GAAc5B,EACd6B,GAAQzB","x_google_ignoreList":[0]}
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import*as t from"react";import"react/jsx-runtime";var r=t.createContext(void 0);function e(e){const o=t.useContext(r);return e||o||"ltr"}export{e as u};
|
2
|
-
//# sourceMappingURL=index-
|
2
|
+
//# sourceMappingURL=index-DXDEMoyA.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-DXDEMoyA.mjs","sources":["../../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/Direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","createContext","useDirection","localDir","globalDir","useContext"],"mappings":"kDAGA,IAAMA,EAAyBC,EAAAC,mBAAqC,GAiBpE,SAASC,EAAaC,GACpB,MAAMC,EAAkBJ,EAAAK,WAAWN,GACnC,OAAOI,GAAYC,GAAa,KAClC","x_google_ignoreList":[0]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-DagWVwpf.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{
|
2
|
-
//# sourceMappingURL=index-
|
1
|
+
import*as e from"react";import{u as t}from"./index-CBuWa3V_.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-VNeBf_qQ.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-VNeBf_qQ.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]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{c as e}from"./utils-C6LYO_CH.mjs";import t from"react";function r({className:r,type:o,...i}){return t.createElement("input",{type:o,"data-slot":"input",className:e("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),...i})}export{r as I};
|
2
|
+
//# sourceMappingURL=input-CIOLnRPP.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"input-CIOLnRPP.mjs","sources":["../../src/components/ui/input/input.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport React from \"react\";\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n\treturn (\n\t\t<input\n\t\t\ttype={type}\n\t\t\tdata-slot=\"input\"\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input file:text-foreground placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-1 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Input };\n"],"names":["Input","className","type","props","React","input","data-slot","cn"],"mappings":"8DAGA,SAASA,GAAMC,UAAEA,EAASC,KAAEA,KAASC,IACpC,OACCC,EAACC,cAAAA,QAAAA,CACAH,KAAMA,EACNI,YAAU,QACVL,UAAWM,EACV,2WACAN,MAEGE,GAGP"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{c as e}from"./utils-C6LYO_CH.mjs";import*as t from"react";import a from"react";import{P as r}from"./index-5xCD9zck.mjs";import{jsx as o}from"react/jsx-runtime";var s=t.forwardRef(((e,t)=>o(r.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));s.displayName="Label";var n=s;function l({className:t,...r}){return a.createElement(n,{"data-slot":"label",className:e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...r})}export{l as L};
|
2
|
+
//# sourceMappingURL=label-JzY_9HXj.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"label-JzY_9HXj.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 { cn } from \"@/lib/utils\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport React from \"react\";\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n\treturn (\n\t\t<LabelPrimitive.Root\n\t\t\tdata-slot=\"label\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\n"],"names":["Label","React","forwardRef","props","forwardedRef","jsx","Primitive","label","ref","onMouseDown","event","target","closest","defaultPrevented","detail","preventDefault","displayName","Root","className","createElement","LabelPrimitive","data-slot","cn"],"mappings":"uKAOA,IAMMA,EAAcC,EAAAC,YAAqC,CAACC,EAAOC,IAE7DC,EAACC,EAAUC,MAAV,IACKJ,EACJK,IAAKJ,EACLK,YAAcC,IAEGA,EAAMC,OACVC,QAAQ,qCAEnBT,EAAMM,cAAcC,IAEfA,EAAMG,kBAAoBH,EAAMI,OAAS,GAAGJ,EAAMK,iBAAe,MAM9Ef,EAAMgB,YAxBO,QA4Bb,IAAMC,EAAOjB,EC/Bb,SAASA,GAAMkB,UAAEA,KAAcf,IAC9B,OACCF,EAAAkB,cAACC,EAAmB,CACnBC,YAAU,QACVH,UAAWI,EACV,sNACAJ,MAEGf,GAGP","x_google_ignoreList":[0]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{c as e}from"./utils-C6LYO_CH.mjs";import a from"react";import{C as t}from"./chevron-left-kY7-JEU4.mjs";import{C as s}from"./chevron-right-BCy8nVMg.mjs";import{c as n}from"./createLucideIcon-NXzoJfn7.mjs";import{b as c}from"./button-L19W2fGF.mjs";const l=n("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function r({className:t,...s}){return a.createElement("nav",{"aria-label":"pagination","data-slot":"pagination",className:e("mx-auto flex w-full justify-center",t),...s})}function i({className:t,...s}){return a.createElement("ul",{"data-slot":"pagination-content",className:e("flex flex-row items-center gap-1",t),...s})}function m({...e}){return a.createElement("li",{"data-slot":"pagination-item",...e})}function o({className:t,isActive:s,size:n="icon",...l}){return a.createElement("a",{"aria-current":s?"page":void 0,"data-slot":"pagination-link","data-active":s,className:e(c({variant:s?"outline":"ghost",size:n}),t),...l})}function p({className:s,...n}){return a.createElement(o,{"aria-label":"Go to previous page",size:"default",className:e("gap-1 px-2.5 sm:pl-2.5",s),...n},a.createElement(t,null),a.createElement("span",{className:"hidden sm:block"},"Previous"))}function u({className:t,...n}){return a.createElement(o,{"aria-label":"Go to next page",size:"default",className:e("gap-1 px-2.5 sm:pr-2.5",t),...n},a.createElement("span",{className:"hidden sm:block"},"Next"),a.createElement(s,null))}function f({className:t,...s}){return a.createElement("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:e("flex size-9 items-center justify-center",t),...s},a.createElement(l,{className:"size-4"}),a.createElement("span",{className:"sr-only"},"More pages"))}export{r as P,i as a,o as b,m as c,p as d,u as e,f};
|
2
|
+
//# sourceMappingURL=pagination-Duu8Xw3w.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"pagination-Duu8Xw3w.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/ellipsis.js","../../src/components/ui/pagination/pagination.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.479.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }]\n];\nconst Ellipsis = createLucideIcon(\"Ellipsis\", __iconNode);\n\nexport { __iconNode, Ellipsis as default };\n//# sourceMappingURL=ellipsis.js.map\n","import { type Button, buttonVariants } from \"@/components/ui/button\";\nimport { cn } from \"@/lib/utils\";\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from \"lucide-react\";\nimport React from \"react\";\n\nfunction Pagination({ className, ...props }: React.ComponentProps<\"nav\">) {\n\treturn (\n\t\t<nav\n\t\t\taria-label=\"pagination\"\n\t\t\tdata-slot=\"pagination\"\n\t\t\tclassName={cn(\"mx-auto flex w-full justify-center\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tdata-slot=\"pagination-content\"\n\t\t\tclassName={cn(\"flex flex-row items-center gap-1\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<\"li\">) {\n\treturn <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n\tReact.ComponentProps<\"a\">;\n\nfunction PaginationLink({ className, isActive, size = \"icon\", ...props }: PaginationLinkProps) {\n\treturn (\n\t\t<a\n\t\t\taria-current={isActive ? \"page\" : undefined}\n\t\t\tdata-slot=\"pagination-link\"\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\n\t\t\t\tbuttonVariants({\n\t\t\t\t\tvariant: isActive ? \"outline\" : \"ghost\",\n\t\t\t\t\tsize,\n\t\t\t\t}),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to previous page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 px-2.5 sm:pl-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronLeftIcon />\n\t\t\t<span className=\"hidden sm:block\">Previous</span>\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n\treturn (\n\t\t<PaginationLink\n\t\t\taria-label=\"Go to next page\"\n\t\t\tsize=\"default\"\n\t\t\tclassName={cn(\"gap-1 px-2.5 sm:pr-2.5\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"hidden sm:block\">Next</span>\n\t\t\t<ChevronRightIcon />\n\t\t</PaginationLink>\n\t);\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\taria-hidden\n\t\t\tdata-slot=\"pagination-ellipsis\"\n\t\t\tclassName={cn(\"flex size-9 items-center justify-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<MoreHorizontalIcon className=\"size-4\" />\n\t\t\t<span className=\"sr-only\">More pages</span>\n\t\t</span>\n\t);\n}\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationLink,\n\tPaginationItem,\n\tPaginationPrevious,\n\tPaginationNext,\n\tPaginationEllipsis,\n};\n"],"names":["Ellipsis","createLucideIcon","cx","cy","r","key","Pagination","className","props","React","nav","aria-label","data-slot","cn","PaginationContent","ul","PaginationItem","li","PaginationLink","isActive","size","a","aria-current","undefined","data-active","buttonVariants","variant","PaginationPrevious","createElement","ChevronLeftIcon","span","PaginationNext","ChevronRightIcon","PaginationEllipsis","aria-hidden","MoreHorizontalIcon"],"mappings":"6PAGO,MAiBDA,EAAWC,EAAiB,W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AEA,SAASC,GAAmB1B,UAAEA,KAAcC,IAC3C,OACCC,EAACqB,cAAAA,OAAAA,CACAI,eAAAA,EACAtB,YAAU,sBACVL,UAAWM,EAAG,0CAA2CN,MACrDC,GAEJC,EAAC0B,cAAAA,EAAAA,CAAmB5B,UAAU,WAC9BE,EAACqB,cAAAA,OAAAA,CAAKvB,UAAU,WAAU,cAG7B","x_google_ignoreList":[0]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{c as e}from"./utils-C6LYO_CH.mjs";import*as o from"react";import t from"react";import{u as r,c as n,P as a}from"./index-BzUzK8k1.mjs";import{c as s}from"./index-BkrjWCcN.mjs";import{P as i,D as c}from"./index-DFm8Tejm.mjs";import{h as d,R as p,u,F as l}from"./Combination-CaCdPc0V.mjs";import{u as f}from"./index-DagWVwpf.mjs";import{c as m,R as v,A as h,C as g,a as P}from"./index-B_Oam-QU.mjs";import{P as C}from"./index-5xCD9zck.mjs";import{Slot as O}from"@radix-ui/react-slot";import{u as b}from"./index-VNeBf_qQ.mjs";import{jsx as w}from"react/jsx-runtime";var x="Popover",[R,_]=s(x,[m]),A=m(),[F,y]=R(x),E=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:a,onOpenChange:s,modal:i=!1}=e,c=A(t),d=o.useRef(null),[p,u]=o.useState(!1),[l=!1,m]=b({prop:n,defaultProp:a,onChange:s});return w(v,{...c,children:w(F,{scope:t,contentId:f(),triggerRef:d,open:l,onOpenChange:m,onOpenToggle:o.useCallback((()=>m((e=>!e))),[m]),hasCustomAnchor:p,onCustomAnchorAdd:o.useCallback((()=>u(!0)),[]),onCustomAnchorRemove:o.useCallback((()=>u(!1)),[]),modal:i,children:r})})};E.displayName=x;var D="PopoverAnchor",j=o.forwardRef(((e,t)=>{const{__scopePopover:r,...n}=e,a=y(D,r),s=A(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=a;return o.useEffect((()=>(i(),()=>c())),[i,c]),w(h,{...s,...n,ref:t})}));j.displayName=D;var k="PopoverTrigger",N=o.forwardRef(((e,o)=>{const{__scopePopover:t,...a}=e,s=y(k,t),i=A(t),c=r(o,s.triggerRef),d=w(C.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":G(s.open),...a,ref:c,onClick:n(e.onClick,s.onOpenToggle)});return s.hasCustomAnchor?d:w(h,{asChild:!0,...i,children:d})}));N.displayName=k;var I="PopoverPortal",[M,z]=R(I,{forceMount:void 0}),K=e=>{const{__scopePopover:o,forceMount:t,children:r,container:n}=e,s=y(I,o);return w(M,{scope:o,forceMount:t,children:w(a,{present:t||s.open,children:w(i,{asChild:!0,container:n,children:r})})})};K.displayName=I;var T="PopoverContent",S=o.forwardRef(((e,o)=>{const t=z(T,e.__scopePopover),{forceMount:r=t.forceMount,...n}=e,s=y(T,e.__scopePopover);return w(a,{present:r||s.open,children:s.modal?w(U,{...n,ref:o}):w(Z,{...n,ref:o})})}));S.displayName=T;var U=o.forwardRef(((e,t)=>{const a=y(T,e.__scopePopover),s=o.useRef(null),i=r(t,s),c=o.useRef(!1);return o.useEffect((()=>{const e=s.current;if(e)return d(e)}),[]),w(p,{as:O,allowPinchZoom:!0,children:w(q,{...e,ref:i,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:n(e.onCloseAutoFocus,(e=>{e.preventDefault(),c.current||a.triggerRef.current?.focus()})),onPointerDownOutside:n(e.onPointerDownOutside,(e=>{const o=e.detail.originalEvent,t=0===o.button&&!0===o.ctrlKey,r=2===o.button||t;c.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:n(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),Z=o.forwardRef(((e,t)=>{const r=y(T,e.__scopePopover),n=o.useRef(!1),a=o.useRef(!1);return w(q,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||r.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,"pointerdown"===o.detail.originalEvent.type&&(a.current=!0));const t=o.target,s=r.triggerRef.current?.contains(t);s&&o.preventDefault(),"focusin"===o.detail.originalEvent.type&&a.current&&o.preventDefault()}})})),q=o.forwardRef(((e,o)=>{const{__scopePopover:t,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:f,...m}=e,v=y(T,t),h=A(t);return u(),w(l,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:a,children:w(c,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:d,onFocusOutside:p,onDismiss:()=>v.onOpenChange(!1),children:w(g,{"data-state":G(v.open),role:"dialog",id:v.contentId,...h,...m,ref:o,style:{...m.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),B="PopoverClose";o.forwardRef(((e,o)=>{const{__scopePopover:t,...r}=e,a=y(B,t);return w(C.button,{type:"button",...r,ref:o,onClick:n(e.onClick,(()=>a.onOpenChange(!1)))})})).displayName=B;function G(e){return e?"open":"closed"}o.forwardRef(((e,o)=>{const{__scopePopover:t,...r}=e,n=A(t);return w(P,{...n,...r,ref:o})})).displayName="PopoverArrow";var H=E,J=j,L=N,Q=K,V=S;function W({...e}){return t.createElement(H,{"data-slot":"popover",...e})}function X({...e}){return t.createElement(L,{"data-slot":"popover-trigger",...e})}function Y({className:o,align:r="center",sideOffset:n=4,...a}){return t.createElement(Q,null,t.createElement(V,{"data-slot":"popover-content",align:r,sideOffset:n,className:e("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 cursor-pointer rounded-md border p-4 shadow-md outline-none",o),...a}))}function $({...e}){return t.createElement(J,{"data-slot":"popover-anchor",...e})}export{W as P,X as a,Y as b,$ as c};
|
2
|
+
//# sourceMappingURL=popover-CstNJ6EN.mjs.map
|