ivt 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion/index.d.ts +13 -0
- package/dist/accordion/index.mjs +2 -0
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/badge/index.d.ts +13 -0
- package/dist/badge/index.mjs +2 -0
- package/dist/badge/index.mjs.map +1 -0
- package/dist/base/index.d.ts +15 -0
- package/dist/base/index.mjs +2 -0
- package/dist/base/index.mjs.map +1 -0
- package/dist/button/index.d.ts +14 -0
- package/dist/button/index.mjs +2 -0
- package/dist/button/index.mjs.map +1 -0
- package/dist/calendar/index.d.ts +11 -0
- package/dist/calendar/index.mjs +2 -0
- package/dist/calendar/index.mjs.map +1 -0
- package/dist/card/index.d.ts +12 -0
- package/dist/card/index.mjs +2 -0
- package/dist/card/index.mjs.map +1 -0
- package/dist/checkbox/index.d.ts +7 -0
- package/dist/checkbox/index.mjs +2 -0
- package/dist/checkbox/index.mjs.map +1 -0
- package/dist/chunks/TextWrap-apUajb0q.mjs +2 -0
- package/dist/chunks/TextWrap-apUajb0q.mjs.map +1 -0
- package/dist/chunks/accordion-CQGSj-IW.mjs +2 -0
- package/dist/chunks/accordion-CQGSj-IW.mjs.map +1 -0
- package/dist/chunks/bundle-mjs-CtG6Smj_.mjs +2 -0
- package/dist/chunks/bundle-mjs-CtG6Smj_.mjs.map +1 -0
- package/dist/chunks/button-D_c_ntEX.mjs +2 -0
- package/dist/chunks/button-D_c_ntEX.mjs.map +1 -0
- package/dist/chunks/check-DjRtCxG6.mjs +2 -0
- package/dist/chunks/check-DjRtCxG6.mjs.map +1 -0
- package/dist/chunks/chevron-down-BCzo9yB2.mjs +2 -0
- package/dist/chunks/chevron-down-BCzo9yB2.mjs.map +1 -0
- package/dist/chunks/chevron-left-DUJqO1vN.mjs +2 -0
- package/dist/chunks/chevron-left-DUJqO1vN.mjs.map +1 -0
- package/dist/chunks/chevron-right-CoNJE7ZW.mjs +2 -0
- package/dist/chunks/chevron-right-CoNJE7ZW.mjs.map +1 -0
- package/dist/chunks/command-eoEJKrZQ.mjs +2 -0
- package/dist/chunks/command-eoEJKrZQ.mjs.map +1 -0
- package/dist/chunks/createLucideIcon-CIn9dHnW.mjs +14 -0
- package/dist/chunks/createLucideIcon-CIn9dHnW.mjs.map +1 -0
- package/dist/chunks/dialog-TKsk0Iu2.mjs +2 -0
- package/dist/chunks/dialog-TKsk0Iu2.mjs.map +1 -0
- package/dist/chunks/index-B98y16WE.mjs +2 -0
- package/dist/chunks/index-B98y16WE.mjs.map +1 -0
- package/dist/chunks/index-BpJwNLRW.mjs +2 -0
- package/dist/chunks/index-BpJwNLRW.mjs.map +1 -0
- package/dist/chunks/index-C598HM8V.mjs +2 -0
- package/dist/chunks/index-C598HM8V.mjs.map +1 -0
- package/dist/chunks/index-CCYyT_rk.mjs +2 -0
- package/dist/chunks/index-CCYyT_rk.mjs.map +1 -0
- package/dist/chunks/index-CX5r7IKM.mjs +2 -0
- package/dist/chunks/index-CX5r7IKM.mjs.map +1 -0
- package/dist/chunks/index-CXrD_SvM.mjs +2 -0
- package/dist/chunks/index-CXrD_SvM.mjs.map +1 -0
- package/dist/chunks/index-ChLuxn93.mjs +2 -0
- package/dist/chunks/index-ChLuxn93.mjs.map +1 -0
- package/dist/chunks/index-CluuXDB_.mjs +2 -0
- package/dist/chunks/index-CluuXDB_.mjs.map +1 -0
- package/dist/chunks/index-D-s-TbR3.mjs +2 -0
- package/dist/chunks/index-D-s-TbR3.mjs.map +1 -0
- package/dist/chunks/index-DOx7g1Qo.mjs +2 -0
- package/dist/chunks/index-DOx7g1Qo.mjs.map +1 -0
- package/dist/chunks/index-Db2NO0t8.mjs +2 -0
- package/dist/chunks/index-Db2NO0t8.mjs.map +1 -0
- package/dist/chunks/index-DxtdpBCb.mjs +2 -0
- package/dist/chunks/index-DxtdpBCb.mjs.map +1 -0
- package/dist/chunks/index-DzMQps4Q.mjs +2 -0
- package/dist/chunks/index-DzMQps4Q.mjs.map +1 -0
- package/dist/chunks/input-BxTp3Q5l.mjs +2 -0
- package/dist/chunks/input-BxTp3Q5l.mjs.map +1 -0
- package/dist/chunks/label-BhQUf4a7.mjs +2 -0
- package/dist/chunks/label-BhQUf4a7.mjs.map +1 -0
- package/dist/chunks/pagination-qTGmkoRO.mjs +2 -0
- package/dist/chunks/pagination-qTGmkoRO.mjs.map +1 -0
- package/dist/chunks/popover-DDPhp0Sa.mjs +2 -0
- package/dist/chunks/popover-DDPhp0Sa.mjs.map +1 -0
- package/dist/chunks/progress-C_yWLgAi.mjs +2 -0
- package/dist/chunks/progress-C_yWLgAi.mjs.map +1 -0
- package/dist/chunks/scroll-area-CuX49k8h.mjs +2 -0
- package/dist/chunks/scroll-area-CuX49k8h.mjs.map +1 -0
- package/dist/chunks/select-BydKi4E_.mjs +2 -0
- package/dist/chunks/select-BydKi4E_.mjs.map +1 -0
- package/dist/chunks/skeleton-BFnps3wE.mjs +2 -0
- package/dist/chunks/skeleton-BFnps3wE.mjs.map +1 -0
- package/dist/chunks/sortable-7DK1K35h.mjs +2 -0
- package/dist/chunks/sortable-7DK1K35h.mjs.map +1 -0
- package/dist/chunks/table-DRvqJktC.mjs +2 -0
- package/dist/chunks/table-DRvqJktC.mjs.map +1 -0
- package/dist/chunks/tslib.es6-Cx3xzITX.mjs +2 -0
- package/dist/chunks/tslib.es6-Cx3xzITX.mjs.map +1 -0
- package/dist/chunks/utils-jIFl11as.mjs +2 -0
- package/dist/chunks/utils-jIFl11as.mjs.map +1 -0
- package/dist/chunks/x-xnz0lTd-.mjs +2 -0
- package/dist/chunks/x-xnz0lTd-.mjs.map +1 -0
- package/dist/command/index.d.ts +20 -0
- package/dist/command/index.mjs +2 -0
- package/dist/command/index.mjs.map +1 -0
- package/dist/data-table/index.d.ts +124 -0
- package/dist/data-table/index.mjs +2 -0
- package/dist/data-table/index.mjs.map +1 -0
- package/dist/dialog/index.d.ts +16 -0
- package/dist/dialog/index.mjs +2 -0
- package/dist/dialog/index.mjs.map +1 -0
- package/dist/dropdown-menu/index.d.ts +28 -0
- package/dist/dropdown-menu/index.mjs +2 -0
- package/dist/dropdown-menu/index.mjs.map +1 -0
- package/dist/dropzone/index.d.ts +84 -0
- package/dist/dropzone/index.mjs +7 -0
- package/dist/dropzone/index.mjs.map +1 -0
- package/dist/form/index.d.ts +28 -0
- package/dist/form/index.mjs +2 -0
- package/dist/form/index.mjs.map +1 -0
- package/dist/icon/index.d.ts +16 -0
- package/dist/icon/index.mjs +2 -0
- package/dist/icon/index.mjs.map +1 -0
- package/dist/index/index.d.ts +2 -0
- package/dist/index/index.mjs +2 -0
- package/dist/index/index.mjs.map +1 -0
- package/dist/index.css +7 -0
- package/dist/input/index.d.ts +6 -0
- package/dist/input/index.mjs +2 -0
- package/dist/input/index.mjs.map +1 -0
- package/dist/label/index.d.ts +7 -0
- package/dist/label/index.mjs +2 -0
- package/dist/label/index.mjs.map +1 -0
- package/dist/pagination/index.d.ts +18 -0
- package/dist/pagination/index.mjs +2 -0
- package/dist/pagination/index.mjs.map +1 -0
- package/dist/popover/index.d.ts +10 -0
- package/dist/popover/index.mjs +2 -0
- package/dist/popover/index.mjs.map +1 -0
- package/dist/progress/index.d.ts +7 -0
- package/dist/progress/index.mjs +2 -0
- package/dist/progress/index.mjs.map +1 -0
- package/dist/scroll-area/index.d.ts +8 -0
- package/dist/scroll-area/index.mjs +2 -0
- package/dist/scroll-area/index.mjs.map +1 -0
- package/dist/select/index.d.ts +16 -0
- package/dist/select/index.mjs +2 -0
- package/dist/select/index.mjs.map +1 -0
- package/dist/separator/index.d.ts +7 -0
- package/dist/separator/index.mjs +2 -0
- package/dist/separator/index.mjs.map +1 -0
- package/dist/sheet/index.d.ts +16 -0
- package/dist/sheet/index.mjs +2 -0
- package/dist/sheet/index.mjs.map +1 -0
- package/dist/skeleton/index.d.ts +6 -0
- package/dist/skeleton/index.mjs +2 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/sortable/index.d.ts +109 -0
- package/dist/sortable/index.mjs +2 -0
- package/dist/sortable/index.mjs.map +1 -0
- package/dist/table/index.d.ts +13 -0
- package/dist/table/index.mjs +2 -0
- package/dist/table/index.mjs.map +1 -0
- package/dist/tabs/index.d.ts +10 -0
- package/dist/tabs/index.mjs +2 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/toast/index.d.ts +20 -0
- package/dist/toast/index.mjs +2 -0
- package/dist/toast/index.mjs.map +1 -0
- package/dist/tooltip/index.d.ts +10 -0
- package/dist/tooltip/index.mjs +2 -0
- package/dist/tooltip/index.mjs.map +1 -0
- package/package.json +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chevron-left-DUJqO1vN.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/chevron-left.js"],"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 = [[\"path\", { d: \"m15 18-6-6 6-6\", key: \"1wnfg3\" }]];\nconst ChevronLeft = createLucideIcon(\"ChevronLeft\", __iconNode);\n\nexport { __iconNode, ChevronLeft as default };\n//# sourceMappingURL=chevron-left.js.map\n"],"names":["ChevronLeft","createLucideIcon","d","key"],"mappings":"oDAGa,MAaPA,EAAcC,EAAiB,cAbD,CAAC,CAAC,OAAQ,CAAEC,EAAG,iBAAkBC,IAAK","x_google_ignoreList":[0]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chevron-right-CoNJE7ZW.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/chevron-right.js"],"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 = [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]];\nconst ChevronRight = createLucideIcon(\"ChevronRight\", __iconNode);\n\nexport { __iconNode, ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n"],"names":["ChevronRight","createLucideIcon","d","key"],"mappings":"oDAGa,MAaPA,EAAeC,EAAiB,eAbF,CAAC,CAAC,OAAQ,CAAEC,EAAG,gBAAiBC,IAAK","x_google_ignoreList":[0]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{R as t,P as r,O as n,a as l}from"./index-CluuXDB_.mjs";import{P as a}from"./index-DxtdpBCb.mjs";import{u as o}from"./index-Db2NO0t8.mjs";import{d as u}from"./index-CX5r7IKM.mjs";import{c as i}from"./utils-jIFl11as.mjs";import{D as c,e as d,h as s,c as m,b as f}from"./dialog-TKsk0Iu2.mjs";import{c as p}from"./createLucideIcon-CIn9dHnW.mjs";const v=p("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);var h=.999,g=/[\\\/_+.#"@\[\(\{&]/,b=/[\\\/_+.#"@\[\(\{&]/g,E=/[\s-]/,x=/[\s-]/g;function k(e,t,r,n,l,a,o){if(a===t.length)return l===e.length?1:.99;var u=`${l},${a}`;if(void 0!==o[u])return o[u];for(var i,c,d,s,m=n.charAt(a),f=r.indexOf(m,l),p=0;f>=0;)(i=k(e,t,r,n,f+1,a+1,o))>p&&(f===l?i*=1:g.test(e.charAt(f-1))?(i*=.8,(d=e.slice(l,f-1).match(b))&&l>0&&(i*=Math.pow(h,d.length))):E.test(e.charAt(f-1))?(i*=.9,(s=e.slice(l,f-1).match(x))&&l>0&&(i*=Math.pow(h,s.length))):(i*=.17,l>0&&(i*=Math.pow(h,f-l))),e.charAt(f)!==t.charAt(a)&&(i*=.9999)),(i<.1&&r.charAt(f-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(f-1)!==n.charAt(a))&&(.1*(c=k(e,t,r,n,f+1,a+2,o))>i&&(i=.1*c)),i>p&&(p=i),f=r.indexOf(m,f+1);return o[u]=p,p}function w(e){return e.toLowerCase().replace(x," ")}function y(e,t,r){return k(e=r&&r.length>0?""+(e+" "+r.join(" ")):e,t,w(e),w(t),0,0,{})}var S='[cmdk-group=""]',I='[cmdk-group-items=""]',C='[cmdk-item=""]',A=`${C}:not([aria-disabled="true"])`,_="cmdk-item-select",R="data-value",N=(e,t,r)=>y(e,t,r),M=e.createContext(void 0),j=()=>e.useContext(M),P=e.createContext(void 0),D=()=>e.useContext(P),L=e.createContext(void 0),$=e.forwardRef(((t,r)=>{let n=T((()=>{var e,r;return{search:"",value:null!=(r=null!=(e=t.value)?e:t.defaultValue)?r:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}})),l=T((()=>new Set)),u=T((()=>new Map)),i=T((()=>new Map)),c=T((()=>new Set)),d=J(t),{label:s,children:m,value:f,onValueChange:p,filter:v,shouldFilter:h,loop:g,disablePointerSelection:b=!1,vimBindings:E=!0,...x}=t,k=o(),w=o(),y=o(),j=e.useRef(null),D=Z();Q((()=>{if(void 0!==f){let e=f.trim();n.current.value=e,L.emit()}}),[f]),Q((()=>{D(6,V)}),[]);let L=e.useMemo((()=>({subscribe:e=>(c.current.add(e),()=>c.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var l,a,o,u;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),F(),D(1,K);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(y);e?e.focus():null==(l=document.getElementById(k))||l.focus()}if(D(7,(()=>{var e;n.current.selectedItemId=null==(e=z())?void 0:e.id,L.emit()})),r||D(5,V),void 0!==(null==(a=d.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(u=(o=d.current).onValueChange)||u.call(o,e))}}L.emit()}},emit:()=>{c.current.forEach((e=>e()))}})),[]),$=e.useMemo((()=>({value:(e,t,r)=>{var l;t!==(null==(l=i.current.get(e))?void 0:l.value)&&(i.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,q(t,r)),D(2,(()=>{F(),L.emit()})))},item:(e,t)=>(l.current.add(e),t&&(u.current.has(t)?u.current.get(t).add(e):u.current.set(t,new Set([e]))),D(3,(()=>{O(),F(),n.current.value||K(),L.emit()})),()=>{i.current.delete(e),l.current.delete(e),n.current.filtered.items.delete(e);let t=z();D(4,(()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&K(),L.emit()}))}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{i.current.delete(e),u.current.delete(e)}),filter:()=>d.current.shouldFilter,label:s||t["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:k,inputId:y,labelId:w,listInnerRef:j})),[]);function q(e,t){var r,l;let a=null!=(l=null==(r=d.current)?void 0:r.filter)?l:N;return e?a(e,n.current.search,t):0}function F(){if(!n.current.search||!1===d.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((r=>{let n=u.current.get(r),l=0;n.forEach((t=>{let r=e.get(t);l=Math.max(r,l)})),t.push([r,l])}));let r=j.current;B().sort(((t,r)=>{var n,l;let a=t.getAttribute("id"),o=r.getAttribute("id");return(null!=(n=e.get(o))?n:0)-(null!=(l=e.get(a))?l:0)})).forEach((e=>{let t=e.closest(I);t?t.appendChild(e.parentElement===t?e:e.closest(`${I} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${I} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{var t;let r=null==(t=j.current)?void 0:t.querySelector(`${S}[${R}="${encodeURIComponent(e[0])}"]`);null==r||r.parentElement.appendChild(r)}))}function K(){let e=B().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(R);L.setState("value",t||void 0)}function O(){var e,t,r,a;if(!n.current.search||!1===d.current.shouldFilter)return void(n.current.filtered.count=l.current.size);n.current.filtered.groups=new Set;let o=0;for(let u of l.current){let l=q(null!=(t=null==(e=i.current.get(u))?void 0:e.value)?t:"",null!=(a=null==(r=i.current.get(u))?void 0:r.keywords)?a:[]);n.current.filtered.items.set(u,l),l>0&&o++}for(let[e,t]of u.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=o}function V(){var e,t,r;let n=z();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(S))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function z(){var e;return null==(e=j.current)?void 0:e.querySelector(`${C}[aria-selected="true"]`)}function B(){var e;return Array.from((null==(e=j.current)?void 0:e.querySelectorAll(A))||[])}function G(e){let t=B()[e];t&&L.setState("value",t.getAttribute(R))}function H(e){var t;let r=z(),n=B(),l=n.findIndex((e=>e===r)),a=n[l+e];null!=(t=d.current)&&t.loop&&(a=l+e<0?n[n.length-1]:l+e===n.length?n[0]:n[l+e]),a&&L.setState("value",a.getAttribute(R))}function X(e){let t,r=z(),n=null==r?void 0:r.closest(S);for(;n&&!t;)n=e>0?U(n,S):W(n,S),t=null==n?void 0:n.querySelector(A);t?L.setState("value",t.getAttribute(R)):H(e)}let Y=()=>G(B().length-1),re=e=>{e.preventDefault(),e.metaKey?Y():e.altKey?X(1):H(1)},ne=e=>{e.preventDefault(),e.metaKey?G(0):e.altKey?X(-1):H(-1)};return e.createElement(a.div,{ref:r,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=x.onKeyDown)||t.call(x,e);let r=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!r)switch(e.key){case"n":case"j":E&&e.ctrlKey&&re(e);break;case"ArrowDown":re(e);break;case"p":case"k":E&&e.ctrlKey&&ne(e);break;case"ArrowUp":ne(e);break;case"Home":e.preventDefault(),G(0);break;case"End":e.preventDefault(),Y();break;case"Enter":{e.preventDefault();let t=z();if(t){let e=new Event(_);t.dispatchEvent(e)}}}}},e.createElement("label",{"cmdk-label":"",htmlFor:$.inputId,id:$.labelId,style:te},s),ee(t,(t=>e.createElement(P.Provider,{value:L},e.createElement(M.Provider,{value:$},t)))))})),q=e.forwardRef(((t,r)=>{var n,l;let i=o(),c=e.useRef(null),d=e.useContext(L),s=j(),m=J(t),f=null!=(l=null==(n=m.current)?void 0:n.forceMount)?l:null==d?void 0:d.forceMount;Q((()=>{if(!f)return s.item(i,null==d?void 0:d.id)}),[f]);let p=Y(i,c,[t.value,t.children,c],t.keywords),v=D(),h=X((e=>e.value&&e.value===p.current)),g=X((e=>!(!f&&!1!==s.filter())||(!e.search||e.filtered.items.get(i)>0)));function b(){var e,t;E(),null==(t=(e=m.current).onSelect)||t.call(e,p.current)}function E(){v.setState("value",p.current,!0)}if(e.useEffect((()=>{let e=c.current;if(e&&!t.disabled)return e.addEventListener(_,b),()=>e.removeEventListener(_,b)}),[g,t.onSelect,t.disabled]),!g)return null;let{disabled:x,value:k,onSelect:w,forceMount:y,keywords:S,...I}=t;return e.createElement(a.div,{ref:u(c,r),...I,id:i,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!h,"data-disabled":!!x,"data-selected":!!h,onPointerMove:x||s.getDisablePointerSelection()?void 0:E,onClick:x?void 0:b},t.children)})),F=e.forwardRef(((t,r)=>{let{heading:n,children:l,forceMount:i,...c}=t,d=o(),s=e.useRef(null),m=e.useRef(null),f=o(),p=j(),v=X((e=>!(!i&&!1!==p.filter())||(!e.search||e.filtered.groups.has(d))));Q((()=>p.group(d)),[]),Y(d,s,[t.value,t.heading,m]);let h=e.useMemo((()=>({id:d,forceMount:i})),[i]);return e.createElement(a.div,{ref:u(s,r),...c,"cmdk-group":"",role:"presentation",hidden:!v||void 0},n&&e.createElement("div",{ref:m,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),ee(t,(t=>e.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},e.createElement(L.Provider,{value:h},t)))))})),K=e.forwardRef(((t,r)=>{let{alwaysRender:n,...l}=t,o=e.useRef(null),i=X((e=>!e.search));return n||i?e.createElement(a.div,{ref:u(o,r),...l,"cmdk-separator":"",role:"separator"}):null})),O=e.forwardRef(((t,r)=>{let{onValueChange:n,...l}=t,o=null!=t.value,u=D(),i=X((e=>e.search)),c=X((e=>e.selectedItemId)),d=j();return e.useEffect((()=>{null!=t.value&&u.setState("search",t.value)}),[t.value]),e.createElement(a.input,{ref:r,...l,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":d.listId,"aria-labelledby":d.labelId,"aria-activedescendant":c,id:d.inputId,type:"text",value:o?t.value:i,onChange:e=>{o||u.setState("search",e.target.value),null==n||n(e.target.value)}})})),V=e.forwardRef(((t,r)=>{let{children:n,label:l="Suggestions",...o}=t,i=e.useRef(null),c=e.useRef(null),d=X((e=>e.selectedItemId)),s=j();return e.useEffect((()=>{if(c.current&&i.current){let e,t=c.current,r=i.current,n=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;r.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return n.observe(t),()=>{cancelAnimationFrame(e),n.unobserve(t)}}}),[]),e.createElement(a.div,{ref:u(i,r),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":l,id:s.listId},ee(t,(t=>e.createElement("div",{ref:u(c,s.listInnerRef),"cmdk-list-sizer":""},t))))})),z=e.forwardRef(((a,o)=>{let{open:u,onOpenChange:i,overlayClassName:c,contentClassName:d,container:s,...m}=a;return e.createElement(t,{open:u,onOpenChange:i},e.createElement(r,{container:s},e.createElement(n,{"cmdk-overlay":"",className:c}),e.createElement(l,{"aria-label":a.label,"cmdk-dialog":"",className:d},e.createElement($,{ref:o,...m}))))})),B=e.forwardRef(((t,r)=>X((e=>0===e.filtered.count))?e.createElement(a.div,{ref:r,...t,"cmdk-empty":"",role:"presentation"}):null)),G=e.forwardRef(((t,r)=>{let{progress:n,children:l,label:o="Loading...",...u}=t;return e.createElement(a.div,{ref:r,...u,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ee(t,(t=>e.createElement("div",{"aria-hidden":!0},t))))})),H=Object.assign($,{List:V,Item:q,Input:O,Group:F,Separator:K,Dialog:z,Empty:B,Loading:G});function U(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function W(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function J(t){let r=e.useRef(t);return Q((()=>{r.current=t})),r}var Q="undefined"==typeof window?e.useEffect:e.useLayoutEffect;function T(t){let r=e.useRef();return void 0===r.current&&(r.current=t()),r}function X(t){let r=D(),n=()=>t(r.snapshot());return e.useSyncExternalStore(r.subscribe,n,n)}function Y(t,r,n,l=[]){let a=e.useRef(),o=j();return Q((()=>{var e;let u=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():a.current}})(),i=l.map((e=>e.trim()));o.value(t,u,i),null==(e=r.current)||e.setAttribute(R,u),a.current=u})),a}var Z=()=>{let[t,r]=e.useState(),n=T((()=>new Map));return Q((()=>{n.current.forEach((e=>e())),n.current=new Map}),[t]),(e,t)=>{n.current.set(e,t),r({})}};function ee({asChild:t,children:r},n){return t&&e.isValidElement(r)?e.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(r),{ref:r.ref},n(r.props.children)):n(r)}var te={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function re({className:t,...r}){return e.createElement(H,{"data-slot":"command",className:i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...r})}function ne({title:t="Command Palette",description:r="Search for a command to run...",children:n,...l}){return e.createElement(c,l,e.createElement(d,{className:"sr-only"},e.createElement(s,null,t),e.createElement(m,null,r)),e.createElement(f,{className:"overflow-hidden p-0"},e.createElement(re,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"},n)))}function le({className:t,...r}){return e.createElement("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3"},e.createElement(v,{className:"size-4 shrink-0 opacity-50"}),e.createElement(H.Input,{"data-slot":"command-input",className:i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...r}))}function ae({className:t,...r}){return e.createElement(H.List,{"data-slot":"command-list",className:i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...r})}function oe({...t}){return e.createElement(H.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function ue({className:t,...r}){return e.createElement(H.Group,{"data-slot":"command-group",className:i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...r})}function ie({className:t,...r}){return e.createElement(H.Separator,{"data-slot":"command-separator",className:i("bg-border -mx-1 h-px",t),...r})}function ce({className:t,...r}){return e.createElement(H.Item,{"data-slot":"command-item",className:i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r})}function de({className:t,...r}){return e.createElement("span",{"data-slot":"command-shortcut",className:i("text-muted-foreground ml-auto text-xs tracking-widest",t),...r})}export{re as C,v as S,ne as a,le as b,ae as c,oe as d,ue as e,ce as f,de as g,ie as h};
|
2
|
+
//# sourceMappingURL=command-eoEJKrZQ.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"command-eoEJKrZQ.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/search.js","../../node_modules/cmdk/dist/chunk-NZJY6EH4.mjs","../../node_modules/cmdk/dist/index.mjs","../../src/components/ui/command/command.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: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n [\"path\", { d: \"m21 21-4.3-4.3\", key: \"1qie3q\" }]\n];\nconst Search = createLucideIcon(\"Search\", __iconNode);\n\nexport { __iconNode, Search as default };\n//# sourceMappingURL=search.js.map\n","var U=1,Y=.9,H=.8,J=.17,p=.1,u=.999,$=.9999;var k=.99,m=/[\\\\\\/_+.#\"@\\[\\(\\{&]/,B=/[\\\\\\/_+.#\"@\\[\\(\\{&]/g,K=/[\\s-]/,X=/[\\s-]/g;function G(_,C,h,P,A,f,O){if(f===C.length)return A===_.length?U:k;var T=`${A},${f}`;if(O[T]!==void 0)return O[T];for(var L=P.charAt(f),c=h.indexOf(L,A),S=0,E,N,R,M;c>=0;)E=G(_,C,h,P,c+1,f+1,O),E>S&&(c===A?E*=U:m.test(_.charAt(c-1))?(E*=H,R=_.slice(A,c-1).match(B),R&&A>0&&(E*=Math.pow(u,R.length))):K.test(_.charAt(c-1))?(E*=Y,M=_.slice(A,c-1).match(X),M&&A>0&&(E*=Math.pow(u,M.length))):(E*=J,A>0&&(E*=Math.pow(u,c-A))),_.charAt(c)!==C.charAt(f)&&(E*=$)),(E<p&&h.charAt(c-1)===P.charAt(f+1)||P.charAt(f+1)===P.charAt(f)&&h.charAt(c-1)!==P.charAt(f))&&(N=G(_,C,h,P,c+1,f+2,O),N*p>E&&(E=N*p)),E>S&&(S=E),c=h.indexOf(L,c+1);return O[T]=S,S}function D(_){return _.toLowerCase().replace(X,\" \")}function W(_,C,h){return _=h&&h.length>0?`${_+\" \"+h.join(\" \")}`:_,G(_,C,D(_),D(C),0,0,{})}export{W as a};\n","\"use client\";import{a as ae}from\"./chunk-NZJY6EH4.mjs\";import*as w from\"@radix-ui/react-dialog\";import*as t from\"react\";import{Primitive as D}from\"@radix-ui/react-primitive\";import{useId as H}from\"@radix-ui/react-id\";import{composeRefs as G}from\"@radix-ui/react-compose-refs\";var N='[cmdk-group=\"\"]',Y='[cmdk-group-items=\"\"]',be='[cmdk-group-heading=\"\"]',le='[cmdk-item=\"\"]',ce=`${le}:not([aria-disabled=\"true\"])`,Z=\"cmdk-item-select\",T=\"data-value\",Re=(r,o,n)=>ae(r,o,n),ue=t.createContext(void 0),K=()=>t.useContext(ue),de=t.createContext(void 0),ee=()=>t.useContext(de),fe=t.createContext(void 0),me=t.forwardRef((r,o)=>{let n=L(()=>{var e,a;return{search:\"\",value:(a=(e=r.value)!=null?e:r.defaultValue)!=null?a:\"\",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),u=L(()=>new Set),c=L(()=>new Map),d=L(()=>new Map),f=L(()=>new Set),p=pe(r),{label:b,children:m,value:R,onValueChange:x,filter:C,shouldFilter:S,loop:A,disablePointerSelection:ge=!1,vimBindings:j=!0,...O}=r,$=H(),q=H(),_=H(),I=t.useRef(null),v=ke();k(()=>{if(R!==void 0){let e=R.trim();n.current.value=e,E.emit()}},[R]),k(()=>{v(6,ne)},[]);let E=t.useMemo(()=>({subscribe:e=>(f.current.add(e),()=>f.current.delete(e)),snapshot:()=>n.current,setState:(e,a,s)=>{var i,l,g,y;if(!Object.is(n.current[e],a)){if(n.current[e]=a,e===\"search\")J(),z(),v(1,W);else if(e===\"value\"){if(document.activeElement.hasAttribute(\"cmdk-input\")||document.activeElement.hasAttribute(\"cmdk-root\")){let h=document.getElementById(_);h?h.focus():(i=document.getElementById($))==null||i.focus()}if(v(7,()=>{var h;n.current.selectedItemId=(h=M())==null?void 0:h.id,E.emit()}),s||v(5,ne),((l=p.current)==null?void 0:l.value)!==void 0){let h=a!=null?a:\"\";(y=(g=p.current).onValueChange)==null||y.call(g,h);return}}E.emit()}},emit:()=>{f.current.forEach(e=>e())}}),[]),U=t.useMemo(()=>({value:(e,a,s)=>{var i;a!==((i=d.current.get(e))==null?void 0:i.value)&&(d.current.set(e,{value:a,keywords:s}),n.current.filtered.items.set(e,te(a,s)),v(2,()=>{z(),E.emit()}))},item:(e,a)=>(u.current.add(e),a&&(c.current.has(a)?c.current.get(a).add(e):c.current.set(a,new Set([e]))),v(3,()=>{J(),z(),n.current.value||W(),E.emit()}),()=>{d.current.delete(e),u.current.delete(e),n.current.filtered.items.delete(e);let s=M();v(4,()=>{J(),(s==null?void 0:s.getAttribute(\"id\"))===e&&W(),E.emit()})}),group:e=>(c.current.has(e)||c.current.set(e,new Set),()=>{d.current.delete(e),c.current.delete(e)}),filter:()=>p.current.shouldFilter,label:b||r[\"aria-label\"],getDisablePointerSelection:()=>p.current.disablePointerSelection,listId:$,inputId:_,labelId:q,listInnerRef:I}),[]);function te(e,a){var i,l;let s=(l=(i=p.current)==null?void 0:i.filter)!=null?l:Re;return e?s(e,n.current.search,a):0}function z(){if(!n.current.search||p.current.shouldFilter===!1)return;let e=n.current.filtered.items,a=[];n.current.filtered.groups.forEach(i=>{let l=c.current.get(i),g=0;l.forEach(y=>{let h=e.get(y);g=Math.max(h,g)}),a.push([i,g])});let s=I.current;V().sort((i,l)=>{var h,F;let g=i.getAttribute(\"id\"),y=l.getAttribute(\"id\");return((h=e.get(y))!=null?h:0)-((F=e.get(g))!=null?F:0)}).forEach(i=>{let l=i.closest(Y);l?l.appendChild(i.parentElement===l?i:i.closest(`${Y} > *`)):s.appendChild(i.parentElement===s?i:i.closest(`${Y} > *`))}),a.sort((i,l)=>l[1]-i[1]).forEach(i=>{var g;let l=(g=I.current)==null?void 0:g.querySelector(`${N}[${T}=\"${encodeURIComponent(i[0])}\"]`);l==null||l.parentElement.appendChild(l)})}function W(){let e=V().find(s=>s.getAttribute(\"aria-disabled\")!==\"true\"),a=e==null?void 0:e.getAttribute(T);E.setState(\"value\",a||void 0)}function J(){var a,s,i,l;if(!n.current.search||p.current.shouldFilter===!1){n.current.filtered.count=u.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let g of u.current){let y=(s=(a=d.current.get(g))==null?void 0:a.value)!=null?s:\"\",h=(l=(i=d.current.get(g))==null?void 0:i.keywords)!=null?l:[],F=te(y,h);n.current.filtered.items.set(g,F),F>0&&e++}for(let[g,y]of c.current)for(let h of y)if(n.current.filtered.items.get(h)>0){n.current.filtered.groups.add(g);break}n.current.filtered.count=e}function ne(){var a,s,i;let e=M();e&&(((a=e.parentElement)==null?void 0:a.firstChild)===e&&((i=(s=e.closest(N))==null?void 0:s.querySelector(be))==null||i.scrollIntoView({block:\"nearest\"})),e.scrollIntoView({block:\"nearest\"}))}function M(){var e;return(e=I.current)==null?void 0:e.querySelector(`${le}[aria-selected=\"true\"]`)}function V(){var e;return Array.from(((e=I.current)==null?void 0:e.querySelectorAll(ce))||[])}function X(e){let s=V()[e];s&&E.setState(\"value\",s.getAttribute(T))}function Q(e){var g;let a=M(),s=V(),i=s.findIndex(y=>y===a),l=s[i+e];(g=p.current)!=null&&g.loop&&(l=i+e<0?s[s.length-1]:i+e===s.length?s[0]:s[i+e]),l&&E.setState(\"value\",l.getAttribute(T))}function re(e){let a=M(),s=a==null?void 0:a.closest(N),i;for(;s&&!i;)s=e>0?we(s,N):De(s,N),i=s==null?void 0:s.querySelector(ce);i?E.setState(\"value\",i.getAttribute(T)):Q(e)}let oe=()=>X(V().length-1),ie=e=>{e.preventDefault(),e.metaKey?oe():e.altKey?re(1):Q(1)},se=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?re(-1):Q(-1)};return t.createElement(D.div,{ref:o,tabIndex:-1,...O,\"cmdk-root\":\"\",onKeyDown:e=>{var s;(s=O.onKeyDown)==null||s.call(O,e);let a=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||a))switch(e.key){case\"n\":case\"j\":{j&&e.ctrlKey&&ie(e);break}case\"ArrowDown\":{ie(e);break}case\"p\":case\"k\":{j&&e.ctrlKey&&se(e);break}case\"ArrowUp\":{se(e);break}case\"Home\":{e.preventDefault(),X(0);break}case\"End\":{e.preventDefault(),oe();break}case\"Enter\":{e.preventDefault();let i=M();if(i){let l=new Event(Z);i.dispatchEvent(l)}}}}},t.createElement(\"label\",{\"cmdk-label\":\"\",htmlFor:U.inputId,id:U.labelId,style:Te},b),B(r,e=>t.createElement(de.Provider,{value:E},t.createElement(ue.Provider,{value:U},e))))}),he=t.forwardRef((r,o)=>{var _,I;let n=H(),u=t.useRef(null),c=t.useContext(fe),d=K(),f=pe(r),p=(I=(_=f.current)==null?void 0:_.forceMount)!=null?I:c==null?void 0:c.forceMount;k(()=>{if(!p)return d.item(n,c==null?void 0:c.id)},[p]);let b=ve(n,u,[r.value,r.children,u],r.keywords),m=ee(),R=P(v=>v.value&&v.value===b.current),x=P(v=>p||d.filter()===!1?!0:v.search?v.filtered.items.get(n)>0:!0);t.useEffect(()=>{let v=u.current;if(!(!v||r.disabled))return v.addEventListener(Z,C),()=>v.removeEventListener(Z,C)},[x,r.onSelect,r.disabled]);function C(){var v,E;S(),(E=(v=f.current).onSelect)==null||E.call(v,b.current)}function S(){m.setState(\"value\",b.current,!0)}if(!x)return null;let{disabled:A,value:ge,onSelect:j,forceMount:O,keywords:$,...q}=r;return t.createElement(D.div,{ref:G(u,o),...q,id:n,\"cmdk-item\":\"\",role:\"option\",\"aria-disabled\":!!A,\"aria-selected\":!!R,\"data-disabled\":!!A,\"data-selected\":!!R,onPointerMove:A||d.getDisablePointerSelection()?void 0:S,onClick:A?void 0:C},r.children)}),Ee=t.forwardRef((r,o)=>{let{heading:n,children:u,forceMount:c,...d}=r,f=H(),p=t.useRef(null),b=t.useRef(null),m=H(),R=K(),x=P(S=>c||R.filter()===!1?!0:S.search?S.filtered.groups.has(f):!0);k(()=>R.group(f),[]),ve(f,p,[r.value,r.heading,b]);let C=t.useMemo(()=>({id:f,forceMount:c}),[c]);return t.createElement(D.div,{ref:G(p,o),...d,\"cmdk-group\":\"\",role:\"presentation\",hidden:x?void 0:!0},n&&t.createElement(\"div\",{ref:b,\"cmdk-group-heading\":\"\",\"aria-hidden\":!0,id:m},n),B(r,S=>t.createElement(\"div\",{\"cmdk-group-items\":\"\",role:\"group\",\"aria-labelledby\":n?m:void 0},t.createElement(fe.Provider,{value:C},S))))}),ye=t.forwardRef((r,o)=>{let{alwaysRender:n,...u}=r,c=t.useRef(null),d=P(f=>!f.search);return!n&&!d?null:t.createElement(D.div,{ref:G(c,o),...u,\"cmdk-separator\":\"\",role:\"separator\"})}),Se=t.forwardRef((r,o)=>{let{onValueChange:n,...u}=r,c=r.value!=null,d=ee(),f=P(m=>m.search),p=P(m=>m.selectedItemId),b=K();return t.useEffect(()=>{r.value!=null&&d.setState(\"search\",r.value)},[r.value]),t.createElement(D.input,{ref:o,...u,\"cmdk-input\":\"\",autoComplete:\"off\",autoCorrect:\"off\",spellCheck:!1,\"aria-autocomplete\":\"list\",role:\"combobox\",\"aria-expanded\":!0,\"aria-controls\":b.listId,\"aria-labelledby\":b.labelId,\"aria-activedescendant\":p,id:b.inputId,type:\"text\",value:c?r.value:f,onChange:m=>{c||d.setState(\"search\",m.target.value),n==null||n(m.target.value)}})}),Ce=t.forwardRef((r,o)=>{let{children:n,label:u=\"Suggestions\",...c}=r,d=t.useRef(null),f=t.useRef(null),p=P(m=>m.selectedItemId),b=K();return t.useEffect(()=>{if(f.current&&d.current){let m=f.current,R=d.current,x,C=new ResizeObserver(()=>{x=requestAnimationFrame(()=>{let S=m.offsetHeight;R.style.setProperty(\"--cmdk-list-height\",S.toFixed(1)+\"px\")})});return C.observe(m),()=>{cancelAnimationFrame(x),C.unobserve(m)}}},[]),t.createElement(D.div,{ref:G(d,o),...c,\"cmdk-list\":\"\",role:\"listbox\",tabIndex:-1,\"aria-activedescendant\":p,\"aria-label\":u,id:b.listId},B(r,m=>t.createElement(\"div\",{ref:G(f,b.listInnerRef),\"cmdk-list-sizer\":\"\"},m)))}),xe=t.forwardRef((r,o)=>{let{open:n,onOpenChange:u,overlayClassName:c,contentClassName:d,container:f,...p}=r;return t.createElement(w.Root,{open:n,onOpenChange:u},t.createElement(w.Portal,{container:f},t.createElement(w.Overlay,{\"cmdk-overlay\":\"\",className:c}),t.createElement(w.Content,{\"aria-label\":r.label,\"cmdk-dialog\":\"\",className:d},t.createElement(me,{ref:o,...p}))))}),Ie=t.forwardRef((r,o)=>P(u=>u.filtered.count===0)?t.createElement(D.div,{ref:o,...r,\"cmdk-empty\":\"\",role:\"presentation\"}):null),Pe=t.forwardRef((r,o)=>{let{progress:n,children:u,label:c=\"Loading...\",...d}=r;return t.createElement(D.div,{ref:o,...d,\"cmdk-loading\":\"\",role:\"progressbar\",\"aria-valuenow\":n,\"aria-valuemin\":0,\"aria-valuemax\":100,\"aria-label\":c},B(r,f=>t.createElement(\"div\",{\"aria-hidden\":!0},f)))}),_e=Object.assign(me,{List:Ce,Item:he,Input:Se,Group:Ee,Separator:ye,Dialog:xe,Empty:Ie,Loading:Pe});function we(r,o){let n=r.nextElementSibling;for(;n;){if(n.matches(o))return n;n=n.nextElementSibling}}function De(r,o){let n=r.previousElementSibling;for(;n;){if(n.matches(o))return n;n=n.previousElementSibling}}function pe(r){let o=t.useRef(r);return k(()=>{o.current=r}),o}var k=typeof window==\"undefined\"?t.useEffect:t.useLayoutEffect;function L(r){let o=t.useRef();return o.current===void 0&&(o.current=r()),o}function P(r){let o=ee(),n=()=>r(o.snapshot());return t.useSyncExternalStore(o.subscribe,n,n)}function ve(r,o,n,u=[]){let c=t.useRef(),d=K();return k(()=>{var b;let f=(()=>{var m;for(let R of n){if(typeof R==\"string\")return R.trim();if(typeof R==\"object\"&&\"current\"in R)return R.current?(m=R.current.textContent)==null?void 0:m.trim():c.current}})(),p=u.map(m=>m.trim());d.value(r,f,p),(b=o.current)==null||b.setAttribute(T,f),c.current=f}),c}var ke=()=>{let[r,o]=t.useState(),n=L(()=>new Map);return k(()=>{n.current.forEach(u=>u()),n.current=new Map},[r]),(u,c)=>{n.current.set(u,c),o({})}};function Me(r){let o=r.type;return typeof o==\"function\"?o(r.props):\"render\"in o?o.render(r.props):r}function B({asChild:r,children:o},n){return r&&t.isValidElement(o)?t.cloneElement(Me(o),{ref:o.ref},n(o.props.children)):n(o)}var Te={position:\"absolute\",width:\"1px\",height:\"1px\",padding:\"0\",margin:\"-1px\",overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",borderWidth:\"0\"};export{_e as Command,xe as CommandDialog,Ie as CommandEmpty,Ee as CommandGroup,Se as CommandInput,he as CommandItem,Ce as CommandList,Pe as CommandLoading,me as CommandRoot,ye as CommandSeparator,Re as defaultFilter,P as useCommandState};\n","import * as React from \"react\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { SearchIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/components/ui/dialog\"\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n \"bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string\n description?: string\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent className=\"overflow-hidden p-0\">\n <Command className=\"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot=\"command-input-wrapper\"\n className=\"flex h-9 items-center gap-2 border-b px-3\"\n >\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n )\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n \"max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n )\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n \"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"bg-border -mx-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n"],"names":["Search","createLucideIcon","cx","cy","r","key","d","u","m","B","K","X","G","_","C","h","P","A","f","O","length","T","E","N","R","M","L","charAt","c","indexOf","S","test","slice","match","Math","pow","D","toLowerCase","replace","W","join","Y","le","ce","Z","Re","o","n","ae","ue","t","createContext","useContext","de","ee","fe","me","forwardRef","e","a","search","value","defaultValue","selectedItemId","filtered","count","items","Map","groups","Set","p","pe","label","b","children","onValueChange","x","filter","shouldFilter","loop","disablePointerSelection","ge","vimBindings","j","$","H","q","I","useRef","v","ke","k","trim","current","emit","ne","useMemo","subscribe","add","delete","snapshot","setState","s","i","l","g","y","Object","is","J","z","document","activeElement","hasAttribute","getElementById","focus","id","call","forEach","U","get","set","keywords","te","item","has","getAttribute","group","getDisablePointerSelection","listId","inputId","labelId","listInnerRef","max","push","V","sort","F","closest","appendChild","parentElement","querySelector","encodeURIComponent","find","size","firstChild","scrollIntoView","block","Array","from","querySelectorAll","Q","findIndex","re","we","De","oe","ie","preventDefault","metaKey","altKey","se","createElement","div","ref","tabIndex","onKeyDown","nativeEvent","isComposing","keyCode","defaultPrevented","ctrlKey","Event","dispatchEvent","htmlFor","style","Te","Provider","he","forceMount","ve","onSelect","useEffect","disabled","addEventListener","removeEventListener","role","onPointerMove","onClick","Ee","heading","hidden","ye","alwaysRender","Se","input","autoComplete","autoCorrect","spellCheck","type","onChange","target","Ce","ResizeObserver","requestAnimationFrame","offsetHeight","setProperty","toFixed","observe","cancelAnimationFrame","unobserve","xe","open","onOpenChange","overlayClassName","contentClassName","container","w","className","Ie","Pe","progress","_e","assign","List","Item","Input","Group","Separator","Dialog","Empty","Loading","nextElementSibling","matches","previousElementSibling","window","useLayoutEffect","useSyncExternalStore","textContent","map","setAttribute","useState","asChild","isValidElement","cloneElement","props","render","Me","position","width","height","padding","margin","overflow","clip","whiteSpace","borderWidth","Command","React","CommandPrimitive","data-slot","cn","CommandDialog","title","description","DialogHeader","DialogTitle","DialogDescription","DialogContent","CommandInput","SearchIcon","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut","span"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AhG,cAACiG,EAAiB/B,UAAS,CACzBgC,YAAU,oBACV1C,UAAW2C,EAAG,uBAAwB3C,MAClC2B,GAGV,CAEA,SAAS8B,IAAYzD,UACnBA,KACG2B,IAEH,OACEa,EAAAhG,cAACiG,EAAiBlC,KAAI,CACpBmC,YAAU,eACV1C,UAAW2C,EACT,sYACA3C,MAEE2B,GAGV,CAEA,SAAS+B,IAAgB1D,UACvBA,KACG2B,IAEH,OACEa,EAACmB,cAAAA,OAAAA,CACCjB,YAAU,mBACV1C,UAAW2C,EACT,wDACA3C,MAEE2B,GAGV","x_google_ignoreList":[0,1,2]}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import{forwardRef as e,createElement as r}from"react";
|
2
|
+
/**
|
3
|
+
* @license lucide-react v0.479.0 - ISC
|
4
|
+
*
|
5
|
+
* This source code is licensed under the ISC license.
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
7
|
+
*/const o=(...e)=>e.filter(((e,r,o)=>Boolean(e)&&""!==e.trim()&&o.indexOf(e)===r)).join(" ").trim()
|
8
|
+
/**
|
9
|
+
* @license lucide-react v0.479.0 - ISC
|
10
|
+
*
|
11
|
+
* This source code is licensed under the ISC license.
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
13
|
+
*/;var t={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const i=e((({color:e="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:n="",children:c,iconNode:l,...d},m)=>r("svg",{ref:m,...t,width:i,height:i,stroke:e,strokeWidth:a?24*Number(s)/Number(i):s,className:o("lucide",n),...d},[...l.map((([e,o])=>r(e,o))),...Array.isArray(c)?c:[c]]))),s=(t,s)=>{const a=e((({className:e,...a},n)=>{return r(i,{ref:n,iconNode:s,className:o(`lucide-${c=t,c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,e),...a});var c}));return a.displayName=`${t}`,a};export{s as c};
|
14
|
+
//# sourceMappingURL=createLucideIcon-CIn9dHnW.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"createLucideIcon-CIn9dHnW.mjs","sources":["../../node_modules/lucide-react/dist/esm/shared/src/utils.js","../../node_modules/lucide-react/dist/esm/defaultAttributes.js","../../node_modules/lucide-react/dist/esm/Icon.js","../../node_modules/lucide-react/dist/esm/createLucideIcon.js"],"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\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\n\nexport { mergeClasses, toKebabCase };\n//# sourceMappingURL=utils.js.map\n","/**\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\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\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 { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => {\n return createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n );\n }\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\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 { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props\n })\n );\n Component.displayName = `${iconName}`;\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n"],"names":["mergeClasses","classes","filter","className","index","array","Boolean","trim","indexOf","join","defaultAttributes","xmlns","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","Icon","forwardRef","color","size","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","Number","map","tag","attrs","Array","isArray","createLucideIcon","iconName","Component","props","string","replace","toLowerCase","displayName"],"mappings":";;;;;;GAQa,MAgCAA,EAAe,IAA2CC,IACrEA,EACGC,QAAO,CAACC,EAAWC,EAAOC,IAEvBC,QAAQH,IACyB,KAAhCA,EAAqBI,QACtBF,EAAMG,QAAQL,KAAeC,IAGhCK,KAAK,KACLF;;;;;;IClDL,IAAeG,EAAA,CACbC,MAAO,6BACPC,MAAO,GACPC,OAAQ,GACRC,QAAS,YACTC,KAAM,OACNC,OAAQ,eACRC,YAAa,EACbC,cAAe,QACfC,eAAgB,SCelB,MAAMC,EAAOC,GAAA,EAGPC,QAAQ,eACRC,OAAO,GACPN,cAAc,EACdO,sBACArB,YAAY,GACZsB,WACAC,cACGC,GAELC,IAEOC,EAAA,MAEL,CACED,SACGlB,EACHE,MAAOW,EACPV,OAAQU,EACRP,OAAQM,EACRL,YAAaO,EAA6C,GAAtBM,OAAOb,GAAqBa,OAAOP,GAAQN,EAC/Ed,UAAWH,EAAa,SAAUG,MAC/BwB,GAEL,IACKD,EAASK,KAAI,EAAEC,EAAKC,KAAWJ,EAAcG,EAAKC,QACjDC,MAAMC,QAAQV,GAAYA,EAAW,CAACA,OCzC5CW,EAAmB,CAACC,EAAkBX,KAC1C,MAAMY,EAAYjB,GAAA,EAA0ClB,eAAcoC,GAASX,KACjFC,SAAcT,EAAM,CAClBQ,MACAF,WACAvB,UAAWH,EAAa,UHRFwC,EGQwBH,EHPlDG,EAAOC,QAAQ,qBAAsB,SAASC,gBGOiBvC,MACxDoC,IHTkB,IAACC,CGUvB,IAKI,OAFGF,EAAAK,YAAc,GAAGN,IAEpBC,CAAA","x_google_ignoreList":[0,1,2,3]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{R as a,C as t,a as s,D as o,O as n,P as l,T as r,b as d}from"./index-CluuXDB_.mjs";import{c as i}from"./utils-jIFl11as.mjs";import{X as c}from"./x-xnz0lTd-.mjs";function m({...t}){return e.createElement(a,{"data-slot":"dialog",...t})}function u({...a}){return e.createElement(d,{"data-slot":"dialog-trigger",...a})}function f({...a}){return e.createElement(l,{"data-slot":"dialog-portal",...a})}function g({...a}){return e.createElement(t,{"data-slot":"dialog-close",...a})}function p({className:a,...t}){return e.createElement(n,{"data-slot":"dialog-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",a),...t})}function x({className:a,children:o,...n}){return e.createElement(f,{"data-slot":"dialog-portal"},e.createElement(p,null),e.createElement(s,{"data-slot":"dialog-content",className:i("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...n},o,e.createElement(t,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"},e.createElement(c,null),e.createElement("span",{className:"sr-only"},"Close"))))}function E({className:a,...t}){return e.createElement("div",{"data-slot":"dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",a),...t})}function N({className:a,...t}){return e.createElement("div",{"data-slot":"dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...t})}function b({className:a,...t}){return e.createElement(r,{"data-slot":"dialog-title",className:i("text-lg leading-none font-semibold",a),...t})}function v({className:a,...t}){return e.createElement(o,{"data-slot":"dialog-description",className:i("text-muted-foreground text-sm",a),...t})}export{m as D,g as a,x as b,v as c,N as d,E as e,p as f,f as g,b as h,u as i};
|
2
|
+
//# sourceMappingURL=dialog-TKsk0Iu2.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"dialog-TKsk0Iu2.mjs","sources":["../../src/components/ui/dialog/dialog.tsx"],"sourcesContent":["import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { XIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content>) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\">\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","props","React","createElement","DialogPrimitive","data-slot","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","cn","DialogContent","children","XIcon","span","DialogHeader","div","DialogFooter","DialogTitle","DialogDescription"],"mappings":"gMAMA,SAASA,MACJC,IAEH,OAAOC,EAAAC,cAACC,EAAoB,CAACC,YAAU,YAAaJ,GACtD,CAEA,SAASK,MACJL,IAEH,OAAOC,EAAAC,cAACC,EAAuB,CAACC,YAAU,oBAAqBJ,GACjE,CAEA,SAASM,MACJN,IAEH,OAAOC,EAAAC,cAACC,EAAsB,CAACC,YAAU,mBAAoBJ,GAC/D,CAEA,SAASO,MACJP,IAEH,OAAOC,EAAAC,cAACC,EAAqB,CAACC,YAAU,kBAAmBJ,GAC7D,CAEA,SAASQ,GAAcC,UACrBA,KACGT,IAEH,OACEC,EAAAC,cAACC,EAAuB,CACtBC,YAAU,iBACVK,UAAWC,EACT,yJACAD,MAEET,GAGV,CAEA,SAASW,GAAcF,UACrBA,EAASG,SACTA,KACGZ,IAEH,OACEC,EAACK,cAAAA,EAAAA,CAAaF,YAAU,iBACtBH,EAACO,cAAAA,EAAAA,MACDP,EAACE,cAAAA,EAAuB,CACtBC,YAAU,iBACVK,UAAWC,EACT,8WACAD,MAEET,GAEHY,EACDX,EAAAC,cAACC,EAAqB,CAACM,UAAU,qWAC/BR,EAAAC,cAACW,QACDZ,EAACa,cAAAA,OAAAA,CAAKL,UAAU,WAAU,WAKpC,CAEA,SAASM,GAAaN,UAAEA,KAAcT,IACpC,OACEC,EAACe,cAAAA,MAAAA,CACCZ,YAAU,gBACVK,UAAWC,EAAG,+CAAgDD,MAC1DT,GAGV,CAEA,SAASiB,GAAaR,UAAEA,KAAcT,IACpC,OACEC,EAACe,cAAAA,MAAAA,CACCZ,YAAU,gBACVK,UAAWC,EACT,yDACAD,MAEET,GAGV,CAEA,SAASkB,GAAYT,UACnBA,KACGT,IAEH,OACEC,EAAAC,cAACC,EAAqB,CACpBC,YAAU,eACVK,UAAWC,EAAG,qCAAsCD,MAChDT,GAGV,CAEA,SAASmB,GAAkBV,UACzBA,KACGT,IAEH,OACEC,EAAAC,cAACC,EAA2B,CAC1BC,YAAU,qBACVK,UAAWC,EAAG,gCAAiCD,MAC3CT,GAGV"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as r from"react";import{P as a}from"./index-DxtdpBCb.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-B98y16WE.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-B98y16WE.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]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-BpJwNLRW.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]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{c as o,u as r,a as t}from"./index-CX5r7IKM.mjs";import{createCollection as n}from"@radix-ui/react-collection";import{c as a}from"./index-CCYyT_rk.mjs";import{u as s}from"./index-Db2NO0t8.mjs";import{P as i}from"./index-DxtdpBCb.mjs";import{u}from"./index-D-s-TbR3.mjs";import{u as c}from"./index-BpJwNLRW.mjs";import{jsx as l}from"react/jsx-runtime";var f="rovingFocusGroup.onEntryFocus",d={bubbles:!1,cancelable:!0},p="RovingFocusGroup",[m,v,b]=n(p),[w,g]=a(p,[b]),[F,I]=w(p),R=e.forwardRef(((e,o)=>l(m.Provider,{scope:e.__scopeRovingFocusGroup,children:l(m.Slot,{scope:e.__scopeRovingFocusGroup,children:l(h,{...e,ref:o})})})));R.displayName=p;var h=e.forwardRef(((n,a)=>{const{__scopeRovingFocusGroup:s,orientation:p,loop:m=!1,dir:b,currentTabStopId:w,defaultCurrentTabStopId:g,onCurrentTabStopIdChange:I,onEntryFocus:R,preventScrollOnEntryFocus:h=!1,...y}=n,x=e.useRef(null),A=r(a,x),T=c(b),[E=null,D]=u({prop:w,defaultProp:g,onChange:I}),[C,_]=e.useState(!1),j=t(R),G=v(s),K=e.useRef(!1),[k,L]=e.useState(0);return e.useEffect((()=>{const e=x.current;if(e)return e.addEventListener(f,j),()=>e.removeEventListener(f,j)}),[j]),l(F,{scope:s,orientation:p,dir:T,loop:m,currentTabStopId:E,onItemFocus:e.useCallback((e=>D(e)),[D]),onItemShiftTab:e.useCallback((()=>_(!0)),[]),onFocusableItemAdd:e.useCallback((()=>L((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>L((e=>e-1))),[]),children:l(i.div,{tabIndex:C||0===k?-1:0,"data-orientation":p,...y,ref:A,style:{outline:"none",...n.style},onMouseDown:o(n.onMouseDown,(()=>{K.current=!0})),onFocus:o(n.onFocus,(e=>{const o=!K.current;if(e.target===e.currentTarget&&o&&!C){const o=new CustomEvent(f,d);if(e.currentTarget.dispatchEvent(o),!o.defaultPrevented){const e=G().filter((e=>e.focusable));S([e.find((e=>e.active)),e.find((e=>e.id===E)),...e].filter(Boolean).map((e=>e.ref.current)),h)}}K.current=!1})),onBlur:o(n.onBlur,(()=>_(!1)))})})})),y="RovingFocusGroupItem",x=e.forwardRef(((r,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:u=!1,tabStopId:c,...f}=r,d=s(),p=c||d,b=I(y,n),w=b.currentTabStopId===p,g=v(n),{onFocusableItemAdd:F,onFocusableItemRemove:R}=b;return e.useEffect((()=>{if(a)return F(),()=>R()}),[a,F,R]),l(m.ItemSlot,{scope:n,id:p,focusable:a,active:u,children:l(i.span,{tabIndex:w?0:-1,"data-orientation":b.orientation,...f,ref:t,onMouseDown:o(r.onMouseDown,(e=>{a?b.onItemFocus(p):e.preventDefault()})),onFocus:o(r.onFocus,(()=>b.onItemFocus(p))),onKeyDown:o(r.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void b.onItemShiftTab();if(e.target!==e.currentTarget)return;const o=function(e,o,r){const t=function(e,o){return"rtl"!==o?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===o&&["ArrowLeft","ArrowRight"].includes(t)||"horizontal"===o&&["ArrowUp","ArrowDown"].includes(t)?void 0:A[t]}(e,b.orientation,b.dir);if(void 0!==o){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=g().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===o)n.reverse();else if("prev"===o||"next"===o){"prev"===o&&n.reverse();const a=n.indexOf(e.currentTarget);n=b.loop?(t=a+1,(r=n).map(((e,o)=>r[(t+o)%r.length]))):n.slice(a+1)}setTimeout((()=>S(n)))}var r,t}))})})}));x.displayName=y;var A={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function S(e,o=!1){const r=document.activeElement;for(const t of e){if(t===r)return;if(t.focus({preventScroll:o}),document.activeElement!==r)return}}var T=R,E=x;export{E as I,T as R,g as c};
|
2
|
+
//# sourceMappingURL=index-C598HM8V.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-C598HM8V.mjs","sources":["../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","bubbles","cancelable","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","forwardRef","props","forwardedRef","jsx","Provider","scope","__scopeRovingFocusGroup","children","Slot","RovingFocusGroupImpl","ref","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","useRef","composedRefs","useComposedRefs","direction","useDirection","setCurrentTabStopId","useControllableState","prop","defaultProp","onChange","isTabbingBackOut","setIsTabbingBackOut","useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","useEffect","node","current","addEventListener","removeEventListener","onItemFocus","useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","Primitive","div","tabIndex","style","outline","onMouseDown","composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","focusFirst","find","active","id","Boolean","map","onBlur","ITEM_NAME","RovingFocusGroupItem","itemProps","autoId","useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","getDirectionAwareKey","includes","MAP_KEY_TO_FOCUS_INTENT","getFocusIntent","metaKey","ctrlKey","altKey","candidateNodes","reverse","currentIndex","indexOf","startIndex","array","_","index","length","slice","setTimeout","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","Root","Item"],"mappings":"6XAaA,IAAMA,EAAc,gCACdC,EAAgB,CAAEC,SAAS,EAAOC,YAAY,GAM9CC,EAAa,oBAGZC,EAAYC,EAAeC,GAAyBC,EAGzDJ,IAGKK,EAA+BC,GAA+BC,EACnEP,EACA,CAACG,KA+BIK,EAAqBC,GAC1BJ,EAAkDL,GAK9CU,EAAyBC,EAAAC,YAC7B,CAACC,EAA2CC,IAExCC,EAACd,EAAWe,SAAX,CAAoBC,MAAOJ,EAAMK,wBAChCC,SAAAJ,EAACd,EAAWmB,KAAX,CAAgBH,MAAOJ,EAAMK,wBAC5BC,SAAAJ,EAACM,EAAA,IAAyBR,EAAOS,IAAKR,UAOhDJ,EAAiBa,YAAcvB,EAgB/B,IAAMqB,EAA6BV,EAAAC,YAGjC,CAACC,EAA+CC,KAChD,MAAMI,wBACJA,EAAAM,YACAA,EAAAC,KACAA,GAAO,EAAAC,IACPA,EACAC,iBAAkBC,EAAAC,wBAClBA,EAAAC,yBACAA,EAAAC,aACAA,EAAAC,0BACAA,GAA4B,KACzBC,GACDpB,EACES,EAAYX,EAAAuB,OAAoC,MAChDC,EAA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,MAAMC,EAA6BC,SAASC,cAC5C,IAAA,MAAWC,KAAaL,EAAY,CAElC,GAAIK,IAAcH,EAA4B,OAE9C,GADAG,EAAUC,MAAM,CAAEL,kBACdE,SAASC,gBAAkBF,EAA4B,MAC7D,CACF,CAUA,IAAMK,EAAOjI,EACPkI,EAAO/C","x_google_ignoreList":[0]}
|
@@ -0,0 +1,2 @@
|
|
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-CCYyT_rk.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-CCYyT_rk.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,IAAIC,EAAyB,GA2C7B,MAAMC,EAA2B,KAC/B,MAAMC,EAAgBF,EAAgBG,KAAKtB,GAC5BE,EAAAJ,cAAcE,KAE7B,OAAO,SAAkBuB,GACvB,MAAMC,EAAWD,IAAQN,IAAcI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EAAUb,UAC3BG,CACT","x_google_ignoreList":[0]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";function n(e,n){if("function"==typeof e)return e(n);null!=e&&(e.current=n)}function t(...e){return t=>{let r=!1;const o=e.map((e=>{const o=n(e,t);return r||"function"!=typeof o||(r=!0),o}));if(r)return()=>{for(let t=0;t<o.length;t++){const r=o[t];"function"==typeof r?r():n(e[t],null)}}}}function r(...n){return e.useCallback(t(...n),n)}function o(e,n,{checkForDefaultPrevented:t=!0}={}){return function(r){if(e?.(r),!1===t||!r.defaultPrevented)return n?.(r)}}function u(n){const t=e.useRef(n);return e.useEffect((()=>{t.current=n})),e.useMemo((()=>(...e)=>t.current?.(...e)),[])}var i=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{};var s=n=>{const{present:t,children:o}=n,u=function(n){const[t,r]=e.useState(),o=e.useRef({}),u=e.useRef(n),s=e.useRef("none"),c=n?"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(o.current);s.current="mounted"===f?e:"none"}),[f]),i((()=>{const e=o.current,t=u.current;if(t!==n){const r=s.current,o=a(e);if(n)l("MOUNT");else if("none"===o||"none"===e?.display)l("UNMOUNT");else{l(t&&r!==o?"ANIMATION_OUT":"UNMOUNT")}u.current=n}}),[n,l]),i((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,r=r=>{const i=a(o.current).includes(r.animationName);if(r.target===t&&i&&(l("ANIMATION_END"),!u.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},i=e=>{e.target===t&&(s.current=a(o.current))};return t.addEventListener("animationstart",i),t.addEventListener("animationcancel",r),t.addEventListener("animationend",r),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",i),t.removeEventListener("animationcancel",r),t.removeEventListener("animationend",r)}}l("ANIMATION_END")}),[t,l]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(t),s="function"==typeof o?o({present:u.isPresent}):e.Children.only(o),c=r(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 o||u.isPresent?e.cloneElement(s,{ref:c}):null};function a(e){return e?.animationName||"none"}s.displayName="Presence";export{s as P,u as a,i as b,o as c,t as d,r as u};
|
2
|
+
//# sourceMappingURL=index-CX5r7IKM.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-CX5r7IKM.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-use-callback-ref/dist/index.mjs","../../node_modules/@radix-ui/react-use-layout-effect/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","// 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","\"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","useCallbackRef","callback","callbackRef","useRef","useEffect","useMemo","args","useLayoutEffect","Boolean","globalThis","document","Presence","props","present","children","presence","setNode","React2","useState","stylesRef","prevPresentRef","prevAnimationNameRef","initialState","state","send","useStateMachine","mounted","UNMOUNT","ANIMATION_OUT","unmountSuspended","MOUNT","ANIMATION_END","unmounted","currentAnimationName","getAnimationName","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":"wBAQA,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,GAERG,CAAA,IAOT,GAAIH,EACF,MAAO,KACL,IAAA,IAASI,EAAI,EAAGA,EAAIH,EAASI,OAAQD,IAAK,CACxC,MAAMD,EAAUF,EAASG,GACH,mBAAXD,EACTA,IAEAV,EAAOK,EAAKM,GAAI,KAEpB,EAEJ,CAEJ,CAMA,SAASE,KAAsBR,GAE7B,OAAaS,EAAAC,YAAYX,KAAeC,GAAOA,EACjD,CCzDA,SAASW,EACPC,EACAC,GACAC,yBAAEA,GAA2B,GAAS,IAEtC,OAAO,SAAqBC,GAG1B,GAFAH,IAAuBG,IAEU,IAA7BD,IAAwCC,EAA2BC,iBACrE,OAAOH,IAAkBE,EAE7B,CACF,CCNA,SAASE,EAAkDC,GACzD,MAAMC,EAAoBV,EAAAW,OAAOF,GAOjC,OALMT,EAAAY,WAAU,KACdF,EAAYrB,QAAUoB,CAAA,IAIXT,EAAAa,SAAQ,IAAO,IAAIC,IAASJ,EAAYrB,aAAayB,IAAa,GACjF,CCNMC,IAAAA,EAAkBC,QAAQC,YAAYC,UAAkBlB,EAAAe,gBAAkB,OCC1E,IAAAI,EAAqCC,IACzC,MAAMC,QAAEA,EAAAC,SAASA,GAAaF,EACxBG,EAmBR,SAAqBF,GACnB,MAAO7B,EAAMgC,GAAiBC,E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|
1
|
+
import*as e from"react";import{a as t,u as n,c as r,b as s}from"./index-CX5r7IKM.mjs";import{P as o,d as i}from"./index-DxtdpBCb.mjs";import{jsx as a}from"react/jsx-runtime";import u from"react-dom";var c,d="dismissableLayer.update",l="dismissableLayer.pointerDownOutside",f="dismissableLayer.focusOutside",v=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=e.forwardRef(((s,i)=>{const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:m,onPointerDownOutside:E,onFocusOutside:b,onInteractOutside:w,onDismiss:h,...D}=s,P=e.useContext(v),[L,C]=e.useState(null),O=L?.ownerDocument??globalThis?.document,[,g]=e.useState({}),x=n(i,(e=>C(e))),R=Array.from(P.layers),[T]=[...P.layersWithOutsidePointerEventsDisabled].slice(-1),k=R.indexOf(T),W=L?R.indexOf(L):-1,B=P.layersWithOutsidePointerEventsDisabled.size>0,S=W>=k,F=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){y(l,s,n,{discrete:!0})};const n={originalEvent:e};"touch"===e.pointerType?(r.removeEventListener("click",i.current),i.current=t,r.addEventListener("click",i.current,{once:!0})):t()}else r.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{r.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),r.removeEventListener("pointerdown",e),r.removeEventListener("click",i.current)}}),[r,s]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...P.branches].some((e=>e.contains(t)));S&&!n&&(E?.(e),w?.(e),e.defaultPrevented||h?.())}),O),z=function(n,r=globalThis?.document){const s=t(n),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){y(f,s,{originalEvent:e},{discrete:!1})}};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)}),[r,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...P.branches].some((e=>e.contains(t)))||(b?.(e),w?.(e),e.defaultPrevented||h?.())}),O);return function(n,r=globalThis?.document){const s=t(n);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&s(e)};return r.addEventListener("keydown",e,{capture:!0}),()=>r.removeEventListener("keydown",e,{capture:!0})}),[s,r])}((e=>{W===P.layers.size-1&&(m?.(e),!e.defaultPrevented&&h&&(e.preventDefault(),h()))}),O),e.useEffect((()=>{if(L)return u&&(0===P.layersWithOutsidePointerEventsDisabled.size&&(c=O.body.style.pointerEvents,O.body.style.pointerEvents="none"),P.layersWithOutsidePointerEventsDisabled.add(L)),P.layers.add(L),p(),()=>{u&&1===P.layersWithOutsidePointerEventsDisabled.size&&(O.body.style.pointerEvents=c)}}),[L,O,u,P]),e.useEffect((()=>()=>{L&&(P.layers.delete(L),P.layersWithOutsidePointerEventsDisabled.delete(L),p())}),[L,P]),e.useEffect((()=>{const e=()=>g({});return document.addEventListener(d,e),()=>document.removeEventListener(d,e)}),[]),a(o.div,{...D,ref:x,style:{pointerEvents:B?S?"auto":"none":void 0,...s.style},onFocusCapture:r(s.onFocusCapture,z.onFocusCapture),onBlurCapture:r(s.onBlurCapture,z.onBlurCapture),onPointerDownCapture:r(s.onPointerDownCapture,F.onPointerDownCapture)})}));m.displayName="DismissableLayer";var E=e.forwardRef(((t,r)=>{const s=e.useContext(v),i=e.useRef(null),u=n(r,i);return e.useEffect((()=>{const e=i.current;if(e)return s.branches.add(e),()=>{s.branches.delete(e)}}),[s.branches]),a(o.div,{...t,ref:u})}));function p(){const e=new CustomEvent(d);document.dispatchEvent(e)}function y(e,t,n,{discrete:r}){const s=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),r?i(s,o):s.dispatchEvent(o)}E.displayName="DismissableLayerBranch";var b=m,w=E,h=e.forwardRef(((t,n)=>{const{container:r,...i}=t,[c,d]=e.useState(!1);s((()=>d(!0)),[]);const l=r||c&&globalThis?.document?.body;return l?u.createPortal(a(o.div,{...i,ref:n}),l):null}));h.displayName="Portal";export{w as B,m as D,h as P,b as R};
|
2
|
+
//# sourceMappingURL=index-CXrD_SvM.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-CXrD_SvM.mjs","sources":["../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../../node_modules/@radix-ui/react-portal/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/dismissable-layer/src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/portal/src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["originalBodyPointerEvents","CONTEXT_UPDATE","POINTER_DOWN_OUTSIDE","FOCUS_OUTSIDE","DismissableLayerContext","React","createContext","layers","Set","layersWithOutsidePointerEventsDisabled","branches","DismissableLayer","forwardRef","props","forwardedRef","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","context","useContext","node","setNode","useState","ownerDocument","globalThis","document","force","composedRefs","useComposedRefs","Array","from","highestLayerWithOutsidePointerEventsDisabled","slice","highestLayerWithOutsidePointerEventsDisabledIndex","indexOf","index","isBodyPointerEventsDisabled","size","isPointerEventsEnabled","pointerDownOutside","handlePointerDownOutside","useCallbackRef","isPointerInsideReactTreeRef","useRef","handleClickRef","useEffect","handlePointerDown","event","target","current","handleAndDispatchPointerDownOutsideEvent","handleAndDispatchCustomEvent","eventDetail","discrete","originalEvent","pointerType","removeEventListener","addEventListener","once","timerId","window","setTimeout","clearTimeout","onPointerDownCapture","usePointerDownOutside","isPointerDownOnBranch","some","branch","contains","defaultPrevented","focusOutside","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","onFocusCapture","onBlurCapture","useFocusOutside","onEscapeKeyDownProp","handleKeyDown","key","capture","useEscapeKeydown","preventDefault","body","style","pointerEvents","add","dispatchUpdate","delete","handleUpdate","jsx","Primitive","div","ref","composeEventHandlers","displayName","DismissableLayerBranch","CustomEvent","dispatchEvent","name","handler","detail","bubbles","cancelable","dispatchDiscreteCustomEvent","Root","Branch","Portal","container","containerProp","portalProps","mounted","setMounted","useLayoutEffect","ReactDOM","createPortal"],"mappings":"uMAWA,IAKIA,EAJEC,EAAiB,0BACjBC,EAAuB,sCACvBC,EAAgB,gCAIhBC,EAAgCC,EAAAC,cAAc,CAClDC,OAAQ,IAAIC,IACZC,uCAAwC,IAAID,IAC5CE,SAAU,IAAIF,MAuCVG,EAAyBN,EAAAO,YAC7B,CAACC,EAAOC,KACN,MAAMC,4BACJA,GAA8B,EAAAC,gBAC9BA,EAAAC,qBACAA,EAAAC,eACAA,EAAAC,kBACAA,EAAAC,UACAA,KACGC,GACDR,EACES,EAAgBjB,EAAAkB,WAAWnB,IAC1BoB,EAAM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B,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]}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{useState as t}from"react";import{a as n,u as r}from"./index-CX5r7IKM.mjs";import{P as o}from"./index-DxtdpBCb.mjs";import{jsx as a}from"react/jsx-runtime";import{_ as c,a as i,b as u}from"./tslib.es6-Cx3xzITX.mjs";var s="focusScope.autoFocusOnMount",l="focusScope.autoFocusOnUnmount",d={bubbles:!1,cancelable:!0},f=e.forwardRef(((t,c)=>{const{loop:i=!1,trapped:u=!1,onMountAutoFocus:f,onUnmountAutoFocus:p,...y}=t,[E,b]=e.useState(null),w=n(f),S=n(p),C=e.useRef(null),k=r(c,(e=>b(e))),A=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(u){let e=function(e){if(A.paused||!E)return;const t=e.target;E.contains(t)?C.current=t:h(C.current,{select:!0})},t=function(e){if(A.paused||!E)return;const t=e.relatedTarget;null!==t&&(E.contains(t)||h(C.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&h(E)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return E&&r.observe(E,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[u,E,A.paused]),e.useEffect((()=>{if(E){g.add(A);const t=document.activeElement;if(!E.contains(t)){const n=new CustomEvent(s,d);E.addEventListener(s,w),E.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(h(r,{select:t}),document.activeElement!==n)return}((e=v(E),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&h(E))}return()=>{E.removeEventListener(s,w),setTimeout((()=>{const e=new CustomEvent(l,d);E.addEventListener(l,S),E.dispatchEvent(e),e.defaultPrevented||h(t??document.body,{select:!0}),E.removeEventListener(l,S),g.remove(A)}),0)}}var e}),[E,w,S,A]);const M=e.useCallback((e=>{if(!i&&!u)return;if(A.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[r,o]=function(e){const t=v(e),n=m(t,e),r=m(t.reverse(),e);return[n,r]}(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),i&&h(o,{select:!0})):(e.preventDefault(),i&&h(r,{select:!0})):n===t&&e.preventDefault()}}),[i,u,A.paused]);return a(o.div,{tabIndex:-1,...y,ref:k,onKeyDown:M})}));function v(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function m(e,t){for(const n of e)if(!p(n,{upTo:t}))return n}function p(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function h(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}f.displayName="FocusScope";var g=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=y(e,t),e.unshift(t)},remove(t){e=y(e,t),e[0]?.resume()}}}();function y(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var E=0;function b(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??w()),document.body.insertAdjacentElement("beforeend",e[1]??w()),E++,()=>{1===E&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),E--}}),[])}function w(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var S="right-scroll-bar-position",C="width-before-scroll-bar";function k(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var A="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,M=new WeakMap;function L(e,n){var r,o,a,c=(r=null,o=function(t){return e.forEach((function(e){return k(e,t)}))},(a=t((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}}))[0]).callback=o,a.facade);return A((function(){var t=M.get(c);if(t){var n=new Set(t),r=new Set(e),o=c.current;n.forEach((function(e){r.has(e)||k(e,null)})),r.forEach((function(e){n.has(e)||k(e,o)}))}M.set(c,e)}),[e]),c}function N(e){return e}var T=function(t){var n=t.sideCar,r=i(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,c({},r))};T.isSideCarExport=!0;var R=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=N);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},c=function(){return Promise.resolve().then(a)};c(),n={push:function(e){t.push(e),c()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=c({async:!0,ssr:!1},e),t}(),x=function(){},P=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:x,onWheelCapture:x,onTouchMoveCapture:x}),a=o[0],u=o[1],s=t.forwardProps,l=t.children,d=t.className,f=t.removeScrollBar,v=t.enabled,m=t.shards,p=t.sideCar,h=t.noIsolation,g=t.inert,y=t.allowPinchZoom,E=t.as,b=void 0===E?"div":E,w=t.gapMode,S=i(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,k=L([r,n]),A=c(c({},S),a);return e.createElement(e.Fragment,null,v&&e.createElement(C,{sideCar:R,removeScrollBar:f,shards:m,noIsolation:h,inert:g,setCallbacks:u,allowPinchZoom:!!y,lockRef:r,gapMode:w}),s?e.cloneElement(e.Children.only(l),c(c({},A),{ref:k})):e.createElement(b,c({},A,{className:d,ref:k}),l))}));P.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},P.classNames={fullWidth:C,zeroRight:S};function I(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var F=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=I())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},W=function(){var t,n=(t=F(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},_={left:0,top:0,right:0,gap:0},B=function(e){return parseInt(e||"",10)||0},D=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return _;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[B(n),B(r),B(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},K=W(),j="data-scroll-locked",X=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,i=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(i,"px ").concat(r,";\n }\n body[").concat(j,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(c,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(i,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(S," {\n right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(C," {\n margin-right: ").concat(i,"px ").concat(r,";\n }\n \n .").concat(S," .").concat(S," {\n right: 0 ").concat(r,";\n }\n \n .").concat(C," .").concat(C," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(j,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(i,"px;\n }\n")},Y=function(){var e=parseInt(document.body.getAttribute(j)||"0",10);return isFinite(e)?e:0},O=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,a=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(j,(Y()+1).toString()),function(){var e=Y()-1;e<=0?document.body.removeAttribute(j):document.body.setAttribute(j,e.toString())}}),[]);var c=e.useMemo((function(){return D(a)}),[a]);return e.createElement(K,{styles:X(c,!n,a,r?"":"!important")})},H=!1;if("undefined"!=typeof window)try{var Z=Object.defineProperty({},"passive",{get:function(){return H=!0,!0}});window.addEventListener("test",Z,Z),window.removeEventListener("test",Z,Z)}catch(e){H=!1}var q=!!H&&{passive:!1},U=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},z=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),G(e,r)){var o=J(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},G=function(e,t){return"v"===e?function(e){return U(e,"overflowY")}(t):function(e){return U(e,"overflowX")}(t)},J=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Q=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},V=function(e){return[e.deltaX,e.deltaY]},$=function(e){return e&&"current"in e?e.current:e},ee=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},te=0,ne=[];function re(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var oe,ae=(oe=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),a=e.useState(te++)[0],c=e.useState(W)[0],i=e.useRef(t);e.useEffect((function(){i.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var e=u([t.lockRef.current],(t.shards||[]).map($),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[t.inert,t.lockRef.current,t.shards]);var s=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var n,a=Q(e),c=r.current,u="deltaX"in e?e.deltaX:c[0]-a[0],s="deltaY"in e?e.deltaY:c[1]-a[1],l=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=z(d,l);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=z(d,l)),!f)return!1;if(!o.current&&"changedTouches"in e&&(u||s)&&(o.current=n),!n)return!0;var v=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,c=n.target,i=t.contains(c),u=!1,s=a>0,l=0,d=0;do{var f=J(e,c),v=f[0],m=f[1]-f[2]-o*v;(v||m)&&G(e,c)&&(l+=m,d+=v),c=c instanceof ShadowRoot?c.host:c.parentNode}while(!i&&c!==document.body||i&&(t.contains(c)||t===c));return(s&&Math.abs(l)<1||!s&&Math.abs(d)<1)&&(u=!0),u}(v,t,e,"h"===v?u:s)}),[]),l=e.useCallback((function(e){var t=e;if(ne.length&&ne[ne.length-1]===c){var r="deltaY"in t?V(t):Q(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var a=(i.current.shards||[]).map($).filter(Boolean).filter((function(e){return e.contains(t.target)}));(a.length>0?s(t,a[0]):!i.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),d=e.useCallback((function(e,t,r,o){var a={name:e,delta:t,target:r,should:o,shadowParent:re(r)};n.current.push(a),setTimeout((function(){n.current=n.current.filter((function(e){return e!==a}))}),1)}),[]),f=e.useCallback((function(e){r.current=Q(e),o.current=void 0}),[]),v=e.useCallback((function(e){d(e.type,V(e),e.target,s(e,t.lockRef.current))}),[]),m=e.useCallback((function(e){d(e.type,Q(e),e.target,s(e,t.lockRef.current))}),[]);e.useEffect((function(){return ne.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:m}),document.addEventListener("wheel",l,q),document.addEventListener("touchmove",l,q),document.addEventListener("touchstart",f,q),function(){ne=ne.filter((function(e){return e!==c})),document.removeEventListener("wheel",l,q),document.removeEventListener("touchmove",l,q),document.removeEventListener("touchstart",f,q)}}),[]);var p=t.removeScrollBar,h=t.inert;return e.createElement(e.Fragment,null,h?e.createElement(c,{styles:ee(a)}):null,p?e.createElement(O,{gapMode:t.gapMode}):null)},R.useMedium(oe),T),ce=e.forwardRef((function(t,n){return e.createElement(P,c({},t,{ref:n,sideCar:ae}))}));ce.classNames=P.classNames;var ie=new WeakMap,ue=new WeakMap,se={},le=0,de=function(e){return e&&(e.host||de(e.parentNode))},fe=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=de(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);se[n]||(se[n]=new WeakMap);var a=se[n],c=[],i=new Set,u=new Set(o),s=function(e){e&&!i.has(e)&&(i.add(e),s(e.parentNode))};o.forEach(s);var l=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(i.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,u=(ie.get(e)||0)+1,s=(a.get(e)||0)+1;ie.set(e,u),a.set(e,s),c.push(e),1===u&&o&&ue.set(e,!0),1===s&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return l(t),i.clear(),le++,function(){c.forEach((function(e){var t=ie.get(e)-1,o=a.get(e)-1;ie.set(e,t),a.set(e,o),t||(ue.has(e)||e.removeAttribute(r),ue.delete(e)),o||e.removeAttribute(n)})),--le||(ie=new WeakMap,ie=new WeakMap,ue=new WeakMap,se={})}},ve=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),fe(r,o,n,"aria-hidden")):function(){return null}};export{f as F,ce as R,ve as h,b as u};
|
2
|
+
//# sourceMappingURL=index-ChLuxn93.mjs.map
|