ivt 0.0.1 → 0.0.3
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/README.md +3 -3
- 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/{index.d.ts → button/index.d.ts} +1 -17
- package/dist/button/index.mjs +2 -0
- package/dist/button/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-B2WOcyfj.mjs +2 -0
- package/dist/chunks/TextWrap-B2WOcyfj.mjs.map +1 -0
- package/dist/chunks/accordion-CEMX6Rna.mjs +2 -0
- package/dist/chunks/accordion-CEMX6Rna.mjs.map +1 -0
- package/dist/chunks/bundle-mjs-HknDzN6Z.mjs +2 -0
- package/dist/chunks/bundle-mjs-HknDzN6Z.mjs.map +1 -0
- package/dist/chunks/button-DR1cWE8S.mjs +2 -0
- package/dist/chunks/button-DR1cWE8S.mjs.map +1 -0
- package/dist/chunks/check-wZkDbgjO.mjs +2 -0
- package/dist/chunks/check-wZkDbgjO.mjs.map +1 -0
- package/dist/chunks/chevron-down-BbjHXP7j.mjs +2 -0
- package/dist/chunks/chevron-down-BbjHXP7j.mjs.map +1 -0
- package/dist/chunks/chevron-right-NuCkf5RR.mjs +2 -0
- package/dist/chunks/chevron-right-NuCkf5RR.mjs.map +1 -0
- package/dist/chunks/command-BvsI_sq9.mjs +2 -0
- package/dist/chunks/command-BvsI_sq9.mjs.map +1 -0
- package/dist/chunks/createLucideIcon-DHet3kMe.mjs +14 -0
- package/dist/chunks/createLucideIcon-DHet3kMe.mjs.map +1 -0
- package/dist/chunks/dialog-B7nAaDwF.mjs +2 -0
- package/dist/chunks/dialog-B7nAaDwF.mjs.map +1 -0
- package/dist/chunks/index-B25rp7IZ.mjs +2 -0
- package/dist/chunks/index-B25rp7IZ.mjs.map +1 -0
- package/dist/chunks/index-BESNMrh8.mjs +2 -0
- package/dist/chunks/index-BESNMrh8.mjs.map +1 -0
- package/dist/chunks/index-BsTRBWyW.mjs +2 -0
- package/dist/chunks/index-BsTRBWyW.mjs.map +1 -0
- package/dist/chunks/index-CJMeIDw8.mjs +2 -0
- package/dist/chunks/index-CJMeIDw8.mjs.map +1 -0
- package/dist/chunks/index-CjcSvOxo.mjs +2 -0
- package/dist/chunks/index-CjcSvOxo.mjs.map +1 -0
- package/dist/chunks/index-Cv2row07.mjs +2 -0
- package/dist/chunks/index-Cv2row07.mjs.map +1 -0
- package/dist/chunks/index-D5hJSEl1.mjs +2 -0
- package/dist/chunks/index-D5hJSEl1.mjs.map +1 -0
- package/dist/chunks/index-D6Orj-nf.mjs +2 -0
- package/dist/chunks/index-D6Orj-nf.mjs.map +1 -0
- package/dist/chunks/index-EftYm3Nj.mjs +2 -0
- package/dist/chunks/index-EftYm3Nj.mjs.map +1 -0
- package/dist/chunks/index-ew5utTUc.mjs +2 -0
- package/dist/chunks/index-ew5utTUc.mjs.map +1 -0
- package/dist/chunks/input-B2w6lnoj.mjs +2 -0
- package/dist/chunks/input-B2w6lnoj.mjs.map +1 -0
- package/dist/chunks/label-DXr1d22R.mjs +2 -0
- package/dist/chunks/label-DXr1d22R.mjs.map +1 -0
- package/dist/chunks/pagination-Cgu8tTUI.mjs +2 -0
- package/dist/chunks/pagination-Cgu8tTUI.mjs.map +1 -0
- package/dist/chunks/popover-BDcGFNWg.mjs +2 -0
- package/dist/chunks/popover-BDcGFNWg.mjs.map +1 -0
- package/dist/chunks/scroll-area-BEfzUuiC.mjs +2 -0
- package/dist/chunks/scroll-area-BEfzUuiC.mjs.map +1 -0
- package/dist/chunks/select-ByQjLEt1.mjs +2 -0
- package/dist/chunks/select-ByQjLEt1.mjs.map +1 -0
- package/dist/chunks/skeleton-BiE2soDg.mjs +2 -0
- package/dist/chunks/skeleton-BiE2soDg.mjs.map +1 -0
- package/dist/chunks/table-yo_IkKny.mjs +2 -0
- package/dist/chunks/table-yo_IkKny.mjs.map +1 -0
- package/dist/chunks/utils-BpbSpG2q.mjs +2 -0
- package/dist/chunks/utils-BpbSpG2q.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 +108 -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/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 +2 -2
- 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/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/table/index.d.ts +13 -0
- package/dist/table/index.mjs +2 -0
- package/dist/table/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 +134 -9
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -1
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import{c as n,d as t,b as r,a as o,P as a,f as s}from"../chunks/index-ew5utTUc.mjs";import{u as c}from"../chunks/index-CJMeIDw8.mjs";import{P as i,d as u}from"../chunks/index-Cv2row07.mjs";import{createCollection as d}from"@radix-ui/react-collection";import{u as l}from"../chunks/index-B25rp7IZ.mjs";import{P as p,D as f}from"../chunks/index-D6Orj-nf.mjs";import{h as m,u as v,R as g,F as h}from"../chunks/index-BESNMrh8.mjs";import{u as w}from"../chunks/index-BsTRBWyW.mjs";import{c as b,R as y,A as _,C as M,a as x}from"../chunks/index-EftYm3Nj.mjs";import{jsx as C}from"react/jsx-runtime";import{Slot as D}from"@radix-ui/react-slot";import{c as R}from"../chunks/utils-BpbSpG2q.mjs";import{C as k}from"../chunks/check-wZkDbgjO.mjs";import{c as E}from"../chunks/createLucideIcon-DHet3kMe.mjs";import{C as I}from"../chunks/chevron-right-NuCkf5RR.mjs";import"react-dom";import"../chunks/index-CjcSvOxo.mjs";import"../chunks/bundle-mjs-HknDzN6Z.mjs";const N=E("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);var P="rovingFocusGroup.onEntryFocus",O={bubbles:!1,cancelable:!0},F="RovingFocusGroup",[T,S,A]=d(F),[K,L]=n(F,[A]),[z,G]=K(F),j=e.forwardRef(((e,n)=>C(T.Provider,{scope:e.__scopeRovingFocusGroup,children:C(T.Slot,{scope:e.__scopeRovingFocusGroup,children:C(U,{...e,ref:n})})})));j.displayName=F;var U=e.forwardRef(((n,a)=>{const{__scopeRovingFocusGroup:s,orientation:u,loop:d=!1,dir:p,currentTabStopId:f,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:v,onEntryFocus:g,preventScrollOnEntryFocus:h=!1,...w}=n,b=e.useRef(null),y=r(a,b),_=l(p),[M=null,x]=c({prop:f,defaultProp:m,onChange:v}),[D,R]=e.useState(!1),k=o(g),E=S(s),I=e.useRef(!1),[N,F]=e.useState(0);return e.useEffect((()=>{const e=b.current;if(e)return e.addEventListener(P,k),()=>e.removeEventListener(P,k)}),[k]),C(z,{scope:s,orientation:u,dir:_,loop:d,currentTabStopId:M,onItemFocus:e.useCallback((e=>x(e)),[x]),onItemShiftTab:e.useCallback((()=>R(!0)),[]),onFocusableItemAdd:e.useCallback((()=>F((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>F((e=>e-1))),[]),children:C(i.div,{tabIndex:D||0===N?-1:0,"data-orientation":u,...w,ref:y,style:{outline:"none",...n.style},onMouseDown:t(n.onMouseDown,(()=>{I.current=!0})),onFocus:t(n.onFocus,(e=>{const n=!I.current;if(e.target===e.currentTarget&&n&&!D){const n=new CustomEvent(P,O);if(e.currentTarget.dispatchEvent(n),!n.defaultPrevented){const e=E().filter((e=>e.focusable));H([e.find((e=>e.active)),e.find((e=>e.id===M)),...e].filter(Boolean).map((e=>e.ref.current)),h)}}I.current=!1})),onBlur:t(n.onBlur,(()=>R(!1)))})})})),V="RovingFocusGroupItem",B=e.forwardRef(((n,r)=>{const{__scopeRovingFocusGroup:o,focusable:a=!0,active:s=!1,tabStopId:c,...u}=n,d=w(),l=c||d,p=G(V,o),f=p.currentTabStopId===l,m=S(o),{onFocusableItemAdd:v,onFocusableItemRemove:g}=p;return e.useEffect((()=>{if(a)return v(),()=>g()}),[a,v,g]),C(T.ItemSlot,{scope:o,id:l,focusable:a,active:s,children:C(i.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...u,ref:r,onMouseDown:t(n.onMouseDown,(e=>{a?p.onItemFocus(l):e.preventDefault()})),onFocus:t(n.onFocus,(()=>p.onItemFocus(l))),onKeyDown:t(n.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const n=function(e,n,t){const r=function(e,n){return"rtl"!==n?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,t);return"vertical"===n&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===n&&["ArrowUp","ArrowDown"].includes(r)?void 0:X[r]}(e,p.orientation,p.dir);if(void 0!==n){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=m().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===n)o.reverse();else if("prev"===n||"next"===n){"prev"===n&&o.reverse();const a=o.indexOf(e.currentTarget);o=p.loop?(r=a+1,(t=o).map(((e,n)=>t[(r+n)%t.length]))):o.slice(a+1)}setTimeout((()=>H(o)))}var t,r}))})})}));B.displayName=V;var X={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function H(e,n=!1){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus({preventScroll:n}),document.activeElement!==t)return}}var Y=j,q=B,W=["Enter"," "],Z=["ArrowUp","PageDown","End"],J=["ArrowDown","PageUp","Home",...Z],Q={ltr:[...W,"ArrowRight"],rtl:[...W,"ArrowLeft"]},$={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ee="Menu",[ne,te,re]=d(ee),[oe,ae]=n(ee,[re,b,L]),se=b(),ce=L(),[ie,ue]=oe(ee),[de,le]=oe(ee),pe=n=>{const{__scopeMenu:t,open:r=!1,children:a,dir:s,onOpenChange:c,modal:i=!0}=n,u=se(t),[d,p]=e.useState(null),f=e.useRef(!1),m=o(c),v=l(s);return e.useEffect((()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}}),[]),C(y,{...u,children:C(ie,{scope:t,open:r,onOpenChange:m,content:d,onContentChange:p,children:C(de,{scope:t,onClose:e.useCallback((()=>m(!1)),[m]),isUsingKeyboardRef:f,dir:v,modal:i,children:a})})})};pe.displayName=ee;var fe=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=se(t);return C(_,{...o,...r,ref:n})}));fe.displayName="MenuAnchor";var me="MenuPortal",[ve,ge]=oe(me,{forceMount:void 0}),he=e=>{const{__scopeMenu:n,forceMount:t,children:r,container:o}=e,s=ue(me,n);return C(ve,{scope:n,forceMount:t,children:C(a,{present:t||s.open,children:C(p,{asChild:!0,container:o,children:r})})})};he.displayName=me;var we="MenuContent",[be,ye]=oe(we),_e=e.forwardRef(((e,n)=>{const t=ge(we,e.__scopeMenu),{forceMount:r=t.forceMount,...o}=e,s=ue(we,e.__scopeMenu),c=le(we,e.__scopeMenu);return C(ne.Provider,{scope:e.__scopeMenu,children:C(a,{present:r||s.open,children:C(ne.Slot,{scope:e.__scopeMenu,children:c.modal?C(Me,{...o,ref:n}):C(xe,{...o,ref:n})})})})})),Me=e.forwardRef(((n,o)=>{const a=ue(we,n.__scopeMenu),s=e.useRef(null),c=r(o,s);return e.useEffect((()=>{const e=s.current;if(e)return m(e)}),[]),C(Ce,{...n,ref:c,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:t(n.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})})),xe=e.forwardRef(((e,n)=>{const t=ue(we,e.__scopeMenu);return C(Ce,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})})),Ce=e.forwardRef(((n,o)=>{const{__scopeMenu:a,loop:s=!1,trapFocus:c,onOpenAutoFocus:i,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:l,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:w,onInteractOutside:b,onDismiss:y,disableOutsideScroll:_,...x}=n,R=ue(we,a),k=le(we,a),E=se(a),I=ce(a),N=te(a),[P,O]=e.useState(null),F=e.useRef(null),T=r(o,F,R.onContentChange),S=e.useRef(0),A=e.useRef(""),K=e.useRef(0),L=e.useRef(null),z=e.useRef("right"),G=e.useRef(0),j=_?g:e.Fragment,U=_?{as:D,allowPinchZoom:!0}:void 0,V=e=>{const n=A.current+e,t=N().filter((e=>!e.disabled)),r=document.activeElement,o=t.find((e=>e.ref.current===r))?.textValue,a=function(e,n,t){const r=n.length>1&&Array.from(n).every((e=>e===n[0])),o=r?n[0]:n,a=t?e.indexOf(t):-1;let s=(c=e,i=Math.max(a,0),c.map(((e,n)=>c[(i+n)%c.length])));var c,i;1===o.length&&(s=s.filter((e=>e!==t)));const u=s.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return u!==t?u:void 0}(t.map((e=>e.textValue)),n,o),s=t.find((e=>e.textValue===a))?.ref.current;!function e(n){A.current=n,window.clearTimeout(S.current),""!==n&&(S.current=window.setTimeout((()=>e("")),1e3))}(n),s&&setTimeout((()=>s.focus()))};e.useEffect((()=>()=>window.clearTimeout(S.current)),[]),v();const B=e.useCallback((e=>z.current===L.current?.side&&function(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return function(e,n){const{x:t,y:r}=e;let o=!1;for(let e=0,a=n.length-1;e<n.length;a=e++){const s=n[e].x,c=n[e].y,i=n[a].x,u=n[a].y;c>r!=u>r&&t<(i-s)*(r-c)/(u-c)+s&&(o=!o)}return o}(t,n)}(e,L.current?.area)),[]);return C(be,{scope:a,searchRef:A,onItemEnter:e.useCallback((e=>{B(e)&&e.preventDefault()}),[B]),onItemLeave:e.useCallback((e=>{B(e)||(F.current?.focus(),O(null))}),[B]),onTriggerLeave:e.useCallback((e=>{B(e)&&e.preventDefault()}),[B]),pointerGraceTimerRef:K,onPointerGraceIntentChange:e.useCallback((e=>{L.current=e}),[]),children:C(j,{...U,children:C(h,{asChild:!0,trapped:c,onMountAutoFocus:t(i,(e=>{e.preventDefault(),F.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:u,children:C(f,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:w,onInteractOutside:b,onDismiss:y,children:C(Y,{asChild:!0,...I,dir:k.dir,orientation:"vertical",loop:s,currentTabStopId:P,onCurrentTabStopIdChange:O,onEntryFocus:t(l,(e=>{k.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:C(M,{role:"menu","aria-orientation":"vertical","data-state":Qe(R.open),"data-radix-menu-content":"",dir:k.dir,...E,...x,ref:T,style:{outline:"none",...x.style},onKeyDown:t(x.onKeyDown,(e=>{const n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,t=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!t&&r&&V(e.key));const o=F.current;if(e.target!==o)return;if(!J.includes(e.key))return;e.preventDefault();const a=N().filter((e=>!e.disabled)).map((e=>e.ref.current));Z.includes(e.key)&&a.reverse(),function(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}(a)})),onBlur:t(n.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),A.current="")})),onPointerMove:t(n.onPointerMove,nn((e=>{const n=e.target,t=G.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>G.current?"right":"left";z.current=n,G.current=e.clientX}})))})})})})})})}));_e.displayName=we;var De=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return C(i.div,{role:"group",...r,ref:n})}));De.displayName="MenuGroup";var Re=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return C(i.div,{...r,ref:n})}));Re.displayName="MenuLabel";var ke="MenuItem",Ee="menu.itemSelect",Ie=e.forwardRef(((n,o)=>{const{disabled:a=!1,onSelect:s,...c}=n,i=e.useRef(null),d=le(ke,n.__scopeMenu),l=ye(ke,n.__scopeMenu),p=r(o,i),f=e.useRef(!1);return C(Ne,{...c,ref:p,disabled:a,onClick:t(n.onClick,(()=>{const e=i.current;if(!a&&e){const n=new CustomEvent(Ee,{bubbles:!0,cancelable:!0});e.addEventListener(Ee,(e=>s?.(e)),{once:!0}),u(e,n),n.defaultPrevented?f.current=!1:d.onClose()}})),onPointerDown:e=>{n.onPointerDown?.(e),f.current=!0},onPointerUp:t(n.onPointerUp,(e=>{f.current||e.currentTarget?.click()})),onKeyDown:t(n.onKeyDown,(e=>{const n=""!==l.searchRef.current;a||n&&" "===e.key||W.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));Ie.displayName=ke;var Ne=e.forwardRef(((n,o)=>{const{__scopeMenu:a,disabled:s=!1,textValue:c,...u}=n,d=ye(ke,a),l=ce(a),p=e.useRef(null),f=r(o,p),[m,v]=e.useState(!1),[g,h]=e.useState("");return e.useEffect((()=>{const e=p.current;e&&h((e.textContent??"").trim())}),[u.children]),C(ne.ItemSlot,{scope:a,disabled:s,textValue:c??g,children:C(q,{asChild:!0,...l,focusable:!s,children:C(i.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...u,ref:f,onPointerMove:t(n.onPointerMove,nn((e=>{if(s)d.onItemLeave(e);else if(d.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:t(n.onPointerLeave,nn((e=>d.onItemLeave(e)))),onFocus:t(n.onFocus,(()=>v(!0))),onBlur:t(n.onBlur,(()=>v(!1)))})})})})),Pe=e.forwardRef(((e,n)=>{const{checked:r=!1,onCheckedChange:o,...a}=e;return C(ze,{scope:e.__scopeMenu,checked:r,children:C(Ie,{role:"menuitemcheckbox","aria-checked":$e(r)?"mixed":r,...a,ref:n,"data-state":en(r),onSelect:t(a.onSelect,(()=>o?.(!!$e(r)||!r)),{checkForDefaultPrevented:!1})})})}));Pe.displayName="MenuCheckboxItem";var Oe="MenuRadioGroup",[Fe,Te]=oe(Oe,{value:void 0,onValueChange:()=>{}}),Se=e.forwardRef(((e,n)=>{const{value:t,onValueChange:r,...a}=e,s=o(r);return C(Fe,{scope:e.__scopeMenu,value:t,onValueChange:s,children:C(De,{...a,ref:n})})}));Se.displayName=Oe;var Ae="MenuRadioItem",Ke=e.forwardRef(((e,n)=>{const{value:r,...o}=e,a=Te(Ae,e.__scopeMenu),s=r===a.value;return C(ze,{scope:e.__scopeMenu,checked:s,children:C(Ie,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":en(s),onSelect:t(o.onSelect,(()=>a.onValueChange?.(r)),{checkForDefaultPrevented:!1})})})}));Ke.displayName=Ae;var Le="MenuItemIndicator",[ze,Ge]=oe(Le,{checked:!1}),je=e.forwardRef(((e,n)=>{const{__scopeMenu:t,forceMount:r,...o}=e,s=Ge(Le,t);return C(a,{present:r||$e(s.checked)||!0===s.checked,children:C(i.span,{...o,ref:n,"data-state":en(s.checked)})})}));je.displayName=Le;var Ue=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return C(i.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})}));Ue.displayName="MenuSeparator";var Ve=e.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=se(t);return C(x,{...o,...r,ref:n})}));Ve.displayName="MenuArrow";var Be="MenuSub",[Xe,He]=oe(Be),Ye=n=>{const{__scopeMenu:t,children:r,open:a=!1,onOpenChange:s}=n,c=ue(Be,t),i=se(t),[u,d]=e.useState(null),[l,p]=e.useState(null),f=o(s);return e.useEffect((()=>(!1===c.open&&f(!1),()=>f(!1))),[c.open,f]),C(y,{...i,children:C(ie,{scope:t,open:a,onOpenChange:f,content:l,onContentChange:p,children:C(Xe,{scope:t,contentId:w(),triggerId:w(),trigger:u,onTriggerChange:d,children:r})})})};Ye.displayName=Be;var qe="MenuSubTrigger",We=e.forwardRef(((n,r)=>{const o=ue(qe,n.__scopeMenu),a=le(qe,n.__scopeMenu),c=He(qe,n.__scopeMenu),i=ye(qe,n.__scopeMenu),u=e.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:l}=i,p={__scopeMenu:n.__scopeMenu},f=e.useCallback((()=>{u.current&&window.clearTimeout(u.current),u.current=null}),[]);return e.useEffect((()=>f),[f]),e.useEffect((()=>{const e=d.current;return()=>{window.clearTimeout(e),l(null)}}),[d,l]),C(fe,{asChild:!0,...p,children:C(Ne,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":c.contentId,"data-state":Qe(o.open),...n,ref:s(r,c.onTriggerChange),onClick:e=>{n.onClick?.(e),n.disabled||e.defaultPrevented||(e.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:t(n.onPointerMove,nn((e=>{i.onItemEnter(e),e.defaultPrevented||n.disabled||o.open||u.current||(i.onPointerGraceIntentChange(null),u.current=window.setTimeout((()=>{o.onOpenChange(!0),f()}),100))}))),onPointerLeave:t(n.onPointerLeave,nn((e=>{f();const n=o.content?.getBoundingClientRect();if(n){const t=o.content?.dataset.side,r="right"===t,a=r?-5:5,s=n[r?"left":"right"],c=n[r?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:n.top},{x:c,y:n.top},{x:c,y:n.bottom},{x:s,y:n.bottom}],side:t}),window.clearTimeout(d.current),d.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:t(n.onKeyDown,(e=>{const t=""!==i.searchRef.current;n.disabled||t&&" "===e.key||Q[a.dir].includes(e.key)&&(o.onOpenChange(!0),o.content?.focus(),e.preventDefault())}))})})}));We.displayName=qe;var Ze="MenuSubContent",Je=e.forwardRef(((n,o)=>{const s=ge(we,n.__scopeMenu),{forceMount:c=s.forceMount,...i}=n,u=ue(we,n.__scopeMenu),d=le(we,n.__scopeMenu),l=He(Ze,n.__scopeMenu),p=e.useRef(null),f=r(o,p);return C(ne.Provider,{scope:n.__scopeMenu,children:C(a,{present:c||u.open,children:C(ne.Slot,{scope:n.__scopeMenu,children:C(Ce,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:f,align:"start",side:"rtl"===d.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{d.isUsingKeyboardRef.current&&p.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:t(n.onFocusOutside,(e=>{e.target!==l.trigger&&u.onOpenChange(!1)})),onEscapeKeyDown:t(n.onEscapeKeyDown,(e=>{d.onClose(),e.preventDefault()})),onKeyDown:t(n.onKeyDown,(e=>{const n=e.currentTarget.contains(e.target),t=$[d.dir].includes(e.key);n&&t&&(u.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function Qe(e){return e?"open":"closed"}function $e(e){return"indeterminate"===e}function en(e){return $e(e)?"indeterminate":e?"checked":"unchecked"}function nn(e){return n=>"mouse"===n.pointerType?e(n):void 0}Je.displayName=Ze;var tn=pe,rn=fe,on=he,an=_e,sn=De,cn=Re,un=Ie,dn=Pe,ln=Se,pn=Ke,fn=je,mn=Ue,vn=Ve,gn=Ye,hn=We,wn=Je,bn="DropdownMenu",[yn,_n]=n(bn,[ae]),Mn=ae(),[xn,Cn]=yn(bn),Dn=n=>{const{__scopeDropdownMenu:t,children:r,dir:o,open:a,defaultOpen:s,onOpenChange:i,modal:u=!0}=n,d=Mn(t),l=e.useRef(null),[p=!1,f]=c({prop:a,defaultProp:s,onChange:i});return C(xn,{scope:t,triggerId:w(),triggerRef:l,contentId:w(),open:p,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:u,children:C(tn,{...d,open:p,onOpenChange:f,dir:o,modal:u,children:r})})};Dn.displayName=bn;var Rn="DropdownMenuTrigger",kn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...a}=e,c=Cn(Rn,r),u=Mn(r);return C(rn,{asChild:!0,...u,children:C(i.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...a,ref:s(n,c.triggerRef),onPointerDown:t(e.onPointerDown,(e=>{o||0!==e.button||!1!==e.ctrlKey||(c.onOpenToggle(),c.open||e.preventDefault())})),onKeyDown:t(e.onKeyDown,(e=>{o||(["Enter"," "].includes(e.key)&&c.onOpenToggle(),"ArrowDown"===e.key&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));kn.displayName=Rn;var En=e=>{const{__scopeDropdownMenu:n,...t}=e,r=Mn(n);return C(on,{...r,...t})};En.displayName="DropdownMenuPortal";var In="DropdownMenuContent",Nn=e.forwardRef(((n,r)=>{const{__scopeDropdownMenu:o,...a}=n,s=Cn(In,o),c=Mn(o),i=e.useRef(!1);return C(an,{id:s.contentId,"aria-labelledby":s.triggerId,...c,...a,ref:r,onCloseAutoFocus:t(n.onCloseAutoFocus,(e=>{i.current||s.triggerRef.current?.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:t(n.onInteractOutside,(e=>{const n=e.detail.originalEvent,t=0===n.button&&!0===n.ctrlKey,r=2===n.button||t;s.modal&&!r||(i.current=!0)})),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Nn.displayName=In;var Pn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(sn,{...o,...r,ref:n})}));Pn.displayName="DropdownMenuGroup";var On=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(cn,{...o,...r,ref:n})}));On.displayName="DropdownMenuLabel";var Fn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(un,{...o,...r,ref:n})}));Fn.displayName="DropdownMenuItem";var Tn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(dn,{...o,...r,ref:n})}));Tn.displayName="DropdownMenuCheckboxItem";var Sn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(ln,{...o,...r,ref:n})}));Sn.displayName="DropdownMenuRadioGroup";var An=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(pn,{...o,...r,ref:n})}));An.displayName="DropdownMenuRadioItem";var Kn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(fn,{...o,...r,ref:n})}));Kn.displayName="DropdownMenuItemIndicator";var Ln=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(mn,{...o,...r,ref:n})}));Ln.displayName="DropdownMenuSeparator";e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(vn,{...o,...r,ref:n})})).displayName="DropdownMenuArrow";var zn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(hn,{...o,...r,ref:n})}));zn.displayName="DropdownMenuSubTrigger";var Gn=e.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,...r}=e,o=Mn(t);return C(wn,{...o,...r,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Gn.displayName="DropdownMenuSubContent";var jn=Dn,Un=kn,Vn=En,Bn=Nn,Xn=Pn,Hn=On,Yn=Fn,qn=Tn,Wn=Sn,Zn=An,Jn=Kn,Qn=Ln,$n=e=>{const{__scopeDropdownMenu:n,children:t,open:r,onOpenChange:o,defaultOpen:a}=e,s=Mn(n),[i=!1,u]=c({prop:r,defaultProp:a,onChange:o});return C(gn,{...s,open:i,onOpenChange:u,children:t})},et=zn,nt=Gn;function tt({...n}){return e.createElement(jn,{"data-slot":"dropdown-menu",...n})}function rt({...n}){return e.createElement(Vn,{"data-slot":"dropdown-menu-portal",...n})}function ot({...n}){return e.createElement(Un,{"data-slot":"dropdown-menu-trigger",...n})}function at({className:n,sideOffset:t=4,...r}){return e.createElement(Vn,null,e.createElement(Bn,{"data-slot":"dropdown-menu-content",sideOffset:t,className:R("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",n),...r}))}function st({...n}){return e.createElement(Xn,{"data-slot":"dropdown-menu-group",...n})}function ct({className:n,inset:t,variant:r="default",...o}){return e.createElement(Yn,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:R("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-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]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...o})}function it({className:n,children:t,checked:r,...o}){return e.createElement(qn,{"data-slot":"dropdown-menu-checkbox-item",className:R("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),checked:r,...o},e.createElement("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},e.createElement(Jn,null,e.createElement(k,{className:"size-4"}))),t)}function ut({...n}){return e.createElement(Wn,{"data-slot":"dropdown-menu-radio-group",...n})}function dt({className:n,children:t,...r}){return e.createElement(Zn,{"data-slot":"dropdown-menu-radio-item",className:R("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...r},e.createElement("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},e.createElement(Jn,null,e.createElement(N,{className:"size-2 fill-current"}))),t)}function lt({className:n,inset:t,...r}){return e.createElement(Hn,{"data-slot":"dropdown-menu-label","data-inset":t,className:R("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",n),...r})}function pt({className:n,...t}){return e.createElement(Qn,{"data-slot":"dropdown-menu-separator",className:R("bg-border -mx-1 my-1 h-px",n),...t})}function ft({className:n,...t}){return e.createElement("span",{"data-slot":"dropdown-menu-shortcut",className:R("text-muted-foreground ml-auto text-xs tracking-widest",n),...t})}function mt({...n}){return e.createElement($n,{"data-slot":"dropdown-menu-sub",...n})}function vt({className:n,inset:t,children:r,...o}){return e.createElement(et,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:R("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",n),...o},r,e.createElement(I,{className:"ml-auto size-4"}))}function gt({className:n,...t}){return e.createElement(nt,{"data-slot":"dropdown-menu-sub-content",className:R("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",n),...t})}export{tt as DropdownMenu,it as DropdownMenuCheckboxItem,at as DropdownMenuContent,st as DropdownMenuGroup,ct as DropdownMenuItem,lt as DropdownMenuLabel,rt as DropdownMenuPortal,ut as DropdownMenuRadioGroup,dt as DropdownMenuRadioItem,pt as DropdownMenuSeparator,ft as DropdownMenuShortcut,mt as DropdownMenuSub,gt as DropdownMenuSubContent,vt as DropdownMenuSubTrigger,ot as DropdownMenuTrigger};
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../node_modules/lucide-react/dist/esm/icons/circle.js","../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../node_modules/@radix-ui/react-menu/dist/index.mjs","../../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs","../../src/components/ui/dropdown-menu/dropdown-menu.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 = [[\"circle\", { cx: \"12\", cy: \"12\", r: \"10\", key: \"1mglay\" }]];\nconst Circle = createLucideIcon(\"Circle\", __iconNode);\n\nexport { __iconNode, Circle as default };\n//# sourceMappingURL=circle.js.map\n","\"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","\"use client\";\n\n// packages/react/menu/src/menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs, composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(MENU_NAME);\nvar [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [\n createCollectionScope,\n createPopperScope,\n createRovingFocusGroupScope\n]);\nvar usePopperScope = createPopperScope();\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = React.useState(null);\n const isUsingKeyboardRef = React.useRef(false);\n const handleOpenChange = useCallbackRef(onOpenChange);\n const direction = useDirection(dir);\n React.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const content = ref.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar MenuContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = React.useState(null);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef, context.onContentChange);\n const timerRef = React.useRef(0);\n const searchRef = React.useRef(\"\");\n const pointerGraceTimerRef = React.useRef(0);\n const pointerGraceIntentRef = React.useRef(null);\n const pointerDirRef = React.useRef(\"right\");\n const lastPointerXRef = React.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n React.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n useFocusGuards();\n const isPointerMovingToSubmenu = React.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ jsx(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: React.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: React.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: composeEventHandlers(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: composeEventHandlers(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: composeEventHandlers(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: composeEventHandlers(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = React.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const isPointerDownRef = React.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n dispatchDiscreteCustomEvent(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: composeEventHandlers(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const [isFocused, setIsFocused] = React.useState(false);\n const [textContent, setTextContent] = React.useState(\"\");\n React.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: composeEventHandlers(props.onFocus, () => setIsFocused(true)),\n onBlur: composeEventHandlers(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = React.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = useCallbackRef(onValueChange);\n return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = React.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: composeEventHandlers(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ jsx(\n Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = React.useState(null);\n const [content, setContent] = React.useState(null);\n const handleOpenChange = useCallbackRef(onOpenChange);\n React.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ jsx(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: useId(),\n triggerId: useId(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = React.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = React.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n React.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n React.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: composeRefs(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: composeEventHandlers(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: composeEventHandlers(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\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}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n CheckboxItem,\n Content2 as Content,\n Group,\n Item2 as Item,\n ItemIndicator,\n Label,\n Menu,\n MenuAnchor,\n MenuArrow,\n MenuCheckboxItem,\n MenuContent,\n MenuGroup,\n MenuItem,\n MenuItemIndicator,\n MenuLabel,\n MenuPortal,\n MenuRadioGroup,\n MenuRadioItem,\n MenuSeparator,\n MenuSub,\n MenuSubContent,\n MenuSubTrigger,\n Portal,\n RadioGroup,\n RadioItem,\n Root3 as Root,\n Separator,\n Sub,\n SubContent,\n SubTrigger,\n createMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// packages/react/dropdown-menu/src/dropdown-menu.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\nimport { createMenuScope } from \"@radix-ui/react-menu\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(\n DROPDOWN_MENU_NAME,\n [createMenuScope]\n);\nvar useMenuScope = createMenuScope();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = React.useRef(null);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: useId(),\n triggerRef,\n contentId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ jsx(MenuPrimitive.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: composeRefs(forwardedRef, context.triggerRef),\n onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: composeEventHandlers(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(MenuPrimitive.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(MenuPrimitive.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ jsx(\n MenuPrimitive.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\nexport {\n Arrow2 as Arrow,\n CheckboxItem2 as CheckboxItem,\n Content2 as Content,\n DropdownMenu,\n DropdownMenuArrow,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuItemIndicator,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n Group2 as Group,\n Item2 as Item,\n ItemIndicator2 as ItemIndicator,\n Label2 as Label,\n Portal2 as Portal,\n RadioGroup2 as RadioGroup,\n RadioItem2 as RadioItem,\n Root2 as Root,\n Separator2 as Separator,\n Sub2 as Sub,\n SubContent2 as SubContent,\n SubTrigger2 as SubTrigger,\n Trigger,\n createDropdownMenuScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n );\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n );\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-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]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n};\n"],"names":["Circle","createLucideIcon","cx","cy","r","key","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","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","SELECTION_KEYS","LAST_KEYS","FIRST_LAST_KEYS","SUB_OPEN_KEYS","ltr","rtl","SUB_CLOSE_KEYS","MENU_NAME","createMenuContext","createMenuScope","createPopperScope","usePopperScope","useRovingFocusGroupScope","MenuProvider","useMenuContext","MenuRootProvider","useMenuRootContext","Menu","__scopeMenu","open","onOpenChange","modal","popperScope","content","setContent","isUsingKeyboardRef","handleOpenChange","handleKeyDown","handlePointer","capture","once","PopperPrimitive.Root","onContentChange","onClose","MenuAnchor","anchorProps","PopperPrimitive.Anchor","PORTAL_NAME","PortalProvider","usePortalContext","forceMount","MenuPortal","container","Presence","present","PortalPrimitive","asChild","CONTENT_NAME","MenuContentProvider","useMenuContentContext","MenuContent","portalContext","contentProps","rootContext","MenuRootContentModal","MenuRootContentNonModal","hideOthers","MenuContentImpl","trapFocus","disableOutsidePointerEvents","disableOutsideScroll","onFocusOutside","checkForDefaultPrevented","onDismiss","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","onInteractOutside","rovingFocusGroupScope","currentItemId","setCurrentItemId","contentRef","timerRef","searchRef","pointerGraceTimerRef","pointerGraceIntentRef","pointerDirRef","lastPointerXRef","ScrollLockWrapper","RemoveScroll","Fragment","scrollLockWrapperProps","as","allowPinchZoom","handleTypeaheadSearch","search","disabled","currentItem","currentMatch","textValue","nextMatch","values","isRepeated","Array","from","every","char","normalizedSearch","currentMatchIndex","wrappedValues","Math","max","v","value","toLowerCase","startsWith","getNextMatch","newItem","updateSearch","window","clearTimeout","useFocusGuards","isPointerMovingToSubmenu","side","area","cursorPos","x","clientX","y","clientY","point","polygon","inside","i","j","xi","yi","xj","yj","isPointInPolygon","isPointerInGraceArea","onItemEnter","onItemLeave","onTriggerLeave","onPointerGraceIntentChange","intent","FocusScope","trapped","onMountAutoFocus","onUnmountAutoFocus","DismissableLayer","RovingFocusGroup.Root","PopperPrimitive.Content","role","getOpenState","isKeyDownInside","closest","isModifierKey","isCharacterKey","contains","onPointerMove","whenMouse","pointerXHasChanged","newDir","MenuGroup","MenuLabel","labelProps","ITEM_SELECT","MenuItem","onSelect","contentContext","isPointerDownRef","MenuItemImpl","onClick","menuItem","itemSelectEvent","dispatchDiscreteCustomEvent","onPointerDown","onPointerUp","click","isTypingAhead","isFocused","setIsFocused","textContent","setTextContent","trim","RovingFocusGroup.Item","onPointerLeave","MenuCheckboxItem","checked","onCheckedChange","checkboxItemProps","ItemIndicatorProvider","isIndeterminate","getCheckedState","RADIO_GROUP_NAME","RadioGroupProvider","useRadioGroupContext","onValueChange","MenuRadioGroup","handleValueChange","RADIO_ITEM_NAME","MenuRadioItem","radioItemProps","ITEM_INDICATOR_NAME","useItemIndicatorContext","MenuItemIndicator","itemIndicatorProps","indicatorContext","MenuSeparator","separatorProps","MenuArrow","arrowProps","PopperPrimitive.Arrow","SUB_NAME","MenuSubProvider","useMenuSubContext","MenuSub","parentMenuContext","trigger","setTrigger","contentId","triggerId","onTriggerChange","SUB_TRIGGER_NAME","MenuSubTrigger","subContext","openTimerRef","clearOpenTimer","pointerGraceTimer","composeRefs","contentRect","getBoundingClientRect","dataset","rightSide","bleed","contentNearEdge","contentFarEdge","top","bottom","SUB_CONTENT_NAME","MenuSubContent","subContentProps","align","isCloseKey","handler","pointerType","Anchor","Portal","Content","Group","Label","CheckboxItem","RadioGroup","RadioItem","ItemIndicator","Separator","Arrow","Sub","SubTrigger","SubContent","DROPDOWN_MENU_NAME","createDropdownMenuContext","createDropdownMenuScope","useMenuScope","DropdownMenuProvider","useDropdownMenuContext","DropdownMenu","__scopeDropdownMenu","openProp","defaultOpen","menuScope","triggerRef","setOpen","onOpenToggle","prevOpen","MenuPrimitive.Root","TRIGGER_NAME","DropdownMenuTrigger","triggerProps","MenuPrimitive.Anchor","button","type","DropdownMenuPortal","portalProps","MenuPrimitive.Portal","DropdownMenuContent","hasInteractedOutsideRef","MenuPrimitive.Content","originalEvent","detail","ctrlLeftClick","isRightClick","DropdownMenuGroup","MenuPrimitive.Group","DropdownMenuLabel","MenuPrimitive.Label","DropdownMenuItem","MenuPrimitive.Item","DropdownMenuCheckboxItem","MenuPrimitive.CheckboxItem","DropdownMenuRadioGroup","radioGroupProps","MenuPrimitive.RadioGroup","DropdownMenuRadioItem","MenuPrimitive.RadioItem","DropdownMenuItemIndicator","MenuPrimitive.ItemIndicator","DropdownMenuSeparator","MenuPrimitive.Separator","MenuPrimitive.Arrow","DropdownMenuSubTrigger","subTriggerProps","MenuPrimitive.SubTrigger","DropdownMenuSubContent","MenuPrimitive.SubContent","Trigger","MenuPrimitive.Sub","createElement","DropdownMenuPrimitive","data-slot","className","sideOffset","cn","inset","variant","data-inset","data-variant","CheckIcon","CircleIcon","DropdownMenuShortcut","DropdownMenuSub","ChevronRightIcon"],"mappings":"48BAGO,MAaDA,EAASC,EAAiB,SAbI,CAAC,CAAC,SAAU,CAAEC,GAAI,KAAMC,GAAI,KAAMC,EAAG,KAAMC,IAAK,aCUpF,IAAMC,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,EAA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AAA,EAAAA,CAAWR,UAAU,0BAGzBjb,EAGP,CAEA,SAASuZ,IAAkB0B,UACzBA,EAASG,MACTA,KACG1b,IAIH,OACEF,EAAAsb,cAACC,GAA2B,CAC1BC,YAAU,sBACVM,aAAYF,EACZH,UAAWE,EACT,oDACAF,MAEEvb,GAGV,CAEA,SAAS0a,IAAsBa,UAC7BA,KACGvb,IAEH,OACEF,EAAAsb,cAACC,GAA+B,CAC9BC,YAAU,0BACVC,UAAWE,EAAG,4BAA6BF,MACvCvb,GAGV,CAEA,SAASgc,IAAqBT,UAC5BA,KACGvb,IAEH,OACEF,EAACyF,cAAAA,OAAAA,CACC+V,YAAU,yBACVC,UAAWE,EACT,wDACAF,MAEEvb,GAGV,CAEA,SAASic,OACJjc,IAEH,OAAOF,EAAAsb,cAACC,GAAyB,CAACC,YAAU,uBAAwBtb,GACtE,CAEA,SAAS6a,IAAuBU,UAC9BA,EAASG,MACTA,EAAKpb,SACLA,KACGN,IAIH,OACEF,EAAAsb,cAACC,GAAgC,CAC/BC,YAAU,4BACVM,aAAYF,EACZH,UAAWE,EACT,iOACAF,MAEEvb,GAEHM,EACDR,EAACoc,cAAAA,EAAAA,CAAiBX,UAAU,mBAGlC,CAEA,SAASP,IAAuBO,UAC9BA,KACGvb,IAEH,OACEF,EAAAsb,cAACC,GAAgC,CAC/BC,YAAU,4BACVC,UAAWE,EACT,wbACAF,MAEEvb,GAGV","x_google_ignoreList":[0,1,2,3]}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
+
import * as react_hook_form from 'react-hook-form';
|
3
|
+
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
4
|
+
import * as React from 'react';
|
5
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
6
|
+
import { Slot } from '@radix-ui/react-slot';
|
7
|
+
|
8
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = undefined>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
9
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
10
|
+
declare const useFormField: () => {
|
11
|
+
invalid: boolean;
|
12
|
+
isDirty: boolean;
|
13
|
+
isTouched: boolean;
|
14
|
+
isValidating: boolean;
|
15
|
+
error?: react_hook_form.FieldError;
|
16
|
+
id: string;
|
17
|
+
name: string;
|
18
|
+
formItemId: string;
|
19
|
+
formDescriptionId: string;
|
20
|
+
formMessageId: string;
|
21
|
+
};
|
22
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
23
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
24
|
+
declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): react_jsx_runtime.JSX.Element;
|
25
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
|
26
|
+
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element | null;
|
27
|
+
|
28
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import*as e from"react";import t from"react";import{Slot as r}from"@radix-ui/react-slot";import{c as s}from"../chunks/utils-BpbSpG2q.mjs";import{L as n}from"../chunks/label-DXr1d22R.mjs";import"../chunks/bundle-mjs-HknDzN6Z.mjs";import"../chunks/index-Cv2row07.mjs";import"react-dom";import"react/jsx-runtime";var a=e=>null==e;var o=e=>!a(e)&&!Array.isArray(e)&&(e=>"object"==typeof e)(e)&&!(e=>e instanceof Date)(e),i=e=>o(e)&&e.target?"checkbox"===e.target.type?e.target.checked:e.target.value:e,u="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function c(e){let t;const r=Array.isArray(e),s="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(u&&(e instanceof Blob||s)||!r&&!o(e))return e;if(t=r?[]:{},r||(e=>{const t=e.constructor&&e.constructor.prototype;return o(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=c(e[r]));else t=e}return t}var l=e=>Array.isArray(e)?e.filter(Boolean):[],d=e=>void 0===e,m=(e,t,r)=>{if(!t||!o(e))return r;const s=l(t.split(/[,[\].]+?/)).reduce(((e,t)=>a(e)?e:e[t]),e);return d(s)||s===e?d(e[t])?r:e[t]:s},f=e=>"boolean"==typeof e,p=(e,t,r)=>{let s=-1;const n=(e=>/^\w*$/.test(e))(t)?[t]:l(t.replace(/["|']|\]/g,"").split(/\.|\[/));const a=n.length,i=a-1;for(;++s<a;){const t=n[s];let a=r;if(s!==i){const r=e[t];a=o(r)||Array.isArray(r)?r:isNaN(+n[s+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=a,e=e[t]}return e};const b="blur",g="change",y="all",_=t.createContext(null),h=()=>t.useContext(_);var v=(e,t,r,s)=>{r(e);const{name:n,...a}=e;return o(i=a)&&!Object.keys(i).length||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find((e=>!0===t[e]));var i},x=(e,t,r)=>{return!e||!t||e===t||(s=e,Array.isArray(s)?s:[s]).some((e=>e&&(r?e===t:e.startsWith(t)||t.startsWith(e))));var s};function V(e){const r=t.useRef(e);r.current=e,t.useEffect((()=>{const t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}}),[e.disabled])}function j(e){const r=h(),{control:s=r.control,disabled:n,name:a,exact:o}=e||{},[i,u]=t.useState(s._formState),c=t.useRef(!0),l=t.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=t.useRef(a);return d.current=a,V({disabled:n,next:e=>c.current&&x(d.current,e.name,o)&&v(e,l.current,s._updateFormState)&&u({...s._formState,...e}),subject:s._subjects.state}),t.useEffect((()=>(c.current=!0,l.current.isValid&&s._updateValid(!0),()=>{c.current=!1})),[s]),t.useMemo((()=>((e,t,r,s=!0)=>{const n={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(n,a,{get:()=>{const n=a;return t._proxyFormState[n]!==y&&(t._proxyFormState[n]=!s||y),r&&(r[n]=!0),e[n]}});return n})(i,s,l.current,!1)),[i,s])}function F(e){const r=h(),{control:s=r.control,name:n,defaultValue:a,disabled:o,exact:i}=e||{},u=t.useRef(n);u.current=n,V({disabled:o,subject:s._subjects.values,next:e=>{x(u.current,e.name,i)&&d(c(((e,t,r,s,n)=>"string"==typeof e?m(r,e,n):Array.isArray(e)?e.map((e=>m(r,e))):r)(u.current,s._names,e.values||s._formValues,0,a)))}});const[l,d]=t.useState(s._getWatch(n,a));return t.useEffect((()=>s._removeUnmounted())),l}const E=e=>e.render(function(e){const r=h(),{name:s,disabled:n,control:a=r.control,shouldUnregister:o}=e,u=((e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)))(a._names.array,s),l=F({control:a,name:s,defaultValue:m(a._formValues,s,m(a._defaultValues,s,e.defaultValue)),exact:!0}),y=j({control:a,name:s,exact:!0}),_=t.useRef(a.register(s,{...e.rules,value:l,...f(e.disabled)?{disabled:e.disabled}:{}})),v=t.useMemo((()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(y.errors,s)},isDirty:{enumerable:!0,get:()=>!!m(y.dirtyFields,s)},isTouched:{enumerable:!0,get:()=>!!m(y.touchedFields,s)},isValidating:{enumerable:!0,get:()=>!!m(y.validatingFields,s)},error:{enumerable:!0,get:()=>m(y.errors,s)}})),[y,s]),x=t.useMemo((()=>({name:s,value:l,...f(n)||y.disabled?{disabled:y.disabled||n}:{},onChange:e=>_.current.onChange({target:{value:i(e),name:s},type:g}),onBlur:()=>_.current.onBlur({target:{value:m(a._formValues,s),name:s},type:b}),ref:e=>{const t=m(a._fields,s);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}})),[s,a._formValues,n,y.disabled,l,a._fields]);return t.useEffect((()=>{const e=a._options.shouldUnregister||o,t=(e,t)=>{const r=m(a._fields,e);r&&r._f&&(r._f.mount=t)};if(t(s,!0),e){const e=c(m(a._options.defaultValues,s));p(a._defaultValues,s,e),d(m(a._formValues,s))&&p(a._formValues,s,e)}return!u&&a.register(s),()=>{(u?e&&!a._state.action:e)?a.unregister(s):t(s,!1)}}),[s,a,u,o]),t.useEffect((()=>{a._updateDisabledField({disabled:n,fields:a._fields,name:s})}),[n,s,a]),t.useMemo((()=>({field:x,formState:y,fieldState:v})),[x,y,v])}(e)),I=e=>{const{children:r,...s}=e;return t.createElement(_.Provider,{value:s},r)},S=e.createContext({}),w=({...t})=>e.createElement(S.Provider,{value:{name:t.name}},e.createElement(E,t)),A=()=>{const t=e.useContext(S),r=e.useContext(k),{getFieldState:s}=h(),n=j({name:t.name}),a=s(t.name,n);if(!t)throw new Error("useFormField should be used within <FormField>");const{id:o}=r;return{id:o,name:t.name,formItemId:`${o}-form-item`,formDescriptionId:`${o}-form-item-description`,formMessageId:`${o}-form-item-message`,...a}},k=e.createContext({});function C({className:t,...r}){const n=e.useId();return e.createElement(k.Provider,{value:{id:n}},e.createElement("div",{"data-slot":"form-item",className:s("grid gap-2",t),...r}))}function N({className:t,...r}){const{error:a,formItemId:o}=A();return e.createElement(n,{"data-slot":"form-label","data-error":!!a,className:s("data-[error=true]:text-destructive",t),htmlFor:o,...r})}function D({...t}){const{error:s,formItemId:n,formDescriptionId:a,formMessageId:o}=A();return e.createElement(r,{"data-slot":"form-control",id:n,"aria-describedby":s?`${a} ${o}`:`${a}`,"aria-invalid":!!s,...t})}function O({className:t,...r}){const{formDescriptionId:n}=A();return e.createElement("p",{"data-slot":"form-description",id:n,className:s("text-muted-foreground text-sm",t),...r})}function M({className:t,...r}){const{error:n,formMessageId:a}=A(),o=n?String(n?.message??""):r.children;return o?e.createElement("p",{"data-slot":"form-message",id:a,className:s("text-destructive text-sm",t),...r},o):null}export{I as Form,D as FormControl,O as FormDescription,w as FormField,C as FormItem,N as FormLabel,M as FormMessage,A as useFormField};
|
2
|
+
//# sourceMappingURL=index.mjs.map
|