@gv-tech/ui-web 2.9.1 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.cjs.js +1 -0
- package/dist/accordion.d.ts +18 -0
- package/dist/accordion.es.js +259 -0
- package/dist/alert-dialog.cjs.js +7 -0
- package/dist/alert-dialog.d.ts +43 -0
- package/dist/alert-dialog.es.js +171 -0
- package/dist/alert.cjs.js +1 -0
- package/dist/alert.d.ts +18 -0
- package/dist/alert.es.js +32 -0
- package/dist/aspect-ratio.cjs.js +1 -0
- package/dist/aspect-ratio.d.ts +10 -0
- package/dist/aspect-ratio.es.js +43 -0
- package/dist/avatar.cjs.js +1 -0
- package/dist/avatar.d.ts +15 -0
- package/dist/avatar.es.js +205 -0
- package/dist/badge.cjs.js +1 -0
- package/dist/badge.d.ts +16 -0
- package/dist/badge.es.js +26 -0
- package/dist/breadcrumb.cjs.js +1 -0
- package/dist/breadcrumb.d.ts +35 -0
- package/dist/breadcrumb.es.js +69 -0
- package/dist/button.cjs.js +1 -0
- package/dist/button.d.ts +17 -0
- package/dist/button.es.js +40 -0
- package/dist/calendar.cjs.js +1 -0
- package/dist/calendar.d.ts +29 -0
- package/dist/calendar.es.js +2976 -0
- package/dist/card.cjs.js +1 -0
- package/dist/card.d.ts +19 -0
- package/dist/card.es.js +33 -0
- package/dist/carousel.cjs.js +1 -0
- package/dist/carousel.d.ts +50 -0
- package/dist/carousel.es.js +1403 -0
- package/dist/chart.cjs.js +16 -0
- package/dist/chart.d.ts +60 -0
- package/dist/chart.es.js +4402 -0
- package/dist/checkbox.cjs.js +1 -0
- package/dist/checkbox.d.ts +10 -0
- package/dist/checkbox.es.js +258 -0
- package/dist/collapsible.cjs.js +1 -0
- package/dist/collapsible.d.ts +20 -0
- package/dist/collapsible.es.js +7 -0
- package/dist/command.cjs.js +1 -0
- package/dist/command.d.ts +115 -0
- package/dist/command.es.js +396 -0
- package/dist/context-menu.cjs.js +1 -0
- package/dist/context-menu.d.ts +80 -0
- package/dist/context-menu.es.js +328 -0
- package/dist/dialog.cjs.js +1 -0
- package/dist/dialog.d.ts +31 -0
- package/dist/dialog.es.js +66 -0
- package/dist/drawer.cjs.js +3 -0
- package/dist/drawer.d.ts +65 -0
- package/dist/drawer.es.js +1085 -0
- package/dist/dropdown-menu.cjs.js +1 -0
- package/dist/dropdown-menu.d.ts +80 -0
- package/dist/dropdown-menu.es.js +316 -0
- package/dist/form.cjs.js +1 -0
- package/dist/form.d.ts +53 -0
- package/dist/form.es.js +355 -0
- package/dist/hover-card.cjs.js +1 -0
- package/dist/hover-card.d.ts +19 -0
- package/dist/hover-card.es.js +188 -0
- package/dist/index-0ioNhtNM.mjs +10 -0
- package/dist/index-3j-XAIXT.mjs +55 -0
- package/dist/index-B2XtpfGY.js +1 -0
- package/dist/index-B39Lzq0v.js +1 -0
- package/dist/index-B7n6fy75.js +1 -0
- package/dist/index-B8dxbSWX.js +41 -0
- package/dist/index-BGIK9FQF.js +1 -0
- package/dist/index-BZPx6jYI.mjs +8 -0
- package/dist/index-BoNjHhm4.js +1 -0
- package/dist/index-BtZvtDmp.js +1 -0
- package/dist/index-Bv7qrYW6.mjs +180 -0
- package/dist/index-ByiPJW53.js +5 -0
- package/dist/index-C0dlIQIi.js +1 -0
- package/dist/index-C1qb0595.mjs +27 -0
- package/dist/index-C7HEunrh.mjs +15 -0
- package/dist/index-C8ni3LLa.js +1 -0
- package/dist/index-CCKe-Mpx.mjs +6 -0
- package/dist/index-CD6_IrA-.mjs +10 -0
- package/dist/index-CRyCZJLa.mjs +677 -0
- package/dist/index-CVx1AgNG.mjs +615 -0
- package/dist/index-Ce5TOFAK.js +1 -0
- package/dist/index-CeSLNJ60.mjs +32 -0
- package/dist/index-CefEQe_4.js +1 -0
- package/dist/index-Cj5hzyBi.js +1 -0
- package/dist/index-Cjj_rUPu.js +1 -0
- package/dist/index-Cl3G0jzM.js +1 -0
- package/dist/index-CsjrqSSN.js +1 -0
- package/dist/index-CwfE56Ep.mjs +1545 -0
- package/dist/index-CwyAfCwY.js +1 -0
- package/dist/index-CzY-WZXL.js +1 -0
- package/dist/index-D2HnlO3y.js +1 -0
- package/dist/index-DAWHN3cH.mjs +85 -0
- package/dist/index-DFdF7K7v.mjs +50 -0
- package/dist/index-DIsg7zU7.js +1 -0
- package/dist/index-DKN_vhyX.mjs +32 -0
- package/dist/index-DLcqcWxM.mjs +29 -0
- package/dist/index-DSxf1gN6.mjs +118 -0
- package/dist/index-DYxWvftI.js +1 -0
- package/dist/index-DaILh3TV.mjs +32 -0
- package/dist/index-Dfzl8TxY.mjs +136 -0
- package/dist/index-Dko2XdTk.js +1 -0
- package/dist/index-DlY82G31.mjs +245 -0
- package/dist/index-DnFcfnA9.mjs +13 -0
- package/dist/index-IZ2gq03c.mjs +68 -0
- package/dist/index-K9FzbxYw.mjs +93 -0
- package/dist/index-Le8p9oP4.mjs +60 -0
- package/dist/index-MQ0c3ZX_.js +1 -0
- package/dist/index-_XxjJPRD.js +1 -0
- package/dist/index-_wdrnYim.js +1 -0
- package/dist/index-jv3B4mTd.js +1 -0
- package/dist/index-kaM0u2Q1.js +1 -0
- package/dist/index-p6xVFRb4.mjs +52 -0
- package/dist/index-rKs9bXHr.mjs +6 -0
- package/dist/index-vuPgkS0V.mjs +70 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.d.ts +1288 -0
- package/dist/index.es.js +289 -0
- package/dist/input.cjs.js +1 -0
- package/dist/input.d.ts +9 -0
- package/dist/input.es.js +19 -0
- package/dist/jsx-runtime-nZSsnGb7.js +6 -0
- package/dist/jsx-runtime-tc70JA_2.mjs +264 -0
- package/dist/label.cjs.js +1 -0
- package/dist/label.d.ts +11 -0
- package/dist/label.es.js +22 -0
- package/dist/menubar.cjs.js +1 -0
- package/dist/menubar.d.ts +79 -0
- package/dist/menubar.es.js +473 -0
- package/dist/navigation-menu.cjs.js +1 -0
- package/dist/navigation-menu.d.ts +47 -0
- package/dist/navigation-menu.es.js +673 -0
- package/dist/pagination.cjs.js +1 -0
- package/dist/pagination.d.ts +68 -0
- package/dist/pagination.es.js +68 -0
- package/dist/popover.cjs.js +1 -0
- package/dist/popover.d.ts +24 -0
- package/dist/popover.es.js +242 -0
- package/dist/progress.cjs.js +6 -0
- package/dist/progress.d.ts +9 -0
- package/dist/progress.es.js +99 -0
- package/dist/radio-group.cjs.js +1 -0
- package/dist/radio-group.d.ts +16 -0
- package/dist/radio-group.es.js +253 -0
- package/dist/resizable.cjs.js +1 -0
- package/dist/resizable.d.ts +22 -0
- package/dist/resizable.es.js +1990 -0
- package/dist/scroll-area.cjs.js +1 -0
- package/dist/scroll-area.d.ts +14 -0
- package/dist/scroll-area.es.js +546 -0
- package/dist/search.cjs.js +1 -0
- package/dist/search.d.ts +15 -0
- package/dist/search.es.js +51 -0
- package/dist/select.cjs.js +1 -0
- package/dist/select.d.ts +54 -0
- package/dist/select.es.js +908 -0
- package/dist/separator.cjs.js +1 -0
- package/dist/separator.d.ts +9 -0
- package/dist/separator.es.js +35 -0
- package/dist/sheet.cjs.js +1 -0
- package/dist/sheet.d.ts +68 -0
- package/dist/sheet.es.js +66 -0
- package/dist/skeleton.cjs.js +1 -0
- package/dist/skeleton.d.ts +9 -0
- package/dist/skeleton.es.js +8 -0
- package/dist/slider.cjs.js +1 -0
- package/dist/slider.d.ts +9 -0
- package/dist/slider.es.js +442 -0
- package/dist/sonner.cjs.js +1 -0
- package/dist/sonner.d.ts +10 -0
- package/dist/sonner.es.js +764 -0
- package/dist/switch.cjs.js +1 -0
- package/dist/switch.d.ts +9 -0
- package/dist/switch.es.js +149 -0
- package/dist/table.cjs.js +1 -0
- package/dist/table.d.ts +43 -0
- package/dist/table.es.js +57 -0
- package/dist/tabs.cjs.js +1 -0
- package/dist/tabs.d.ts +24 -0
- package/dist/tabs.es.js +195 -0
- package/dist/text.cjs.js +1 -0
- package/dist/text.d.ts +17 -0
- package/dist/text.es.js +42 -0
- package/dist/textarea.cjs.js +1 -0
- package/dist/textarea.d.ts +9 -0
- package/dist/textarea.es.js +18 -0
- package/dist/theme-provider.cjs.js +1 -0
- package/dist/theme-provider.d.ts +9 -0
- package/dist/theme-provider.es.js +8 -0
- package/dist/theme-toggle.cjs.js +1 -0
- package/dist/theme-toggle.d.ts +8 -0
- package/dist/theme-toggle.es.js +78 -0
- package/dist/toast.cjs.js +1 -0
- package/dist/toast.d.ts +26 -0
- package/dist/toast.es.js +494 -0
- package/dist/toaster-CIpfms4W.js +1 -0
- package/dist/toaster-jBYXAPRk.mjs +118 -0
- package/dist/toaster.cjs.js +1 -0
- package/dist/toaster.d.ts +6 -0
- package/dist/toaster.es.js +6 -0
- package/dist/toggle-group.cjs.js +1 -0
- package/dist/toggle-group.d.ts +18 -0
- package/dist/toggle-group.es.js +170 -0
- package/dist/toggle.cjs.js +1 -0
- package/dist/toggle.d.ts +14 -0
- package/dist/toggle.es.js +14 -0
- package/dist/tooltip.cjs.js +1 -0
- package/dist/tooltip.d.ts +25 -0
- package/dist/tooltip.es.js +342 -0
- package/dist/utils-B6yFEsav.mjs +8 -0
- package/dist/utils-IjLH3w2e.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./jsx-runtime-nZSsnGb7.js"),Se=require("react"),we=require("./index-BGIK9FQF.js"),_e=require("./index-Dko2XdTk.js"),v=require("./index-BtZvtDmp.js"),Ce=require("./index-_XxjJPRD.js"),Ie=require("./index-D2HnlO3y.js"),S=require("./index-CefEQe_4.js"),d=require("./index-B7n6fy75.js"),y=require("./index-DIsg7zU7.js"),$=require("./index-Ce5TOFAK.js"),I=require("lucide-react"),R=require("./utils-IjLH3w2e.js");function Pe(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const s=Pe(Se);var E="Menubar",[w,Ae,Oe]=we.createCollection(E),[D]=Ie.createContextScope(E,[Oe,y.createRovingFocusGroupScope]),l=d.createMenuScope(),k=y.createRovingFocusGroupScope(),[Te,P]=D(E),F=s.forwardRef((e,t)=>{const{__scopeMenubar:r,value:n,onValueChange:o,defaultValue:x,loop:p=!0,dir:c,...u}=e,b=_e.useDirection(c),i=k(r),[g,f]=$.useControllableState({prop:n,onChange:o,defaultProp:x??"",caller:E}),[M,m]=s.useState(null);return a.jsxRuntimeExports.jsx(Te,{scope:r,value:g,onMenuOpen:s.useCallback(j=>{f(j),m(j)},[f]),onMenuClose:s.useCallback(()=>f(""),[f]),onMenuToggle:s.useCallback(j=>{f(O=>O?"":j),m(j)},[f]),dir:b,loop:p,children:a.jsxRuntimeExports.jsx(w.Provider,{scope:r,children:a.jsxRuntimeExports.jsx(w.Slot,{scope:r,children:a.jsxRuntimeExports.jsx(y.Root,{asChild:!0,...i,orientation:"horizontal",loop:p,dir:b,currentTabStopId:M,onCurrentTabStopIdChange:m,children:a.jsxRuntimeExports.jsx(v.Primitive.div,{role:"menubar",...u,ref:t})})})})})});F.displayName=E;var A="MenubarMenu",[Ge,K]=D(A),q=e=>{const{__scopeMenubar:t,value:r,...n}=e,o=S.useId(),x=r||o||"LEGACY_REACT_AUTO_VALUE",p=P(A,t),c=l(t),u=s.useRef(null),b=s.useRef(!1),i=p.value===x;return s.useEffect(()=>{i||(b.current=!1)},[i]),a.jsxRuntimeExports.jsx(Ge,{scope:t,value:x,triggerId:S.useId(),triggerRef:u,contentId:S.useId(),wasKeyboardTriggerOpenRef:b,children:a.jsxRuntimeExports.jsx(d.Root3,{...c,open:i,onOpenChange:g=>{g||p.onMenuClose()},modal:!1,dir:p.dir,...n})})};q.displayName=A;var _="MenubarTrigger",L=s.forwardRef((e,t)=>{const{__scopeMenubar:r,disabled:n=!1,...o}=e,x=k(r),p=l(r),c=P(_,r),u=K(_,r),b=s.useRef(null),i=Ce.useComposedRefs(t,b,u.triggerRef),[g,f]=s.useState(!1),M=c.value===u.value;return a.jsxRuntimeExports.jsx(w.ItemSlot,{scope:r,value:u.value,disabled:n,children:a.jsxRuntimeExports.jsx(y.Item,{asChild:!0,...x,focusable:!n,tabStopId:u.value,children:a.jsxRuntimeExports.jsx(d.Anchor2,{asChild:!0,...p,children:a.jsxRuntimeExports.jsx(v.Primitive.button,{type:"button",role:"menuitem",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":M,"aria-controls":M?u.contentId:void 0,"data-highlighted":g?"":void 0,"data-state":M?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:i,onPointerDown:v.composeEventHandlers(e.onPointerDown,m=>{!n&&m.button===0&&m.ctrlKey===!1&&(c.onMenuOpen(u.value),M||m.preventDefault())}),onPointerEnter:v.composeEventHandlers(e.onPointerEnter,()=>{c.value&&!M&&(c.onMenuOpen(u.value),b.current?.focus())}),onKeyDown:v.composeEventHandlers(e.onKeyDown,m=>{n||(["Enter"," "].includes(m.key)&&c.onMenuToggle(u.value),m.key==="ArrowDown"&&c.onMenuOpen(u.value),["Enter"," ","ArrowDown"].includes(m.key)&&(u.wasKeyboardTriggerOpenRef.current=!0,m.preventDefault()))}),onFocus:v.composeEventHandlers(e.onFocus,()=>f(!0)),onBlur:v.composeEventHandlers(e.onBlur,()=>f(!1))})})})})});L.displayName=_;var $e="MenubarPortal",B=e=>{const{__scopeMenubar:t,...r}=e,n=l(t);return a.jsxRuntimeExports.jsx(d.Portal,{...n,...r})};B.displayName=$e;var C="MenubarContent",H=s.forwardRef((e,t)=>{const{__scopeMenubar:r,align:n="start",...o}=e,x=l(r),p=P(C,r),c=K(C,r),u=Ae(r),b=s.useRef(!1);return a.jsxRuntimeExports.jsx(d.Content2,{id:c.contentId,"aria-labelledby":c.triggerId,"data-radix-menubar-content":"",...x,...o,ref:t,align:n,onCloseAutoFocus:v.composeEventHandlers(e.onCloseAutoFocus,i=>{!p.value&&!b.current&&c.triggerRef.current?.focus(),b.current=!1,i.preventDefault()}),onFocusOutside:v.composeEventHandlers(e.onFocusOutside,i=>{const g=i.target;u().some(M=>M.ref.current?.contains(g))&&i.preventDefault()}),onInteractOutside:v.composeEventHandlers(e.onInteractOutside,()=>{b.current=!0}),onEntryFocus:i=>{c.wasKeyboardTriggerOpenRef.current||i.preventDefault()},onKeyDown:v.composeEventHandlers(e.onKeyDown,i=>{if(["ArrowRight","ArrowLeft"].includes(i.key)){const g=i.target,f=g.hasAttribute("data-radix-menubar-subtrigger"),M=g.closest("[data-radix-menubar-content]")!==i.currentTarget,j=(p.dir==="rtl"?"ArrowRight":"ArrowLeft")===i.key;if(!j&&f||M&&j)return;let h=u().filter(N=>!N.disabled).map(N=>N.value);j&&h.reverse();const T=h.indexOf(c.value);h=p.loop?Xe(h,T+1):h.slice(T+1);const[G]=h;G&&p.onMenuOpen(G)}},{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});H.displayName=C;var De="MenubarGroup",U=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.Group,{...o,...n,ref:t})});U.displayName=De;var ke="MenubarLabel",z=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.Label,{...o,...n,ref:t})});z.displayName=ke;var Fe="MenubarItem",V=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.Item2,{...o,...n,ref:t})});V.displayName=Fe;var Ke="MenubarCheckboxItem",W=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.CheckboxItem,{...o,...n,ref:t})});W.displayName=Ke;var qe="MenubarRadioGroup",X=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.RadioGroup,{...o,...n,ref:t})});X.displayName=qe;var Le="MenubarRadioItem",Y=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.RadioItem,{...o,...n,ref:t})});Y.displayName=Le;var Be="MenubarItemIndicator",J=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.ItemIndicator,{...o,...n,ref:t})});J.displayName=Be;var He="MenubarSeparator",Q=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.Separator,{...o,...n,ref:t})});Q.displayName=He;var Ue="MenubarArrow",ze=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.Arrow2,{...o,...n,ref:t})});ze.displayName=Ue;var Z="MenubarSub",ee=e=>{const{__scopeMenubar:t,children:r,open:n,onOpenChange:o,defaultOpen:x}=e,p=l(t),[c,u]=$.useControllableState({prop:n,defaultProp:x??!1,onChange:o,caller:Z});return a.jsxRuntimeExports.jsx(d.Sub,{...p,open:c,onOpenChange:u,children:r})};ee.displayName=Z;var Ve="MenubarSubTrigger",re=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.SubTrigger,{"data-radix-menubar-subtrigger":"",...o,...n,ref:t})});re.displayName=Ve;var We="MenubarSubContent",te=s.forwardRef((e,t)=>{const{__scopeMenubar:r,...n}=e,o=l(r);return a.jsxRuntimeExports.jsx(d.SubContent,{...o,"data-radix-menubar-content":"",...n,ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});te.displayName=We;function Xe(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ne=F,Ye=q,ae=L,oe=B,se=H,Je=U,ue=z,ie=V,ce=W,Qe=X,de=Y,le=J,pe=Q,Ze=ee,me=re,xe=te;function er({...e}){return a.jsxRuntimeExports.jsx(Ye,{...e})}function rr({...e}){return a.jsxRuntimeExports.jsx(Je,{...e})}function tr({...e}){return a.jsxRuntimeExports.jsx(oe,{...e})}function nr({...e}){return a.jsxRuntimeExports.jsx(Qe,{...e})}function ar({...e}){return a.jsxRuntimeExports.jsx(Ze,{"data-slot":"menubar-sub",...e})}const be=s.forwardRef(({className:e,...t},r)=>a.jsxRuntimeExports.jsx(ne,{ref:r,className:R.cn("bg-background flex h-9 items-center space-x-1 rounded-md border p-1 shadow-sm",e),...t}));be.displayName=ne.displayName;const fe=s.forwardRef(({className:e,...t},r)=>a.jsxRuntimeExports.jsx(ae,{ref:r,className:R.cn("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-3 py-1 text-sm font-medium outline-none select-none",e),...t}));fe.displayName=ae.displayName;const ge=s.forwardRef(({className:e,inset:t,children:r,...n},o)=>a.jsxRuntimeExports.jsxs(me,{ref:o,className:R.cn("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-none select-none",t&&"pl-8",e),...n,children:[r,a.jsxRuntimeExports.jsx(I.ChevronRight,{className:"ml-auto h-4 w-4"})]}));ge.displayName=me.displayName;const Me=s.forwardRef(({className:e,...t},r)=>a.jsxRuntimeExports.jsx(xe,{ref:r,className:R.cn("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] origin-[--radix-menubar-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",e),...t}));Me.displayName=xe.displayName;const ve=s.forwardRef(({className:e,align:t="start",alignOffset:r=-4,sideOffset:n=8,...o},x)=>a.jsxRuntimeExports.jsx(oe,{children:a.jsxRuntimeExports.jsx(se,{ref:x,align:t,alignOffset:r,sideOffset:n,className:R.cn("bg-popover text-popover-foreground data-[state=open]:animate-in 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-[12rem] origin-[--radix-menubar-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-md",e),...o})}));ve.displayName=se.displayName;const Re=s.forwardRef(({className:e,inset:t,...r},n)=>a.jsxRuntimeExports.jsx(ie,{ref:n,className:R.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));Re.displayName=ie.displayName;const je=s.forwardRef(({className:e,children:t,checked:r,...n},o)=>a.jsxRuntimeExports.jsxs(ce,{ref:o,className:R.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(le,{children:a.jsxRuntimeExports.jsx(I.Check,{className:"h-4 w-4"})})}),t]}));je.displayName=ce.displayName;const he=s.forwardRef(({className:e,children:t,...r},n)=>a.jsxRuntimeExports.jsxs(de,{ref:n,className:R.cn("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[a.jsxRuntimeExports.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:a.jsxRuntimeExports.jsx(le,{children:a.jsxRuntimeExports.jsx(I.Circle,{className:"h-4 w-4 fill-current"})})}),t]}));he.displayName=de.displayName;const Ee=s.forwardRef(({className:e,inset:t,...r},n)=>a.jsxRuntimeExports.jsx(ue,{ref:n,className:R.cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Ee.displayName=ue.displayName;const ye=s.forwardRef(({className:e,...t},r)=>a.jsxRuntimeExports.jsx(pe,{ref:r,className:R.cn("bg-muted -mx-1 my-1 h-px",e),...t}));ye.displayName=pe.displayName;const Ne=({className:e,...t})=>a.jsxRuntimeExports.jsx("span",{className:R.cn("text-muted-foreground ml-auto text-xs tracking-widest",e),...t});Ne.displayname="MenubarShortcut";exports.Menubar=be;exports.MenubarCheckboxItem=je;exports.MenubarContent=ve;exports.MenubarGroup=rr;exports.MenubarItem=Re;exports.MenubarLabel=Ee;exports.MenubarMenu=er;exports.MenubarPortal=tr;exports.MenubarRadioGroup=nr;exports.MenubarRadioItem=he;exports.MenubarSeparator=ye;exports.MenubarShortcut=Ne;exports.MenubarSub=ar;exports.MenubarSubContent=Me;exports.MenubarSubTrigger=ge;exports.MenubarTrigger=fe;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { MenubarCheckboxItemBaseProps as MenubarCheckboxItemProps } from '../../ui-core/src';
|
|
3
|
+
import { MenubarContentBaseProps as MenubarContentProps } from '../../ui-core/src';
|
|
4
|
+
import { MenubarItemBaseProps as MenubarItemProps } from '../../ui-core/src';
|
|
5
|
+
import { MenubarLabelBaseProps as MenubarLabelProps } from '../../ui-core/src';
|
|
6
|
+
import { MenubarMenuBaseProps as MenubarMenuProps } from '../../ui-core/src';
|
|
7
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
8
|
+
import { MenubarBaseProps as MenubarProps } from '../../ui-core/src';
|
|
9
|
+
import { MenubarRadioItemBaseProps as MenubarRadioItemProps } from '../../ui-core/src';
|
|
10
|
+
import { MenubarSeparatorBaseProps as MenubarSeparatorProps } from '../../ui-core/src';
|
|
11
|
+
import { MenubarShortcutBaseProps as MenubarShortcutProps } from '../../ui-core/src';
|
|
12
|
+
import { MenubarSubContentBaseProps as MenubarSubContentProps } from '../../ui-core/src';
|
|
13
|
+
import { MenubarSubBaseProps as MenubarSubProps } from '../../ui-core/src';
|
|
14
|
+
import { MenubarSubTriggerBaseProps as MenubarSubTriggerProps } from '../../ui-core/src';
|
|
15
|
+
import { MenubarTriggerBaseProps as MenubarTriggerProps } from '../../ui-core/src';
|
|
16
|
+
import * as React_2 from 'react';
|
|
17
|
+
|
|
18
|
+
export declare const Menubar: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
|
|
20
|
+
export declare const MenubarCheckboxItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarCheckboxItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
|
|
22
|
+
export { MenubarCheckboxItemProps }
|
|
23
|
+
|
|
24
|
+
export declare const MenubarContent: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
|
|
26
|
+
export { MenubarContentProps }
|
|
27
|
+
|
|
28
|
+
export declare function MenubarGroup({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Group>): JSX.Element;
|
|
29
|
+
|
|
30
|
+
export declare const MenubarItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
|
|
32
|
+
export { MenubarItemProps }
|
|
33
|
+
|
|
34
|
+
export declare const MenubarLabel: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarLabelProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
|
|
36
|
+
export { MenubarLabelProps }
|
|
37
|
+
|
|
38
|
+
export declare function MenubarMenu({ ...props }: MenubarPrimitive.MenubarMenuProps & MenubarMenuProps): JSX.Element;
|
|
39
|
+
|
|
40
|
+
export { MenubarMenuProps }
|
|
41
|
+
|
|
42
|
+
export declare function MenubarPortal({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.Portal>): JSX.Element;
|
|
43
|
+
|
|
44
|
+
export { MenubarProps }
|
|
45
|
+
|
|
46
|
+
export declare function MenubarRadioGroup({ ...props }: React_2.ComponentProps<typeof MenubarPrimitive.RadioGroup>): JSX.Element;
|
|
47
|
+
|
|
48
|
+
export declare const MenubarRadioItem: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarRadioItemProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
|
|
50
|
+
export { MenubarRadioItemProps }
|
|
51
|
+
|
|
52
|
+
export declare const MenubarSeparator: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarSeparatorProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
53
|
+
|
|
54
|
+
export { MenubarSeparatorProps }
|
|
55
|
+
|
|
56
|
+
export declare const MenubarShortcut: {
|
|
57
|
+
({ className, ...props }: React_2.HTMLAttributes<HTMLSpanElement> & MenubarShortcutProps): JSX.Element;
|
|
58
|
+
displayname: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export { MenubarShortcutProps }
|
|
62
|
+
|
|
63
|
+
export declare function MenubarSub({ ...props }: MenubarPrimitive.MenubarSubProps & MenubarSubProps): JSX.Element;
|
|
64
|
+
|
|
65
|
+
export declare const MenubarSubContent: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarSubContentProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
66
|
+
|
|
67
|
+
export { MenubarSubContentProps }
|
|
68
|
+
|
|
69
|
+
export { MenubarSubProps }
|
|
70
|
+
|
|
71
|
+
export declare const MenubarSubTrigger: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React_2.RefAttributes<HTMLDivElement>, "ref"> & MenubarSubTriggerProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
72
|
+
|
|
73
|
+
export { MenubarSubTriggerProps }
|
|
74
|
+
|
|
75
|
+
export declare const MenubarTrigger: React_2.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React_2.RefAttributes<HTMLButtonElement>, "ref"> & MenubarTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
76
|
+
|
|
77
|
+
export { MenubarTriggerProps }
|
|
78
|
+
|
|
79
|
+
export { }
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
import { j as n } from "./jsx-runtime-tc70JA_2.mjs";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { c as fe } from "./index-DFdF7K7v.mjs";
|
|
4
|
+
import { u as be } from "./index-CD6_IrA-.mjs";
|
|
5
|
+
import { P as T, c as h } from "./index-K9FzbxYw.mjs";
|
|
6
|
+
import { u as xe } from "./index-DLcqcWxM.mjs";
|
|
7
|
+
import { c as ge } from "./index-IZ2gq03c.mjs";
|
|
8
|
+
import { u as w } from "./index-DnFcfnA9.mjs";
|
|
9
|
+
import { A as ve, S as Me, a as he, P as Ne, C as ye, I as Re, b as we, c as Se, R as _e, L as Ce, d as Ie, e as je, G as Ae, f as Pe, g as Ee, h as Te, i as Oe } from "./index-CVx1AgNG.mjs";
|
|
10
|
+
import { R as Ge, I as De, c as O } from "./index-Bv7qrYW6.mjs";
|
|
11
|
+
import { u as G } from "./index-p6xVFRb4.mjs";
|
|
12
|
+
import { ChevronRight as ke, Check as $e, Circle as Ke } from "lucide-react";
|
|
13
|
+
import { c as v } from "./utils-B6yFEsav.mjs";
|
|
14
|
+
var y = "Menubar", [S, Fe, Le] = fe(y), [D] = ge(y, [
|
|
15
|
+
Le,
|
|
16
|
+
O
|
|
17
|
+
]), d = je(), k = O(), [Be, I] = D(y), $ = s.forwardRef(
|
|
18
|
+
(e, a) => {
|
|
19
|
+
const {
|
|
20
|
+
__scopeMenubar: r,
|
|
21
|
+
value: t,
|
|
22
|
+
onValueChange: o,
|
|
23
|
+
defaultValue: m,
|
|
24
|
+
loop: l = !0,
|
|
25
|
+
dir: c,
|
|
26
|
+
...u
|
|
27
|
+
} = e, f = be(c), i = k(r), [x, b] = G({
|
|
28
|
+
prop: t,
|
|
29
|
+
onChange: o,
|
|
30
|
+
defaultProp: m ?? "",
|
|
31
|
+
caller: y
|
|
32
|
+
}), [g, p] = s.useState(null);
|
|
33
|
+
return /* @__PURE__ */ n.jsx(
|
|
34
|
+
Be,
|
|
35
|
+
{
|
|
36
|
+
scope: r,
|
|
37
|
+
value: x,
|
|
38
|
+
onMenuOpen: s.useCallback(
|
|
39
|
+
(M) => {
|
|
40
|
+
b(M), p(M);
|
|
41
|
+
},
|
|
42
|
+
[b]
|
|
43
|
+
),
|
|
44
|
+
onMenuClose: s.useCallback(() => b(""), [b]),
|
|
45
|
+
onMenuToggle: s.useCallback(
|
|
46
|
+
(M) => {
|
|
47
|
+
b((A) => A ? "" : M), p(M);
|
|
48
|
+
},
|
|
49
|
+
[b]
|
|
50
|
+
),
|
|
51
|
+
dir: f,
|
|
52
|
+
loop: l,
|
|
53
|
+
children: /* @__PURE__ */ n.jsx(S.Provider, { scope: r, children: /* @__PURE__ */ n.jsx(S.Slot, { scope: r, children: /* @__PURE__ */ n.jsx(
|
|
54
|
+
Ge,
|
|
55
|
+
{
|
|
56
|
+
asChild: !0,
|
|
57
|
+
...i,
|
|
58
|
+
orientation: "horizontal",
|
|
59
|
+
loop: l,
|
|
60
|
+
dir: f,
|
|
61
|
+
currentTabStopId: g,
|
|
62
|
+
onCurrentTabStopIdChange: p,
|
|
63
|
+
children: /* @__PURE__ */ n.jsx(T.div, { role: "menubar", ...u, ref: a })
|
|
64
|
+
}
|
|
65
|
+
) }) })
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
$.displayName = y;
|
|
71
|
+
var j = "MenubarMenu", [Ue, K] = D(j), F = (e) => {
|
|
72
|
+
const { __scopeMenubar: a, value: r, ...t } = e, o = w(), m = r || o || "LEGACY_REACT_AUTO_VALUE", l = I(j, a), c = d(a), u = s.useRef(null), f = s.useRef(!1), i = l.value === m;
|
|
73
|
+
return s.useEffect(() => {
|
|
74
|
+
i || (f.current = !1);
|
|
75
|
+
}, [i]), /* @__PURE__ */ n.jsx(
|
|
76
|
+
Ue,
|
|
77
|
+
{
|
|
78
|
+
scope: a,
|
|
79
|
+
value: m,
|
|
80
|
+
triggerId: w(),
|
|
81
|
+
triggerRef: u,
|
|
82
|
+
contentId: w(),
|
|
83
|
+
wasKeyboardTriggerOpenRef: f,
|
|
84
|
+
children: /* @__PURE__ */ n.jsx(
|
|
85
|
+
Pe,
|
|
86
|
+
{
|
|
87
|
+
...c,
|
|
88
|
+
open: i,
|
|
89
|
+
onOpenChange: (x) => {
|
|
90
|
+
x || l.onMenuClose();
|
|
91
|
+
},
|
|
92
|
+
modal: !1,
|
|
93
|
+
dir: l.dir,
|
|
94
|
+
...t
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
F.displayName = j;
|
|
101
|
+
var _ = "MenubarTrigger", L = s.forwardRef(
|
|
102
|
+
(e, a) => {
|
|
103
|
+
const { __scopeMenubar: r, disabled: t = !1, ...o } = e, m = k(r), l = d(r), c = I(_, r), u = K(_, r), f = s.useRef(null), i = xe(a, f, u.triggerRef), [x, b] = s.useState(!1), g = c.value === u.value;
|
|
104
|
+
return /* @__PURE__ */ n.jsx(S.ItemSlot, { scope: r, value: u.value, disabled: t, children: /* @__PURE__ */ n.jsx(
|
|
105
|
+
De,
|
|
106
|
+
{
|
|
107
|
+
asChild: !0,
|
|
108
|
+
...m,
|
|
109
|
+
focusable: !t,
|
|
110
|
+
tabStopId: u.value,
|
|
111
|
+
children: /* @__PURE__ */ n.jsx(ve, { asChild: !0, ...l, children: /* @__PURE__ */ n.jsx(
|
|
112
|
+
T.button,
|
|
113
|
+
{
|
|
114
|
+
type: "button",
|
|
115
|
+
role: "menuitem",
|
|
116
|
+
id: u.triggerId,
|
|
117
|
+
"aria-haspopup": "menu",
|
|
118
|
+
"aria-expanded": g,
|
|
119
|
+
"aria-controls": g ? u.contentId : void 0,
|
|
120
|
+
"data-highlighted": x ? "" : void 0,
|
|
121
|
+
"data-state": g ? "open" : "closed",
|
|
122
|
+
"data-disabled": t ? "" : void 0,
|
|
123
|
+
disabled: t,
|
|
124
|
+
...o,
|
|
125
|
+
ref: i,
|
|
126
|
+
onPointerDown: h(e.onPointerDown, (p) => {
|
|
127
|
+
!t && p.button === 0 && p.ctrlKey === !1 && (c.onMenuOpen(u.value), g || p.preventDefault());
|
|
128
|
+
}),
|
|
129
|
+
onPointerEnter: h(e.onPointerEnter, () => {
|
|
130
|
+
c.value && !g && (c.onMenuOpen(u.value), f.current?.focus());
|
|
131
|
+
}),
|
|
132
|
+
onKeyDown: h(e.onKeyDown, (p) => {
|
|
133
|
+
t || (["Enter", " "].includes(p.key) && c.onMenuToggle(u.value), p.key === "ArrowDown" && c.onMenuOpen(u.value), ["Enter", " ", "ArrowDown"].includes(p.key) && (u.wasKeyboardTriggerOpenRef.current = !0, p.preventDefault()));
|
|
134
|
+
}),
|
|
135
|
+
onFocus: h(e.onFocus, () => b(!0)),
|
|
136
|
+
onBlur: h(e.onBlur, () => b(!1))
|
|
137
|
+
}
|
|
138
|
+
) })
|
|
139
|
+
}
|
|
140
|
+
) });
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
L.displayName = _;
|
|
144
|
+
var ze = "MenubarPortal", B = (e) => {
|
|
145
|
+
const { __scopeMenubar: a, ...r } = e, t = d(a);
|
|
146
|
+
return /* @__PURE__ */ n.jsx(Ne, { ...t, ...r });
|
|
147
|
+
};
|
|
148
|
+
B.displayName = ze;
|
|
149
|
+
var C = "MenubarContent", U = s.forwardRef(
|
|
150
|
+
(e, a) => {
|
|
151
|
+
const { __scopeMenubar: r, align: t = "start", ...o } = e, m = d(r), l = I(C, r), c = K(C, r), u = Fe(r), f = s.useRef(!1);
|
|
152
|
+
return /* @__PURE__ */ n.jsx(
|
|
153
|
+
ye,
|
|
154
|
+
{
|
|
155
|
+
id: c.contentId,
|
|
156
|
+
"aria-labelledby": c.triggerId,
|
|
157
|
+
"data-radix-menubar-content": "",
|
|
158
|
+
...m,
|
|
159
|
+
...o,
|
|
160
|
+
ref: a,
|
|
161
|
+
align: t,
|
|
162
|
+
onCloseAutoFocus: h(e.onCloseAutoFocus, (i) => {
|
|
163
|
+
!l.value && !f.current && c.triggerRef.current?.focus(), f.current = !1, i.preventDefault();
|
|
164
|
+
}),
|
|
165
|
+
onFocusOutside: h(e.onFocusOutside, (i) => {
|
|
166
|
+
const x = i.target;
|
|
167
|
+
u().some((g) => g.ref.current?.contains(x)) && i.preventDefault();
|
|
168
|
+
}),
|
|
169
|
+
onInteractOutside: h(e.onInteractOutside, () => {
|
|
170
|
+
f.current = !0;
|
|
171
|
+
}),
|
|
172
|
+
onEntryFocus: (i) => {
|
|
173
|
+
c.wasKeyboardTriggerOpenRef.current || i.preventDefault();
|
|
174
|
+
},
|
|
175
|
+
onKeyDown: h(
|
|
176
|
+
e.onKeyDown,
|
|
177
|
+
(i) => {
|
|
178
|
+
if (["ArrowRight", "ArrowLeft"].includes(i.key)) {
|
|
179
|
+
const x = i.target, b = x.hasAttribute("data-radix-menubar-subtrigger"), g = x.closest("[data-radix-menubar-content]") !== i.currentTarget, M = (l.dir === "rtl" ? "ArrowRight" : "ArrowLeft") === i.key;
|
|
180
|
+
if (!M && b || g && M) return;
|
|
181
|
+
let N = u().filter((R) => !R.disabled).map((R) => R.value);
|
|
182
|
+
M && N.reverse();
|
|
183
|
+
const P = N.indexOf(c.value);
|
|
184
|
+
N = l.loop ? tr(N, P + 1) : N.slice(P + 1);
|
|
185
|
+
const [E] = N;
|
|
186
|
+
E && l.onMenuOpen(E);
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{ checkForDefaultPrevented: !1 }
|
|
190
|
+
),
|
|
191
|
+
style: {
|
|
192
|
+
...e.style,
|
|
193
|
+
"--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
194
|
+
"--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
|
|
195
|
+
"--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
|
|
196
|
+
"--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
|
|
197
|
+
"--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
);
|
|
203
|
+
U.displayName = C;
|
|
204
|
+
var Ve = "MenubarGroup", z = s.forwardRef(
|
|
205
|
+
(e, a) => {
|
|
206
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
207
|
+
return /* @__PURE__ */ n.jsx(Ae, { ...o, ...t, ref: a });
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
z.displayName = Ve;
|
|
211
|
+
var He = "MenubarLabel", V = s.forwardRef(
|
|
212
|
+
(e, a) => {
|
|
213
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
214
|
+
return /* @__PURE__ */ n.jsx(Ce, { ...o, ...t, ref: a });
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
V.displayName = He;
|
|
218
|
+
var We = "MenubarItem", H = s.forwardRef(
|
|
219
|
+
(e, a) => {
|
|
220
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
221
|
+
return /* @__PURE__ */ n.jsx(Re, { ...o, ...t, ref: a });
|
|
222
|
+
}
|
|
223
|
+
);
|
|
224
|
+
H.displayName = We;
|
|
225
|
+
var Xe = "MenubarCheckboxItem", W = s.forwardRef(
|
|
226
|
+
(e, a) => {
|
|
227
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
228
|
+
return /* @__PURE__ */ n.jsx(we, { ...o, ...t, ref: a });
|
|
229
|
+
}
|
|
230
|
+
);
|
|
231
|
+
W.displayName = Xe;
|
|
232
|
+
var Ye = "MenubarRadioGroup", X = s.forwardRef(
|
|
233
|
+
(e, a) => {
|
|
234
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
235
|
+
return /* @__PURE__ */ n.jsx(Ee, { ...o, ...t, ref: a });
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
X.displayName = Ye;
|
|
239
|
+
var qe = "MenubarRadioItem", Y = s.forwardRef(
|
|
240
|
+
(e, a) => {
|
|
241
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
242
|
+
return /* @__PURE__ */ n.jsx(_e, { ...o, ...t, ref: a });
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
Y.displayName = qe;
|
|
246
|
+
var Je = "MenubarItemIndicator", q = s.forwardRef((e, a) => {
|
|
247
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
248
|
+
return /* @__PURE__ */ n.jsx(Se, { ...o, ...t, ref: a });
|
|
249
|
+
});
|
|
250
|
+
q.displayName = Je;
|
|
251
|
+
var Qe = "MenubarSeparator", J = s.forwardRef(
|
|
252
|
+
(e, a) => {
|
|
253
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
254
|
+
return /* @__PURE__ */ n.jsx(Ie, { ...o, ...t, ref: a });
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
J.displayName = Qe;
|
|
258
|
+
var Ze = "MenubarArrow", er = s.forwardRef(
|
|
259
|
+
(e, a) => {
|
|
260
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
261
|
+
return /* @__PURE__ */ n.jsx(Oe, { ...o, ...t, ref: a });
|
|
262
|
+
}
|
|
263
|
+
);
|
|
264
|
+
er.displayName = Ze;
|
|
265
|
+
var Q = "MenubarSub", Z = (e) => {
|
|
266
|
+
const { __scopeMenubar: a, children: r, open: t, onOpenChange: o, defaultOpen: m } = e, l = d(a), [c, u] = G({
|
|
267
|
+
prop: t,
|
|
268
|
+
defaultProp: m ?? !1,
|
|
269
|
+
onChange: o,
|
|
270
|
+
caller: Q
|
|
271
|
+
});
|
|
272
|
+
return /* @__PURE__ */ n.jsx(Te, { ...l, open: c, onOpenChange: u, children: r });
|
|
273
|
+
};
|
|
274
|
+
Z.displayName = Q;
|
|
275
|
+
var rr = "MenubarSubTrigger", ee = s.forwardRef(
|
|
276
|
+
(e, a) => {
|
|
277
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
278
|
+
return /* @__PURE__ */ n.jsx(
|
|
279
|
+
Me,
|
|
280
|
+
{
|
|
281
|
+
"data-radix-menubar-subtrigger": "",
|
|
282
|
+
...o,
|
|
283
|
+
...t,
|
|
284
|
+
ref: a
|
|
285
|
+
}
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
ee.displayName = rr;
|
|
290
|
+
var ar = "MenubarSubContent", re = s.forwardRef(
|
|
291
|
+
(e, a) => {
|
|
292
|
+
const { __scopeMenubar: r, ...t } = e, o = d(r);
|
|
293
|
+
return /* @__PURE__ */ n.jsx(
|
|
294
|
+
he,
|
|
295
|
+
{
|
|
296
|
+
...o,
|
|
297
|
+
"data-radix-menubar-content": "",
|
|
298
|
+
...t,
|
|
299
|
+
ref: a,
|
|
300
|
+
style: {
|
|
301
|
+
...e.style,
|
|
302
|
+
"--radix-menubar-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
303
|
+
"--radix-menubar-content-available-width": "var(--radix-popper-available-width)",
|
|
304
|
+
"--radix-menubar-content-available-height": "var(--radix-popper-available-height)",
|
|
305
|
+
"--radix-menubar-trigger-width": "var(--radix-popper-anchor-width)",
|
|
306
|
+
"--radix-menubar-trigger-height": "var(--radix-popper-anchor-height)"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
re.displayName = ar;
|
|
313
|
+
function tr(e, a) {
|
|
314
|
+
return e.map((r, t) => e[(a + t) % e.length]);
|
|
315
|
+
}
|
|
316
|
+
var ae = $, nr = F, te = L, ne = B, oe = U, or = z, se = V, ue = H, ie = W, sr = X, ce = Y, de = q, le = J, ur = Z, pe = ee, me = re;
|
|
317
|
+
function Er({ ...e }) {
|
|
318
|
+
return /* @__PURE__ */ n.jsx(nr, { ...e });
|
|
319
|
+
}
|
|
320
|
+
function Tr({ ...e }) {
|
|
321
|
+
return /* @__PURE__ */ n.jsx(or, { ...e });
|
|
322
|
+
}
|
|
323
|
+
function Or({ ...e }) {
|
|
324
|
+
return /* @__PURE__ */ n.jsx(ne, { ...e });
|
|
325
|
+
}
|
|
326
|
+
function Gr({ ...e }) {
|
|
327
|
+
return /* @__PURE__ */ n.jsx(sr, { ...e });
|
|
328
|
+
}
|
|
329
|
+
function Dr({ ...e }) {
|
|
330
|
+
return /* @__PURE__ */ n.jsx(ur, { "data-slot": "menubar-sub", ...e });
|
|
331
|
+
}
|
|
332
|
+
const ir = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ n.jsx(
|
|
333
|
+
ae,
|
|
334
|
+
{
|
|
335
|
+
ref: r,
|
|
336
|
+
className: v("bg-background flex h-9 items-center space-x-1 rounded-md border p-1 shadow-sm", e),
|
|
337
|
+
...a
|
|
338
|
+
}
|
|
339
|
+
));
|
|
340
|
+
ir.displayName = ae.displayName;
|
|
341
|
+
const cr = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ n.jsx(
|
|
342
|
+
te,
|
|
343
|
+
{
|
|
344
|
+
ref: r,
|
|
345
|
+
className: v(
|
|
346
|
+
"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-3 py-1 text-sm font-medium outline-none select-none",
|
|
347
|
+
e
|
|
348
|
+
),
|
|
349
|
+
...a
|
|
350
|
+
}
|
|
351
|
+
));
|
|
352
|
+
cr.displayName = te.displayName;
|
|
353
|
+
const dr = s.forwardRef(({ className: e, inset: a, children: r, ...t }, o) => /* @__PURE__ */ n.jsxs(
|
|
354
|
+
pe,
|
|
355
|
+
{
|
|
356
|
+
ref: o,
|
|
357
|
+
className: v(
|
|
358
|
+
"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-none select-none",
|
|
359
|
+
a && "pl-8",
|
|
360
|
+
e
|
|
361
|
+
),
|
|
362
|
+
...t,
|
|
363
|
+
children: [
|
|
364
|
+
r,
|
|
365
|
+
/* @__PURE__ */ n.jsx(ke, { className: "ml-auto h-4 w-4" })
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
));
|
|
369
|
+
dr.displayName = pe.displayName;
|
|
370
|
+
const lr = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ n.jsx(
|
|
371
|
+
me,
|
|
372
|
+
{
|
|
373
|
+
ref: r,
|
|
374
|
+
className: v(
|
|
375
|
+
"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] origin-[--radix-menubar-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",
|
|
376
|
+
e
|
|
377
|
+
),
|
|
378
|
+
...a
|
|
379
|
+
}
|
|
380
|
+
));
|
|
381
|
+
lr.displayName = me.displayName;
|
|
382
|
+
const pr = s.forwardRef(({ className: e, align: a = "start", alignOffset: r = -4, sideOffset: t = 8, ...o }, m) => /* @__PURE__ */ n.jsx(ne, { children: /* @__PURE__ */ n.jsx(
|
|
383
|
+
oe,
|
|
384
|
+
{
|
|
385
|
+
ref: m,
|
|
386
|
+
align: a,
|
|
387
|
+
alignOffset: r,
|
|
388
|
+
sideOffset: t,
|
|
389
|
+
className: v(
|
|
390
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in 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-[12rem] origin-[--radix-menubar-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-md",
|
|
391
|
+
e
|
|
392
|
+
),
|
|
393
|
+
...o
|
|
394
|
+
}
|
|
395
|
+
) }));
|
|
396
|
+
pr.displayName = oe.displayName;
|
|
397
|
+
const mr = s.forwardRef(({ className: e, inset: a, ...r }, t) => /* @__PURE__ */ n.jsx(
|
|
398
|
+
ue,
|
|
399
|
+
{
|
|
400
|
+
ref: t,
|
|
401
|
+
className: v(
|
|
402
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
403
|
+
a && "pl-8",
|
|
404
|
+
e
|
|
405
|
+
),
|
|
406
|
+
...r
|
|
407
|
+
}
|
|
408
|
+
));
|
|
409
|
+
mr.displayName = ue.displayName;
|
|
410
|
+
const fr = s.forwardRef(({ className: e, children: a, checked: r, ...t }, o) => /* @__PURE__ */ n.jsxs(
|
|
411
|
+
ie,
|
|
412
|
+
{
|
|
413
|
+
ref: o,
|
|
414
|
+
className: v(
|
|
415
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
416
|
+
e
|
|
417
|
+
),
|
|
418
|
+
checked: r,
|
|
419
|
+
...t,
|
|
420
|
+
children: [
|
|
421
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(de, { children: /* @__PURE__ */ n.jsx($e, { className: "h-4 w-4" }) }) }),
|
|
422
|
+
a
|
|
423
|
+
]
|
|
424
|
+
}
|
|
425
|
+
));
|
|
426
|
+
fr.displayName = ie.displayName;
|
|
427
|
+
const br = s.forwardRef(({ className: e, children: a, ...r }, t) => /* @__PURE__ */ n.jsxs(
|
|
428
|
+
ce,
|
|
429
|
+
{
|
|
430
|
+
ref: t,
|
|
431
|
+
className: v(
|
|
432
|
+
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
433
|
+
e
|
|
434
|
+
),
|
|
435
|
+
...r,
|
|
436
|
+
children: [
|
|
437
|
+
/* @__PURE__ */ n.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ n.jsx(de, { children: /* @__PURE__ */ n.jsx(Ke, { className: "h-4 w-4 fill-current" }) }) }),
|
|
438
|
+
a
|
|
439
|
+
]
|
|
440
|
+
}
|
|
441
|
+
));
|
|
442
|
+
br.displayName = ce.displayName;
|
|
443
|
+
const xr = s.forwardRef(({ className: e, inset: a, ...r }, t) => /* @__PURE__ */ n.jsx(
|
|
444
|
+
se,
|
|
445
|
+
{
|
|
446
|
+
ref: t,
|
|
447
|
+
className: v("px-2 py-1.5 text-sm font-semibold", a && "pl-8", e),
|
|
448
|
+
...r
|
|
449
|
+
}
|
|
450
|
+
));
|
|
451
|
+
xr.displayName = se.displayName;
|
|
452
|
+
const gr = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ n.jsx(le, { ref: r, className: v("bg-muted -mx-1 my-1 h-px", e), ...a }));
|
|
453
|
+
gr.displayName = le.displayName;
|
|
454
|
+
const vr = ({ className: e, ...a }) => /* @__PURE__ */ n.jsx("span", { className: v("text-muted-foreground ml-auto text-xs tracking-widest", e), ...a });
|
|
455
|
+
vr.displayname = "MenubarShortcut";
|
|
456
|
+
export {
|
|
457
|
+
ir as Menubar,
|
|
458
|
+
fr as MenubarCheckboxItem,
|
|
459
|
+
pr as MenubarContent,
|
|
460
|
+
Tr as MenubarGroup,
|
|
461
|
+
mr as MenubarItem,
|
|
462
|
+
xr as MenubarLabel,
|
|
463
|
+
Er as MenubarMenu,
|
|
464
|
+
Or as MenubarPortal,
|
|
465
|
+
Gr as MenubarRadioGroup,
|
|
466
|
+
br as MenubarRadioItem,
|
|
467
|
+
gr as MenubarSeparator,
|
|
468
|
+
vr as MenubarShortcut,
|
|
469
|
+
Dr as MenubarSub,
|
|
470
|
+
lr as MenubarSubContent,
|
|
471
|
+
dr as MenubarSubTrigger,
|
|
472
|
+
cr as MenubarTrigger
|
|
473
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./jsx-runtime-nZSsnGb7.js"),De=require("react"),Oe=require("react-dom"),Le=require("./index-D2HnlO3y.js"),f=require("./index-BtZvtDmp.js"),te=require("./index-Ce5TOFAK.js"),D=require("./index-_XxjJPRD.js"),Ae=require("./index-Dko2XdTk.js"),F=require("./index-B2XtpfGY.js"),ne=require("./index-CefEQe_4.js"),oe=require("./index-BGIK9FQF.js"),Fe=require("./index-BoNjHhm4.js"),Ke=require("./index-DYxWvftI.js"),V=require("./index-MQ0c3ZX_.js"),_=require("./index-CzY-WZXL.js"),Ve=require("./index-Cl3G0jzM.js"),$e=require("class-variance-authority"),He=require("lucide-react"),S=require("./utils-IjLH3w2e.js");function ze(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const r=ze(De);var k="NavigationMenu",[U,re,qe]=oe.createCollection(k),[$,Ge,Ue]=oe.createCollection(k),[B]=Le.createContextScope(k,[qe,Ue]),[Be,y]=B(k),[We,Ye]=B(k),ie=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:s,defaultValue:a,delayDuration:c=200,skipDelayDuration:d=300,orientation:l="horizontal",dir:w,...u}=e,[p,h]=r.useState(null),M=D.useComposedRefs(t,N=>h(N)),g=Ae.useDirection(w),R=r.useRef(0),C=r.useRef(0),j=r.useRef(0),[b,v]=r.useState(!0),[x,m]=te.useControllableState({prop:o,onChange:N=>{const I=N!=="",K=d>0;I?(window.clearTimeout(j.current),K&&v(!1)):(window.clearTimeout(j.current),j.current=window.setTimeout(()=>v(!0),d)),s?.(N)},defaultProp:a??"",caller:k}),E=r.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>m(""),150)},[m]),T=r.useCallback(N=>{window.clearTimeout(C.current),m(N)},[m]),P=r.useCallback(N=>{x===N?window.clearTimeout(C.current):R.current=window.setTimeout(()=>{window.clearTimeout(C.current),m(N)},c)},[x,m,c]);return r.useEffect(()=>()=>{window.clearTimeout(R.current),window.clearTimeout(C.current),window.clearTimeout(j.current)},[]),i.jsxRuntimeExports.jsx(se,{scope:n,isRootMenu:!0,value:x,dir:g,orientation:l,rootNavigationMenu:p,onTriggerEnter:N=>{window.clearTimeout(R.current),b?P(N):T(N)},onTriggerLeave:()=>{window.clearTimeout(R.current),E()},onContentEnter:()=>window.clearTimeout(C.current),onContentLeave:E,onItemSelect:N=>{m(I=>I===N?"":N)},onItemDismiss:()=>m(""),children:i.jsxRuntimeExports.jsx(f.Primitive.nav,{"aria-label":"Main","data-orientation":l,dir:g,...u,ref:M})})});ie.displayName=k;var H="NavigationMenuSub",Xe=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,onValueChange:s,defaultValue:a,orientation:c="horizontal",...d}=e,l=y(H,n),[w,u]=te.useControllableState({prop:o,onChange:s,defaultProp:a??"",caller:H});return i.jsxRuntimeExports.jsx(se,{scope:n,isRootMenu:!1,value:w,dir:l.dir,orientation:c,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:p=>u(p),onItemSelect:p=>u(p),onItemDismiss:()=>u(""),children:i.jsxRuntimeExports.jsx(f.Primitive.div,{"data-orientation":c,...d,ref:t})})});Xe.displayName=H;var se=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:o,dir:s,orientation:a,children:c,value:d,onItemSelect:l,onItemDismiss:w,onTriggerEnter:u,onTriggerLeave:p,onContentEnter:h,onContentLeave:M}=e,[g,R]=r.useState(null),[C,j]=r.useState(new Map),[b,v]=r.useState(null);return i.jsxRuntimeExports.jsx(Be,{scope:t,isRootMenu:n,rootNavigationMenu:o,value:d,previousValue:Ke.usePrevious(d),baseId:ne.useId(),dir:s,orientation:a,viewport:g,onViewportChange:R,indicatorTrack:b,onIndicatorTrackChange:v,onTriggerEnter:_.useCallbackRef(u),onTriggerLeave:_.useCallbackRef(p),onContentEnter:_.useCallbackRef(h),onContentLeave:_.useCallbackRef(M),onItemSelect:_.useCallbackRef(l),onItemDismiss:_.useCallbackRef(w),onViewportContentChange:r.useCallback((x,m)=>{j(E=>(E.set(x,m),new Map(E)))},[]),onViewportContentRemove:r.useCallback(x=>{j(m=>m.has(x)?(m.delete(x),new Map(m)):m)},[]),children:i.jsxRuntimeExports.jsx(U.Provider,{scope:t,children:i.jsxRuntimeExports.jsx(We,{scope:t,items:C,children:c})})})},ae="NavigationMenuList",ce=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,s=y(ae,n),a=i.jsxRuntimeExports.jsx(f.Primitive.ul,{"data-orientation":s.orientation,...o,ref:t});return i.jsxRuntimeExports.jsx(f.Primitive.div,{style:{position:"relative"},ref:s.onIndicatorTrackChange,children:i.jsxRuntimeExports.jsx(U.Slot,{scope:n,children:s.isRootMenu?i.jsxRuntimeExports.jsx(Re,{asChild:!0,children:a}):a})})});ce.displayName=ae;var ue="NavigationMenuItem",[Je,le]=B(ue),de=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,...s}=e,a=ne.useId(),c=o||a||"LEGACY_REACT_AUTO_VALUE",d=r.useRef(null),l=r.useRef(null),w=r.useRef(null),u=r.useRef(()=>{}),p=r.useRef(!1),h=r.useCallback((g="start")=>{if(d.current){u.current();const R=q(d.current);R.length&&X(g==="start"?R:R.reverse())}},[]),M=r.useCallback(()=>{if(d.current){const g=q(d.current);g.length&&(u.current=rt(g))}},[]);return i.jsxRuntimeExports.jsx(Je,{scope:n,value:c,triggerRef:l,contentRef:d,focusProxyRef:w,wasEscapeCloseRef:p,onEntryKeyDown:h,onFocusProxyEnter:h,onRootContentClose:M,onContentFocusOutside:M,children:i.jsxRuntimeExports.jsx(f.Primitive.li,{...s,ref:t})})});de.displayName=ue;var z="NavigationMenuTrigger",ve=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:o,...s}=e,a=y(z,e.__scopeNavigationMenu),c=le(z,e.__scopeNavigationMenu),d=r.useRef(null),l=D.useComposedRefs(d,c.triggerRef,t),w=we(a.baseId,c.value),u=Ne(a.baseId,c.value),p=r.useRef(!1),h=r.useRef(!1),M=c.value===a.value;return i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(U.ItemSlot,{scope:n,value:c.value,children:i.jsxRuntimeExports.jsx(Ee,{asChild:!0,children:i.jsxRuntimeExports.jsx(f.Primitive.button,{id:w,disabled:o,"data-disabled":o?"":void 0,"data-state":J(M),"aria-expanded":M,"aria-controls":u,...s,ref:l,onPointerEnter:f.composeEventHandlers(e.onPointerEnter,()=>{h.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:f.composeEventHandlers(e.onPointerMove,A(()=>{o||h.current||c.wasEscapeCloseRef.current||p.current||(a.onTriggerEnter(c.value),p.current=!0)})),onPointerLeave:f.composeEventHandlers(e.onPointerLeave,A(()=>{o||(a.onTriggerLeave(),p.current=!1)})),onClick:f.composeEventHandlers(e.onClick,()=>{a.onItemSelect(c.value),h.current=M}),onKeyDown:f.composeEventHandlers(e.onKeyDown,g=>{const C={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];M&&g.key===C&&(c.onEntryKeyDown(),g.preventDefault())})})})}),M&&i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx(Ve.Root,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:g=>{const R=c.contentRef.current,C=g.relatedTarget,j=C===d.current,b=R?.contains(C);(j||!b)&&c.onFocusProxyEnter(j?"start":"end")}}),a.viewport&&i.jsxRuntimeExports.jsx("span",{"aria-owns":u})]})]})});ve.displayName=z;var Qe="NavigationMenuLink",Z="navigationMenu.linkSelect",fe=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:o,onSelect:s,...a}=e;return i.jsxRuntimeExports.jsx(Ee,{asChild:!0,children:i.jsxRuntimeExports.jsx(f.Primitive.a,{"data-active":o?"":void 0,"aria-current":o?"page":void 0,...a,ref:t,onClick:f.composeEventHandlers(e.onClick,c=>{const d=c.target,l=new CustomEvent(Z,{bubbles:!0,cancelable:!0});if(d.addEventListener(Z,w=>s?.(w),{once:!0}),f.dispatchDiscreteCustomEvent(d,l),!l.defaultPrevented&&!c.metaKey){const w=new CustomEvent(L,{bubbles:!0,cancelable:!0});f.dispatchDiscreteCustomEvent(d,w)}},{checkForDefaultPrevented:!1})})})});fe.displayName=Qe;var W="NavigationMenuIndicator",me=r.forwardRef((e,t)=>{const{forceMount:n,...o}=e,s=y(W,e.__scopeNavigationMenu),a=!!s.value;return s.indicatorTrack?Oe.createPortal(i.jsxRuntimeExports.jsx(F.Presence,{present:n||a,children:i.jsxRuntimeExports.jsx(Ze,{...o,ref:t})}),s.indicatorTrack):null});me.displayName=W;var Ze=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,s=y(W,n),a=re(n),[c,d]=r.useState(null),[l,w]=r.useState(null),u=s.orientation==="horizontal",p=!!s.value;r.useEffect(()=>{const g=a().find(R=>R.value===s.value)?.ref.current;g&&d(g)},[a,s.value]);const h=()=>{c&&w({size:u?c.offsetWidth:c.offsetHeight,offset:u?c.offsetLeft:c.offsetTop})};return G(c,h),G(s.indicatorTrack,h),l?i.jsxRuntimeExports.jsx(f.Primitive.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":s.orientation,...o,ref:t,style:{position:"absolute",...u?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...o.style}}):null}),O="NavigationMenuContent",pe=r.forwardRef((e,t)=>{const{forceMount:n,...o}=e,s=y(O,e.__scopeNavigationMenu),a=le(O,e.__scopeNavigationMenu),c=D.useComposedRefs(a.contentRef,t),d=a.value===s.value,l={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...o};return s.viewport?i.jsxRuntimeExports.jsx(et,{forceMount:n,...l,ref:c}):i.jsxRuntimeExports.jsx(F.Presence,{present:n||d,children:i.jsxRuntimeExports.jsx(xe,{"data-state":J(d),...l,ref:c,onPointerEnter:f.composeEventHandlers(e.onPointerEnter,s.onContentEnter),onPointerLeave:f.composeEventHandlers(e.onPointerLeave,A(s.onContentLeave)),style:{pointerEvents:!d&&s.isRootMenu?"none":void 0,...l.style}})})});pe.displayName=O;var et=r.forwardRef((e,t)=>{const n=y(O,e.__scopeNavigationMenu),{onViewportContentChange:o,onViewportContentRemove:s}=n;return V.useLayoutEffect2(()=>{o(e.value,{ref:t,...e})},[e,t,o]),V.useLayoutEffect2(()=>()=>s(e.value),[e.value,s]),null}),L="navigationMenu.rootContentDismiss",xe=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:o,triggerRef:s,focusProxyRef:a,wasEscapeCloseRef:c,onRootContentClose:d,onContentFocusOutside:l,...w}=e,u=y(O,n),p=r.useRef(null),h=D.useComposedRefs(p,t),M=we(u.baseId,o),g=Ne(u.baseId,o),R=re(n),C=r.useRef(null),{onItemDismiss:j}=u;r.useEffect(()=>{const v=p.current;if(u.isRootMenu&&v){const x=()=>{j(),d(),v.contains(document.activeElement)&&s.current?.focus()};return v.addEventListener(L,x),()=>v.removeEventListener(L,x)}},[u.isRootMenu,e.value,s,j,d]);const b=r.useMemo(()=>{const x=R().map(I=>I.value);u.dir==="rtl"&&x.reverse();const m=x.indexOf(u.value),E=x.indexOf(u.previousValue),T=o===u.value,P=E===x.indexOf(o);if(!T&&!P)return C.current;const N=(()=>{if(m!==E){if(T&&E!==-1)return m>E?"from-end":"from-start";if(P&&m!==-1)return m>E?"to-start":"to-end"}return null})();return C.current=N,N},[u.previousValue,u.value,u.dir,R,o]);return i.jsxRuntimeExports.jsx(Re,{asChild:!0,children:i.jsxRuntimeExports.jsx(Fe.DismissableLayer,{id:g,"aria-labelledby":M,"data-motion":b,"data-orientation":u.orientation,...w,ref:h,disableOutsidePointerEvents:!1,onDismiss:()=>{const v=new Event(L,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(v)},onFocusOutside:f.composeEventHandlers(e.onFocusOutside,v=>{l();const x=v.target;u.rootNavigationMenu?.contains(x)&&v.preventDefault()}),onPointerDownOutside:f.composeEventHandlers(e.onPointerDownOutside,v=>{const x=v.target,m=R().some(T=>T.ref.current?.contains(x)),E=u.isRootMenu&&u.viewport?.contains(x);(m||E||!u.isRootMenu)&&v.preventDefault()}),onKeyDown:f.composeEventHandlers(e.onKeyDown,v=>{const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const E=q(v.currentTarget),T=document.activeElement,P=E.findIndex(K=>K===T),I=v.shiftKey?E.slice(0,P).reverse():E.slice(P+1,E.length);X(I)?v.preventDefault():a.current?.focus()}}),onEscapeKeyDown:f.composeEventHandlers(e.onEscapeKeyDown,v=>{c.current=!0})})})}),Y="NavigationMenuViewport",ge=r.forwardRef((e,t)=>{const{forceMount:n,...o}=e,a=!!y(Y,e.__scopeNavigationMenu).value;return i.jsxRuntimeExports.jsx(F.Presence,{present:n||a,children:i.jsxRuntimeExports.jsx(tt,{...o,ref:t})})});ge.displayName=Y;var tt=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:o,...s}=e,a=y(Y,n),c=D.useComposedRefs(t,a.onViewportChange),d=Ye(O,e.__scopeNavigationMenu),[l,w]=r.useState(null),[u,p]=r.useState(null),h=l?l?.width+"px":void 0,M=l?l?.height+"px":void 0,g=!!a.value,R=g?a.value:a.previousValue;return G(u,()=>{u&&w({width:u.offsetWidth,height:u.offsetHeight})}),i.jsxRuntimeExports.jsx(f.Primitive.div,{"data-state":J(g),"data-orientation":a.orientation,...s,ref:c,style:{pointerEvents:!g&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":h,"--radix-navigation-menu-viewport-height":M,...s.style},onPointerEnter:f.composeEventHandlers(e.onPointerEnter,a.onContentEnter),onPointerLeave:f.composeEventHandlers(e.onPointerLeave,A(a.onContentLeave)),children:Array.from(d.items).map(([j,{ref:b,forceMount:v,...x}])=>{const m=R===j;return i.jsxRuntimeExports.jsx(F.Presence,{present:v||m,children:i.jsxRuntimeExports.jsx(xe,{...x,ref:D.composeRefs(b,E=>{m&&E&&p(E)})})},j)})})}),nt="FocusGroup",Re=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,s=y(nt,n);return i.jsxRuntimeExports.jsx($.Provider,{scope:n,children:i.jsxRuntimeExports.jsx($.Slot,{scope:n,children:i.jsxRuntimeExports.jsx(f.Primitive.div,{dir:s.dir,...o,ref:t})})})}),ee=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ot="FocusGroupItem",Ee=r.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...o}=e,s=Ge(n),a=y(ot,n);return i.jsxRuntimeExports.jsx($.ItemSlot,{scope:n,children:i.jsxRuntimeExports.jsx(f.Primitive.button,{...o,ref:t,onKeyDown:f.composeEventHandlers(e.onKeyDown,c=>{if(["Home","End",...ee].includes(c.key)){let l=s().map(p=>p.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(c.key)&&l.reverse(),ee.includes(c.key)){const p=l.indexOf(c.currentTarget);l=l.slice(p+1)}setTimeout(()=>X(l)),c.preventDefault()}})})})});function q(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const s=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||s?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function X(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function rt(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function G(e,t){const n=_.useCallbackRef(t);V.useLayoutEffect2(()=>{let o=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return s.observe(e),()=>{window.cancelAnimationFrame(o),s.unobserve(e)}}},[e,n])}function J(e){return e?"open":"closed"}function we(e,t){return`${e}-trigger-${t}`}function Ne(e,t){return`${e}-content-${t}`}function A(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Ce=ie,he=ce,it=de,Me=ve,st=fe,je=me,ye=pe,be=ge;const Te=r.forwardRef(({className:e,children:t,...n},o)=>i.jsxRuntimeExports.jsxs(Ce,{ref:o,className:S.cn("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...n,children:[t,i.jsxRuntimeExports.jsx(Q,{})]}));Te.displayName=Ce.displayName;const Ie=r.forwardRef(({className:e,...t},n)=>i.jsxRuntimeExports.jsx(he,{ref:n,className:S.cn("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));Ie.displayName=he.displayName;const at=it,Pe=$e.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:text-accent-foreground data-[state=open]:bg-accent/50 data-[state=open]:hover:bg-accent data-[state=open]:focus:bg-accent"),_e=r.forwardRef(({className:e,children:t,...n},o)=>i.jsxRuntimeExports.jsxs(Me,{ref:o,className:S.cn(Pe(),"group",e),...n,children:[t," ",i.jsxRuntimeExports.jsx(He.ChevronDown,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));_e.displayName=Me.displayName;const Se=r.forwardRef(({className:e,...t},n)=>i.jsxRuntimeExports.jsx(ye,{ref:n,className:S.cn("data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 top-0 left-0 w-full md:absolute md:w-auto",e),...t}));Se.displayName=ye.displayName;const ct=st,Q=r.forwardRef(({className:e,...t},n)=>i.jsxRuntimeExports.jsx("div",{className:S.cn("absolute top-full left-0 flex justify-center"),children:i.jsxRuntimeExports.jsx(be,{className:S.cn("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:n,...t})}));Q.displayName=be.displayName;const ke=r.forwardRef(({className:e,...t},n)=>i.jsxRuntimeExports.jsx(je,{ref:n,className:S.cn("data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden",e),...t,children:i.jsxRuntimeExports.jsx("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})}));ke.displayName=je.displayName;exports.NavigationMenu=Te;exports.NavigationMenuContent=Se;exports.NavigationMenuIndicator=ke;exports.NavigationMenuItem=at;exports.NavigationMenuLink=ct;exports.NavigationMenuList=Ie;exports.NavigationMenuTrigger=_e;exports.NavigationMenuViewport=Q;exports.navigationMenuTriggerStyle=Pe;
|