@sykoramaros/marosh-components 0.0.5 → 0.0.6

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/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { ClassProp } from 'class-variance-authority/types';
2
2
  import { ClassValue } from 'clsx';
3
3
  import { JSX } from 'react/jsx-runtime';
4
+ import { LucideIcon } from 'lucide-react';
4
5
  import { VariantProps } from 'class-variance-authority';
5
6
 
6
7
  declare const buttonVariants: (props?: ({
@@ -12,9 +13,26 @@ export declare function cn(...inputs: ClassValue[]): string;
12
13
 
13
14
  export declare const CustomButton: ({ children, className, variant, size, ...props }: CustomButtonProps) => JSX.Element;
14
15
 
15
- declare interface CustomButtonProps extends React.ComponentPropsWithoutRef<"button">, VariantProps<typeof buttonVariants> {
16
+ export declare interface CustomButtonProps extends React.ComponentPropsWithoutRef<"button">, VariantProps<typeof buttonVariants> {
16
17
  children: React.ReactNode;
17
18
  className?: string;
18
19
  }
19
20
 
21
+ export declare const MainNav: ({ navItems, LinkComponent, className, ...props }: MainNavProps) => JSX.Element;
22
+
23
+ export declare interface MainNavProps extends React.ComponentPropsWithoutRef<"header"> {
24
+ navItems: NavItem[];
25
+ LinkComponent?: React.ComponentType<{
26
+ to: string;
27
+ className?: string;
28
+ children: React.ReactNode;
29
+ }>;
30
+ }
31
+
32
+ export declare interface NavItem {
33
+ title: string;
34
+ url: string;
35
+ icon?: LucideIcon | React.ComponentType;
36
+ }
37
+
20
38
  export { }
package/dist/index.js CHANGED
@@ -1,2 +1,46 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("clsx"),u=require("tailwind-merge"),n=require("react/jsx-runtime"),c=require("@radix-ui/react-slot"),l=require("class-variance-authority");function a(...e){return u.twMerge(d.clsx(e))}const g=l.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function v({className:e,variant:t="default",size:r="default",asChild:i=!1,...s}){const o=i?c.Slot:"button";return n.jsx(o,{"data-slot":"button","data-variant":t,"data-size":r,className:a(g({variant:t,size:r,className:e})),...s})}const b=({children:e,className:t,variant:r,size:i,...s})=>n.jsx(n.Fragment,{children:n.jsx(v,{className:a(t),variant:r,size:i,...s,children:e})});exports.CustomButton=b;exports.cn=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("clsx"),Xt=require("tailwind-merge"),u=require("react/jsx-runtime"),X=require("@radix-ui/react-slot"),Je=require("class-variance-authority"),L=require("react"),Ne=require("react-dom"),et=require("lucide-react");function tt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=tt(L),Zt=tt(Ne);function A(...e){return Xt.twMerge(qt.clsx(e))}const Qt=Je.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function nt({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?X.Slot:"button";return u.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:A(Qt({variant:t,size:n,className:e})),...o})}const Jt=({children:e,className:t,variant:n,size:r,...o})=>u.jsx(u.Fragment,{children:u.jsx(nt,{className:A(t),variant:n,size:r,...o,children:e})});function en(e,t){const n=i.createContext(t),r=a=>{const{children:c,...s}=a,f=i.useMemo(()=>s,Object.values(s));return u.jsx(n.Provider,{value:f,children:c})};r.displayName=e+"Provider";function o(a){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Re(e,t=[]){let n=[];function r(a,c){const s=i.createContext(c),f=n.length;n=[...n,c];const v=m=>{const{scope:p,children:y,...w}=m,d=p?.[e]?.[f]||s,g=i.useMemo(()=>w,Object.values(w));return u.jsx(d.Provider,{value:g,children:y})};v.displayName=a+"Provider";function l(m,p){const y=p?.[e]?.[f]||s,w=i.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[v,l]}const o=()=>{const a=n.map(c=>i.createContext(c));return function(s){const f=s?.[e]||a;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:f}}),[s,f])}};return o.scopeName=e,[r,tn(o,...t)]}function tn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const c=r.reduce((s,{useScope:f,scopeName:v})=>{const m=f(a)[`__scope${v}`];return{...s,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var nn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],P=nn.reduce((e,t)=>{const n=X.createSlot(`Primitive.${t}`),r=i.forwardRef((o,a)=>{const{asChild:c,...s}=o,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(f,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pe(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}var V=globalThis?.document?i.useLayoutEffect:()=>{},rn=i[" useInsertionEffect ".trim().toString()]||V;function Se({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=on({defaultProp:t,onChange:n}),s=e!==void 0,f=s?e:o;{const l=i.useRef(e!==void 0);i.useEffect(()=>{const m=l.current;m!==s&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=s},[s,r])}const v=i.useCallback(l=>{if(s){const m=an(l)?l(e):l;m!==e&&c.current?.(m)}else a(l)},[s,e,a,c]);return[f,v]}function on({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return rn(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function an(e){return typeof e=="function"}function Fe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Fe(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Fe(e[o],null)}}}}function O(...e){return i.useCallback(rt(...e),e)}var sn=i.createContext(void 0);function cn(e){const t=i.useContext(sn);return e||t||"ltr"}function un(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var K=e=>{const{present:t,children:n}=e,r=ln(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),a=O(r.ref,dn(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:a}):null};K.displayName="Presence";function ln(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,f]=un(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const v=Z(r.current);a.current=s==="mounted"?v:"none"},[s]),V(()=>{const v=r.current,l=o.current;if(l!==e){const p=a.current,y=Z(v);e?f("MOUNT"):y==="none"||v?.display==="none"?f("UNMOUNT"):f(l&&p!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),V(()=>{if(t){let v;const l=t.ownerDocument.defaultView??window,m=y=>{const d=Z(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&d&&(f("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",v=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=y=>{y.target===t&&(a.current=Z(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{l.clearTimeout(v),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(v=>{r.current=v?getComputedStyle(v):null,n(v)},[])}}function Z(e){return e?.animationName||"none"}function dn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fn=i[" useId ".trim().toString()]||(()=>{}),vn=0;function q(e){const[t,n]=i.useState(fn());return V(()=>{n(r=>r??String(vn++))},[e]),t?`radix-${t}`:""}function ot(e){const t=e+"CollectionProvider",[n,r]=Re(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=d=>{const{scope:g,children:E}=d,C=L.useRef(null),h=L.useRef(new Map).current;return u.jsx(o,{scope:g,itemMap:h,collectionRef:C,children:E})};c.displayName=t;const s=e+"CollectionSlot",f=X.createSlot(s),v=L.forwardRef((d,g)=>{const{scope:E,children:C}=d,h=a(s,E),b=O(g,h.collectionRef);return u.jsx(f,{ref:b,children:C})});v.displayName=s;const l=e+"CollectionItemSlot",m="data-radix-collection-item",p=X.createSlot(l),y=L.forwardRef((d,g)=>{const{scope:E,children:C,...h}=d,b=L.useRef(null),x=O(g,b),N=a(l,E);return L.useEffect(()=>(N.itemMap.set(b,{ref:b,...h}),()=>{N.itemMap.delete(b)})),u.jsx(p,{[m]:"",ref:x,children:C})});y.displayName=l;function w(d){const g=a(e+"CollectionConsumer",d);return L.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const h=Array.from(C.querySelectorAll(`[${m}]`));return Array.from(g.itemMap.values()).sort((N,R)=>h.indexOf(N.ref.current)-h.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:c,Slot:v,ItemSlot:y},w,r]}function D(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function mn(e,t=globalThis?.document){const n=D(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var gn="DismissableLayer",he="dismissableLayer.update",pn="dismissableLayer.pointerDownOutside",hn="dismissableLayer.focusOutside",We,at=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Me=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:c,onDismiss:s,...f}=e,v=i.useContext(at),[l,m]=i.useState(null),p=l?.ownerDocument??globalThis?.document,[,y]=i.useState({}),w=O(t,R=>m(R)),d=Array.from(v.layers),[g]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),E=d.indexOf(g),C=l?d.indexOf(l):-1,h=v.layersWithOutsidePointerEventsDisabled.size>0,b=C>=E,x=En(R=>{const T=R.target,S=[...v.branches].some(I=>I.contains(T));!b||S||(o?.(R),c?.(R),R.defaultPrevented||s?.())},p),N=xn(R=>{const T=R.target;[...v.branches].some(I=>I.contains(T))||(a?.(R),c?.(R),R.defaultPrevented||s?.())},p);return mn(R=>{C===v.layers.size-1&&(r?.(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},p),i.useEffect(()=>{if(l)return n&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(We=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(l)),v.layers.add(l),Ve(),()=>{n&&v.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=We)}},[l,p,n,v]),i.useEffect(()=>()=>{l&&(v.layers.delete(l),v.layersWithOutsidePointerEventsDisabled.delete(l),Ve())},[l,v]),i.useEffect(()=>{const R=()=>y({});return document.addEventListener(he,R),()=>document.removeEventListener(he,R)},[]),u.jsx(P.div,{...f,ref:w,style:{pointerEvents:h?b?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,N.onFocusCapture),onBlurCapture:M(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,x.onPointerDownCapture)})});Me.displayName=gn;var yn="DismissableLayerBranch",bn=i.forwardRef((e,t)=>{const n=i.useContext(at),r=i.useRef(null),o=O(t,r);return i.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(P.div,{...e,ref:o})});bn.displayName=yn;function En(e,t=globalThis?.document){const n=D(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let f=function(){it(pn,n,v,{discrete:!0})};const v={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xn(e,t=globalThis?.document){const n=D(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!r.current&&it(hn,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ve(){const e=new CustomEvent(he);document.dispatchEvent(e)}function it(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pe(o,a):o.dispatchEvent(a)}function wn(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Cn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Nn="VisuallyHidden",st=i.forwardRef((e,t)=>u.jsx(P.span,{...e,ref:t,style:{...Cn,...e.style}}));st.displayName=Nn;var Rn=st,U="NavigationMenu",[Pe,ct,Sn]=ot(U),[ye,Mn,Pn]=ot(U),[Te]=Re(U,[Sn,Pn]),[Tn,_]=Te(U),[In,On]=Te(U),ut=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:c=200,skipDelayDuration:s=300,orientation:f="horizontal",dir:v,...l}=e,[m,p]=i.useState(null),y=O(t,S=>p(S)),w=cn(v),d=i.useRef(0),g=i.useRef(0),E=i.useRef(0),[C,h]=i.useState(!0),[b,x]=Se({prop:r,onChange:S=>{const I=S!=="",F=s>0;I?(window.clearTimeout(E.current),F&&h(!1)):(window.clearTimeout(E.current),E.current=window.setTimeout(()=>h(!0),s)),o?.(S)},defaultProp:a??"",caller:U}),N=i.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(""),150)},[x]),R=i.useCallback(S=>{window.clearTimeout(g.current),x(S)},[x]),T=i.useCallback(S=>{b===S?window.clearTimeout(g.current):d.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(S)},c)},[b,x,c]);return i.useEffect(()=>()=>{window.clearTimeout(d.current),window.clearTimeout(g.current),window.clearTimeout(E.current)},[]),u.jsx(lt,{scope:n,isRootMenu:!0,value:b,dir:w,orientation:f,rootNavigationMenu:m,onTriggerEnter:S=>{window.clearTimeout(d.current),C?T(S):R(S)},onTriggerLeave:()=>{window.clearTimeout(d.current),N()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:N,onItemSelect:S=>{x(I=>I===S?"":S)},onItemDismiss:()=>x(""),children:u.jsx(P.nav,{"aria-label":"Main","data-orientation":f,dir:w,...l,ref:y})})});ut.displayName=U;var be="NavigationMenuSub",Dn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:c="horizontal",...s}=e,f=_(be,n),[v,l]=Se({prop:r,onChange:o,defaultProp:a??"",caller:be});return u.jsx(lt,{scope:n,isRootMenu:!1,value:v,dir:f.dir,orientation:c,rootNavigationMenu:f.rootNavigationMenu,onTriggerEnter:m=>l(m),onItemSelect:m=>l(m),onItemDismiss:()=>l(""),children:u.jsx(P.div,{"data-orientation":c,...s,ref:t})})});Dn.displayName=be;var lt=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:c,value:s,onItemSelect:f,onItemDismiss:v,onTriggerEnter:l,onTriggerLeave:m,onContentEnter:p,onContentLeave:y}=e,[w,d]=i.useState(null),[g,E]=i.useState(new Map),[C,h]=i.useState(null);return u.jsx(Tn,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:wn(s),baseId:q(),dir:o,orientation:a,viewport:w,onViewportChange:d,indicatorTrack:C,onIndicatorTrackChange:h,onTriggerEnter:D(l),onTriggerLeave:D(m),onContentEnter:D(p),onContentLeave:D(y),onItemSelect:D(f),onItemDismiss:D(v),onViewportContentChange:i.useCallback((b,x)=>{E(N=>(N.set(b,x),new Map(N)))},[]),onViewportContentRemove:i.useCallback(b=>{E(x=>x.has(b)?(x.delete(b),new Map(x)):x)},[]),children:u.jsx(Pe.Provider,{scope:t,children:u.jsx(In,{scope:t,items:g,children:c})})})},dt="NavigationMenuList",ft=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=_(dt,n),a=u.jsx(P.ul,{"data-orientation":o.orientation,...r,ref:t});return u.jsx(P.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:u.jsx(Pe.Slot,{scope:n,children:o.isRootMenu?u.jsx(bt,{asChild:!0,children:a}):a})})});ft.displayName=dt;var vt="NavigationMenuItem",[An,mt]=Te(vt),gt=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=q(),c=r||a||"LEGACY_REACT_AUTO_VALUE",s=i.useRef(null),f=i.useRef(null),v=i.useRef(null),l=i.useRef(()=>{}),m=i.useRef(!1),p=i.useCallback((w="start")=>{if(s.current){l.current();const d=xe(s.current);d.length&&De(w==="start"?d:d.reverse())}},[]),y=i.useCallback(()=>{if(s.current){const w=xe(s.current);w.length&&(l.current=Un(w))}},[]);return u.jsx(An,{scope:n,value:c,triggerRef:f,contentRef:s,focusProxyRef:v,wasEscapeCloseRef:m,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:y,onContentFocusOutside:y,children:u.jsx(P.li,{...o,ref:t})})});gt.displayName=vt;var Ee="NavigationMenuTrigger",_n=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=_(Ee,e.__scopeNavigationMenu),c=mt(Ee,e.__scopeNavigationMenu),s=i.useRef(null),f=O(s,c.triggerRef,t),v=xt(a.baseId,c.value),l=wt(a.baseId,c.value),m=i.useRef(!1),p=i.useRef(!1),y=c.value===a.value;return u.jsxs(u.Fragment,{children:[u.jsx(Pe.ItemSlot,{scope:n,value:c.value,children:u.jsx(Et,{asChild:!0,children:u.jsx(P.button,{id:v,disabled:r,"data-disabled":r?"":void 0,"data-state":Ae(y),"aria-expanded":y,"aria-controls":l,...o,ref:f,onPointerEnter:M(e.onPointerEnter,()=>{p.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:M(e.onPointerMove,ae(()=>{r||p.current||c.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(c.value),m.current=!0)})),onPointerLeave:M(e.onPointerLeave,ae(()=>{r||(a.onTriggerLeave(),m.current=!1)})),onClick:M(e.onClick,()=>{a.onItemSelect(c.value),p.current=y}),onKeyDown:M(e.onKeyDown,w=>{const g={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];y&&w.key===g&&(c.onEntryKeyDown(),w.preventDefault())})})})}),y&&u.jsxs(u.Fragment,{children:[u.jsx(Rn,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:w=>{const d=c.contentRef.current,g=w.relatedTarget,E=g===s.current,C=d?.contains(g);(E||!C)&&c.onFocusProxyEnter(E?"start":"end")}}),a.viewport&&u.jsx("span",{"aria-owns":l})]})]})});_n.displayName=Ee;var jn="NavigationMenuLink",Ke="navigationMenu.linkSelect",pt=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return u.jsx(Et,{asChild:!0,children:u.jsx(P.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:M(e.onClick,c=>{const s=c.target,f=new CustomEvent(Ke,{bubbles:!0,cancelable:!0});if(s.addEventListener(Ke,v=>o?.(v),{once:!0}),pe(s,f),!f.defaultPrevented&&!c.metaKey){const v=new CustomEvent(ne,{bubbles:!0,cancelable:!0});pe(s,v)}},{checkForDefaultPrevented:!1})})})});pt.displayName=jn;var Ie="NavigationMenuIndicator",kn=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_(Ie,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Ne.createPortal(u.jsx(K,{present:n||a,children:u.jsx(Ln,{...r,ref:t})}),o.indicatorTrack):null});kn.displayName=Ie;var Ln=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=_(Ie,n),a=ct(n),[c,s]=i.useState(null),[f,v]=i.useState(null),l=o.orientation==="horizontal",m=!!o.value;i.useEffect(()=>{const w=a().find(d=>d.value===o.value)?.ref.current;w&&s(w)},[a,o.value]);const p=()=>{c&&v({size:l?c.offsetWidth:c.offsetHeight,offset:l?c.offsetLeft:c.offsetTop})};return we(c,p),we(o.indicatorTrack,p),f?u.jsx(P.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...l?{left:0,width:f.size+"px",transform:`translateX(${f.offset}px)`}:{top:0,height:f.size+"px",transform:`translateY(${f.offset}px)`},...r.style}}):null}),Y="NavigationMenuContent",Fn=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_(Y,e.__scopeNavigationMenu),a=mt(Y,e.__scopeNavigationMenu),c=O(a.contentRef,t),s=a.value===o.value,f={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?u.jsx(Wn,{forceMount:n,...f,ref:c}):u.jsx(K,{present:n||s,children:u.jsx(ht,{"data-state":Ae(s),...f,ref:c,onPointerEnter:M(e.onPointerEnter,o.onContentEnter),onPointerLeave:M(e.onPointerLeave,ae(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...f.style}})})});Fn.displayName=Y;var Wn=i.forwardRef((e,t)=>{const n=_(Y,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return V(()=>{r(e.value,{ref:t,...e})},[e,t,r]),V(()=>()=>o(e.value),[e.value,o]),null}),ne="navigationMenu.rootContentDismiss",ht=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:c,onRootContentClose:s,onContentFocusOutside:f,...v}=e,l=_(Y,n),m=i.useRef(null),p=O(m,t),y=xt(l.baseId,r),w=wt(l.baseId,r),d=ct(n),g=i.useRef(null),{onItemDismiss:E}=l;i.useEffect(()=>{const h=m.current;if(l.isRootMenu&&h){const b=()=>{E(),s(),h.contains(document.activeElement)&&o.current?.focus()};return h.addEventListener(ne,b),()=>h.removeEventListener(ne,b)}},[l.isRootMenu,e.value,o,E,s]);const C=i.useMemo(()=>{const b=d().map(I=>I.value);l.dir==="rtl"&&b.reverse();const x=b.indexOf(l.value),N=b.indexOf(l.previousValue),R=r===l.value,T=N===b.indexOf(r);if(!R&&!T)return g.current;const S=(()=>{if(x!==N){if(R&&N!==-1)return x>N?"from-end":"from-start";if(T&&x!==-1)return x>N?"to-start":"to-end"}return null})();return g.current=S,S},[l.previousValue,l.value,l.dir,d,r]);return u.jsx(bt,{asChild:!0,children:u.jsx(Me,{id:w,"aria-labelledby":y,"data-motion":C,"data-orientation":l.orientation,...v,ref:p,disableOutsidePointerEvents:!1,onDismiss:()=>{const h=new Event(ne,{bubbles:!0,cancelable:!0});m.current?.dispatchEvent(h)},onFocusOutside:M(e.onFocusOutside,h=>{f();const b=h.target;l.rootNavigationMenu?.contains(b)&&h.preventDefault()}),onPointerDownOutside:M(e.onPointerDownOutside,h=>{const b=h.target,x=d().some(R=>R.ref.current?.contains(b)),N=l.isRootMenu&&l.viewport?.contains(b);(x||N||!l.isRootMenu)&&h.preventDefault()}),onKeyDown:M(e.onKeyDown,h=>{const b=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!b){const N=xe(h.currentTarget),R=document.activeElement,T=N.findIndex(F=>F===R),I=h.shiftKey?N.slice(0,T).reverse():N.slice(T+1,N.length);De(I)?h.preventDefault():a.current?.focus()}}),onEscapeKeyDown:M(e.onEscapeKeyDown,h=>{c.current=!0})})})}),Oe="NavigationMenuViewport",yt=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!_(Oe,e.__scopeNavigationMenu).value;return u.jsx(K,{present:n||a,children:u.jsx(Vn,{...r,ref:t})})});yt.displayName=Oe;var Vn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=_(Oe,n),c=O(t,a.onViewportChange),s=On(Y,e.__scopeNavigationMenu),[f,v]=i.useState(null),[l,m]=i.useState(null),p=f?f?.width+"px":void 0,y=f?f?.height+"px":void 0,w=!!a.value,d=w?a.value:a.previousValue;return we(l,()=>{l&&v({width:l.offsetWidth,height:l.offsetHeight})}),u.jsx(P.div,{"data-state":Ae(w),"data-orientation":a.orientation,...o,ref:c,style:{pointerEvents:!w&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":p,"--radix-navigation-menu-viewport-height":y,...o.style},onPointerEnter:M(e.onPointerEnter,a.onContentEnter),onPointerLeave:M(e.onPointerLeave,ae(a.onContentLeave)),children:Array.from(s.items).map(([E,{ref:C,forceMount:h,...b}])=>{const x=d===E;return u.jsx(K,{present:h||x,children:u.jsx(ht,{...b,ref:rt(C,N=>{x&&N&&m(N)})})},E)})})}),Kn="FocusGroup",bt=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=_(Kn,n);return u.jsx(ye.Provider,{scope:n,children:u.jsx(ye.Slot,{scope:n,children:u.jsx(P.div,{dir:o.dir,...r,ref:t})})})}),Be=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Bn="FocusGroupItem",Et=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Mn(n),a=_(Bn,n);return u.jsx(ye.ItemSlot,{scope:n,children:u.jsx(P.button,{...r,ref:t,onKeyDown:M(e.onKeyDown,c=>{if(["Home","End",...Be].includes(c.key)){let f=o().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(c.key)&&f.reverse(),Be.includes(c.key)){const m=f.indexOf(c.currentTarget);f=f.slice(m+1)}setTimeout(()=>De(f)),c.preventDefault()}})})})});function xe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function De(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Un(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 we(e,t){const n=D(t);V(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function Ae(e){return e?"open":"closed"}function xt(e,t){return`${e}-trigger-${t}`}function wt(e,t){return`${e}-content-${t}`}function ae(e){return t=>t.pointerType==="mouse"?e(t):void 0}var zn=ut,$n=ft,Hn=gt,Gn=pt,Yn=yt;function qn({className:e,children:t,viewport:n=!0,...r}){return u.jsxs(zn,{"data-slot":"navigation-menu","data-viewport":n,className:A("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,n&&u.jsx(Jn,{})]})}function Xn({className:e,...t}){return u.jsx($n,{"data-slot":"navigation-menu-list",className:A("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function Zn({className:e,...t}){return u.jsx(Hn,{"data-slot":"navigation-menu-item",className:A("relative",e),...t})}const Qn=Je.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");function Jn({className:e,...t}){return u.jsx("div",{className:A("absolute top-full left-0 isolate z-50 flex justify-center"),children:u.jsx(Yn,{"data-slot":"navigation-menu-viewport",className:A("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),...t})})}function er({className:e,...t}){return u.jsx(Gn,{"data-slot":"navigation-menu-link",className:A("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}var ue="focusScope.autoFocusOnMount",le="focusScope.autoFocusOnUnmount",Ue={bubbles:!1,cancelable:!0},tr="FocusScope",Ct=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[s,f]=i.useState(null),v=D(o),l=D(a),m=i.useRef(null),p=O(t,d=>f(d)),y=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let d=function(h){if(y.paused||!s)return;const b=h.target;s.contains(b)?m.current=b:W(m.current,{select:!0})},g=function(h){if(y.paused||!s)return;const b=h.relatedTarget;b!==null&&(s.contains(b)||W(m.current,{select:!0}))},E=function(h){if(document.activeElement===document.body)for(const x of h)x.removedNodes.length>0&&W(s)};document.addEventListener("focusin",d),document.addEventListener("focusout",g);const C=new MutationObserver(E);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",g),C.disconnect()}}},[r,s,y.paused]),i.useEffect(()=>{if(s){$e.add(y);const d=document.activeElement;if(!s.contains(d)){const E=new CustomEvent(ue,Ue);s.addEventListener(ue,v),s.dispatchEvent(E),E.defaultPrevented||(nr(sr(Nt(s)),{select:!0}),document.activeElement===d&&W(s))}return()=>{s.removeEventListener(ue,v),setTimeout(()=>{const E=new CustomEvent(le,Ue);s.addEventListener(le,l),s.dispatchEvent(E),E.defaultPrevented||W(d??document.body,{select:!0}),s.removeEventListener(le,l),$e.remove(y)},0)}}},[s,v,l,y]);const w=i.useCallback(d=>{if(!n&&!r||y.paused)return;const g=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,E=document.activeElement;if(g&&E){const C=d.currentTarget,[h,b]=rr(C);h&&b?!d.shiftKey&&E===b?(d.preventDefault(),n&&W(h,{select:!0})):d.shiftKey&&E===h&&(d.preventDefault(),n&&W(b,{select:!0})):E===C&&d.preventDefault()}},[n,r,y.paused]);return u.jsx(P.div,{tabIndex:-1,...c,ref:p,onKeyDown:w})});Ct.displayName=tr;function nr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(W(r,{select:t}),document.activeElement!==n)return}function rr(e){const t=Nt(e),n=ze(t,e),r=ze(t.reverse(),e);return[n,r]}function Nt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ze(e,t){for(const n of e)if(!or(n,{upTo:t}))return n}function or(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ar(e){return e instanceof HTMLInputElement&&"select"in e}function W(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ar(e)&&t&&e.select()}}var $e=ir();function ir(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=He(e,t),e.unshift(t)},remove(t){e=He(e,t),e[0]?.resume()}}}function He(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sr(e){return e.filter(t=>t.tagName!=="A")}var cr="Portal",Rt=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=i.useState(!1);V(()=>a(!0),[]);const c=n||o&&globalThis?.document?.body;return c?Ne.createPortal(u.jsx(P.div,{...r,ref:t}),c):null});Rt.displayName=cr;var de=0;function ur(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ge()),document.body.insertAdjacentElement("beforeend",e[1]??Ge()),de++,()=>{de===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),de--}},[])}function Ge(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var k=function(){return k=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},k.apply(this,arguments)};function St(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lr(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var re="right-scroll-bar-position",oe="width-before-scroll-bar",dr="with-scroll-bars-hidden",fr="--removed-body-scroll-bar-size";function fe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vr(e,t){var n=L.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var mr=typeof window<"u"?i.useLayoutEffect:i.useEffect,Ye=new WeakMap;function gr(e,t){var n=vr(null,function(r){return e.forEach(function(o){return fe(o,r)})});return mr(function(){var r=Ye.get(n);if(r){var o=new Set(r),a=new Set(e),c=n.current;o.forEach(function(s){a.has(s)||fe(s,null)}),a.forEach(function(s){o.has(s)||fe(s,c)})}Ye.set(n,e)},[e]),n}function pr(e){return e}function hr(e,t){t===void 0&&(t=pr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(a){for(r=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(a),c=n}var f=function(){var l=c;c=[],l.forEach(a)},v=function(){return Promise.resolve().then(f)};v(),n={push:function(l){c.push(l),v()},filter:function(l){return c=c.filter(l),n}}}};return o}function yr(e){e===void 0&&(e={});var t=hr(null);return t.options=k({async:!0,ssr:!1},e),t}var Mt=function(e){var t=e.sideCar,n=St(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,k({},n))};Mt.isSideCarExport=!0;function br(e,t){return e.useMedium(t),Mt}var Pt=yr(),ve=function(){},se=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:ve,onWheelCapture:ve,onTouchMoveCapture:ve}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,f=e.className,v=e.removeScrollBar,l=e.enabled,m=e.shards,p=e.sideCar,y=e.noRelative,w=e.noIsolation,d=e.inert,g=e.allowPinchZoom,E=e.as,C=E===void 0?"div":E,h=e.gapMode,b=St(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,N=gr([n,t]),R=k(k({},b),o);return i.createElement(i.Fragment,null,l&&i.createElement(x,{sideCar:Pt,removeScrollBar:v,shards:m,noRelative:y,noIsolation:w,inert:d,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:h}),c?i.cloneElement(i.Children.only(s),k(k({},R),{ref:N})):i.createElement(C,k({},R,{className:f,ref:N}),s))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:oe,zeroRight:re};var Er=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Er();return t&&e.setAttribute("nonce",t),e}function wr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Nr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xr())&&(wr(t,n),Cr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Rr=function(){var e=Nr();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Tt=function(){var e=Rr(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sr={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},Mr=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[me(n),me(r),me(o)]},Pr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sr;var t=Mr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tr=Tt(),G="data-scroll-locked",Ir=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
2
+ .`.concat(dr,` {
3
+ overflow: hidden `).concat(r,`;
4
+ padding-right: `).concat(s,"px ").concat(r,`;
5
+ }
6
+ body[`).concat(G,`] {
7
+ overflow: hidden `).concat(r,`;
8
+ overscroll-behavior: contain;
9
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
10
+ padding-left: `.concat(o,`px;
11
+ padding-top: `).concat(a,`px;
12
+ padding-right: `).concat(c,`px;
13
+ margin-left:0;
14
+ margin-top:0;
15
+ margin-right: `).concat(s,"px ").concat(r,`;
16
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
17
+ }
18
+
19
+ .`).concat(re,` {
20
+ right: `).concat(s,"px ").concat(r,`;
21
+ }
22
+
23
+ .`).concat(oe,` {
24
+ margin-right: `).concat(s,"px ").concat(r,`;
25
+ }
26
+
27
+ .`).concat(re," .").concat(re,` {
28
+ right: 0 `).concat(r,`;
29
+ }
30
+
31
+ .`).concat(oe," .").concat(oe,` {
32
+ margin-right: 0 `).concat(r,`;
33
+ }
34
+
35
+ body[`).concat(G,`] {
36
+ `).concat(fr,": ").concat(s,`px;
37
+ }
38
+ `)},qe=function(){var e=parseInt(document.body.getAttribute(G)||"0",10);return isFinite(e)?e:0},Or=function(){i.useEffect(function(){return document.body.setAttribute(G,(qe()+1).toString()),function(){var e=qe()-1;e<=0?document.body.removeAttribute(G):document.body.setAttribute(G,e.toString())}},[])},Dr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Or();var a=i.useMemo(function(){return Pr(o)},[o]);return i.createElement(Tr,{styles:Ir(a,!t,o,n?"":"!important")})},Ce=!1;if(typeof window<"u")try{var Q=Object.defineProperty({},"passive",{get:function(){return Ce=!0,!0}});window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{Ce=!1}var z=Ce?{passive:!1}:!1,Ar=function(e){return e.tagName==="TEXTAREA"},It=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ar(e)&&n[t]==="visible")},_r=function(e){return It(e,"overflowY")},jr=function(e){return It(e,"overflowX")},Xe=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ot(e,r);if(o){var a=Dt(e,r),c=a[1],s=a[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kr=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Lr=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ot=function(e,t){return e==="v"?_r(t):jr(t)},Dt=function(e,t){return e==="v"?kr(t):Lr(t)},Fr=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wr=function(e,t,n,r,o){var a=Fr(e,window.getComputedStyle(t).direction),c=a*r,s=n.target,f=t.contains(s),v=!1,l=c>0,m=0,p=0;do{if(!s)break;var y=Dt(e,s),w=y[0],d=y[1],g=y[2],E=d-g-a*w;(w||E)&&Ot(e,s)&&(m+=E,p+=w);var C=s.parentNode;s=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!f&&s!==document.body||f&&(t.contains(s)||t===s));return(l&&Math.abs(m)<1||!l&&Math.abs(p)<1)&&(v=!0),v},J=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ze=function(e){return[e.deltaX,e.deltaY]},Qe=function(e){return e&&"current"in e?e.current:e},Vr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Kr=function(e){return`
39
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
40
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
+ `)},Br=0,$=[];function Ur(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(Br++)[0],a=i.useState(Tt)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var d=lr([e.lockRef.current],(e.shards||[]).map(Qe),!0).filter(Boolean);return d.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),d.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=i.useCallback(function(d,g){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!c.current.allowPinchZoom;var E=J(d),C=n.current,h="deltaX"in d?d.deltaX:C[0]-E[0],b="deltaY"in d?d.deltaY:C[1]-E[1],x,N=d.target,R=Math.abs(h)>Math.abs(b)?"h":"v";if("touches"in d&&R==="h"&&N.type==="range")return!1;var T=window.getSelection(),S=T&&T.anchorNode,I=S?S===N||S.contains(N):!1;if(I)return!1;var F=Xe(R,N);if(!F)return!0;if(F?x=R:(x=R==="v"?"h":"v",F=Xe(R,N)),!F)return!1;if(!r.current&&"changedTouches"in d&&(h||b)&&(r.current=x),!x)return!0;var Le=r.current||x;return Wr(Le,g,d,Le==="h"?h:b)},[]),f=i.useCallback(function(d){var g=d;if(!(!$.length||$[$.length-1]!==a)){var E="deltaY"in g?Ze(g):J(g),C=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&Vr(x.delta,E)})[0];if(C&&C.should){g.cancelable&&g.preventDefault();return}if(!C){var h=(c.current.shards||[]).map(Qe).filter(Boolean).filter(function(x){return x.contains(g.target)}),b=h.length>0?s(g,h[0]):!c.current.noIsolation;b&&g.cancelable&&g.preventDefault()}}},[]),v=i.useCallback(function(d,g,E,C){var h={name:d,delta:g,target:E,should:C,shadowParent:zr(E)};t.current.push(h),setTimeout(function(){t.current=t.current.filter(function(b){return b!==h})},1)},[]),l=i.useCallback(function(d){n.current=J(d),r.current=void 0},[]),m=i.useCallback(function(d){v(d.type,Ze(d),d.target,s(d,e.lockRef.current))},[]),p=i.useCallback(function(d){v(d.type,J(d),d.target,s(d,e.lockRef.current))},[]);i.useEffect(function(){return $.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",f,z),document.addEventListener("touchmove",f,z),document.addEventListener("touchstart",l,z),function(){$=$.filter(function(d){return d!==a}),document.removeEventListener("wheel",f,z),document.removeEventListener("touchmove",f,z),document.removeEventListener("touchstart",l,z)}},[]);var y=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(a,{styles:Kr(o)}):null,y?i.createElement(Dr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zr(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $r=br(Pt,Ur);var At=i.forwardRef(function(e,t){return i.createElement(se,k({},e,{ref:t,sideCar:$r}))});At.classNames=se.classNames;var Hr=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},H=new WeakMap,ee=new WeakMap,te={},ge=0,_t=function(e){return e&&(e.host||_t(e.parentNode))},Gr=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=_t(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Yr=function(e,t,n,r){var o=Gr(t,Array.isArray(e)?e:[e]);te[n]||(te[n]=new WeakMap);var a=te[n],c=[],s=new Set,f=new Set(o),v=function(m){!m||s.has(m)||(s.add(m),v(m.parentNode))};o.forEach(v);var l=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(p){if(s.has(p))l(p);else try{var y=p.getAttribute(r),w=y!==null&&y!=="false",d=(H.get(p)||0)+1,g=(a.get(p)||0)+1;H.set(p,d),a.set(p,g),c.push(p),d===1&&w&&ee.set(p,!0),g===1&&p.setAttribute(n,"true"),w||p.setAttribute(r,"true")}catch(E){console.error("aria-hidden: cannot operate on ",p,E)}})};return l(t),s.clear(),ge++,function(){c.forEach(function(m){var p=H.get(m)-1,y=a.get(m)-1;H.set(m,p),a.set(m,y),p||(ee.has(m)||m.removeAttribute(r),ee.delete(m)),y||m.removeAttribute(n)}),ge--,ge||(H=new WeakMap,H=new WeakMap,ee=new WeakMap,te={})}},qr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Hr(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Yr(r,o,n,"aria-hidden")):function(){return null}},ce="Dialog",[jt]=Re(ce),[Xr,j]=jt(ce),kt=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,s=i.useRef(null),f=i.useRef(null),[v,l]=Se({prop:r,defaultProp:o??!1,onChange:a,caller:ce});return u.jsx(Xr,{scope:t,triggerRef:s,contentRef:f,contentId:q(),titleId:q(),descriptionId:q(),open:v,onOpenChange:l,onOpenToggle:i.useCallback(()=>l(m=>!m),[l]),modal:c,children:n})};kt.displayName=ce;var Lt="DialogTrigger",Ft=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=j(Lt,n),a=O(t,o.triggerRef);return u.jsx(P.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ke(o.open),...r,ref:a,onClick:M(e.onClick,o.onOpenToggle)})});Ft.displayName=Lt;var _e="DialogPortal",[Zr,Wt]=jt(_e,{forceMount:void 0}),Vt=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=j(_e,t);return u.jsx(Zr,{scope:t,forceMount:n,children:i.Children.map(r,c=>u.jsx(K,{present:n||a.open,children:u.jsx(Rt,{asChild:!0,container:o,children:c})}))})};Vt.displayName=_e;var ie="DialogOverlay",Kt=i.forwardRef((e,t)=>{const n=Wt(ie,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=j(ie,e.__scopeDialog);return a.modal?u.jsx(K,{present:r||a.open,children:u.jsx(Jr,{...o,ref:t})}):null});Kt.displayName=ie;var Qr=X.createSlot("DialogOverlay.RemoveScroll"),Jr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=j(ie,n);return u.jsx(At,{as:Qr,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(P.div,{"data-state":ke(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),B="DialogContent",Bt=i.forwardRef((e,t)=>{const n=Wt(B,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=j(B,e.__scopeDialog);return u.jsx(K,{present:r||a.open,children:a.modal?u.jsx(eo,{...o,ref:t}):u.jsx(to,{...o,ref:t})})});Bt.displayName=B;var eo=i.forwardRef((e,t)=>{const n=j(B,e.__scopeDialog),r=i.useRef(null),o=O(t,n.contentRef,r);return i.useEffect(()=>{const a=r.current;if(a)return qr(a)},[]),u.jsx(Ut,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:M(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:M(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&a.preventDefault()}),onFocusOutside:M(e.onFocusOutside,a=>a.preventDefault())})}),to=i.forwardRef((e,t)=>{const n=j(B,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return u.jsx(Ut,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;n.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ut=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...c}=e,s=j(B,n),f=i.useRef(null),v=O(t,f);return ur(),u.jsxs(u.Fragment,{children:[u.jsx(Ct,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:u.jsx(Me,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ke(s.open),...c,ref:v,onDismiss:()=>s.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(oo,{titleId:s.titleId}),u.jsx(io,{contentRef:f,descriptionId:s.descriptionId})]})]})}),je="DialogTitle",no=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=j(je,n);return u.jsx(P.h2,{id:o.titleId,...r,ref:t})});no.displayName=je;var zt="DialogDescription",ro=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=j(zt,n);return u.jsx(P.p,{id:o.descriptionId,...r,ref:t})});ro.displayName=zt;var $t="DialogClose",Ht=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=j($t,n);return u.jsx(P.button,{type:"button",...r,ref:t,onClick:M(e.onClick,()=>o.onOpenChange(!1))})});Ht.displayName=$t;function ke(e){return e?"open":"closed"}var Gt="DialogTitleWarning",[Eo,Yt]=en(Gt,{contentName:B,titleName:je,docsSlug:"dialog"}),oo=({titleId:e})=>{const t=Yt(Gt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
42
+
43
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
44
+
45
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ao="DialogDescriptionWarning",io=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yt(ao).contentName}}.`;return i.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},so=kt,co=Ft,uo=Vt,lo=Kt,fo=Bt,vo=Ht;function mo({...e}){return u.jsx(so,{"data-slot":"sheet",...e})}function go({...e}){return u.jsx(co,{"data-slot":"sheet-trigger",...e})}function po({...e}){return u.jsx(uo,{"data-slot":"sheet-portal",...e})}function ho({className:e,...t}){return u.jsx(lo,{"data-slot":"sheet-overlay",className:A("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function yo({className:e,children:t,side:n="right",...r}){return u.jsxs(po,{children:[u.jsx(ho,{}),u.jsxs(fo,{"data-slot":"sheet-content",className:A("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,u.jsxs(vo,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[u.jsx(et.XIcon,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}const bo=({navItems:e,LinkComponent:t="a",className:n,...r})=>u.jsxs("header",{className:A(n),...r,children:[u.jsx("nav",{className:"hidden sm:flex sticky top-0 z-10 items-center px-4 h-14",children:u.jsx(qn,{children:u.jsx(Xn,{children:e.map(o=>u.jsx(Zn,{children:u.jsx(er,{asChild:!0,className:Qn(),children:u.jsxs(t,{to:o.url,className:"flex items-center gap-2",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{children:o.title})]})})},o.title))})})}),u.jsx("nav",{className:"flex sm:hidden",children:u.jsxs(mo,{children:[u.jsx(go,{asChild:!0,children:u.jsx(nt,{variant:"ghost",size:"icon",children:u.jsx(et.Menu,{})})}),u.jsx(yo,{side:"top",className:"p-8",children:u.jsx("div",{className:"flex flex-col gap-4",children:e.map(o=>u.jsxs(t,{to:o.url,className:"flex items-center gap-2",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{className:"text-base font-medium",children:o.title})]},o.title))})})]})})]});exports.CustomButton=Jt;exports.MainNav=bo;exports.cn=A;
2
46
  //# sourceMappingURL=index.js.map